From 8a0e52ab03e15dd88f9da63b3f73670ed3f6549c Mon Sep 17 00:00:00 2001 From: JaeYoo-Im Date: Wed, 19 Mar 2025 16:26:05 +0900 Subject: [PATCH] bspwm : add scratch pad --- .config/bspwm/bspwmrc | 1 + .config/sxhkd/sxhkdrc | 2 ++ scripts/scpad | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100755 scripts/scpad diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index 6f6f371..7241bdd 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -70,6 +70,7 @@ bspc config normal_private_border_color "$color1" bspc rule -a Emacs state=tiled # bspc rule -a \* state=tiled +bspc rule -a scpad sticky=on state=floating rectangle=1400x600+660+40 # TODO heres polybar if [[ $JUPCID == "HOME-DESKTOP" ]]; then diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 85328c0..14deba5 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -2,6 +2,8 @@ super+Return alacritty +super+shift+Return + ~/scripts/scpad #Apps and programs super+e emacsclient -c -a 'emacs' diff --git a/scripts/scpad b/scripts/scpad new file mode 100755 index 0000000..aeaa161 --- /dev/null +++ b/scripts/scpad @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +winclass="$(xdotool search --class scpad)"; + +if [ -z "$winclass" ]; then + alacritty --class scpad +else + if [ ! -f /tmp/scpad ]; then + touch /tmp/scpad && xdo hide "$winclass" + elif [ -f /tmp/scpad ]; then + rm /tmp/scpad && xdo show "$winclass" + fi +fi + + + + +