This repository has been archived on 2024-03-04. You can view files and clone it, but cannot push or open issues or pull requests.
linux/.config/bash/module/File.sh

24 lines
526 B
Bash
Raw Normal View History

2023-12-07 00:42:06 +03:00
# Open file/dir in GUI.
# Usage: o <FILE>
2023-12-07 01:44:42 +03:00
function o() {
2023-12-07 00:42:06 +03:00
xdg-open "${@}"
}
2024-01-15 15:55:58 +03:00
# Play media file from CLI. All files by default.
# Usage: play [FILE]
function play() {
2024-01-15 15:55:58 +03:00
local targets=${*}
[[ "${targets}" = "" ]] && targets=$(_ls_file)
2024-02-07 17:06:39 +03:00
flatpak run io.mpv.Mpv --no-video ${targets}
}
# Play media files shuffled from CLI. All files by default.
# Usage: play_shuffle [FILE]
function play_shuffle() {
local targets=${*}
[[ "${targets}" = "" ]] && targets=$(_ls_file)
flatpak run io.mpv.Mpv --no-video --shuffle ${targets}
}