Initial commit of waybar configs

This commit is contained in:
John Mertz 2022-05-27 17:13:37 -04:00
parent f067d31581
commit 7327cc6928
3 changed files with 527 additions and 0 deletions

238
waybar/config.template Normal file
View File

@ -0,0 +1,238 @@
// This is not a valid Waybar config file. It is a template designed to work with:
// https://git.john.me.tz/jpm/scripts/src/branch/master/sway/displays.pl
// You can make changes to the bar, but leave the '__' variables intact.
// The script will build a config with these settings for each enabled display.
// 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>"
},
},{
// 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": "<span font='Anonymous Pro 12'><big>{:%d %B}</big>\n<tt><small>{calendar}</small></tt></span>",
"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",
"output": __OUTPUT__,
"ipc": true,
"id": "bar-1",
"mode": "hide",
"hidden_state": "hide",
"layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
"margin-left": 20,
"margin-right": 20,
"margin-top": 20,
// 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 configuration
"sway/workspaces": {
// "disable-scroll": true,
// "all-outputs": true,
"format": "{icon}",
"numeric-first": true,
"format-icons": {
"0": "0 \uf073",
"1": "1 \uf27a",
"2": "2 \uf0e0",
"3": "3 \uf268",
"4": "4 \uf144",
"5": "5 \uf095",
"6": "6 \uf120",
"7": "7 \uf269",
"8": "8 \uf121",
"9": "9 \uf126",
"C0": "C0",
"C1": "C1",
"C2": "C2",
"C3": "C3",
"C4": "C4",
"C5": "C5",
"C6": "C6",
"C7": "C7",
"C8": "C8",
"C9": "C9",
"grave": "",
"urgent": "!",
"focused": "",
"default": ""
}
},
//"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"
//},
"custom/weather": {
"interval": 600,
"tooltip-format": "<span font='Anonymous Pro 12'><big>{:%d %B}</big>\n<tt><small>{calendar}</small></tt></span>",
"on-click": "${HOME}/scripts/waybar/waybar-weather.pl notify",
"exec": "${HOME}/scripts/waybar/waybar-weather.sh bar"
},
"network": {
// "interface": "wlp58s0", // (Optional) To force the use of this interface
"interval": 10,
"tooltip": "{ipaddr}",
"format-ethernet": "",
"format-wifi": "",
"format-disconnected": "⛖",
"on-click": "${HOME}/scripts/waybar/waybar-nm.sh"
//"on-click": "if [ $(sudo pgrep -c nmtui) -gt 0 ]; then sudo pkill nmtui; else /usr/bin/xterm -e 'sudo /usr/bin/nmtui'; fi"
},
"network#wireguard": {
"interval": 10,
"interface": "wg0", // (Optional) To force the use of this interface
"tooltip": "{ipaddr}",
"format": "🔒",
"format-disconnected": "🔓",
"on-click": "if [ $(sudo pgrep -xc rofi) -gt 0 ]; then pkill rofi; else ${HOME}/scripts/rofi/rofi-openvpn.sh; fi"
},
"cpu": {
"format": "{usage}%",
"tooltip": true,
"on-click": "${HOME}/scripts/waybar/waybar-cpu.sh"
},
"memory": {
"format": "{}%",
"on-click": "${HOME}/scripts/waybar/waybar-mem.sh"
},
"custom/disk": {
"format": "\uf0a0{}",
"exec": "df / | tail -n 1 | awk {'print $5'}",
"on-click": "${HOME}/scripts/waybar/waybar-disk.sh"
},
"temperature": {
"critical-threshold": 80,
"format": "{temperatureC}°C"
},
"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": {
"format": "{}",
"return-type": "json",
"exec": "${HOME}/scripts/thinkpad/pow.pl -b",
"interval": 5,
"on-click": "notify-send Power \"`${HOME}/scripts/thinkpad/pow.pl -p`\""
},
"pulseaudio": {
//"scroll-step": 1,
"format": "{icon}{volume}%",
"format-bluetooth": "{icon}{volume}%",
"format-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
},
"on-click": "${HOME}/scripts/waybar/waybar-audio.sh"
},
}]

37
waybar/gruvbox-oled.css Normal file
View File

