added waybar configs
This commit is contained in:
parent
1eedc532f0
commit
6faece00a3
3 changed files with 565 additions and 0 deletions
215
config/waybar/config-hypr
Normal file
215
config/waybar/config-hypr
Normal file
|
@ -0,0 +1,215 @@
|
|||
{
|
||||
"layer": "bottom", // (top|bottom|overlay)
|
||||
"position": "top", // (top|bottom|left|right)
|
||||
"height": 20, // leave blank for a dynamic value
|
||||
// "width": 1280, // leave blank for a dynamic value
|
||||
"spacing": 0, // Gaps between modules
|
||||
"fixed-center": false,
|
||||
// Choose the order of the modules
|
||||
"modules-left": ["hyprland/workspaces", "custom/arrow8"],
|
||||
"modules-center": ["hyprland/window"],
|
||||
"modules-right": [ "custom/arrow0", "tray", "custom/notification", "idle_inhibitor", "custom/arrow1", "cpu", "custom/arrow2", "memory", "custom/arrow3", "temperature", "custom/arrow4", "custom/storage", "custom/arrow5", "network", "custom/arrow6", "bluetooth", "battery", "wireplumber", "custom/arrow7", "clock","custom/power"],
|
||||
// Module Config
|
||||
"hyprland/workspaces": {
|
||||
"format": "{id}",
|
||||
"smooth-scrolling-threshold": 1.0,
|
||||
"on-scroll-up": "hyprctl dispatch workspace r+1",
|
||||
"on-scroll-down": "hyprctl dispatch workspace r-1",
|
||||
"on-click": "activate"
|
||||
},
|
||||
"hyprland/window": {
|
||||
"max-length": 200,
|
||||
"separate-outputs": true
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 16,
|
||||
"spacing": 4
|
||||
},
|
||||
"custom/notification": {
|
||||
"tooltip": false,
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"notification": "<span foreground='red'><sup></sup></span>",
|
||||
"none": "",
|
||||
"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-if": "which swaync-client",
|
||||
"exec": "swaync-client -swb",
|
||||
"on-click": "swaync-client -t -sw",
|
||||
"on-click-right": "swaync-client -d -sw",
|
||||
"escape": true
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
}
|
||||
},
|
||||
"cpu": {
|
||||
"format": " {max_frequency}GHz | {usage}%" ,
|
||||
},
|
||||
"memory": {
|
||||
"format": " {}%"
|
||||
},
|
||||
"temperature": {
|
||||
"interval": 4,
|
||||
"critical-threshold": 80,
|
||||
// "format-critical": "{temperatureC}°C {icon}",
|
||||
"format": "{icon}{temperatureC}°C",
|
||||
"format-icons": ["", "", ""],
|
||||
"tooltip": false,
|
||||
"max-length": 6,
|
||||
"min-length": 6,
|
||||
"on-click": "xsensors"
|
||||
},
|
||||
"custom/storage": {
|
||||
"format": " {}",
|
||||
"format-alt": "{percentage}% ",
|
||||
"format-alt-click": "click-right",
|
||||
"return-type": "json",
|
||||
"interval": 60,
|
||||
"exec": "~/.config/waybar/modules/storage.sh"
|
||||
},
|
||||
"network": {
|
||||
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||
"format-ethernet": " {bandwidthUpBytes} {bandwidthDownBytes}",
|
||||
"format-wifi": " {bandwidthUpBytes} {bandwidthDownBytes}",
|
||||
"tooltip-format": "[{ipaddr}/{cidr}] {ifname} via {gwaddr}",
|
||||
"tooltip-format-wifi": "{essid} {frequency}MHz\nStrength: {signaldBm}dBm ({signalStrength}%)\n[{ipaddr}/{cidr}] {ifname} via {gwaddr}",
|
||||
"format-linked": " {ifname} (No IP)",
|
||||
"format-disconnected": "⚠ Disconnected",
|
||||
"interval": 10,
|
||||
"on-click": "nm-connection-editor",
|
||||
"on-click-right": "rfkill toggle wlan"
|
||||
},
|
||||
"battery": {
|
||||
"interval": 2,
|
||||
"states": {
|
||||
"good": 85,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-plugged": " {capacity}%",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
},
|
||||
"bluetooth": {
|
||||
// "controller": "controller1", // specify the alias of the controller if there are more than 1 on the system
|
||||
"format-on": "",
|
||||
"format-off": "",
|
||||
"format-disabled": "", // an empty format will hide the module
|
||||
"format-connected": " {num_connections}",
|
||||
"tooltip-format": "{controller_alias}\t[{controller_address}]",
|
||||
"tooltip-format-connected": "{controller_alias}\t[{controller_address}]\n\n{device_enumerate}",
|
||||
"tooltip-format-enumerate-connected": "{device_alias}\t[{device_address}]",
|
||||
"tooltip-format-enumerate-connected-battery": "{device_alias}\t {device_battery_percentage}%\t[{device_address}]",
|
||||
"on-click": "blueman-manager",
|
||||
"on-click-right": "rfkill toggle bluetooth"
|
||||
},
|
||||
"wireplumber": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": " MUTE",
|
||||
"on-click": "pavucontrol",
|
||||
"format-icons": ["", "", ""]
|
||||
},
|
||||
"clock": {
|
||||
"format": " {:%I:%M %p}",
|
||||
"tooltip-format": "<tt>{calendar}</tt>",
|
||||
"format-alt": " {:%a, %d %b, W%V %Y} ",
|
||||
"calendar": {
|
||||
"mode" : "month",
|
||||
"weeks-pos" : "right",
|
||||
"format": {
|
||||
"months": "<span color='#0883ff'><b>{}</b></span>",
|
||||
"days": "<span color='#8308ff'><b>{}</b></span>",
|
||||
"weeks": "<span color='#08ff83'><b>W{}</b></span>",
|
||||
"weekdays": "<span color='#ff8308'><b>{}</b></span>",
|
||||
"today": "<span color='#ff0883'><b><u>{}</u></b></span>"
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom/power": {
|
||||
"format": "",
|
||||
"tooltip": false,
|
||||
"on-click": "wlogout"
|
||||
},
|
||||
// Separators
|
||||
"custom/arrow0": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/arrow1": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/arrow2": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/arrow3": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/arrow4": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/arrow5": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/arrow6": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/arrow7": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/arrow8": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
}
|
||||
// Unused modules
|
||||
// "keyboard-state": {
|
||||
// "numlock": true,
|
||||
// "capslock": true,
|
||||
// "format": "{name} {icon}",
|
||||
// "format-icons": {
|
||||
// "locked": "",
|
||||
// "unlocked": ""
|
||||
// }
|
||||
// },
|
||||
// "disk": {
|
||||
// "format": " {percentage_used}%",
|
||||
// "tooltip-format": "{used} of {total} on {path}",
|
||||
// "path": "/"
|
||||
// },
|
||||
// "mpris": {
|
||||
// "format": "{player_icon} {artist} - {title}",
|
||||
// "format-paused": "{status_icon} {artist} - {title}",
|
||||
// "player-icons": {
|
||||
// "default": "⏵",
|
||||
// "mpv": ""
|
||||
// },
|
||||
// "status-icons": {
|
||||
// "paused": "⏯"
|
||||
// },
|
||||
// "ignored-players": ["firefox"]
|
||||
// },
|
||||
}
|
||||
|
25
config/waybar/modules/storage.sh
Executable file
25
config/waybar/modules/storage.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
mount="/"
|
||||
warning=20
|
||||
critical=10
|
||||
|
||||
df -h -P -l "$mount" | awk -v warning=$warning -v critical=$critical '
|
||||
/\/.*/ {
|
||||
text=$4
|
||||
tooltip="Filesystem: "$1"\rSize: "$2"\rUsed: "$3"\rAvail: "$4"\rUse%: "$5"\rMounted on: "$6
|
||||
use=$5
|
||||
exit 0
|
||||
}
|
||||
END {
|
||||
class=""
|
||||
gsub(/%$/,"",use)
|
||||
if ((100 - use) < critical) {
|
||||
class="critical"
|
||||
} else if ((100 - use) < warning) {
|
||||
class="warning"
|
||||
}
|
||||
print "{\"text\":\""text"\", \"percentage\":"use",\"tooltip\":\""tooltip"\", \"class\":\""class"\"}"
|
||||
}
|
||||
'
|
||||
|
325
config/waybar/style.css
Normal file
325
config/waybar/style.css
Normal file
|
@ -0,0 +1,325 @@
|
|||
* {
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
/* font-family: Input Mono Light, Input Mono, FontAwesome, SymbolsNerdFont, Roboto, Helvetica, Arial, sans-serif; */
|
||||
font-family: JetBrainsMono Nerd Font, FontAwesome, SymbolsNerdFont;
|
||||
font-size: 12px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
color: #aeafb2;
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
window#waybar.termite {
|
||||
background-color: #3F3F3F;
|
||||
}
|
||||
|
||||
window#waybar.chromium {
|
||||
background-color: #000000;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#temperature,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#wireplumber,
|
||||
#bluetooth,
|
||||
#tray,
|
||||
#idle_inhibitor,
|
||||
#mpris,
|
||||
#keyboard-state,
|
||||
#battery,
|
||||
#custom-notification,
|
||||
#custom-storage,
|
||||
#custom-power
|
||||
{
|
||||
padding: 0 7px;
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#temperature,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#wireplumber,
|
||||
#bluetooth,
|
||||
#mpris,
|
||||
#idle_inhibitor
|
||||
{
|
||||
border: 0;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
background: rgba(49, 60, 84, 0.75);
|
||||
border-radius: 0px;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0 7px 0 0;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
color: #aeafb2;
|
||||
padding: 2px 4px 0px 5px;
|
||||
margin: 0;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#workspaces button:hover, #workspaces button.active:hover {
|
||||
color: #fff;
|
||||
background: #647aab;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
border: 0;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#workspaces button.visible {
|
||||
border: 0;
|
||||
border-radius: 0px;
|
||||
background-image: -gtk-gradient (linear,
|
||||
0.5 0, 0.5 1,
|
||||
color-stop(0.2, #313c54),
|
||||
color-stop(1, #556892)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: #fff000;
|
||||
border: 0;
|
||||
border-radius: 0px;
|
||||
background-image: -gtk-gradient (linear,
|
||||
0.5 0, 0.5 1,
|
||||
color-stop(0.2, #313c54),
|
||||
color-stop(1, #556892)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: #fff;
|
||||
border: 0;
|
||||
border-radius: 0px;
|
||||
background-image: -gtk-gradient (linear,
|
||||
0.5 0, 0.5 1,
|
||||
color-stop(0.2, #313c54),
|
||||
color-stop(1, #eb4d4b)
|
||||
);
|
||||
}
|
||||
|
||||
#window {
|
||||
padding: 0px 7px 0 7px;
|
||||
opacity: 1;
|
||||
color: #dcdcde;
|
||||
text-shadow: 1px 1px 2px #111;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
color: #aeafb2;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#custom-power,
|
||||
#custom-notification,
|
||||
#idle_inhibitor,
|
||||
#tray {
|
||||
background-color: #111;
|
||||
}
|
||||
|
||||
#tray > .passive {
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#cpu
|
||||
{
|
||||
background-color: #313c54;
|
||||
}
|
||||
|
||||
#memory {
|
||||
background-color: #455c8f;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
background-color: #17243b;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
color: #cf4beb;
|
||||
}
|
||||
|
||||
#disk,
|
||||
#custom-storage
|
||||
{
|
||||
background-color: #38588f;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: #dcdcde;
|
||||
background-color: #37373f;
|
||||
}
|
||||
|
||||
#bluetooth.disabled,
|
||||
#pulseaudio.muted,
|
||||
#wireplumber.muted,
|
||||
#battery.critical,
|
||||
#network.disconnected {
|
||||
color: #f53c3c;
|
||||
}
|
||||
|
||||
#bluetooth.off {
|
||||
color: #909091;
|
||||
}
|
||||
|
||||
#bluetooth,
|
||||
#pulseaudio,
|
||||
#battery,
|
||||
#wireplumber
|
||||
{
|
||||
background-color: #112254;
|
||||
}
|
||||
|
||||
#battery
|
||||
{
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#battery.good
|
||||
{
|
||||
color: #aeafb2;
|
||||
}
|
||||
|
||||
#battery.warning
|
||||
{
|
||||
color: #fff000;
|
||||
|
||||
}
|
||||
|
||||
/* arrows */
|
||||
|
||||
#custom-arrow0,
|
||||
#custom-arrow1,
|
||||
#custom-arrow2,
|
||||
#custom-arrow3,
|
||||
#custom-arrow4,
|
||||
#custom-arrow5,
|
||||
#custom-arrow6,
|
||||
#custom-arrow7,
|
||||
#custom-arrow8
|
||||
{
|
||||
margin: -2px 0 0 0;
|
||||
padding: 0 0 0 0;
|
||||
opacity: 0.75;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#custom-arrow0 {
|
||||
color: #111;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#custom-arrow1 {
|
||||
color: #313c54;
|
||||
background-color: #111;
|
||||
}
|
||||
|
||||
#custom-arrow2 {
|
||||
color: #455c8f;
|
||||
background-color: #313c54;
|
||||
}
|
||||
|
||||
#custom-arrow3 {
|
||||
color: #17243b;
|
||||
background-color: #455c8f;
|
||||
}
|
||||
|
||||
#custom-arrow4 {
|
||||
color: #38588f;
|
||||
background-color: #17243b;
|
||||
}
|
||||
|
||||
#custom-arrow5 {
|
||||
color: #37373f;
|
||||
background-color: #38588f;
|
||||
}
|
||||
|
||||
#custom-arrow6 {
|
||||
color: #112254;
|
||||
background-color: #37373f;
|
||||
}
|
||||
|
||||
#custom-arrow7 {
|
||||
color: #111;
|
||||
background-color: #112254;
|
||||
}
|
||||
|
||||
#custom-arrow8 {
|
||||
color: #313c54;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* unused */
|
||||
/*
|
||||
#language {
|
||||
background: #00b093;
|
||||
color: #740864;
|
||||
padding: 0 5px;
|
||||
margin: 0 5px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
#mpris {
|
||||
background:#989898;
|
||||
}
|
||||
|
||||
#keyboard-state {
|
||||
background: #455c8f;
|
||||
color: #aeafb2;
|
||||
padding: 0;
|
||||
margin: 0 0 0 5px;
|
||||
min-width: 16px;
|
||||
border-top: 1px solid rgba(25, 25, 25, 0.5);
|
||||
border-bottom: 1px solid rgba(25, 25, 25, 0.5);
|
||||
border-left: 1px solid rgba(25, 25, 25, 0.5);
|
||||
border: 0;
|
||||
border-radius: 20px 0 0 20px;
|
||||
}
|
||||
|
||||
|
||||
#keyboard-state > label {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#keyboard-state > label.locked {
|
||||
color: #fff;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
*/
|
Loading…
Reference in a new issue