diff options
-rwxr-xr-x | bin/wmnormal | 3 | ||||
-rwxr-xr-x | bin/wmunsafe | 3 | ||||
-rwxr-xr-x | bspwmrc | 3 | ||||
-rwxr-xr-x | install.sh | 3 | ||||
-rw-r--r-- | polybar/normal/config.ini (renamed from polybar/config.ini) | 0 | ||||
-rwxr-xr-x | polybar/normal/launch.sh (renamed from polybar/launch.sh) | 0 | ||||
l--------- | polybar/normal/normal | 1 | ||||
l--------- | polybar/normal/unsafe | 1 | ||||
-rw-r--r-- | polybar/unsafe/config.ini | 176 | ||||
-rwxr-xr-x | polybar/unsafe/launch.sh | 30 |
10 files changed, 219 insertions, 1 deletions
diff --git a/bin/wmnormal b/bin/wmnormal index aa9e08f..c8a78ed 100755 --- a/bin/wmnormal +++ b/bin/wmnormal @@ -1,3 +1,6 @@ #! /bin/bash feh --no-fehbg --bg-fill ~/.config/bspwm/wallpaper + +ln -snf ${HOME}/.config/polybar.d/normal ${HOME}/.config/polybar +polybar-msg cmd restart diff --git a/bin/wmunsafe b/bin/wmunsafe index cd99b2e..6fc7762 100755 --- a/bin/wmunsafe +++ b/bin/wmunsafe @@ -1,3 +1,6 @@ #! /bin/bash feh --no-fehbg --bg-fill ~/.config/bspwm/unsafe_wallpaper + +ln -snf ${HOME}/.config/polybar.d/unsafe ${HOME}/.config/polybar +polybar-msg cmd restart @@ -32,6 +32,9 @@ killall -qw wireplumber; wireplumber & feh --no-fehbg --bg-fill ~/.config/bspwm/wallpaper +# load the normal mode polybar +ln -snf ${HOME}/.config/polybar.d/normal ${HOME}/.config/polybar + killall -qw picom; picom -b killall -qw dunst; dunst & killall -qw polybar; ~/.config/polybar/launch.sh & @@ -137,7 +137,8 @@ mkdir -p ~/.config/rofi ln -sf ${PWD}/rofi_config ~/.config/rofi/config ln -sf ${PWD}/rofi_config.rasi ~/.config/rofi/config.rasi -ln -sf ${PWD}/polybar ~/.config/polybar +# not the actual config location, it will be symlinked by the mode switch +ln -sf ${PWD}/polybar ~/.config/polybar.d mkdir -p ~/.config ln -sf ${PWD}/picom.conf ~/.config/picom.conf diff --git a/polybar/config.ini b/polybar/normal/config.ini index 2be299e..2be299e 100644 --- a/polybar/config.ini +++ b/polybar/normal/config.ini diff --git a/polybar/launch.sh b/polybar/normal/launch.sh index 9eacf68..9eacf68 100755 --- a/polybar/launch.sh +++ b/polybar/normal/launch.sh diff --git a/polybar/normal/normal b/polybar/normal/normal new file mode 120000 index 0000000..ba80d2c --- /dev/null +++ b/polybar/normal/normal @@ -0,0 +1 @@ +/home/himbeer/.config/polybar.d/normal
\ No newline at end of file diff --git a/polybar/normal/unsafe b/polybar/normal/unsafe new file mode 120000 index 0000000..f8638b3 --- /dev/null +++ b/polybar/normal/unsafe @@ -0,0 +1 @@ +/home/himbeer/.config/polybar.d/unsafe
\ No newline at end of file diff --git a/polybar/unsafe/config.ini b/polybar/unsafe/config.ini new file mode 100644 index 0000000..a81e909 --- /dev/null +++ b/polybar/unsafe/config.ini @@ -0,0 +1,176 @@ +[bar/base] +monitor-strict = true +override-redirect = false +fixed-center = true +width = 100% +height = 44 +background = #eeeeee +foreground = #884422 +radius = 10.0 +border-size = 4 +border-color = #00000000 +border-bottom-size = 0 +padding = 2 +module-margin-left = 1 +module-margin-right = 1 +font-0 = "Terminus:size=10;3" +font-1 = "Noto Color Emoji:pixelsize=16:style=Regular:scale=10;3" + +modules-left = workspaces sep wireless sep wired +modules-right = cpu sep memory sep volume sep battery sep brightness sep date + +wm-name = bspwm +wm-restack = bspwm +enable-ipc = true + +[bar/main] +inherit = bar/base +monitor = eDP-1 +width = 90% +border-right-size = 2 + +[bar/opt] +inherit = bar/base +monitor = DP-2 + +[bar/tray] +inherit = bar/base +monitor = eDP-1 +override-reditect = true +width = 10% +offset-x = 90% +border-left-size = 2 + +modules-left = +modules-center = dummy +modules-right = + +tray-position = center +tray-detached = true + +wm-restack = + +[settings] +throttle-output = 5 +throttle-output-for = 10 + +; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t +compositing-background = source +compositing-foreground = over +compositing-overline = over +compositing-underline = over +compositing-border = over + +[module/workspaces] +type = internal/xworkspaces +pin-workspaces = true +enable-click = true +enable-scroll = true +reverse-scroll = true + +icon-0 = 1;e +icon-1 = 2;l +icon-2 = 3;i +icon-3 = 4;d +icon-4 = 5;r +icon-5 = 6;a +icon-6 = 7;g +icon-7 = 8;o +icon-8 = 9;n + +format = <label-state> +label-active = "%{F#2255dd}%icon%" +label-occupied = "%{F#22dd22}%icon%" +label-urgent = "%{F#ff3333}%icon%" +label-empty = "%{F#884422}%icon%" +label-active-padding = 1 +label-urgent-padding = 1 +label-occupied-padding = 1 +label-empty-padding = 1 + +[module/sep] +type = custom/text +content = | +content-foreground = #a5a5a5 + +[module/dummy] +type = custom/text +content = | +content-foreground = #00000000 + +[module/memory] +type = internal/memory +interval = 1 +format = <label> +label = "π %{F#bb11bb}%gb_free%" +label-warn = "π %{F#ff3333}%gb_free%" + +[module/cpu] +type = internal/cpu +interval = 1 +format = <label> +label = "π» %{F#bb11bb}%percentage-cores%" + +[module/battery] +type = internal/battery +full-at = 97 +low-at = 15 +battery = BAT0 +adapter = AC +poll-interval = 20 +time-format = %H:%M +format-charging = <label-charging> +format-discharging = <label-discharging> +format-full = <label-full> +format-low = <label-low> +label-charging = "β‘ %percentage%% %time%" +label-discharging = "π %percentage%% %time%" +label-full = "π %percentage%%" +label-low = "ππ¨ %{F#ff3333}%percentage%% %time%" + +[module/brightness] +type = internal/backlight +card = intel_backlight +enable-scroll = true +format = <label> +label = "π‘ %percentage%%" + +[module/wireless] +type = internal/network +interface-type = wireless +interval = 1.0 +format-connected = <label-connected> +format-disconnected = <label-disconnected> +format-packetloss = <label-packetloss> +label-connected = "πΆ %essid% %{F#bb11bb}%signal%% %{F#00bb00}%upspeed%β %downspeed%β" +label-disconnected = "πΆπ«" +label-packetloss = "πΆπ¦π¨ %essid% %{F#bb11bb}%signal%% %{F#00bb00}%upspeed%β %downspeed%β" + +[module/wired] +type = internal/network +interface-type = wired +interval = 1.0 +format-connected = <label-connected> +format-disconnected = <label-disconnected> +format-packetloss = <label-packetloss> +label-connected = "π %linkspeed% %{F#00bb00}%upspeed%β %downspeed%β" +label-disconnected = "ππ«" +label-packetloss = "ππ¦π¨ %linkspeed% %{F#00bb00}%upspeed%β %downspeed%β" + +[module/date] +type = internal/date +date = %Y-%m-%d +time = %H:%M:%S +date-alt = %d. %b %Y +time-alt = %H:%M:%S +format = <label> +label = %date% %time% + +[module/volume] +type = internal/alsa +master-soundcard = default +format-volume = <ramp-volume> <label-volume> +label-muted = "π%percentage%%" +ramp-volume-0 = π +ramp-volume-1 = π +ramp-volume-2 = π diff --git a/polybar/unsafe/launch.sh b/polybar/unsafe/launch.sh new file mode 100755 index 0000000..9eacf68 --- /dev/null +++ b/polybar/unsafe/launch.sh @@ -0,0 +1,30 @@ +#! /bin/sh + +# Copyright (C) 2022 HimbeerserverDE +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + +polybar --reload -q main -c "${HOME}/.config/polybar/config.ini" & +polybar --reload -q opt -c "${HOME}/.config/polybar/config.ini" & + +polybar --reload -q tray -c "${HOME}/.config/polybar/config.ini" & + +while [[ $(pgrep -x polybar | wc -l) -lt 3 ]]; do sleep 1; done +sleep 2 + +while [ -z "$(bspc query -N -n any.fullscreen)" ]; do sleep 1; done +sleep 2 + +TRAYBAR=$(pgrep -x polybar | tail -n 1) +xdo above -t $(bspc query -N -n any.fullscreen) $(xdo id -p ${TRAYBAR}) |