polish waybar and clean code

This commit is contained in:
kuoi 2022-08-22 17:01:02 +01:00
parent c87d9493f8
commit e19b8bc3c7
4 changed files with 28 additions and 159 deletions

View file

@ -1,7 +1,7 @@
box { box {
/* Uncomment to set vertical margin /* Uncomment to set vertical margin
margin-top: 30px; margin-top: 20px;
margin-bottom: 30px; margin-bottom: 30px;
*/ */
} }

View file

@ -1,7 +1,7 @@
{ {
"layer": "top", "layer": "top",
"position": "top", "position": "top",
"height": 20, "height": 32,
"spacing": 4, "spacing": 4,
"mode": "dock", "mode": "dock",
"margin-top": 0, "margin-top": 0,
@ -41,7 +41,7 @@
"spacing": 10 "spacing": 10
}, },
"clock": { "clock": {
// "timezone": "Europe/London", // "timezone": "Europe/London",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%Y-%m-%d %H:%M}" "format": "{:%Y-%m-%d %H:%M}"
}, },
@ -67,7 +67,7 @@
"format-icons": ["", "", "", "", ""] "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:5} ", "format-wifi": "{essid:5} ",
"format-ethernet": "Connected  ", "format-ethernet": "Connected  ",
// "tooltip-format": "{ifname} via {gwaddr} ", // "tooltip-format": "{ifname} via {gwaddr} ",
@ -112,7 +112,6 @@
"exec": "checkupdates | wc -l", "exec": "checkupdates | wc -l",
"exec-if": "exit 0", "exec-if": "exit 0",
"on-click": "tilix -e '/home/guoyi/.config/waybar/update.sh'", "on-click": "tilix -e '/home/guoyi/.config/waybar/update.sh'",
"signal": 8
}, },
"custom/power":{ "custom/power":{
"format": "⏻", "format": "⏻",

View file

@ -1,85 +1,19 @@
* { * {
border: none; border: none;
border-radius: 0px; border-radius: 0px;
/* `otf-font-awesome` is required to be installed for icons */ font-family: JetBrains Mono, Cantarell, Arial;
font-family: JetBrains Mono, Roboto, Helvetica, Arial, sans-serif; font-size: 15px;
font-size: 14px;
min-height: 0; min-height: 0;
} }
window#waybar { window#waybar {
background-color: #2c2c2c; background-color: #2c2c2c;
/* color: white;*/ color: white;
transition-property: background-color; transition-property: background-color;
transition-duration: .5s; transition-duration: .5s;
opacity: 0.7; opacity: 0.7;
} }
window#waybar.hidden {
opacity: 0.75;
}
#workspaces button {
background: #f9f06b;
color: white;
border-radius: 20px;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover {
background: lightblue;
color: white;
border-bottom: 3px solid white;
}
#workspaces button.focused {
background: #f9f06b;
color: white;
}
#workspaces button.focused:hover {
background: lightblue;
color: white;
border-bottom: 3px solid white;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid white;
}
#clock,
#custom-power,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#network,
#pulseaudio,
#custom-media,
#custom-launcher,
#custom-update,
#custom-layout,
#taskbar,
#tray,
#mode,
#bluetoth {
padding: 0 10px;
color: black;
}
#window,
#workspaces {
margin: 0px 4px;
}
/* If workspaces is the leftmost module, omit left margin */ /* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces { .modules-left > widget:first-child > #workspaces {
margin-left: 0px; margin-left: 0px;
@ -90,102 +24,38 @@ window#waybar.hidden {
margin-right: 0px; margin-right: 0px;
} }
#clock { #mode,
#clock,
#custom-launcher,
#custom-power,
#custom-update,
#battery,
#bluetoth,
#cpu,
#memory,
#mode,
#network,
#pulseaudio,
#taskbar,
#tray{
padding: 0 10px;
color: white; color: white;
} }
#custom-power { #custom-power,
#pulseaudio{
font-size: 20px; font-size: 20px;
color: white;
/* border-radius: 0px 20px 20px 0px;*/
} }
#bluetooth { #custom-update,
color: white; #custom-launcher{
} font-size: 17px;
#battery {
color: white;
/* border-radius: 20px 0px 0px 20px;*/
}
#battery.charging, #battery.plugged {
color: white;
}
@keyframes blink {
to {
background-color: #268bd2;
color: white;
}
} }
#battery.critical:not(.charging) { #battery.critical:not(.charging) {
color: white;
animation-name: blink; animation-name: blink;
animation-duration: 0.5s; animation-duration: 0.5s;
animation-timing-function: linear; animation-timing-function: linear;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-direction: alternate; animation-direction: alternate;
} }
label:focus {
background-color: #f9f06b;
}
#cpu {
color: white;
}
#memory {
color: white;
}
#disk {
color: white;
}
#network {
color: white;
}
#network.disconnected {
color: white;
}
#pulseaudio {
font-size: 20px;
color: white;
}
#pulseaudio.muted {
color: white;
}
#custom-update{
color: white;
font-size: 17px;
/* border-radius: 0px 20px 20px 0px;*/
}
#custom-launcher{
color: white;
font-size: 20px;
/* border-radius: 20px 0px 0px 20px;;*/
}
#taskbar {
/* border-radius: 20px 20px 20px 20px;*/
}
#temperature {
color: white;
}
#tray {
color: white;
}

View file

@ -111,7 +111,7 @@ fcitx5 = fcitx
kdeconnect = kdeconnect-indicator kdeconnect = kdeconnect-indicator
## Keyring ## Keyring
keyring = echo -n "YOU_PASSWD" | gnome-keyring-daemon -s -r --unlock --components=secrets keyring = echo -n "YOUR_PASSWD" | gnome-keyring-daemon -s -r --unlock --components=secrets
## Email ## Email
email = geary --gapplication-service email = geary --gapplication-service