[Waybar] Improve look

This commit is contained in:
2022-10-03 18:36:32 +02:00
committed by Pierre Jeanjean
parent f3d849ba41
commit 0d654d09fe
2 changed files with 19 additions and 95 deletions

View File

@@ -1,9 +1,10 @@
[{
"spacing": 4, // Gaps between modules (4px)
"modules-left": ["sway/workspaces", "sway/mode", "custom/media"],
"modules-left": ["sway/workspaces"],
"modules-right": ["pulseaudio", "memory", "cpu", "battery", "network", "custom/pacman", "clock", "tray"],
"memory": {
"format": "\uf538 {used:0.1f}GiB",
"on-click": "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf btop"
},
"tray": {
"spacing": 10
@@ -14,7 +15,8 @@
},
"cpu": {
"format": "\uf2db {usage}%",
"tooltip": false
"tooltip": false,
"on-click": "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf btop"
},
"battery": {
"states": {
@@ -35,7 +37,7 @@
"tooltip-format": "\f6ff {ifname} via {gwaddr}",
"format-linked": "\uf6ff {ifname} (No IP)",
"format-disconnected": "\uf071 Disconnected",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
"on-click": "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf nmtui"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
@@ -65,7 +67,8 @@
"available": "\uf019"
},
"interval": 600,
"exec": "$HOME/.config/waybar/pacman.py '(?:^(?:linux-|sway|wl)|pipewire)' 2> /dev/null"
"exec": "$HOME/.config/waybar/pacman.py '(?:^(?:linux-|sway|wl)|pipewire)' 2> /dev/null",
"on-click": "kitty --class kitty-scratch -c ~/.config/kitty/kitty-scratch.conf zsh -i -c update"
}
}]

View File

@@ -15,13 +15,12 @@ window#waybar.hidden {
}
#workspaces button {
padding: 0 5px;
padding: 0px;
background-color: transparent;
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each workspace name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
@@ -45,26 +44,24 @@ window#waybar.hidden {
color: #002b36;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid #ffffff;
}
#workspaces button,
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#mpd {
padding: 0 10px;
#custom-pacman {
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-radius: 25px / 25px;
background-clip: border-box;
}
#workspaces button:first-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
#window,
@@ -136,11 +133,6 @@ label:focus {
color: #002b36;
}
#custom-pacman {
padding-left: 5px;
padding-right: 5px;
}
#custom-pacman.good {
background-color: #859900;
color: #002b36;
@@ -156,28 +148,6 @@ label:focus {
color: #002b36;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
background-color: #f0932b;
}
#temperature.critical {
background-color: #eb4d4b;
}
#tray {
}
@@ -190,52 +160,3 @@ label:focus {
background-color: #d30102;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}