From 0a385bbc6385a7fd96a93db8f444d333f026f45a Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Sat, 21 Sep 2024 22:10:25 -0400 Subject: [PATCH] feat(waybar): replace assigned workspaces with numbered ones --- .config/sway/config.d/application_defaults | 20 +------------------- .config/waybar/config | 20 ++++++++++++-------- .config/waybar/scripts/weather.sh | 13 ------------- .config/waybar/style.css | 15 +++++++-------- 4 files changed, 20 insertions(+), 48 deletions(-) delete mode 100755 .config/waybar/scripts/weather.sh diff --git a/.config/sway/config.d/application_defaults b/.config/sway/config.d/application_defaults index 81d8794..d2a9965 100644 --- a/.config/sway/config.d/application_defaults +++ b/.config/sway/config.d/application_defaults @@ -1,25 +1,8 @@ -# Assign workspaces -assign [app_id="firefox"] 2 -for_window [app_id="firefox"] focus - -assign [class="firefox"] 2 -for_window [class="firefox"] focus - -assign [app_id=thunar] 3 -for_window [app_id=thunar] focus - -assign [app_id="org.telegram.desktop"] 4 -for_window [app_id="org.telegram.desktop"] focus - -# set floating (nontiling)for apps needing it: +# Custom windowing rules for_window [class="Yad" instance="yad"] floating enable for_window [app_id="yad"] floating enable for_window [app_id="blueman-manager"] floating enable, resize set width 40 ppt height 30 ppt - -# set floating (nontiling) for special apps: for_window [app_id="pavucontrol" ] floating enable, resize set width 40 ppt height 30 ppt - -# set floating for window roles for_window [window_role="pop-up"] floating enable for_window [window_role="bubble"] floating enable for_window [window_role="task_dialog"] floating enable @@ -28,7 +11,6 @@ for_window [window_type="dialog"] floating enable for_window [window_type="menu"] floating enable for_window [window_role="About"] floating enable for_window [title="File Operation Progress"] floating enable, border pixel 1, sticky enable, resize set width 40 ppt height 30 ppt -for_window [app_id="firefox" title="^Library$"] floating enable, border pixel 1, sticky enable, resize set width 40 ppt height 30 ppt for_window [app_id="floating_shell_portrait"] floating enable, border pixel 1, sticky enable, resize set width 30 ppt height 40 ppt for_window [title="Picture in picture"] floating enable, sticky enable for_window [title="waybar_htop"] floating enable, resize set width 70 ppt height 70 ppt diff --git a/.config/waybar/config b/.config/waybar/config index 0bfc7f4..439fcd3 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -3,7 +3,7 @@ "position": "top", // Waybar position (top|bottom|left|right) // "height": 30, // Auto-height is used when commented // "width": 1280, // Full screen width when commented - "spacing": 10, // Gaps between modules (in px) + "spacing": 16, // Gaps between modules (in px) // See `man waybar` for more configuration options // Configuration - modules-left @@ -14,7 +14,7 @@ "sway/mode", "sway/window" ], - + "custom/launcher": { "format":"", "on-click": "exec fuzzel", @@ -25,13 +25,16 @@ "disable-scroll": true, "disable-markup" : false, "all-outputs": true, - "format": " {icon} ", - //"format":"{icon}", + "format": "{icon}", "format-icons": { - "1": "", - "2": "", - "3": "", - "4": "", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "10": "10", } }, @@ -42,6 +45,7 @@ "sway/window": { "format": "{}", + //"all-outputs": true, // Active window shows only on active display when commented "max-length": 120 }, diff --git a/.config/waybar/scripts/weather.sh b/.config/waybar/scripts/weather.sh deleted file mode 100755 index b03cd1c..0000000 --- a/.config/waybar/scripts/weather.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -LOC="$1" -# HTML encode string as %20 -LOCATION=$(sed -e "s/ /%20/g" <<<"$LOC") -content=$(curl -sS "https://thisdavej.azurewebsites.net/api/weather/current?loc=$LOCATION°=C") -ICON=$(curl -s 'https://wttr.in/?format=1' | sed 's/[+0-9a-cA-Z°-]//g' ) -# echo $ICON -TEMP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)"' | sed 's/"//g') -TOOLTIP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)\n\(.skytext)"' | sed 's/"//g') -CLASS=$(echo $content | jq .skytext) -echo '{"text": "'$TEMP'", "tooltip": "'$ICON $TOOLTIP $LOC'", "class": '$CLASS' }' - diff --git a/.config/waybar/style.css b/.config/waybar/style.css index c8e7ce0..408a784 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -10,7 +10,7 @@ * Keyframes * -------------------------------------------------------------------------- */ -@define-color highlight #5294e2 ; +@define-color highlight #685878 ; @define-color base1 #19191e ; @keyframes blink-warning { @@ -78,7 +78,6 @@ * -------------------------------------------------------------------------- */ #custom-launcher { - font-size:15px; margin-left:15px; margin-right:10px; } @@ -88,15 +87,15 @@ } #workspaces button { - border-bottom: 3px solid transparent; - margin-bottom: 0px; - padding:0px; + border-radius: 5px; + color: #eceff4; + padding: 1px 6px; + margin-right: 2px; + margin-left: 2px; } #workspaces button.focused { - border-bottom: 3px solid @highlight; - margin-bottom: 1px; - padding-left:0; + border: 1px solid #d8dee9; } #workspaces button.urgent {