From cd25d92ac27b7fe86491b1a51ccc80c397fba177 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Tue, 13 Jul 2021 16:10:58 +0200 Subject: [PATCH] [polybar] Add polywins and remove task_manager --- .config/polybar/bar.ini | 3 +- .config/polybar/launch.sh | 4 - .config/polybar/modules.ini | 9 +- .config/polybar/scripts/polywins | 286 +++++++++++++++++++++++++++ .config/polybar/scripts/task_manager | 222 --------------------- 5 files changed, 294 insertions(+), 230 deletions(-) create mode 100755 .config/polybar/scripts/polywins delete mode 100755 .config/polybar/scripts/task_manager diff --git a/.config/polybar/bar.ini b/.config/polybar/bar.ini index 51981b7..a869d73 100644 --- a/.config/polybar/bar.ini +++ b/.config/polybar/bar.ini @@ -66,8 +66,7 @@ font-3 = NotoSans-Regular:size=18:weight=bold:antialias=true;2 font-4 = NotoSans-Regular:size=28:weight=bold:antialias=true;-12 font-5 = "FontAwesome:size=21:antialias=true;4" -modules-left-dynamic = -include-file = ~/.config/polybar/modules-left.ini +modules-left = polywins modules-center = custom_date modules-right = updates cpu_bar memory_bar vpn network_usage alsa_bar diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh index faf3ca6..dde94bc 100755 --- a/.config/polybar/launch.sh +++ b/.config/polybar/launch.sh @@ -4,7 +4,6 @@ export TERMINAL_CMD=${TERMINAL_CMD:-"tilix --profile orange --new-process -e"} export WM_CONTROL=${WM_CONTROL:-"~/.config/polybar/scripts/switch_window_state"} -export TASKMANAGER_MAX_TASKS=${TASKMANAGER_MAX_TASKS:-20} export ROFI_THEME=${ROFI_THEME:-orange} function wait_for_polybar @@ -22,7 +21,6 @@ function wait_for_polybar function kill_polybar { pkill polybar - pkill -f "task_manager --daemon" wait_for_polybar stopped } @@ -36,6 +34,4 @@ function launch_polybar } kill_polybar -~/.config/polybar/scripts/task_manager --generate-config "$TASKMANAGER_MAX_TASKS" launch_polybar -~/.config/polybar/scripts/task_manager --daemon & diff --git a/.config/polybar/modules.ini b/.config/polybar/modules.ini index c1f4a46..9c60af6 100644 --- a/.config/polybar/modules.ini +++ b/.config/polybar/modules.ini @@ -154,8 +154,13 @@ tail = true interval = 5 click-left = $TERMINAL_CMD "yay -Suy" & -; task_manager module -include-file = ~/.config/polybar/task_manager.ini +[module/polywins] +type = custom/script +exec = ~/.config/polybar/scripts/polywins 2>/dev/null +format =