From cc5e93bee05cb86c157ee19c5a3397c6238a4fd2 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Tue, 28 Mar 2023 09:45:16 +0200 Subject: [PATCH] cleanup --- .config/mpv/scripts/modules.lua | 3 --- .config/shell/profile | 4 ++-- .local/bin/dmenumaim | 7 ++++--- .local/bin/statusbar/sb-internet | 2 +- .local/bin/statusbar/sb-playerctl | 6 +++--- 5 files changed, 10 insertions(+), 12 deletions(-) delete mode 100644 .config/mpv/scripts/modules.lua diff --git a/.config/mpv/scripts/modules.lua b/.config/mpv/scripts/modules.lua deleted file mode 100644 index 703f372dd..000000000 --- a/.config/mpv/scripts/modules.lua +++ /dev/null @@ -1,3 +0,0 @@ -local mpv_config_dir_path = require("mp").command_native({"expand-path", "~~/"}) -function load(relative_path) dofile(mpv_config_dir_path .. "/script_modules/" .. relative_path) end -load("mpvSockets/mpvSockets.lua") diff --git a/.config/shell/profile b/.config/shell/profile index d8006e7fd..8145192a8 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -2,9 +2,9 @@ # profile file. Runs on login. Environmental variables are set here. -# Adds `~/.local/bin` to $PATH localpath="$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')" -export PATH="$PATH:~/.local/share/npm-global/bin:$localpath" +export PATH="$PATH:$HOME/.local/share/npm-global/bin:$localpath" +export FPATH="$FPATH:$HOME/.local/share/zsh/functions:$HOME/.local/share/zsh/site-functions" # Default programs: export EDITOR="nvim" diff --git a/.local/bin/dmenumaim b/.local/bin/dmenumaim index 9e1639ea6..1814c5d9b 100755 --- a/.local/bin/dmenumaim +++ b/.local/bin/dmenumaim @@ -3,13 +3,14 @@ # this script provides a menu of screenshot options, using maim # variables +dir=$XDG_PICTURES_DIR output="$(date '+%y%m%d-%H%M-%S').png" xclip_cmd="xclip -sel clip -t image/png" case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in -"a selected area") maim -s pic-selected-"${output}" ;; -"current window") maim -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${output}" ;; -"full screen") maim -q -d 0.2 pic-full-"${output}" ;; +"a selected area") maim -s "$dir/pic-selected-${output}" ;; +"current window") maim -q -d 0.2 -i "$(xdotool getactivewindow)" "$dir/pic-window-${output}" ;; +"full screen") maim -q -d 0.2 "$dir/pic-full-${output}" ;; "a selected area (copy)") maim -s | ${xclip_cmd} ;; "current window (copy)") maim -q -d 0.2 -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;; "full screen (copy)") maim -q -d 0.2 | ${xclip_cmd} ;; diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet index 18ee96ff6..e37c04141 100755 --- a/.local/bin/statusbar/sb-internet +++ b/.local/bin/statusbar/sb-internet @@ -13,7 +13,7 @@ fi if ls /sys/class/net/e*/operstate 1>/dev/null 2>&1; then for e in /sys/class/net/e*/operstate; do if_icon="$(sed "s/down//;s/up//" $e)" - printf "$shift\033[10m%s\033[10m" "$if_icon" + printf "$shift\033[11m%s\033[10m" "$if_icon" shift=" " done fi diff --git a/.local/bin/statusbar/sb-playerctl b/.local/bin/statusbar/sb-playerctl index 48bd39dea..6d72f3648 100755 --- a/.local/bin/statusbar/sb-playerctl +++ b/.local/bin/statusbar/sb-playerctl @@ -4,10 +4,10 @@ big="\033[11m" reset="\033[10m" pidof -x sbd-playerctl >/dev/null 2>&1 || sbd-playerctl >/dev/null 2>&1 & -[ "$(playerctl status 2>&1)" = "No players found" ] && echo -e "$bigﱙ$reset" && exit 1 +[ "$(playerctl status 2>&1)" = "No players found" ] && echo "$bigﱙ$reset" && exit 1 # song="$(playerctl metadata xesam:artist) - $(playerctl metadata xesam:title)" song="$(playerctl metadata xesam:title) - $(playerctl metadata xesam:artist)" [ ${#song} -gt 35 ] && song="$(printf %.35s "$song")…" -icon="$(playerctl status | sed "s/Playing//;s/Paused//;")" -echo -e "$big$icon$reset $song" +icon="$(playerctl status | sed "s/Playing//;s/Paused//;s/Stopped/ﱙ/;")" +echo "$big$icon$reset $song"