This commit is contained in:
krolyxon 2022-07-07 11:21:15 +05:30
parent f7c99ee109
commit a362b34172
3 changed files with 29 additions and 0 deletions

View File

@ -96,4 +96,5 @@ map gp cd ~/pix
map gc cd ~/.config map gc cd ~/.config
map gr cd ~/code/repos map gr cd ~/code/repos
map gv cd ~/vids/ map gv cd ~/vids/
map gm cd ~/media/movies
map gs cd ~/.local/bin map gs cd ~/.local/bin

12
.local/bin/metadata Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
if [ -z "$*" ]; then
input_file=$(fzf)
else
input_file=$*
fi
read -p "Title: " title
read -p "Artist: " artist
read -p "album: " album
output_name="metadata-$input_file"
ffmpeg -i "$input_file" -metadata title="$title" -metadata artist="$artist" -metadata album="$album" -c copy "$output_name"
mv -f "$output_name" "$input_file"

16
.local/bin/system_action Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
case "$(readlink -f /sbin/init)" in
*systemd*) ctl='systemctl' ;;
*) ctl='loginctl' ;;
esac
case "$(printf " lock\n display off\n logout\n sleep\n reboot\n shutdown" | dmenu -i -p '>_ ')" in
' lock') slock ;;
' display off') xset dpms force off ;;
' logout') kill -TERM "$(pgrep -u "$USER" "\bdwm$")" ;;
' sleep') slock $ctl suspend ;;
' reboot') $ctl reboot ;;
' shutdown') $ctl poweroff ;;
*) exit 1 ;;
esac