Pretty new config is stable!

This commit is contained in:
John Mertz 2024-10-16 12:59:47 -06:00
parent 114572fac4
commit 5c2ab819d8
2 changed files with 144 additions and 99 deletions

View File

@ -17,9 +17,9 @@
//"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", "sway/window"], "modules-left": ["sway/mode", "sway/workspaces", "sway/window"],
"modules-center": [], "modules-center": [],
"modules-right": ["sway/mode", "custom/weather", "custom/keyboard", "backlight", "cpu", "memory", "custom/disk", "temperature", "pulseaudio", "custom/battery", "tray", "custom/wallpaper", "custom/pkg", "custom/idle_mode", "custom/clock", "custom/nc"], "modules-right": ["custom/keyboard", "custom/weather", "backlight", "cpu", "memory", "custom/disk", "temperature", "pulseaudio", "custom/battery", "tray", "custom/wallpaper", "custom/pkg", "custom/idle_mode", "custom/clock", "custom/nc"],
// Modules configuration // Modules configuration
"sway/workspaces": { "sway/workspaces": {
// "disable-scroll": true, // "disable-scroll": true,
@ -65,6 +65,13 @@
//"format-disconnected": "⚠ mpd", //"format-disconnected": "⚠ mpd",
//"on-click": "${HOME}/scripts/waybar/waybar-mpd.sh" //"on-click": "${HOME}/scripts/waybar/waybar-mpd.sh"
//}, //},
"custom/keyboard": {
"on-click": "${HOME}/scripts/waybar/waybar-keyboard.sh layout",
"on-click-right": "${HOME}/scripts/waybar/waybar-keyboard.sh osk",
"exec": "${HOME}/scripts/waybar/waybar-keyboard.sh bar",
"exec-on-event": true,
"return-type": "json",
},
"custom/weather": { "custom/weather": {
"interval": 600, "interval": 600,
"return-type": "json", "return-type": "json",
@ -97,14 +104,6 @@
"on-scroll-up": "${HOME}/scripts/waybar/waybar-backlight.sh up", "on-scroll-up": "${HOME}/scripts/waybar/waybar-backlight.sh up",
"on-scroll-down": "${HOME}/scripts/waybar/waybar-backlight.sh down" "on-scroll-down": "${HOME}/scripts/waybar/waybar-backlight.sh down"
}, },
//"backlight": {
//"device": "acpi_video1",
//"format": "{icon} {percent}%",
//"format-icons": [ "•", "☼", "o", "", ""],
//"on-click": "${HOME}/scripts/thinkpad/blc.pl --notify %",
//"on-scroll-up": "${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",
@ -131,6 +130,13 @@
"on-click": "pavucontrol", "on-click": "pavucontrol",
"on-click-right": "${HOME}/scripts/waybar/waybar-volume.sh" "on-click-right": "${HOME}/scripts/waybar/waybar-volume.sh"
}, },
"custom/pkg": {
"interval": 360,
"tooltip-format": "<span font='Anonymous Pro 12'><big>{:%d %B}</big>\n<tt><small>{calendar}</small></tt></span>",
"on-click": "alacritty --config-file ~/.dotfiles/alacritty/host.toml --class Alacritty-grave -e ${HOME}/scripts/waybar/waybar-pkg.sh upgrade",
"return-type": "json",
"exec": "${HOME}/scripts/waybar/waybar-pkg.sh bar"
},
"tray": { "tray": {
"icon-size": 24, "icon-size": 24,
"spacing": 0 "spacing": 0
@ -140,25 +146,6 @@
"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": {
//"interval": 86400,
//"exec": "echo '☑\nTo-do list\n'",
//"on-click": "${HOME}/scripts/waybar/waybar-todo.sh",
//},
"custom/keyboard": {
"interval": 1,
"on-click": "${HOME}/scripts/waybar/waybar-keyboard.sh layout",
"on-click-right": "${HOME}/scripts/waybar/waybar-keyboard.sh osk",
"exec": "${HOME}/scripts/waybar/waybar-keyboard.sh bar",
"return-type": "json",
},
"custom/pkg": {
"interval": 360,
"tooltip-format": "<span font='Anonymous Pro 12'><big>{:%d %B}</big>\n<tt><small>{calendar}</small></tt></span>",
"on-click": "alacritty --config-file ~/.dotfiles/alacritty/host.toml --class Alacritty-grave -e ${HOME}/scripts/waybar/waybar-pkg.sh upgrade",
"return-type": "json",
"exec": "${HOME}/scripts/waybar/waybar-pkg.sh bar"
},
"custom/idle_mode": { "custom/idle_mode": {
"interval": 1, "interval": 1,
"return-type": "json", "return-type": "json",
@ -166,36 +153,30 @@
"on-click": "${HOME}/scripts/sway/idle.sh mode", "on-click": "${HOME}/scripts/sway/idle.sh mode",
"on-click-right": "${HOME}/scripts/sway/idle.sh toggle" "on-click-right": "${HOME}/scripts/sway/idle.sh toggle"
}, },
"custom/gammastep": {
"interval": 1,
"return-type": "json",
"exec": "${HOME}/scripts/waybar/waybar-gammastep.sh",
"on-click": "${HOME}/scripts/waybar/waybar-gammastep.sh toggle"
},
"custom/nc": {
"tooltip": true,
"format": "{icon} Test",
"format-icons": {
"notification": " <span foreground=red><sup></sup></span>",
"none": "<span style='color: #928374'> </span>",
"dnd-notification": " <span foreground=red><sup></sup></span>",
"dnd-none": " ",
"inhibited-notification": " <span foreground=red><sup></sup></span>",
"inhibited-none": " ",
"dnd-inhibited-notification": " <span foreground=red><sup></sup></span>",
"dnd-inhibited-none": " "
},
"return-type": "json",
"exec": "swaync-client -swb",
"exec-if": "which swaync-client",
"on-click": "swaync-client -t",
"on-click-right": "swaync-client -d",
"escape": true
},
"custom/clock": { "custom/clock": {
"interval": 60, "interval": 60,
"on-click": "flatpak run org.mozilla.Firefox https://papillon.john.me.tz/calendar.php", "on-click": "flatpak run org.mozilla.Firefox https://papillon.john.me.tz/calendar.php",
"return-type": "json", "return-type": "json",
"exec": "echo '{\"class\": \"clock\", \"text\": \"'$(date '+%H:%M')'\", \"tooltip\": \"'$(date '+%A, %B %d, %Y | %Y-%m-%d')'\"}'" "exec": "echo '{\"class\": \"clock\", \"text\": \"'$(date '+%H:%M')'\", \"tooltip\": \"'$(date '+%A, %B %d, %Y | %Y-%m-%d')'\"}'"
}, },
"custom/nc": {
"tooltip": true,
"format": "{icon}",
"format-icons": {
"notification": "",
"none": "",
"dnd-notification": "",
"dnd-none": "",
"inhibited-notification": "",
"inhibited-none": " ",
"dnd-inhibited-notification": "",
"dnd-inhibited-none": " "
},
"return-type": "json",
"exec": "swaync-client -swb",
"exec-if": "which swaync-client",
"on-click": "swaync-client --toggle-panel",
"on-click-right": "swaync-client --toggle-dnd",
"escape": true
}
}] }]

