Compare commits
1 Commits
45a07c0e06
...
cc50dbb368
Author | SHA1 | Date |
---|---|---|
coolneng | cc50dbb368 |
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
select_action() {
|
||||||
|
action_content=(
|
||||||
|
"System resources usage"
|
||||||
|
"Connectivity test"
|
||||||
|
"Kill emacs"
|
||||||
|
)
|
||||||
|
action=$(printf '%s\n' "${action_content[@]}" | rofi -no-auto-select -i "$@" -dmenu -p "Choose an action")
|
||||||
|
execute_action "$action"
|
||||||
|
}
|
||||||
|
|
||||||
|
launch_kitty() {
|
||||||
|
bash -c "kitty --class popup -- $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
execute_action() {
|
||||||
|
case "$1" in
|
||||||
|
"System resources usage") launch_kitty "htop" ;;
|
||||||
|
"Connectivity test") launch_kitty "ping -c 2 freebsd.org" ;;
|
||||||
|
"Kill emacs") launch_kitty "pkill emacs" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
select_action
|
|
@ -247,7 +247,7 @@ exec_always {
|
||||||
# Enable floating windows
|
# Enable floating windows
|
||||||
for_window [app_id="mpv"] floating enable
|
for_window [app_id="mpv"] floating enable
|
||||||
for_window [app_id="imv"] floating enable
|
for_window [app_id="imv"] floating enable
|
||||||
for_window [app_id="htop"] floating enable, resize set 1280 720
|
for_window [app_id="popup"] floating enable, resize set 1280 720
|
||||||
# Resize zathura to 70% in tiling mode
|
# Resize zathura to 70% in tiling mode
|
||||||
for_window [app_id="org.pwmt.zathura" workspace=$workspace4] resize set width 70 ppt
|
for_window [app_id="org.pwmt.zathura" workspace=$workspace4] resize set width 70 ppt
|
||||||
# Split windows vertically
|
# Split windows vertically
|
||||||
|
@ -281,8 +281,8 @@ bindsym Print exec grim
|
||||||
bindsym Shift+Print exec slurp | grim -g - - | wl-copy
|
bindsym Shift+Print exec slurp | grim -g - - | wl-copy
|
||||||
# find PDFs with rofi
|
# find PDFs with rofi
|
||||||
bindsym $mod+f exec ~/.local/share/scripts/finder
|
bindsym $mod+f exec ~/.local/share/scripts/finder
|
||||||
# temporary floating htop
|
# temporary popup window selection
|
||||||
bindsym $mod+Shift+h exec kitty --class htop -- htop
|
bindsym $mod+Shift+h exec ~/.local/share/scripts/popup-window
|
||||||
# power menu
|
# power menu
|
||||||
bindsym $mod+Shift+p mode "$Pause-break"
|
bindsym $mod+Shift+p mode "$Pause-break"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue