summaryrefslogtreecommitdiffstats
path: root/bspwm/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bspwm/.local/bin')
-rwxr-xr-xbspwm/.local/bin/panel30
-rwxr-xr-xbspwm/.local/bin/panel_bar74
-rw-r--r--bspwm/.local/bin/panel_colors29
-rwxr-xr-xbspwm/.local/bin/spk-icon5
-rwxr-xr-xbspwm/.local/bin/toggle_tray16
5 files changed, 16 insertions, 138 deletions
diff --git a/bspwm/.local/bin/panel b/bspwm/.local/bin/panel
deleted file mode 100755
index f04841b..0000000
--- a/bspwm/.local/bin/panel
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /bin/sh
-
-if [ $(pgrep -cx panel) -gt 1 ] ; then
- printf "%s\n" "The panel is already running." >&2
- exit 1
-fi
-
-trap 'trap - TERM; kill 0' INT TERM QUIT EXIT
-
-[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
-mkfifo "$PANEL_FIFO"
-
-bspc config top_padding $PANEL_HEIGHT
-bspc control --subscribe > "$PANEL_FIFO" &
-#xtitle -sf 'T%s' > "$PANEL_FIFO" &
-#clock -sf 'S%a %H:%M' > "$PANEL_FIFO" &
-
-pamixer --get-volume > /tmp/volinfo
-if $(pamixer --get-mute) ; then
- echo ⮝ > /tmp/spkicon
-else
- echo ⮟ > /tmp/spkicon
-fi
-conky > "$PANEL_FIFO" &
-
-. panel_colors
-
-cat "$PANEL_FIFO" | panel_bar | bar-aint-recursive -g x$PANEL_HEIGHT -f "$PANEL_FONT_FAMILY1","$PANEL_FONT_FAMILY2","$PANEL_FONT_FAMILY3" -F "$COLOR_FOREGROUND" -B "$COLOR_BACKGROUND" &
-
-wait
diff --git a/bspwm/.local/bin/panel_bar b/bspwm/.local/bin/panel_bar
deleted file mode 100755
index 2ad2f15..0000000
--- a/bspwm/.local/bin/panel_bar
+++ /dev/null
@@ -1,74 +0,0 @@
-#! /bin/sh
-#
-# Example panel for LemonBoy's bar
-
-. panel_colors
-
-num_mon=$(bspc query -M | wc -l)
-
-while read -r line ; do
- case $line in
- S*)
- # clock output
- sys_infos="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${line#?} %{B-}%{F-}"
- ;;
- T*)
- # xtitle output
- title="%{F$COLOR_TITLE_FG}%{B$COLOR_TITLE_BG} ${line#?} %{B-}%{F-}"
- ;;
- W*)
- # bspwm internal state
- wm_infos=""
- IFS=':'
- set -- ${line#?}
- while [ $# -gt 0 ] ; do
- item=$1
- name=${item#?}
- case $item in
- M*)
- # active monitor
- if [ $num_mon -gt 1 ] ; then
- wm_infos="$wm_infos %{F$COLOR_ACTIVE_MONITOR_FG}%{B$COLOR_ACTIVE_MONITOR_BG} ${name} %{B-}%{F-} "
- fi
- ;;
- m*)
- # inactive monitor
- if [ $num_mon -gt 1 ] ; then
- wm_infos="$wm_infos %{F$COLOR_INACTIVE_MONITOR_FG}%{B$COLOR_INACTIVE_MONITOR_BG} ${name} %{B-}%{F-} "
- fi
- ;;
- O*)
- # focused occupied desktop
- wm_infos="${wm_infos}%{F$COLOR_FOCUSED_OCCUPIED_FG}%{B$COLOR_FOCUSED_OCCUPIED_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
- ;;
- F*)
- # focused free desktop
- wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FREE_FG}%{B$COLOR_FOCUSED_FREE_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
- ;;
- U*)
- # focused urgent desktop
- wm_infos="${wm_infos}%{F$COLOR_FOCUSED_URGENT_FG}%{B$COLOR_FOCUSED_URGENT_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
- ;;
- o*)
- # occupied desktop
- wm_infos="${wm_infos}%{F$COLOR_OCCUPIED_FG}%{B$COLOR_OCCUPIED_BG} ${name} %{B-}%{F-}"
- ;;
- f*)
- # free desktop
- wm_infos="${wm_infos}%{F$COLOR_FREE_FG}%{B$COLOR_FREE_BG} ${name} %{B-}%{F-}"
- ;;
- u*)
- # urgent desktop
- wm_infos="${wm_infos}%{F$COLOR_URGENT_FG}%{B$COLOR_URGENT_BG} ${name} %{B-}%{F-}"
- ;;
- L*)
- # layout
- # wm_infos="$wm_infos %{F$COLOR_LAYOUT_FG}%{B$COLOR_LAYOUT_BG} ${name} %{B-}%{F-}"
- ;;
- esac
- shift
- done
- ;;
- esac
- printf "%s\n" "%{l}${wm_infos}%{c}${title}%{r}${sys_infos}"
-done
diff --git a/bspwm/.local/bin/panel_colors b/bspwm/.local/bin/panel_colors
deleted file mode 100644
index 6327864..0000000
--- a/bspwm/.local/bin/panel_colors
+++ /dev/null
@@ -1,29 +0,0 @@
-COLOR_FOREGROUND='#FFffffff'
-COLOR_BACKGROUND='#FF1d1f21'
-COLOR_ACTIVE_MONITOR_FG='#FF1d1f21'
-COLOR_ACTIVE_MONITOR_BG='#FFcc6666'
-COLOR_INACTIVE_MONITOR_FG='#FFffffff'
-COLOR_INACTIVE_MONITOR_BG='#FF1d1f21'
-COLOR_FOCUSED_OCCUPIED_FG='#FFffffff'
-COLOR_FOCUSED_OCCUPIED_BG='#FF373b41'
-COLOR_FOCUSED_OCCUPIED_UL='#FFbcbac2'
-COLOR_FOCUSED_FREE_FG='#FFffffff'
-COLOR_FOCUSED_FREE_BG='#FF1d1f21'
-COLOR_FOCUSED_FREE_UL='#FFa39e98'
-COLOR_FOCUSED_URGENT_FG='white'
-COLOR_FOCUSED_URGENT_BG='#FFF9A299'
-COLOR_FOCUSED_URGENT_UL='white'
-COLOR_OCCUPIED_FG='#FFffffff'
-COLOR_OCCUPIED_BG='#FF1d1f21'
-#COLOR_FREE_FG='#FF6F7277'
-COLOR_FREE_FG='#FF969896'
-COLOR_FREE_BG='#FF1d1f21'
-COLOR_URGENT_FG='#FFF9A299'
-COLOR_URGENT_BG='#FF1d1f21'
-COLOR_LAYOUT_FG='#FFffffff'
-COLOR_LAYOUT_BG='#FF1d1f21'
-COLOR_TITLE_FG='#FFffffff'
-COLOR_TITLE_BG='#FF1d1f21'
-COLOR_STATUS_FG='#FFffffff'
-COLOR_STATUS_BG='#FF1d1f21'
-COLOR_STATUS_IC='#FFcc6666'
diff --git a/bspwm/.local/bin/spk-icon b/bspwm/.local/bin/spk-icon
deleted file mode 100755
index 10a2e7c..0000000
--- a/bspwm/.local/bin/spk-icon
+++ /dev/null
@@ -1,5 +0,0 @@
-if $(pamixer --get-mute) ; then
-echo ⮝
-else
-cat /tmp/spkicon
-fi
diff --git a/bspwm/.local/bin/toggle_tray b/bspwm/.local/bin/toggle_tray
new file mode 100755
index 0000000..c081995
--- /dev/null
+++ b/bspwm/.local/bin/toggle_tray
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# from https://github.com/kallith/Dotfiles
+
+if [ $(pgrep -cf stalonetray) -gt 0 ]; then
+ wid=$(xdotool search --class stalonetray)
+ if [ "$(xdotool search --onlyvisible --class stalonetray)" != "" ]; then
+ xdotool windowunmap $wid
+ else
+ xdotool windowmap $wid
+ xdotool windowraise $wid
+ fi
+else
+ xdotool search --class stalonetray
+ stalonetray
+fi