nix/home/program/bash/module/File.nix

33 lines
627 B
Nix
Raw Normal View History

2024-04-06 03:03:58 +03:00
{ ... }: {
text = ''
# Open file/dir in GUI.
2024-10-04 12:08:23 +03:00
# Usage: o <FILE>
function o() {
2024-04-06 03:03:58 +03:00
xdg-open "''${@}"
}
# Play media file from CLI. All files by default.
# Usage: play [FILE]
function play() {
local targets=''${*}
[[ "''${targets}" = "" ]] && targets=$(_ls_file)
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)
mpv --no-video --shuffle ''${targets}
}
2024-04-16 23:19:40 +03:00
# Open files app.
function files() {
nautilus
}
2024-04-06 03:03:58 +03:00
'';
}