diff options
author | David Robillard <d@drobilla.net> | 2017-04-07 07:21:02 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-04-07 07:21:02 +0200 |
commit | e377720babb55531ad0419602931d12d4138fa92 (patch) | |
tree | 2dd1440460185024e4ab39e055196cfca4bc251c /bspwm | |
parent | 678787151a3e770c736670e96ae8c3cf4efce362 (diff) | |
download | dotfiles-e377720babb55531ad0419602931d12d4138fa92.tar.gz dotfiles-e377720babb55531ad0419602931d12d4138fa92.tar.bz2 dotfiles-e377720babb55531ad0419602931d12d4138fa92.zip |
Define palette as customizable variables
Diffstat (limited to 'bspwm')
-rwxr-xr-x | bspwm/bspwmrc | 17 | ||||
-rwxr-xr-x | bspwm/panel | 2 | ||||
-rwxr-xr-x | bspwm/panel_bar | 26 |
3 files changed, 23 insertions, 22 deletions
diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc index efeb927..2e02ac8 100755 --- a/bspwm/bspwmrc +++ b/bspwm/bspwmrc @@ -1,11 +1,12 @@ #! /bin/sh export PANEL_FIFO=/home/drobilla/bspwmpanel.fifo -export PANEL_HEIGHT=18 -export PANEL_FONT="DejaVu Sans Mono-11" -export TRAY_HEIGHT=16 +export PANEL_HEIGHT=48 +export PANEL_FONT="DejaVu Sans Mono-16" +export TRAY_HEIGHT=28 export SCREEN_WIDTH="$(xrandr | grep '*' | sed 's/ *\([0-9]*\)x.*/\1/')" -export TRAY_X="$(echo "$SCREEN_WIDTH - 550" | bc)" +export TRAY_X="$(echo "$SCREEN_WIDTH - 300" | bc)" +export TRAY_Y=4 bspc config border_width 2 bspc config window_gap 12 @@ -22,8 +23,8 @@ bspc config focus_follows_pointer true bspc monitor -d 1 2 3 4 5 6 7 8 9 -xsetroot -solid "#000" +hsetroot -solid "#000" sxhkd & -~/.config/bspwm/panel & -stalonetray -bg "#000" --geometry "1x1+$TRAY_X+2" --grow-gravity E -i $TRAY_HEIGHT & -xdotool search --classname stalonetray windowraise +#~/.config/bspwm/panel & +#stalonetray -bg "#000" --geometry "1x1+$TRAY_X+$TRAY_Y" --grow-gravity E -i $TRAY_HEIGHT & +#xdotool search --classname stalonetray windowraise diff --git a/bspwm/panel b/bspwm/panel index 4b22b0f..ca1ae02 100755 --- a/bspwm/panel +++ b/bspwm/panel @@ -42,7 +42,7 @@ bspc control --subscribe > "$PANEL_FIFO" & xtitle -sf 'T%s' > "$PANEL_FIFO" & clock -sf 'S%a %Y-%m-%d %H:%M' > "$PANEL_FIFO" & LC_TIME=en_DK.UTF-8 mpstat 1 | stdbuf -oL tail -n +4 | stdbuf -oL awk '$12 ~ /[0-9.]+/ { printf "L%3d\n", 100 - $12 }' > "$PANEL_FIFO" & -free -m -s 1 | stdbuf -oL awk '/^Mem:.*/ { printf "M%02d%%\n", ($3 - $6 - $7) / $2 * 100 }' > "$PANEL_FIFO" & +free -m -s 1 | stdbuf -oL awk '/^Mem:.*/ { printf "M%02d%%\n", $3 / $2 * 100 }' > "$PANEL_FIFO" & iostat -y -d 1 | stdbuf -oL awk '/Device.*/ { printf("\nI"); next } /^[0-9a-z]* / { printf " %s %04.0f↓ %04.0f↑", $1, $3, $4 } END { printf "\n" }' > "$PANEL_FIFO" & # Battery diff --git a/bspwm/panel_bar b/bspwm/panel_bar index 72e7629..bf0fc6d 100755 --- a/bspwm/panel_bar +++ b/bspwm/panel_bar @@ -18,24 +18,24 @@ while read -r line ; do # IO io_info="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG}${line#?}%{B-}%{F-}" ;; - B*) - # Battery - bat_info="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${line#?} %{B-}%{F-}" + B*) + # Battery + bat_info="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG}${line#?}%{B-}%{F-}" ;; - C*) - # CPU temperature + C*) + # CPU temperature temp_info="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG}${line#?}°%{B-}%{F-}" ;; - L*) - # CPU load + L*) + # CPU load load_info="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG}${line#?}%%{B-}%{F-}" ;; - M*) - # Memory usage + M*) + # Memory usage mem_info="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG}${line#?}%{B-}%{F-}" ;; - N*) - # Network throughput + N*) + # Network throughput net_info="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG}${line#?}%{B-}%{F-}" ;; W*) @@ -85,12 +85,12 @@ while read -r line ; do ;; L*) # layout - #wm_info="$wm_info %{F$COLOR_LAYOUT_FG}%{B$COLOR_LAYOUT_BG} ${name} %{B-}%{F-}" + wm_info="$wm_info%{F$COLOR_LAYOUT_FG}%{B$COLOR_LAYOUT_BG}${name}%{B-}%{F-}" ;; esac shift done ;; esac - printf "%s\n" "%{l}${wm_info} : ${load_info} ${temp_info} : ${mem_info} :${io_info} : ${net_info}%{c} ${title} %{r} ${bat_info}${sys_info}" + printf "%s\n" "%{l}${wm_info} cpu ${load_info} ${temp_info} mem ${mem_info} ${io_info} ${net_info} bat ${bat_info} %{c} ${title} %{r} ${sys_info}" done |