From 6e968354e4f9cad9f94b592e61a09b17a8e06210 Mon Sep 17 00:00:00 2001 From: xAlpharax <42233094+xAlpharax@users.noreply.github.com> Date: Fri, 7 Mar 2025 00:22:08 +0200 Subject: Great new changes to X11, allacrity(just for testing), btop, nsxiv (added key exec handler), nvim, tmux niceness, zathura configuration massive zsh improvements. Overall a solid update, install script is still dead tho. REGARDLESS: Changes to be committed: modified: X11/xinit new file: alacritty/alacritty.toml modified: btop/btop.conf new file: nsxiv/exec/key-handler modified: nvim/init.vim new file: sxiv modified: tmux/tmux.conf modified: zathura/zathurarc modified: zsh/aliases modified: zsh/env modified: zsh/zshrc --- nsxiv/exec/key-handler | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 nsxiv/exec/key-handler (limited to 'nsxiv/exec') diff --git a/nsxiv/exec/key-handler b/nsxiv/exec/key-handler new file mode 100755 index 0000000..0875061 --- /dev/null +++ b/nsxiv/exec/key-handler @@ -0,0 +1,52 @@ +#!/bin/sh + +# you use these inside nsxiv with Ctrl+x and then the key for an action + +# w: set as wallpaper +# c: copy File +# m: move file +# r: rotate 90 degrees +# R: rotate -90 degrees +# f: flip +# y: copy file path to clipboard +# Y: copy file path to clipboard with full path +# d: delete File +# g: open with gimp +# k: open with krita +# i: show file information + +dmenu_config=$(bash ~/.config/dmenu.conf) + +while read -r file +do +case "$1" in + "w") feh --bg-fill --no-fehbg "$file" & ;; + "c") + [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | $dmenu_config -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit + cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & + ;; + "m") + [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | $dmenu_config -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit + mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & + ;; + "r") + magick "$file" -rotate 90 "$file" ;; + "R") + magick "$file" -rotate -90 "$file" ;; + "f") + magick "$file" -flop "$file" ;; + "y") + printf "%s" "$file" | tr -d '\n' | xclip -selection clipboard && + notify-send "$file copied to clipboard" & ;; + "Y") + readlink -f "$file" | tr -d '\n' | xclip -selection clipboard && + notify-send "$(readlink -f "$file") copied to clipboard" & ;; + "d") + [ "$(printf "No\\nYes" | $dmenu_config -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;; + "g") setsid -f gimp "$file" ;; + "k") setsid -f krita "$file" ;; + "i") notify-send "File information" "$(mediainfo "$file" | sed "s/[ ]\+:/:/g;s/: /: /;s/$/<\/b>/" | grep "")" ;; +esac +done -- cgit v1.2.3