add waybar

This commit is contained in:
Frieder Schlesier 2024-04-23 22:44:38 +02:00
parent b9d5240175
commit 029f58c1b3
2 changed files with 189 additions and 0 deletions

99
waybar/config Normal file
View File

@ -0,0 +1,99 @@
{
"layer": "bottom",
"position": "bottom",
"height": 20,
// maybe take another look at e.g. https://gitlab.com/wef/dotfiles/-/blob/master/.config/waybar/config
// https://github.com/Alexays/Waybar/wiki/Configuration
// https://github.com/Alexays/Waybar/wiki/Examples
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": [ "custom/disk_root", "network"],
"modules-right": [ "memory", "tray", "battery", "clock", ],
"sway/mode": {
"format": " {}"
},
"sway/workspaces": {
"format": "{name}",
"disable-scroll": true
},
"clock": {
"format": "{:%b %d %H:%M KW%U}",
"tooltip": false
},
"battery": {
"format": " {time} {icon}",
"format-alt": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""],
"format-charging": "{capacity}% ",
"interval": 30,
"states": {
"warning": 25,
"critical": 10
},
"tooltip": false
},
"custom/disk_home": {
"format": "🏠 {} ",
"interval": 30,
"exec": "df -h --output=avail $HOME | tail -1 | tr -d ' '"
},
"custom/disk_root": {
"format": "💽 {} ",
"interval": 30,
"exec": "df -h --output=avail / | tail -1 | tr -d ' '"
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "<span color='#e88939'>{icon}</span> {temperatureC}°C",
"format-icons": ["", "", ""]
},
"cpu": {
"format": "🏭 {usage}%",
"tooltip": false
},
"memory": {
"format": "💾 {used:0.1f}G"
},
"custom/mail": {
"format": "📩{}",
"interval": 30,
"exec": "notmuch count tag:flagged OR tag:inbox AND NOT tag:killed"
},
"network": {
// "family": "ipv6",
"interface": "wlp3*", // (Optional) To force the use of this interface
"format-wifi": "<span color='#589df6'></span> <span color='gray'>{essid}</span> {frequency} <span color='#589df6'>{signaldBm} dB</span> <span color='#589df6'>⇵</span> {bandwidthUpBits}/{bandwidthDownBits}",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}",
"interval": 5
},
//"timer": {
// "interval": 1,
// "exec": "~/.config/waybar/timer.sh",
// "exec-if": "pgrep emacs",
// "escape": true
//},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
},
"tooltip": false
},
"tray": {
"icon-size": 20,
"show-passive-items": true
},
"cpu": {
"interval": 2,
"format": "{icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}",
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
},
}

90
waybar/style.css Normal file
View File

@ -0,0 +1,90 @@
* {
border: none;
border-radius: 0;
font-family: Iosevka ss08;
font-size: 13px;
box-shadow: none;
text-shadow: none;
transition-duration: 0s;
}
window.eDP-1 * {
font-size: 11px;
}
window {
color: #ffffff;
background: rgba(35, 38, 53, 0.8);
}
#workspaces {
margin: 0 2px;
}
#workspaces button {
padding: 0 5px;
color: rgba(217, 216, 216, 0.6);
}
#workspaces button.visible {
color: rgba(217, 216, 216, 1);
}
#workspaces button.focused {
font-weight: bold;
/* border-bottom: 2px solid rgba(217, 216, 216, 1); */
}
#workspaces button.unfocused {
/* border-bottom: 2px solid rgba(217, 216, 216, 0); */
}
#workspaces button.urgent {
color: rgba(238, 46, 36, 1);
}
#mode,
#battery,
#cpu,
#memory,
#network,
#pulseaudio,
#idle_inhibitor,
#backlight,
#custom-storage,
#custom-spotify,
#custom-weather,
#custom-mail {
margin: 0px 6px 0px 10px;
min-width: 25px;
}
#clock {
margin: 0px 2px 0px 2px;
min-width: 120px;
}
#custom-timer {
font-weight: bold;
color: rgba(247, 172, 66, 1);
}
#battery.warning {
color: rgba(255, 210, 4, 1);
}
#battery.critical {
color: rgba(238, 46, 36, 1);
}
#battery.charging {
color: rgba(217, 216, 216, 1);
}
#custom-storage.warning {
color: rgba(255, 210, 4, 1);
}
#custom-storage.critical {
color: rgba(238, 46, 36, 1);
}