From 8037ab9950e937567df9c6769fdfab0e86de69a7 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 23 Aug 2022 14:20:08 -0600 Subject: [PATCH 01/12] Modules positioned --- waybar/config.template | 127 +++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 80 deletions(-) diff --git a/waybar/config.template b/waybar/config.template index 42f0203ab..a34374568 100644 --- a/waybar/config.template +++ b/waybar/config.template @@ -22,87 +22,9 @@ "sway/mode": { "format": "{}" }, -},{ - // LAUNCHER - "name": "launcher", - "output": __OUTPUT__, - "ipc": true, - "id": "bar-1", - "mode": "hide", - "hidden_state": "hide", - "layer": "top", // Waybar at top layer - "position": "bottom", // Waybar position (top|bottom|left|right) - "margin-left": 20, - "margin-right": 20, - "margin-bottom": 20, - "modules-left": ["custom/launcher"], - "modules-center": [], - "modules-right": ["tray", "custom/todo", "custom/osk", "custom/pkg", "custom/bar", "idle_inhibitor", "custom/clock", "custom/power"], - // Modules configuration - "custom/launcher": { - "format": "", - "on-click": "if [ $(sudo pgrep -xc rofi) -gt 0 ]; then pkill rofi; else rofi -config ${HOME}/.config/rofi/config.rasi -show drun -lines 20; fi" - }, - //"mpd": { - //"server": "10.10.0.66", - //"port": 6600, - //"interval": 10, - //"timeout": 30, - //"unknown-tag": "⚠", - //"format": "▶️{title}", - //"format-paused": "⏸️{title}", - //"format-stopped": "⏹️ mpd", - //"format-disconnected": "⚠ mpd", - //"on-click": "${HOME}/scripts/waybar/waybar-mpd.sh" - //}, - "tray": { - "icon-size": 28, - "spacing": 10 - }, - "custom/todo": { - "format": "🗈", - "on-click": "${HOME}/scripts/waybar/waybar-todo.sh", - "tooltip": false - }, - "custom/osk": { - "format": "⌨", - "on-click": "${HOME}/scripts/waybar/waybar-keyboard.sh", - "tooltip": false - }, - "custom/pkg": { - "interval": 60, - "tooltip-format": "{:%d %B}\n{calendar}", - "on-click": "${HOME}/scripts/waybar/waybar-pkg.sh upgrade", - "return-type": "json", - "exec": "${HOME}/scripts/waybar/waybar-pkg.sh bar" - }, - "custom/bar": { - "format": "", - "tooltip": false, - "on-click": "${HOME}/scripts/waybar/toggle.sh" - }, - "idle_inhibitor": { - "format": "{icon}", - "format-icons": { - "activated": "", - "deactivated": "" - }, - "on-click": "echo {status} > .config/idle_inhibitor" - }, - "custom/clock": { - "interval": 60, - "tooltip": true, - "on-click": "${HOME}/.local/bin/firefox/firefox-bin https://papillon.john.me.tz/calendar.php", - "return-type": "json", - "exec": "echo '{\"class\": \"clock\", \"text\": \"'$(date '+%H:%M')'\", \"tooltip\": \"'$(date '+%A, %B %d, %Y | %Y-%m-%d')'\"}'" - }, - "custom/power": { - "format": "\u23FB", - "on-click": "if [ $(sudo pgrep -xc rofi) -gt 0 ]; then pkill rofi; else ${HOME}/scripts/rofi/rofi-power-menu.sh; fi" - }, }, { - "name": "status", + "name": "bar", "output": __OUTPUT__, "ipc": true, "id": "bar-1", @@ -116,7 +38,7 @@ // Choose the order of the modules "modules-left": ["sway/workspaces"], "modules-center": [], - "modules-right": ["custom/weather", "network", "network#wireguard", "cpu", "memory", "custom/disk", "temperature", "backlight", "custom/battery", "pulseaudio"], + "modules-right": ["custom/weather", "network", "network#wireguard", "cpu", "memory", "custom/disk", "temperature", "backlight", "custom/battery", "pulseaudio","tray", "custom/todo", "custom/osk", "custom/pkg", "custom/bar", "idle_inhibitor", "custom/clock", "custom/power"], // Modules configuration "sway/workspaces": { // "disable-scroll": true, @@ -235,4 +157,49 @@ }, "on-click": "${HOME}/scripts/waybar/waybar-audio.sh" }, + "tray": { + "icon-size": 28, + "spacing": 10 + }, + "custom/todo": { + "format": "🗈", + "on-click": "${HOME}/scripts/waybar/waybar-todo.sh", + "tooltip": false + }, + "custom/osk": { + "format": "⌨", + "on-click": "${HOME}/scripts/waybar/waybar-keyboard.sh", + "tooltip": false + }, + "custom/pkg": { + "interval": 60, + "tooltip-format": "{:%d %B}\n{calendar}", + "on-click": "${HOME}/scripts/waybar/waybar-pkg.sh upgrade", + "return-type": "json", + "exec": "${HOME}/scripts/waybar/waybar-pkg.sh bar" + }, + "custom/bar": { + "format": "\u200a", + "tooltip": false, + "on-click": "${HOME}/scripts/waybar/toggle.sh" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + }, + "on-click": "echo {status} > .config/idle_inhibitor" + }, + "custom/clock": { + "interval": 60, + "tooltip": true, + "on-click": "${HOME}/.local/bin/firefox/firefox-bin https://papillon.john.me.tz/calendar.php", + "return-type": "json", + "exec": "echo '{\"class\": \"clock\", \"text\": \"'$(date '+%H:%M')'\", \"tooltip\": \"'$(date '+%A, %B %d, %Y | %Y-%m-%d')'\"}'" + }, + "custom/power": { + "format": "\u23FB", + "on-click": "if [ $(sudo pgrep -xc rofi) -gt 0 ]; then pkill rofi; else ${HOME}/scripts/rofi/rofi-power-menu.sh; fi" + }, }] From e0d4eb1abb61f2a9edf4739cb06569a8fd1b461f Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 23 Aug 2022 14:20:40 -0600 Subject: [PATCH 02/12] remove launcher --- waybar/style.css | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/waybar/style.css b/waybar/style.css index 6cc049274..377a33c54 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -58,7 +58,7 @@ window#waybar { color: @fg; } -#window, #custom-launcher, #workspaces, #mode, #mpd, #network, #cpu, #memory, #custom-disk, #temperature, #backlight, #custom-battery, #pulseaudio, #custom-clock, #tray, #custom-todo, #custom-osk, #idle_inhibitor, #custom-power, #custom-weather { +#window, #workspaces, #mode, #mpd, #network, #cpu, #memory, #custom-disk, #temperature, #backlight, #custom-battery, #pulseaudio, #custom-clock, #tray, #custom-todo, #custom-osk, #idle_inhibitor, #custom-power, #custom-weather { color: @grey06; padding: 0 5px; margin: 0px; @@ -79,13 +79,6 @@ window#waybar { padding: 10px; } -/* Start Launcher */ - -#custom-launcher { - margin-left: 15px; - color: @fg; -} - /* Workspaces */ #workspaces { From 36bef7ca2156bc3136622f438fe8ea66fe5af175 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 23 Aug 2022 14:21:06 -0600 Subject: [PATCH 03/12] right-edge margins --- waybar/style.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/waybar/style.css b/waybar/style.css index 377a33c54..63fcc5081 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -206,7 +206,6 @@ window#waybar { /* Pulseaudio */ #pulseaudio { - margin-right: 15px; color: @bluehi; } @@ -254,7 +253,7 @@ window#waybar { /* Power button */ #custom-power { - margin-right: 15px; + margin-right: 8px; margin-top: 8px; color: @red; } From 36b36b4feef34dca4811c673c16861371b3d0054 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Thu, 25 Aug 2022 23:06:16 -0600 Subject: [PATCH 04/12] gammastep waybar --- waybar/config.template | 8 +++++++- waybar/style.css | 24 +++++++++++++++++------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/waybar/config.template b/waybar/config.template index a34374568..dd3ec9918 100644 --- a/waybar/config.template +++ b/waybar/config.template @@ -38,7 +38,7 @@ // Choose the order of the modules "modules-left": ["sway/workspaces"], "modules-center": [], - "modules-right": ["custom/weather", "network", "network#wireguard", "cpu", "memory", "custom/disk", "temperature", "backlight", "custom/battery", "pulseaudio","tray", "custom/todo", "custom/osk", "custom/pkg", "custom/bar", "idle_inhibitor", "custom/clock", "custom/power"], + "modules-right": ["custom/weather", "network", "network#wireguard", "cpu", "memory", "custom/disk", "temperature", "backlight", "custom/battery", "pulseaudio","tray", "custom/todo", "custom/osk", "custom/pkg", "custom/bar", "custom/gammastep", "idle_inhibitor", "custom/clock", "custom/power"], // Modules configuration "sway/workspaces": { // "disable-scroll": true, @@ -191,6 +191,12 @@ }, "on-click": "echo {status} > .config/idle_inhibitor" }, + "custom/gammastep": { + "interval": 1, + "return-type": "json", + "exec": "${HOME}/scripts/waybar/waybar-gammastep.sh", + "on-click": "${HOME}/scripts/waybar/waybar-gammastep.sh toggle" + }, "custom/clock": { "interval": 60, "tooltip": true, diff --git a/waybar/style.css b/waybar/style.css index 63fcc5081..85c7889cd 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -66,7 +66,7 @@ window#waybar { /* Tray */ -#tray, #custom-todo, #custom-osk, #custom-pkg, #custom-bar, #idle_inhibitor, #custom-clock, #custom-power { +#tray, #custom-todo, #custom-osk, #custom-pkg, #custom-bar, #custom-gammastep, #idle_inhibitor, #custom-clock, #custom-power { color: @bluehi; } @@ -229,12 +229,6 @@ window#waybar { margin-right: -8px; } -/* Package upgrades */ - -#custom-pkg { - margin-bottom: -3px; -} - /* On-Screen Keyboard */ #custom-osk { @@ -243,6 +237,22 @@ window#waybar { margin-bottom: -15px; } +/* Package upgrades */ + +#custom-pkg { + margin-bottom: -3px; +} + +/* Gammastep */ + +#custom-gammastep.enabled { + color: #fefefe; +} + +#custom-gammastep { + margin-top: -5px; +} + /* Idle Inhibitor */ #idle_inhibitor.activated { From 2d21f8e66f88fc6d45d64c0b111f9ad9d0e1518d Mon Sep 17 00:00:00 2001 From: John Mertz Date: Mon, 5 Sep 2022 12:34:15 -0600 Subject: [PATCH 05/12] Shrink bar height a bit --- waybar/style.css | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/waybar/style.css b/waybar/style.css index 85c7889cd..be360eacc 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -40,18 +40,19 @@ * { font-family: "Anonymous Pro", "Font Awesome 5 Brands", "Font Awesome 5 Free", Monospace; - font-size: 24px; + font-size: 20px; min-height: 0; } window#waybar.window { - font-size: 12px; + font-size: 20px; } window#waybar { + margin: -5px; border-radius: 30px; border: solid 2px @fg; - font-size: 12px; + font-size: 20px; background-color: @bg; animation-name: fadeIn; animation-duration: 1s; @@ -76,7 +77,7 @@ window#waybar { } #window { - padding: 10px; + padding: 5px; } /* Workspaces */ @@ -222,7 +223,7 @@ window#waybar { /* Todo-txt */ #custom-todo { - font-size: 40px; + font-size: 20px; margin-top: -13px; margin-bottom: -10px; margin-left: -8px; @@ -232,7 +233,7 @@ window#waybar { /* On-Screen Keyboard */ #custom-osk { - font-size: 50px; + font-size: 30px; margin-top: -13px; margin-bottom: -15px; } From eda4401e1455b9564e79e47e508177dcadf7f6d8 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Mon, 5 Sep 2022 15:05:12 -0400 Subject: [PATCH 06/12] Update .gitignore waybar/config is a generated file (though it is better placed in ~/.spool --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0b62b1196..cb105fe43 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ nvim/autoload nvim/plugins nvim/shada nvim/swap +waybar/config From f7f4b0170c88db57e59a56f6672d3983759bacbc Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 6 Sep 2022 08:40:57 -0600 Subject: [PATCH 07/12] Updateable pkg module in orange --- waybar/style.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/waybar/style.css b/waybar/style.css index be360eacc..72fd6d0b2 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -24,6 +24,7 @@ * yellow * blue * purple + * orange * aqua * redhi * greenhi @@ -244,6 +245,10 @@ window#waybar { margin-bottom: -3px; } +#custom-pkg.updateable { + color: @orange; +} + /* Gammastep */ #custom-gammastep.enabled { From b937259ddb7534210c3ffe756508edecd7e9fef3 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Thu, 8 Sep 2022 09:26:13 -0400 Subject: [PATCH 08/12] Fix firefox flatpak workspace assignment --- sway/behaviours | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/behaviours b/sway/behaviours index d56f4cae6..9eb46a2fb 100644 --- a/sway/behaviours +++ b/sway/behaviours @@ -10,7 +10,7 @@ assign [class="UXTerm"] grave assign [app_id="thunderbird"] 2 assign [class="Chromium"] 3 assign [class="Linphone"] 5 -assign [app_id="firefox"] 7 +assign [class="firefox"] 7 assign [app_id="com.github.gittyup.Gittyup"] 9 # Don't use VNC viewer anymore. I've defaulted to running virt-manager on this workspace because it's similar From 817a749dd65eafd67a6bff6268150229fb73fcd2 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Mon, 12 Sep 2022 11:32:24 -0400 Subject: [PATCH 09/12] Update bash_aliases and bash_login --- bash/bash_aliases | 2 +- bash/bash_login | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bash/bash_aliases b/bash/bash_aliases index d6b4fc0cc..78064a0e6 100644 --- a/bash/bash_aliases +++ b/bash/bash_aliases @@ -33,7 +33,7 @@ alias startsway="${HOME}/scripts/sway/startsway.sh" alias starti3="${HOME}/scripts/i3/starti3.sh" # Web shortcuts -alias papillon="/usr/bin/chromium --app='https://papillon.john.me.tz/hud.php?refresh=3600&theme=dark'" +alias papillon="flatpak run com.github.Eloston.UngoogledChromium --app='https://papillon.john.me.tz/hud.php?refresh=3600&theme=dark'" # Force python3 alias pip="pip3" diff --git a/bash/bash_login b/bash/bash_login index c32f67bc8..574174877 100644 --- a/bash/bash_login +++ b/bash/bash_login @@ -25,7 +25,7 @@ export LC_ALL="en_US.UTF-8" export XDG_DATA_HOME="${HOME}/.config" # GUI themes -export GTK_THEME="Oled" +export GTK_THEME="Flat-Remix-GTK-Blue-Darkest-Solid-NoBorder" export PROFILE_NAME="Oled" export QT_QPA_PLATFORMTHEME="qt5ct" export QT_QPA_PLATFORM="wayland-egl;wayland;xcb" From 1591df6e4ff875198a73f27701d20e6924212354 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Mon, 12 Sep 2022 11:41:38 -0400 Subject: [PATCH 10/12] Floating windows improvement --- sway/behaviours | 3 ++- sway/config | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sway/behaviours b/sway/behaviours index 9eb46a2fb..53600ee1e 100644 --- a/sway/behaviours +++ b/sway/behaviours @@ -20,8 +20,9 @@ assign [app_id="com.github.gittyup.Gittyup"] 9 # Floating windows ################################################################################ -for_window [shell="xdg_shell"] floating enable # Picture-in-picture firefox +for_window [title="Picture-in-Picture"] floating enable # Picture-in-picture firefox # Also make Picture-in-picture windows stick to active workspace +for_window [title="Picture-in-Picture"] sticky enable for_window [shell="xdg_shell"] sticky enable # Picture-in-picture firefox for_window [instance="Download"] floating enable for_window [window_role="plugin_ui"] floating enable diff --git a/sway/config b/sway/config index 7b4211dfe..daf98bae8 100755 --- a/sway/config +++ b/sway/config @@ -43,7 +43,7 @@ seat seat0 xcursor_theme FlatbedCursors-Blue # Minimize borders from all windows hide_edge_borders none -default_floating_border normal 1 +default_floating_border none default_border pixel 1 # Font only visible in tabbed mode. Also inheritted by bar. From 9e8da8aec5e111988f2c36108032e90809a8d11c Mon Sep 17 00:00:00 2001 From: John Mertz Date: Mon, 12 Sep 2022 11:41:56 -0400 Subject: [PATCH 11/12] Fix thunderbird workspace assignment --- sway/behaviours | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/behaviours b/sway/behaviours index 53600ee1e..faeadfcf5 100644 --- a/sway/behaviours +++ b/sway/behaviours @@ -7,7 +7,7 @@ assign [class="Mattermost"] 1 assign [class="Rocket.Chat"] 1 assign [class="UXTerm"] grave -assign [app_id="thunderbird"] 2 +assign [class="Thunderbird"] 2 assign [class="Chromium"] 3 assign [class="Linphone"] 5 assign [class="firefox"] 7 From 6df65d1b9bfd6b332c2825cf635c1327e2194f23 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Mon, 12 Sep 2022 11:42:45 -0400 Subject: [PATCH 12/12] Stardardize icons more --- waybar/config.template | 7 ++++--- waybar/style.css | 46 +++++++++++++++++++++++++++++------------- 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/waybar/config.template b/waybar/config.template index dd3ec9918..f7b1d9b48 100644 --- a/waybar/config.template +++ b/waybar/config.template @@ -93,7 +93,7 @@ "network": { // "interface": "wlp58s0", // (Optional) To force the use of this interface "interval": 10, - "tooltip": "{ipaddr}", + "tooltip-format": "{essid} {ipaddr}", "format-ethernet": "", "format-wifi": "", "format-disconnected": "⛖", @@ -103,6 +103,7 @@ "network#wireguard": { "interval": 10, "interface": "wg0", // (Optional) To force the use of this interface + "tooltip-format": "{ifname} {ipaddr}", "tooltip": "{ipaddr}", "format": "⚿", "format-disconnected": "⚿", @@ -158,8 +159,8 @@ "on-click": "${HOME}/scripts/waybar/waybar-audio.sh" }, "tray": { - "icon-size": 28, - "spacing": 10 + "icon-size": 24, + "spacing": 0 }, "custom/todo": { "format": "🗈", diff --git a/waybar/style.css b/waybar/style.css index 72fd6d0b2..dba380b99 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -62,7 +62,7 @@ window#waybar { #window, #workspaces, #mode, #mpd, #network, #cpu, #memory, #custom-disk, #temperature, #backlight, #custom-battery, #pulseaudio, #custom-clock, #tray, #custom-todo, #custom-osk, #idle_inhibitor, #custom-power, #custom-weather { color: @grey06; - padding: 0 5px; + padding: 0 3px; margin: 0px; } @@ -128,12 +128,13 @@ window#waybar { #network { color: @blue; - margin-right: -8px; + font-size: 24px; + margin-right: -4px; } #network.wireguard { padding: 0px; - margin-right: 0px; + margin-right: 4px; } #network.disconnected { @@ -185,7 +186,7 @@ window#waybar { /* Battery */ #custom-battery { - color: @yellow; + color: @green; } #custom-battery.charging { @@ -193,6 +194,10 @@ window#waybar { } #custom-battery.discharging { + color: @yellow; +} + +#custom-battery.low { color: @orange; } @@ -215,26 +220,26 @@ window#waybar { color: @grey06; } -/* Clock */ +/* Tray */ -#custom-clock { - color: @fg; +#tray { + margin-right: 3px; } /* Todo-txt */ #custom-todo { - font-size: 20px; + font-size: 40px; margin-top: -13px; - margin-bottom: -10px; + margin-bottom: -9px; margin-left: -8px; - margin-right: -8px; + margin-right: -6px; } /* On-Screen Keyboard */ #custom-osk { - font-size: 30px; + font-size: 40px; margin-top: -13px; margin-bottom: -15px; } @@ -249,16 +254,23 @@ window#waybar { color: @orange; } -/* Gammastep */ +/* Bar locker */ -#custom-gammastep.enabled { - color: #fefefe; +#custom-bar { + padding: 3px; + margin-top: -10px; } +/* Gammastep */ + #custom-gammastep { margin-top: -5px; } +#custom-gammastep.enabled { + color: #fefefe; +} + /* Idle Inhibitor */ #idle_inhibitor.activated { @@ -266,6 +278,12 @@ window#waybar { color: @white; } +/* Clock */ + +#custom-clock { + color: @fg; +} + /* Power button */ #custom-power {