dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README

commit 5650fd500c0e98eb6e66bba84c2ec9c40aa83fd9
parent ef2cc0b46d6b112b21ffe880d0db8b025be0879e
Author: Pablo Cárdenas <pablo.cardenas@imca.edu.pe>
Date:   Wed, 17 Jul 2024 20:47:09 -0500

bspwm: Added config scratchpad

Diffstat:
M.config/bspwm/bspwmrc | 1+
M.config/sxhkd/sxhkdrc | 6++++++
A.local/bin/status.sh | 15+++++++++++++++
3 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc @@ -19,6 +19,7 @@ bspc rule -a latexocr state=floating bspc rule -a R_x11 state=floating bspc rule -a Screenkey manage=off bspc rule -a st-256color state=pseudo_tiled +bspc rule -a st-256color:*:watch state=floating bspc rule -a URxvt state=pseudo_tiled bspc rule -a Zathura state=tiled bspc rule -a qutebrowser locked=on diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc @@ -126,3 +126,9 @@ super + {Left,Down,Up,Right} super + minus ~/.local/bin/scratchpad.sh + +# +# Status +# +super + equal + ~/.local/bin/status.sh diff --git a/.local/bin/status.sh b/.local/bin/status.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +winid=$(xdotool search --name watch) +visible_winid=$(xdotool search --onlyvisible --name watch) + + +if [ -z "${winid}" ]; then + nohup st -t watch -e bash -c 'while true; do watch --interval 60 --chgexit ". ~/.config/shell/functions.sh; wm_status"; notify-send "Status changed"; done' >/dev/null 2>/dev/null </dev/null & +else + if [ -z "${visible_winid}" ]; then + xdo show "${winid}" + else + xdo hide "${winid}" + fi +fi