From 221a87cad1e6bd9ee93eca818ed50328a3be59ea Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Sat, 30 Sep 2023 17:35:44 +0200 Subject: [PATCH] [kitty/polybar] Remove tilix leftovers --- .config/kitty/kitty.conf | 2 +- .config/kitty/secrets.py | 6 ++++++ .config/polybar/launch.sh | 2 +- .config/polybar/modules.ini | 20 ++++++++++---------- .config/polybar/scripts/cpu_usage.py | 2 +- .config/polybar/scripts/polywins | 3 ++- 6 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index ea1e877..1f26ea9 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -80,7 +80,7 @@ allow_remote_control yes listen_on unix:@mykitty map F1 launch --allow-remote-control kitty +kitten broadcast -map ctrl+alt+p kitten secrets.py "description" "Tilix Password" +map ctrl+alt+p kitten secrets.py "description" "Kitty password" map kitty_mod+p>l kitten hints --type line --program @ #: }}} diff --git a/.config/kitty/secrets.py b/.config/kitty/secrets.py index 294401e..f91a8a4 100644 --- a/.config/kitty/secrets.py +++ b/.config/kitty/secrets.py @@ -10,6 +10,12 @@ import secretstorage from kitty.boss import Boss +# +# To add passwords to the Secret Service that can be retrieved for this kitten: +# secret-tool store --label user1 description "Kitty password" id $(uuidgen) +# secret-tool store --label user2 description "Kitty password" id $(uuidgen) +# Add map to kitty.conf: +# map ctrl+alt+p kitten secrets.py "description" "Kitty password" def main(args: List[str]) -> Optional[str]: secrets = get_secret_names(args[1], args[2]) diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh index dde94bc..2ff89ca 100755 --- a/.config/polybar/launch.sh +++ b/.config/polybar/launch.sh @@ -2,7 +2,7 @@ [ -f ~/.config/polybar/bar.env ] && . ~/.config/polybar/bar.env -export TERMINAL_CMD=${TERMINAL_CMD:-"tilix --profile orange --new-process -e"} +export TERMINAL_CMD=${TERMINAL_CMD:-"kitty --class=info --override='foreground=#c69026' "} export WM_CONTROL=${WM_CONTROL:-"~/.config/polybar/scripts/switch_window_state"} export ROFI_THEME=${ROFI_THEME:-orange} diff --git a/.config/polybar/modules.ini b/.config/polybar/modules.ini index b341b47..ee6c8af 100644 --- a/.config/polybar/modules.ini +++ b/.config/polybar/modules.ini @@ -20,14 +20,14 @@ label-song-ellipsis = true [module/cpu_bar] type = custom/script exec = ~/.config/polybar/scripts/cpu_usage.py -format-prefix = "%{A1:$TERMINAL_CMD 'top -o %CPU' &:}CPU %{A}" +format-prefix = "%{A1:$TERMINAL_CMD top -o %CPU &:}CPU %{A}" format-prefix-foreground = ${colors.foreground-alt} interval = 5 [module/memory_bar] type = internal/memory format = -format-prefix = "%{A1:$TERMINAL_CMD 'top -o RES' &:} %{A}" +format-prefix = "%{A1:$TERMINAL_CMD top -o RES &:} %{A}" format-prefix-foreground = ${colors.foreground-alt} bar-used-width = 10 @@ -35,7 +35,7 @@ bar-used-gradient = false bar-used-indicator = bar-used-indicator-foreground = ${colors.foreground} bar-used-indicator-font = 0 -bar-used-fill = "%{A1:$TERMINAL_CMD 'top -o RES' &:}%{T5}_%{T-}%{A}" +bar-used-fill = "%{A1:$TERMINAL_CMD top -o RES &:}%{T5}_%{T-}%{A}" bar-used-foreground-0 = ${colors.bn} bar-used-foreground-1 = ${colors.bn} bar-used-foreground-2 = ${colors.bn} @@ -45,7 +45,7 @@ bar-used-foreground-5 = ${colors.bm} bar-used-foreground-6 = ${colors.bd} bar-used-foreground-7 = ${colors.bd} bar-used-foreground-8 = ${colors.bd} -bar-used-empty = "%{A1:$TERMINAL_CMD 'top -o RES' &:}%{T5}_%{T-}%{A}" +bar-used-empty = "%{A1:$TERMINAL_CMD top -o RES &:}%{T5}_%{T-}%{A}" bar-used-empty-foreground = ${colors.foreground-alt} [module/wireless] @@ -90,7 +90,7 @@ tail = true [module/network_status] type = custom/script exec = ~/.config/polybar/scripts/network_status -click-left = $TERMINAL_CMD "fping --elapsed --count 100 1.0.0.1" +click-left = $TERMINAL_CMD fping --elapsed --count 100 1.0.0.1 interval = 5 [module/vpn] @@ -127,7 +127,7 @@ click-left = gnome-calendar type = internal/alsa format-volume = -label-volume = "%{A3:$TERMINAL_CMD 'pulsemixer' &:}%{A}" +label-volume = "%{A3:$TERMINAL_CMD pulsemixer &:}%{A}" label-volume-foreground = ${root.foreground} format-muted-prefix = "" @@ -147,18 +147,18 @@ bar-volume-foreground-7 = ${colors.bm} bar-volume-gradient = false bar-volume-indicator = -bar-volume-fill = "%{A3:$TERMINAL_CMD 'pulsemixer' &:}%{T5}_%{T-}%{A}" -bar-volume-empty = "%{A3:$TERMINAL_CMD 'pulsemixer' &:}%{T5}_%{T-}%{A}" +bar-volume-fill = "%{A3:$TERMINAL_CMD pulsemixer &:}%{T5}_%{T-}%{A}" +bar-volume-empty = "%{A3:$TERMINAL_CMD pulsemixer &:}%{T5}_%{T-}%{A}" bar-volume-empty-foreground = ${colors.foreground-alt} -click-right = $TERMINAL_CMD 'pulsemixer' +click-right = $TERMINAL_CMD pulsemixer [module/updates] type = custom/script exec = ~/.config/polybar/scripts/check_updates tail = true interval = 5 -click-left = $TERMINAL_CMD "yay -Suy" & +click-left = $TERMINAL_CMD yay -Suy & [module/polywins] type = custom/script diff --git a/.config/polybar/scripts/cpu_usage.py b/.config/polybar/scripts/cpu_usage.py index 3e7f0eb..e4526a4 100755 --- a/.config/polybar/scripts/cpu_usage.py +++ b/.config/polybar/scripts/cpu_usage.py @@ -36,7 +36,7 @@ def show_cpu_usage(): if global_count < 10: padding = '%{F' + colors['id'] + '}' + '_' * (10 - global_count) + '%{F-}' - print("%{A1:$TERMINAL_CMD 'top -o %CPU' &:}%{T5}" + bar + padding + "%{T-}%{A}") + print("%{A1:$TERMINAL_CMD top -o %CPU &:}%{T5}" + bar + padding + "%{T-}%{A}") if __name__ == "__main__": diff --git a/.config/polybar/scripts/polywins b/.config/polybar/scripts/polywins index 46b0e08..6ac70cf 100755 --- a/.config/polybar/scripts/polywins +++ b/.config/polybar/scripts/polywins @@ -63,6 +63,7 @@ get_icon_by_name() [gnome-terminal]= [gpaste-ui]= [keepassxc]= + [info]= [kitty]= [librewolf-default]= [librewolf]= @@ -77,7 +78,7 @@ get_icon_by_name() [steam]= [telegramdesktop]= [thunderbird]= - [tilix]= + [vpn]= [tor]= [vivaldi-stable]= [xterm]=