waybar config cleanup and style change

This commit is contained in:
dalahast 2020-05-26 19:06:23 +02:00
parent f4bb1710ea
commit e71c853be9
2 changed files with 55 additions and 142 deletions

@ -30,7 +30,7 @@
// Choose the order of the modules // Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode"], "modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"], "modules-center": ["sway/window"],
"modules-right": ["tray", "pulseaudio", "idle_inhibitor", "network", "cpu", "memory", "temperature", "clock#date", "clock#time"], "modules-right": ["tray", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "clock#date", "clock#time"],
// Modules configuration // Modules configuration
"sway/mode": { "sway/mode": {
@ -74,18 +74,20 @@
"spacing": 10 "spacing": 10
}, },
"clock#time": { "clock#time": {
"interval": 1, "interval": 1,
"format": "{:%H:%M:%S}", "format": "{:%H:%M:%S}",
"tooltip": false "tooltip": false
}, },
"clock#date": { "clock#date": {
"interval": 10, "interval": 10,
"format": "{:%a %b %e %Y}", "format": "{:%a %b %e}",
"tooltip": false "tooltip": true,
"tooltip-format": "{:%a %b %e %Y}"
}, },
"cpu": { "cpu": {
"format": "{usage:3}%", "format": " {usage}%",
"tooltip": false "tooltip": true,
"interval": 2
}, },
"memory": { "memory": {
"format": "{:2}%", "format": "{:2}%",
@ -95,46 +97,60 @@
// "thermal-zone": 2, // "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80, "critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{icon} {temperatureC}°C", "format": "{icon} {temperatureC}°C",
"format-icons": ["", "", ""], "format-icons": ["", "", ""],
"on-click": "exec kitty watch -n 5 sensors" "on-click": "exec kitty watch -n 5 sensors",
"tooltip": true
}, },
"backlight": { "backlight": {
// "device": "acpi_video1", // "device": "acpi_video1",
"format": "{icon} {percent}%", "format": "{icon}{percent}",
"format-icons": ["", ""] "format-icons": [""]
}, },
"battery": { "battery": {
"bat": "BAT0",
"states": { "states": {
// "good": 95, "good": 95,
"warning": 30, "warning": 30,
"critical": 15 "critical": 15
}, },
"format": "{capacity}% {icon}", "format": "{icon}{capacity}%",
"format-charging": " {capacity}%", "format-charging": "{capacity:3}%",
"format-plugged": " {capacity}%", "format-plugged": "{capacity:3}%",
"format-alt": "{icon}{time}", "format-alt": "{icon}{time}",
// "format-good": "", // An empty format will hide the module "format-good": "", // An empty format will hide the module
// "format-full": "", "format-full": "",
"format-icons": ["", "", "", "", ""] "format-icons": ["", "", "", "", ""]
}, },
"battery#bat2": { "battery#bat2": {
"bat": "BAT2" "bat": "BAT1",
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon}{capacity}%",
"format-charging": "{capacity:3}%",
"format-plugged": "{capacity:3}%",
"format-alt": "{icon}{time}",
"format-good": "", // An empty format will hide the module
"format-full": "",
"format-icons": ["", "", "", "", ""]
}, },
"network": { "network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface // "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": " {essid} ({signalStrength}%)", "format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": " {ifname} ▲{bandwidthUpBits:8} ▼{bandwidthDownBits:8}", "format-ethernet": "",
"format-linked": " {ifname} (No IP)", "format-linked": " {ifname} (No IP)",
"format-disconnected": "Disconnected ⚠", "format-disconnected": "Disconnected ⚠",
"format-alt": "{ipaddr}/{cidr}", "format-alt": "{ifname} {ipaddr}/{cidr} ▲{bandwidthUpBits}▼{bandwidthDownBits}",
"on-click-right": "exec gnome-terminal nmtui", "on-click-right": "exec kitty nmtui",
"interval": 1 "interval": 1,
"tooltip-format": "{ifname} {ipaddr}/{cidr} ▲{bandwidthUpBits}▼{bandwidthDownBits}"
}, },
"pulseaudio": { "pulseaudio": {
// "scroll-step": 1, // %, can be a float // "scroll-step": 1, // %, can be a float
"format": "{icon}{volume:3}% {format_source}", "format": "{icon} {volume}% {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}", "format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}", "format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}", "format-muted": " {format_source}",

@ -1,5 +1,4 @@
* { * {
border: none;
border-radius: 0; border-radius: 0;
/* `otf-font-awesome` is required to be installed for icons */ /* `otf-font-awesome` is required to be installed for icons */
font-family: 'Anka/Coder';/*Roboto, Helvetica, Arial, sans-serif; */ font-family: 'Anka/Coder';/*Roboto, Helvetica, Arial, sans-serif; */
@ -10,9 +9,8 @@
window#waybar { window#waybar {
background-color: transparent; background-color: transparent;
/*background-color: rgba(43, 48, 59, 0.5);*/ /* background-color: #002b36; */
/* border-bottom: 3px solid rgba(100, 114, 125, 0.5); */ color: #a6baba;
color: #ffffff;
transition-property: background-color; transition-property: background-color;
transition-duration: .5s; transition-duration: .5s;
} }
@ -22,23 +20,22 @@ window#waybar.hidden {
} }
#workspaces button { #workspaces button {
padding: 2px 5px 0; padding: 1px 5px 0px;
background-color: transparent; background-color: transparent;
color: #ffffff; color: #a6baba;
/* border-bottom: 3px solid transparent; */ border-top: 2px solid transparent;
} }
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover { #workspaces button:hover {
background: rgba(0, 0, 0, 0.2); background: rgba(0, 0, 0, 0.2);
box-shadow: inherit; box-shadow: inherit;
/* border-bottom: 3px solid #ffffff; */
} }
#workspaces button.focused { #workspaces button.focused {
background-color: #64727D; background-color: #073642; /*#64727D;*/
/* border-bottom: 3px solid #ffffff; */ border-top: 2px solid #839496;
padding: 2px 5px 0; padding: 1px 5px 0px;
} }
#workspaces button.urgent { #workspaces button.urgent {
@ -46,9 +43,8 @@ window#waybar.hidden {
} }
#mode { #mode {
padding: 0 5px 0; padding: 1px 5px 0px;
background-color: #64727D; background-color: #073642;
/* border-bottom: 3px solid #ffffff; */
} }
#clock, #clock,
@ -59,34 +55,25 @@ window#waybar.hidden {
#backlight, #backlight,
#network, #network,
#pulseaudio, #pulseaudio,
#custom-media,
#tray, #tray,
#idle_inhibitor, #idle_inhibitor,
#mpd { #mpd {
padding: 0 10px 0; padding: 0 1px 0;
margin: 0 4px 0; margin: 0 4px 0;
color: #ffffff; color: #a6baba;
background-color: transparent;
} }
#clock { #clock {
padding: 0 0 0; padding: 0 0 0;
background-color: transparent;
} }
#clock.time { #clock.time {
background-color: transparent;
min-width: 60px; min-width: 60px;
} }
#battery {
padding: 0 1px 0;
background-color: transparent;
color: #ffffff;
}
#battery.charging { #battery.charging {
color: #26A65B; color: #26A65B;
/* background-color: #26A65B; */
} }
@keyframes blink { @keyframes blink {
@ -106,100 +93,10 @@ window#waybar.hidden {
animation-direction: alternate; animation-direction: alternate;
} }
label:focus {
background-color: #000000;
}
#cpu {
padding: 0 1px 0;
/* background-color: #2ecc71; */
color: #fff;
}
#memory {
padding: 0 1px 0;
/* background-color: #9b59b6; */
}
#backlight {
padding: 0 1px 0;
/* background-color: #90b1b1; */
}
#network {
min-width: 250px;
padding: 0 1px 0;
/* background-color: #2980b9; */
}
#network.disconnected { #network.disconnected {
/* background-color: #f53c3c; */ color: #f53c3c;
}
#pulseaudio {
padding: 0 1px 0;
/* background-color: #f1c40f; */
/* color: #000000; */
}
#pulseaudio.muted {
/* background-color: #90b1b1; */
/* color: #2a5c45; */
}
#custom-media {
padding: 0 1px 0;
/* background-color: #66cc99; */
/* color: #2a5c45; */
/* min-width: 100px; */
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
padding: 0 1px 0;
/* background-color: #f0932b; */
} }
#temperature.critical { #temperature.critical {
background-color: #eb4d4b; background-color: #eb4d4b;
} }
#tray {
padding: 0 1px 0;
/* background-color: #2980b9; */
}
#idle_inhibitor {
padding: 0 1px 0;
/* background-color: #2d3436; */
}
#idle_inhibitor.activated {
/* background-color: #ecf0f1; */
/* color: #2d3436; */
}
#mpd {
padding: 0 1px 0;
/* background-color: #66cc99; */
/* color: #2a5c45; */
}
#mpd.disconnected {
/* background-color: #f53c3c; */
}
#mpd.stopped {
/* background-color: #90b1b1; */
}
#mpd.paused {
/* background-color: #51a37a; */
}