View File

@ -45,64 +45,137 @@
min-height: 0; min-height: 0;
} }
window#waybar.window {
}
window#waybar { window#waybar {
margin: -5px; margin: -5px;
border-bottom: solid 1px @fg;
background-color: @bg;
animation-name: fadeIn; animation-name: fadeIn;
animation-duration: 1s; animation-duration: 1s;
color: @fg; color: @fg;
border-bottom: solid 1px @fg;
border-top: solid 1px @fg;
} }
#window, #mode, #custom-weather, #mpd, #cpu, #memory, #custom-disk, #temperature, #custom-battery, #pulseaudio, #tray, #custom-todo, #custom-keyboard, #custom-pkg, #custom-clock { /* Right */
color: @grey06;
padding: 0px 2px; #window, #custom-weather, #custom-mpd, #custom-keyboard, #backlight, #cpu, #memory, #custom-disk, #temperature, #pulseaudio, #custom-battery, #tray, #custom-wallpaper, #custom-pkg, #custom-clock, #custom-idle_mode, #custom-nc {
border-top: solid 1px @fg;
border-bottom: solid 1px @fg;
margin: 0px; margin: 0px;
padding-left: 5px;
}
/* Left-most modules */
#custom-keyboard, #backlight, #tray {
border-top-left-radius: 15px;
border-bottom-left-radius: 15px;
border-left: 1px solid @fg;
padding-left: 5px;
}
/* Misc */
#custom-weather, #custom-mpd, #custom-keyboard {
color: @fg;
background: @grey01;
}
/* Status area */
#backlight, #cpu, #memory, #custom-disk, #temperature, #pulseaudio, #custom-battery {
color: @yellowhi;
background: @grey02;
} }
/* Tray */ /* Tray */
#tray, #custom-wallpaper, #custom-pkg, #custom-clock, #custom-idle_mode { #tray, #custom-wallpaper, #custom-pkg, #custom-clock, #custom-idle_mode {
background: @grey03; background: @grey03;
border-bottom: 1px solid @fg;
color: @bluehi; color: @bluehi;
margin: 0px;
} }
/* Workspaces */ /* Workspaces */
#workspaces { #workspaces {
color: @fg; border-top-right-radius: 15px;
border-bottom-right-radius: 15px;
background-color: @grey02;
} }
#workspaces button, #mode {
border: solid 1px @fg;
border-left: 0px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border-top-right-radius: 15px;
border-bottom-right-radius: 15px;
color: @white;
padding: 0px;
margin: 0px;
background: none;
margin-right: -10px;
padding-left: 6px;
}
#workspaces button:first-child {
padding-left: 5px;
}
#workspaces button:last-child {
margin-right: 0px;
}
#workspaces button.visible { #workspaces button.visible {
background-color: @grey06; color: @white;
} }
#workspaces button.focused { #workspaces button.focused {
background-color: @fg; color: @orangehi;
color: @grey06; border-color: @orangehi;
font-weight: bold;
} }
#workspaces button.urgent { #workspaces button.urgent, #mode {
background-color: @redhi; color: @redhi;
color: @white; border-color: @redhi;
font-weight: bold;
} }
/* Mode */ /* Mode */
#mode { #mode {
background-color: @grey06; background-color: @grey01;
color: @bg; padding-right: 7px;
} }
/* Window title */ /* Window title */
window#waybar.empty #window {
background: none;
}
#window { #window {
color: @fg; color: @fg;
margin: 0px 10px;
padding: 0px 20px;
background: linear-gradient(90deg, @bg 0%, @grey03 3%, @grey03 97%, @bg 100%);
}
/* Keyboard */
#custom-keyboard {
padding-left: 5px;
}
#custom-keyboard.alternate {
color: @orange;
}
/* Weather */
#custom-weather {
color: @bluehi;
border-radius: 0px;
padding-right: 24px;
margin-right: -20px;
} }
/* MPD */ /* MPD */
@ -111,30 +184,9 @@ window#waybar {
color: @fg; color: @fg;
} }
/* Weather */
#custom-weather {
margin-top: -8px;
margin-bottom: -2px;
}
/* Keyboard */
#custom-keyboard {
color: @bluehi;
margin-right: -2px;
margin-top: -1px;
}
#custom-keyboard.alternate {
color: @orange;
}
/* Backlight */ /* Backlight */
#backlight { #backlight {
margin-left: 5px;
margin-right: 2px;
color: @yellowhi; color: @yellowhi;
} }
@ -198,7 +250,7 @@ window#waybar {
#custom-battery { #custom-battery {
color: @green; color: @green;
margin-top: -1px; padding-right: 24px;
} }
#custom-battery.charging { #custom-battery.charging {
@ -225,14 +277,15 @@ window#waybar {
/* Tray */ /* Tray */
#tray { #tray {
margin-left: -20px;
margin-right: -4px; margin-right: -4px;
} }
/* Wallpaper rotation */ /* Wallpaper rotation */
#custom-wallpaper { #custom-wallpaper {
font-size: 22px; font-size: 16px;
margin-top: -4px; padding-right: 4px;
} }
/* Package upgrades */ /* Package upgrades */
@ -250,10 +303,11 @@ window#waybar {
#custom-idle_mode { #custom-idle_mode {
font-family: "Font Awesome 6 Brands", "Font Awesome 6 Free"; font-family: "Font Awesome 6 Brands", "Font Awesome 6 Free";
padding-right: 3px; padding-right: 3px;
padding-left: 0px;
} }
#custom-idle_mode.none { #custom-idle_mode.none {
color: @red; color: @orangehi;
} }
/* Clock */ /* Clock */
@ -262,6 +316,7 @@ window#waybar {
color: @fg; color: @fg;
font-weight: bold; font-weight: bold;
margin: 0px; margin: 0px;
padding-right: 5px;
} }
/* Notifications */ /* Notifications */
@ -270,4 +325,13 @@ window#waybar {
font-family: "NotoSansMono Nerd Font"; font-family: "NotoSansMono Nerd Font";
background: @grey06; background: @grey06;
margin: 0px; margin: 0px;
padding-right: 5px;
padding-left: 5px;
}
#custom-nc.dnd-none {
color: @bg;
}
#custom-nc.dnd-notification {
background: @orange;
} }