waybar and tmux plugins

This commit is contained in:
Cy Pokhrel 2024-11-21 15:56:39 -05:00
parent 238d53fadd
commit 6bdaba63f5
No known key found for this signature in database
GPG key ID: 1200FBE36C2ADE2E
6 changed files with 179 additions and 140 deletions

55
waybar/config Normal file
View file

@ -0,0 +1,55 @@
{
"modules-left": ["sway/workspaces", "sway/window", "sway/mode"],
"modules-right": ["tray", "pulseaudio", "backlight", "network", "battery", "clock"],
"clock": {
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%b %d(%H:%M) 󰃰}"
},
"backlight": {
"format": "{percent}% {icon}",
"format-icons": ["", "", "", "", "", "", "", "", ""]
},
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% 󰢝",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", ""]
},
"pulseaudio": {
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": "󰝟 {icon} {format_source}",
"format-muted": "󰝟 {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "󱠰",
"headset": "󰋎",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
"network": {
"format": "{ifname}",
"format-wifi": "Connected ",
"format-ethernet": "{ipaddr}/{cidr} 󰈀",
"format-disconnected": "Disconnected 󱛅", //An empty format will hide the module.
"tooltip-format": "{ifname} via {gwaddr} 󰛳",
"tooltip-format-wifi": "{essid} ({signalStrength}%) ",
"tooltip-format-ethernet": "{ifname} ",
"tooltip-format-disconnected": "Disconnected",
"max-length": 50
},
"tray": {
"spacing": 10
}
}

View file

@ -1,117 +0,0 @@
{
"layer": "top",
"position": "bottom",
"height": 26,
// Choose the order of the modules
"modules-left": [
"sway/workspaces",
"sway/mode",
"custom/mic",
"custom/yubikey",
"sway/window",
],
"modules-center": [],
"modules-right": [
"custom/khal",
"custom/wireguard",
"custom/iwd",
"bluetooth",
"pulseaudio",
"custom/inbox",
// "tray",
"battery",
"clock",
],
// Modules configuration
"sway/workspaces": {
"disable-scroll": false,
"disable-scroll-wraparound": true,
"enable-bar-scroll": true,
"all-outputs": true,
"format": "{name} {icon}",
"format-icons": {
"focused": "",
"default": "",
},
},
"custom/mic": {
"exec": "$HOME/.local/lib/waybar-mic",
"return-type": "json",
"on-click": "pactl set-source-mute @DEFAULT_SOURCE@ toggle",
},
"custom/yubikey": {
"exec": "$HOME/.local/lib/waybar-yubikey",
"return-type": "json",
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>",
},
"sway/window": {
"icon": false,
"tooltip": false,
},
"custom/khal": {
"exec": "$HOME/.local/lib/waybar-khal",
"return-type": "json",
"on-click": "pause khal list now 24h",
},
"custom/inbox": {
"exec": "$HOME/.local/lib/waybar-inbox",
},
"clock": {
"interval": 1,
"tooltip-format": "<big>{:%Y %B}</big>\n<tt>{calendar}</tt>",
"format": "󰅐 {:%a %Y-%m-%d %X}",
},
"battery": {
"states": {
// Results in "format-full" being used.
"full": 100,
// Applies a CSS animation/alert.
"critical": 15,
},
"format": "{icon} {capacity}%",
"format-charging": "󰂄 {capacity}%",
"format-plugged": "󱐥 {capacity}%",
"format-alt": "{icon} {power}W {time}", // Toggled on click.
"format-icons": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"],
// More icons in this range: ->
// More icons in this range: ->
// More icons in this range: ->
},
"bluetooth": {
"format-connected": " {num_connections}",
// TODO: show icons representing each device (e.g.: mouse, headphones, speaker, etc)
"tooltip-format": "{device_enumerate}",
"tooltip-format-enumerate-connected-battery": "{device_alias}, {device_battery_percentage}%",
"on-click": "foot -e bluetuith",
},
"custom/iwd": {
"exec": "$HOME/.local/lib/waybar-iwd",
"interval": 1, // FIXME: pointless wake-ups every 1000ms.
},
"custom/wireguard": {
"exec": "$HOME/.local/lib/waybar-wireguard",
"interval": 1, // FIXME: pointless wake-ups every 1000ms.
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{icon} {volume}%",
"format-bluetooth": "{icon} {volume}% ",
"format-bluetooth-muted": " ",
"format-muted": "",
"format-icons": {
"speaker": "󰓃",
"headphone": "",
"hands-free": "󰂑",
"headset": "󰋎",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""],
},
"on-click": "pavucontrol",
"on-click-right": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"reverse-mouse-scrolling": 1,
},
}

102
waybar/style.css Normal file
View file

@ -0,0 +1,102 @@
* {
border: none;
border-radius: 0;
font-family: RobotoMono Nerd Font;
font-size: 14px;
font-weight: 500;
}
window#waybar {
background-color: #282828;
color: #ebdbb2;
transition-property: background-color;
transition-duration: 0.5s;
border-bottom: solid 0px #3c3836;
}
window#waybar.hidden {
opacity: 0.2;
}
#workspaces button {
padding: 0 5px;
color: #ebdbb2;
border-radius: 5px;
}
#workspaces button.focused {
background-color: #ebdbb2;
color: #282828;
border-bottom: none;
}
#workspaces button.urgent {
background-color: #cc241d;
}
widget > * {
margin-top: 6px;
margin-bottom: 6px;
}
.modules-left > widget > * {
margin-left: 12px;
margin-right: 12px;
}
.modules-left > widget:first-child > * {
margin-left: 6px;
}
.modules-left > widget:last-child > * {
margin-right: 18px;
}
.modules-right > widget > * {
padding: 0 12px;
margin-left: 0;
margin-right: 0;
color: #282828;
background-color: #ebdbb2;
}
.modules-right > widget:first-child > * {
border-radius: 5px 0 0 5px;
}
.modules-right > widget:last-child > * {
border-radius: 0 5px 5px 0;
margin-right: 6px;
}
#mode {
background: transparent;
color: #fb4934;
}
@keyframes blink {
to {
color: #ebdbb2;
}
}
#battery.critical:not(.charging) {
animation-name: blink;
animation-duration: 1s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #282828;
}
tooltip {
border-radius: 5px;
background: #504945;
}
tooltip label {
color: #ebdbb2;
}