Move to single bar

At top and fully justified

TODO:
- Work on bar pinning. Should be able to lock the bar's visibility
and have it automatically lock in tablet mode
- Second template with just workspaces and window on eInk
This commit is contained in:
John Mertz 2023-04-09 20:34:19 -04:00
parent 44c7322460
commit 48a53a1d27
2 changed files with 27 additions and 55 deletions

View File

@ -4,26 +4,6 @@
// The script will build a config with these settings for each enabled display. // The script will build a config with these settings for each enabled display.
// The '__' variables are defined in the hash in that script file. // The '__' variables are defined in the hash in that script file.
[{ [{
"name": "window",
"output": __OUTPUT__,
"ipc": true,
"id": "bar-1",
"width": 1000,
"mode": "hide",
"hidden_state": "hide",
"layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
"margin-left": 75,
"margin-right": 75,
"margin-top": 68,
"modules-left": [],
"modules-center": ["sway/mode", "sway/window"],
"modules-right": [],
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
},
{
"name": "bar", "name": "bar",
"output": __OUTPUT__, "output": __OUTPUT__,
"ipc": true, "ipc": true,
@ -32,13 +12,13 @@
"hidden_state": "hide", "hidden_state": "hide",
"layer": "top", // Waybar at top layer "layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right) "position": "top", // Waybar position (top|bottom|left|right)
"margin-left": 20, //"margin-left": 20,
"margin-right": 20, //"margin-right": 20,
"margin-top": 20, //"margin-top": 20,
// Choose the order of the modules // Choose the order of the modules
"modules-left": ["sway/workspaces"], "modules-left": ["sway/workspaces", "sway/window"],
"modules-center": [], "modules-center": [],
"modules-right": ["custom/weather", "network", "network#wireguard", "cpu", "memory", "custom/disk", "temperature", "backlight", "custom/battery", "pulseaudio","tray", "custom/wallpaper", "custom/todo", "custom/osk", "custom/pkg", "custom/bar", "custom/gammastep", "idle_inhibitor", "custom/hibernate_inhibitor", "custom/clock", "custom/power"], "modules-right": ["sway/mode", "custom/weather", "network", "network#wireguard", "cpu", "memory", "custom/disk", "temperature", "custom/battery", "pulseaudio","tray", "custom/wallpaper", "custom/todo", "custom/osk", "custom/pkg", "custom/bar", "custom/gammastep", "idle_inhibitor", "custom/hibernate_inhibitor", "custom/clock", "custom/power"],
// Modules configuration // Modules configuration
"sway/workspaces": { "sway/workspaces": {
// "disable-scroll": true, // "disable-scroll": true,
@ -125,14 +105,14 @@
"critical-threshold": 80, "critical-threshold": 80,
"format": "\u200a{temperatureC}°C" "format": "\u200a{temperatureC}°C"
}, },
"backlight": { //"backlight": {
// "device": "acpi_video1", // "device": "acpi_video1",
"format": "{icon}\u200a{percent}%", //"format": "{icon}\u200a{percent}%",
"format-icons": [ "•", "☼", "o", "", ""], //"format-icons": [ "•", "☼", "o", "", ""],
"on-click": "${HOME}/scripts/thinkpad/blc.pl --notify %", //"on-click": "${HOME}/scripts/thinkpad/blc.pl --notify %",
"on-scroll-up": "${HOME}/scripts/thinkpad/blc.pl --notify ++", //"on-scroll-up": "${HOME}/scripts/thinkpad/blc.pl --notify ++",
"on-scroll-down": "${HOME}/scripts/thinkpad/blc.pl --notify --" //"on-scroll-down": "${HOME}/scripts/thinkpad/blc.pl --notify --"
}, //},
"custom/battery": { "custom/battery": {
"format": "{}", "format": "{}",
"return-type": "json", "return-type": "json",
@ -162,7 +142,7 @@
}, },
"custom/wallpaper": { "custom/wallpaper": {
"interval": 86400, "interval": 86400,
"exec": "echo '🌌\nRotate wallpaper\nactive'", "exec": "echo '\nRotate wallpaper\nactive'",
"on-click": "${HOME}/scripts/sway/rotate-wallpaper.sh" "on-click": "${HOME}/scripts/sway/rotate-wallpaper.sh"
}, },
"custom/todo": { "custom/todo": {

View File

@ -46,49 +46,40 @@
} }
window#waybar.window { window#waybar.window {
font-size: 14px;
} }
window#waybar { window#waybar {
margin: -5px; margin: -5px;
border-radius: 30px; border-bottom: solid 1px @fg;
border: solid 2px @fg;
font-size: 14px;
background-color: @bg; background-color: @bg;
animation-name: fadeIn; animation-name: fadeIn;
animation-duration: 1s; animation-duration: 1s;
color: @fg; color: @fg;
} }
#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 { #window, #mode, #custom-weather, #mpd, #network, #cpu, #memory, #custom-disk, #temperature, #custom-battery, #pulseaudio, #tray, #custom-wallpaper, #custom-todo, #custom-osk, #custom-pkg, #custom-bar, #custom-gammastep, #idle_inhibitor, #custom-hibernate_inhibitor, #custom-clock, #custom-power {
color: @grey06; color: @grey06;
padding: 0 3px; padding: 0px 2px;
margin: 0px; margin: 0px;
} }
/* Tray */ /* Tray */
#tray, #custom-todo, #custom-osk, #custom-pkg, #custom-bar, #custom-gammastep, #idle_inhibitor, #custom-clock, #custom-power { #tray, #custom-wallpaper, #custom-todo, #custom-osk, #custom-pkg, #custom-bar, #custom-gammastep, #idle_inhibitor, #custom-clock, #custom-power {
color: @bluehi; color: @bluehi;
} }
#mode, #mpd, #network, #cpu, #memory, #custom-disk, #temperature, #backlight, #custom-battery, #custom-clock, #tray, #custom-todo, #custom-osk, #idle_inhibitor { /* Wallpaper rotation */
border-top: solid 2px @fg;
border-bottom: solid 2px @fg;
}
#window { #custom-wallpaper {
padding: 5px; margin: -10px -4px -5px -4px;
font-size: 20px;
} }
/* Workspaces */ /* Workspaces */
#workspaces { #workspaces {
color: @fg; color: @fg;
padding: 0px 0px;
margin: 0px;
margin-left: 15px;
border-radius: 0px;
} }
#workspaces button.visible { #workspaces button.visible {
@ -126,8 +117,7 @@ window#waybar {
} }
#custom-weather { #custom-weather {
font-size: 14px; margin-top: -7px;
margin-top: -5px;
} }
/* Networks */ /* Networks */
@ -140,6 +130,8 @@ window#waybar {
#network.wireguard { #network.wireguard {
padding: 0px; padding: 0px;
font-size: 18px;
margin-top: -2px;
margin-right: 2px; margin-right: 2px;
} }
@ -229,7 +221,7 @@ window#waybar {
/* Tray */ /* Tray */
#tray { #tray {
font-size: 14px; margin-right: -2px;
} }
/* Todo-txt */ /* Todo-txt */
@ -299,8 +291,8 @@ window#waybar {
/* Power button */ /* Power button */
#custom-power { #custom-power {
margin-right: 8px; margin-right: 0px;
margin-top: 8px; margin-top: 5px;
color: @red; color: @red;
} }