@ -0,0 +1,37 @@
/*
* Pure Black spin of Gruvbox
*/
@define-color black #000000;
@define-color white #FFFFFF;
@define-color fg #EBDBB2;
@define-color fghi #FBF1C7;
@define-color bg #282828;
@define-color hibg #1d2021;
@define-color grey00 #1d2021;
@define-color grey01 #282828;
@define-color grey02 #323836;
@define-color grey03 #504945;
@define-color grey04 #665c54;
@define-color grey05 #7C6F64;
@define-color grey06 #928374;
@define-color grey07 #A89984;
@define-color grey08 #BDAE93;
@define-color grey09 #D5C4A1;
@define-color grey10 #EBDBB2;
@define-color grey11 #FBF1C7;
@define-color red #CC241d;
@define-color green #98971A;
@define-color yellow #D79921;
@define-color blue #458588;
@define-color purple #B16286;
@define-color aqua #8EC07C;
@define-color orange #D65D0E;
@define-color redhi #FB4934;
@define-color greenhi #B8BB26;
@define-color yellowhi #FABD2F;
@define-color bluehi #83A598;
@define-color purplehi #D3869B;
@define-color aquahi #8EC07C;
@define-color orangehi #FE8019;
@define-color alert #D65D0E;
@define-color warning #FE8019;

252
waybar/style.css Normal file
View File

@ -0,0 +1,252 @@
@import "gruvbox-oled.css";
/*
* Available colours
* black
* white
* fg
* fghi
* bg
* bghi
* grey00 = bghi
* grey01 = bg
* grey02
* grey03
* grey04
* grey05
* grey06
* grey07
* grey08
* grey09
* grey10 = fg
* grey11 = fghi
* red
* green
* yellow
* blue
* purple
* aqua
* redhi
* greenhi
* yellowhi
* bluehi
* purple hi
* aquahi
* orangehi
* alert = orange
* warning = orangehi
*/
/* Global/Multi */
* {
font-family: "Anonymous Pro", "Font Awesome 5 Brands", "Font Awesome 5 Free", Monospace;
font-size: 24px;
min-height: 0;
}
window#waybar.window {
font-size: 12px;
}
window#waybar {
border-radius: 30px;
border: solid 2px @fg;
font-size: 12px;
background-color: @bg;
animation-name: fadeIn;
animation-duration: 1s;
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 {
color: @grey06;
padding: 0 5px;
margin: 0px;
}
/* Tray */
#tray, #custom-todo, #custom-osk, #custom-apt, #custom-bar, #idle_inhibitor, #custom-clock, #custom-power {
color: @bluehi;
}
#mode, #mpd, #network, #cpu, #memory, #custom-disk, #temperature, #backlight, #custom-battery, #custom-clock, #tray, #custom-todo, #custom-osk, #idle_inhibitor {
border-top: solid 2px @fg;
border-bottom: solid 2px @fg;
}
#window {
padding: 10px;
}
/* Start Launcher */
#custom-launcher {
margin-left: 15px;
color: @fg;
}
/* Workspaces */
#workspaces {
color: @fg;
padding: 0px 0px;
margin: 0px;
margin-left: 15px;
border-radius: 0px;
}
#workspaces button.visible {
background-color: @grey06;
}
#workspaces button.focused {
background-color: @fg;
color: @grey06;
}
#workspaces button.urgent {
background-color: @redhi;
color: @white;
}
/* Mode */
#mode {
background-color: @grey06;
color: @bg;
}
/* Window title */
#window {
color: @fg;
}
/* MPD */
#mpd {
color: @bg;
}
/* Networks */
#network {
color: @blue;
}
#network.disconnected {
color: @red;
padding: 0px;
}
#network.wifi {
}
/* CPU */
#cpu {
color: @fg;
color: @greenhi;
}
/* Memory */
#memory {
color: @fg;
color: @purplehi;
}
/* Disk */
#custom-disk {
color: @fg;
color: @purple;
}
/* Temperature */
#temperature {
color: @fg;
color: @yellowhi;
}
#temperature.critical {
color: @redhi;
}
/* Backlight */
#backlight {
color: @fg;
color: @greenhi;
}
/* Battery */
#custom-battery {
color: @yellow;
}
#custom-battery.charging {
color: @green;
}
#custom-battery.discharging {
color: @orange;
}
#custom-battery.critical {
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
color: @redhi;
}
/* Pulseaudio */
#pulseaudio {
margin-right: 15px;
color: @bluehi;
}
#pulseaudio.muted {
color: @grey06;
}
/* Clock */
#custom-clock {
color: @fg;
}
/* Todo-txt */
#custom-todo {
color: @fg;
color: @bluehi;
}
/* On-Screen Keyboard */
#custom-osk {
color: @fg;
color: @bluehi;
}
/* Idle Inhibitor */
#idle_inhibitor.activated {
/* background-color: @fg; */
color: @white;
}
/* Power button */
#custom-power {
margin-right: 15px;
color: @red;
}