summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradam <56338480+adastx@users.noreply.github.com>2022-11-05 18:53:30 +0100
committeradam <56338480+adastx@users.noreply.github.com>2022-11-05 18:53:30 +0100
commit48ec52b47674cd8767ebacfb4d0b9b9c846c7446 (patch)
tree810c32e69069c7b09faf058c4f1e0818ede5ea7c
parent145ab8f0429030edcdc86f48277508720345d167 (diff)
fixed some bindings, switched from rofi to dmenu
-rw-r--r--.bash_profile1
-rw-r--r--.config/sxhkd/sxhkdrc18
-rwxr-xr-x.local/bin/dmenu/dm-pass24
-rwxr-xr-x.local/bin/dmenu/dm-power11
4 files changed, 44 insertions, 10 deletions
diff --git a/.bash_profile b/.bash_profile
index 17750b4..ecaad9a 100644
--- a/.bash_profile
+++ b/.bash_profile
@@ -26,7 +26,6 @@ export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswi
export SSB_HOME="$XDG_DATA_HOME"/zoom
export WGETRC="$XDG_CONFIG_HOME/wgetrc"
export PYTHONSTARTUP="${XDG_CONFIG_HOME}/python/pythonrc"
-export CM_LAUNCHER=rofi
export CM_SELECTIONS=clipboard
export CM_DIR=/tmp
export PF_INFO="ascii title os kernel uptime pkgs memory"
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc
index 525478e..d05128d 100644
--- a/.config/sxhkd/sxhkdrc
+++ b/.config/sxhkd/sxhkdrc
@@ -5,16 +5,16 @@ super + shift + r
i3-msg restart
super + shift + p
- rofi -show p -modi "p:rofi-power-menu --choices=shutdown/reboot/suspend/logout --confirm="
+ $HOME/.local/bin/dmenu/dm-power
super + Escape
systemctl suspend
super + Return
- alacritty
+ i3-msg exec alacritty
super + b
- firefox
+ i3-msg exec firefox
super + f
i3-msg fullscreen toggle
@@ -32,16 +32,16 @@ super + shift + c
$HOME/.local/bin/comptoggle
super + d
- rofi -show drun -show-icons -drun-display-format \{name\}
-
-alt + Tab
- rofi -show window -show-icons -drun-display-format \{name\}
+ dmenu_run -p 'Run:' -b -i -fn 'JetBrainsMono NerdFont:size=11'
alt + b
- clipmenu -i -p clipmenu
+ clipmenu -p 'Clipboard:' -b -i -fn 'JetBrainsMono NerdFont:size=11'
super + p
- rofi-pass
+ $HOME/.local/bin/dmenu/dm-pass
+
+super + m
+ i3-msg exec "alacritty -e pulsemixer"
XF86AudioRaiseVolume
pamixer -i 5
diff --git a/.local/bin/dmenu/dm-pass b/.local/bin/dmenu/dm-pass
new file mode 100755
index 0000000..5420549
--- /dev/null
+++ b/.local/bin/dmenu/dm-pass
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+DMENU_CMD="dmenu -p 'Pass:' -b -i -fn 'JetBrainsMono Nerd Font:size=11'"
+
+entry=$(find "$PASSWORD_STORE_DIR" -name '*.gpg' |\
+ sed "s|$PASSWORD_STORE_DIR/||" |\
+ sed "s|.gpg||" |\
+ sort -n |\
+ eval "$DMENU_CMD") || exit 1
+
+details=$(pass "$entry") || exit 1
+user=$(echo "$details" | sed -n '2p' | sed 's|user: ||')
+pass=$(echo "$details" | head -n1)
+
+case "$(printf "autotype\npass\nuser" | eval "$DMENU_CMD")" in
+ autotype)
+ xdotool type "$user"
+ xdotool key Tab
+ xdotool type "$pass" ;;
+ pass)
+ xdotool type "$pass" ;;
+ user)
+ xdotool type "$user" ;;
+esac
diff --git a/.local/bin/dmenu/dm-power b/.local/bin/dmenu/dm-power
new file mode 100755
index 0000000..77bcfd9
--- /dev/null
+++ b/.local/bin/dmenu/dm-power
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+case "$(printf "Shutdown\nRestart\nLogout\nSuspend\nLock" | dmenu \
+ -fn 'JetBrainsMono NerdFont:size=11' -i \
+ -b -p 'Power:')" in
+ Shutdown) exec systemctl poweroff;;
+ Restart) exec systemctl reboot;;
+ Logout) kill -HUP "$XDG_SESSION_PID";;
+ Suspend) exec systemctl suspend;;
+ Lock) exec systemctl --user start lock.target;;
+esac