Move rofi/bspwm scripts into config/{rofi,bspwm}
This commit is contained in:
parent
712e2ac58d
commit
d923c8c079
|
@ -19,7 +19,20 @@ done
|
|||
if [[ $1 == -r ]]; then
|
||||
resume=1; shift
|
||||
fi
|
||||
url=$@
|
||||
|
||||
url=
|
||||
# Get qutebrowser's current url
|
||||
win=$(xdotool getactivewindow)
|
||||
if [[ -n $win ]]; then
|
||||
winname=$(xdotool getwindowname $win)
|
||||
if [[ $winname =~ " - Mozilla Firefox$" ]]; then
|
||||
url=${winname% - Mozilla*}
|
||||
url=${url##* - }
|
||||
while (( ${#url//[^.]/} > 1 )); do
|
||||
url=${url#*.}
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
LAST_ENTRY_FILE=/tmp/_upm
|
||||
if [[ -n $resume && -f $LAST_ENTRY_FILE ]]; then
|
||||
|
@ -29,7 +42,7 @@ else
|
|||
password_files=( "$prefix"/**/*.gpg )
|
||||
password_files=( "${password_files[@]#"$prefix"/}" )
|
||||
password_files=( "${password_files[@]%.gpg}" )
|
||||
entry=$(printf "%s\n" "${password_files[@]}" | $ROFI_CMD -p "pass > " -filter "$url")
|
||||
entry=$(printf "%s\n" "${password_files[@]}" | $ROFI_CMD -p pass -filter "$url")
|
||||
fi
|
||||
|
||||
if [[ -z $entry ]]; then
|
||||
|
@ -47,7 +60,7 @@ if [[ -n $secrets ]]; then
|
|||
otp) printf "%s" "$(pass otp -c "$entry")" ;;
|
||||
*) printf "%s" "$(awk -v "key=$field:" '$1 == key {print $2}' <<<"$secrets")" | xclip -selection clipboard -in ;;
|
||||
esac
|
||||
notify-send --urgency=low "<b>$entry -> $field</b>" "Copied to clipboard for 45s"
|
||||
notify-send --urgency=low "<b>$entry/$field</b>" "Copied to clipboard for 45s"
|
||||
else
|
||||
notify-send --urgency=critical "Failed to retrieve $entry"
|
||||
exit 2
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
export PATH="$XDG_CONFIG_HOME/rofi/bin:$PATH"
|
|
@ -12,10 +12,10 @@ super + apostrophe
|
|||
|
||||
# focus/swap the node in the given direction
|
||||
super + {_,ctrl +}{h,j,k,l}
|
||||
~/.dotfiles/bin/bspc/focus {_,-m }{west,south,north,east}
|
||||
bspc-focus {_,-m }{west,south,north,east}
|
||||
|
||||
super + shift + {_,ctrl +}{h,j,k,l}
|
||||
~/.dotfiles/bin/bspc/swap {_,-m }{west,south,north,east}
|
||||
bspc-swap {_,-m }{west,south,north,east}
|
||||
|
||||
super + {_,shift +}{1-9,0}
|
||||
bspc {desktop -f,node -d} {1-9,10}
|
||||
|
@ -30,13 +30,13 @@ super + shift + grave
|
|||
emacsclient -e '(open-scratch-frame)'
|
||||
|
||||
super + space
|
||||
~/.config/rofi/bin/appmenu
|
||||
rofi-appmenu
|
||||
|
||||
super + Tab
|
||||
~/.config/rofi/bin/windowmenu
|
||||
rofi-windowmenu
|
||||
|
||||
super + backslash
|
||||
~/.config/rofi/bin/passmenu
|
||||
rofi-passmenu
|
||||
|
||||
super + Escape
|
||||
pkill -USR1 -x sxhkd
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
for dir in $XDG_CONFIG_HOME/*/bin(N); do
|
||||
export PATH="$dir:$PATH"
|
||||
done
|
||||
|
||||
for file in $XDG_CONFIG_HOME/zsh/rc.d/env.*.zsh(N); do
|
||||
source $file
|
||||
done
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
name = "browsermenu";
|
||||
desktopName = "Open Bookmark in Firefox";
|
||||
icon = "firefox";
|
||||
exec = "/home/hlissner/.config/rofi/bin/browsermenu";
|
||||
exec = "rofi-browsermenu";
|
||||
categories = "Network";
|
||||
})
|
||||
];
|
||||
|
@ -24,6 +24,5 @@
|
|||
home-manager.users.hlissner.xdg.configFile = {
|
||||
# link recursively so other modules can link files in its folder
|
||||
"rofi" = { source = <config/rofi>; recursive = true; };
|
||||
"zsh/rc.d/env.rofi.zsh".source = <config/rofi/env.zsh>;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue