dotfiles-x11a362b34
stuff
+29 −0
3 files changed
- M .config/lf/lfrc +1 −0
- A .local/bin/metadata +12 −0
- A .local/bin/system_action +16 −0
| @@ -96,4 +96,5 @@ map gp cd ~/pix | |||
| 96 | 96 | map gc cd ~/.config | |
| 97 | 97 | map gr cd ~/code/repos | |
| 98 | 98 | map gv cd ~/vids/ | |
| 99 | + | map gm cd ~/media/movies | |
| 99 | 100 | map gs cd ~/.local/bin | |
| @@ -0,0 +1,12 @@ | |||
| 1 | + | #!/bin/sh | |
| 2 | + | if [ -z "$*" ]; then | |
| 3 | + | input_file=$(fzf) | |
| 4 | + | else | |
| 5 | + | input_file=$* | |
| 6 | + | fi | |
| 7 | + | read -p "Title: " title | |
| 8 | + | read -p "Artist: " artist | |
| 9 | + | read -p "album: " album | |
| 10 | + | output_name="metadata-$input_file" | |
| 11 | + | ffmpeg -i "$input_file" -metadata title="$title" -metadata artist="$artist" -metadata album="$album" -c copy "$output_name" | |
| 12 | + | mv -f "$output_name" "$input_file" | |
| @@ -0,0 +1,16 @@ | |||
| 1 | + | #!/bin/sh | |
| 2 | + | ||
| 3 | + | case "$(readlink -f /sbin/init)" in | |
| 4 | + | *systemd*) ctl='systemctl' ;; | |
| 5 | + | *) ctl='loginctl' ;; | |
| 6 | + | esac | |
| 7 | + | ||
| 8 | + | case "$(printf " lock\n display off\n logout\n sleep\n reboot\n shutdown" | dmenu -i -p '>_ ')" in | |
| 9 | + | ' lock') slock ;; | |
| 10 | + | ' display off') xset dpms force off ;; | |
| 11 | + | ' logout') kill -TERM "$(pgrep -u "$USER" "\bdwm$")" ;; | |
| 12 | + | ' sleep') slock $ctl suspend ;; | |
| 13 | + | ' reboot') $ctl reboot ;; | |
| 14 | + | ' shutdown') $ctl poweroff ;; | |
| 15 | + | *) exit 1 ;; | |
| 16 | + | esac | |