Compare commits

..

2 Commits

Author SHA1 Message Date
36db4e39e3 Merge remote-tracking branch 'refs/remotes/origin/main' 2026-05-07 21:08:07 +09:00
047a792cb7 feat: add wifi and BAT 2025-10-03 10:03:36 +09:00
2 changed files with 83 additions and 78 deletions

59
config
View File

@@ -1,24 +1,25 @@
{ {
"layer": "top", "layer": "top", // Waybar at top layer
"position": "top", "position": "top", // Waybar position (top|bottom|left|right)
"modules-left": ["custom/haskell", "hyprland/workspaces"], // "width": 1280, // Waybar width
"modules-center": ["clock"], // Choose the order of the modules
"modules-right": ["pulseaudio", "backlight", "battery", "custom/music", "tray", "custom/lock", "custom/power"], "modules-left": ["hyprland/workspaces"],
"custom/haskell": { "modules-center": ["custom/music"],
"format": "λ", "modules-right": ["pulseaudio", "backlight", "battery", "custom/wifi", "clock", "tray", "custom/lock", "custom/power"],
"tooltip": false "wlr/workspaces": {
}, "disable-scroll": true,
"hyprland/workspaces": { "sort-by-name": true,
"disable-scroll": true, "format": " {icon} ",
"format": "{id}", "format-icons": {
"on-click": "activate" "default": "",
}, },
},
"tray": { "tray": {
"icon-size": 21, "icon-size": 21,
"spacing": 10 "spacing": 10
}, },
"custom/music": { "custom/music": {
"format": "{}", "format": "{}",
"escape": true, "escape": true,
"interval": 5, "interval": 5,
"tooltip": false, "tooltip": false,
@@ -34,30 +35,42 @@
}, },
"backlight": { "backlight": {
"device": "intel_backlight", "device": "intel_backlight",
"format": "BRI {percent}%" "format": "{icon}",
"format-icons": ["", "", "", "", "", "", "", "", ""]
}, },
"battery": { "battery": {
"states": { "states": {
"warning": 30, "warning": 30,
"critical": 15 "critical": 15
}, },
"format": "BAT {capacity}%", "format": "{capacity}%",
"format-charging": "BAT {capacity}% +", "format-charging": "{capacity}% (CHRG)",
"format-plugged": "BAT {capacity}% =" "format-plugged": "{capacity}% (PLUG)",
"format-alt": "{capacity}%",
"format-icons": ["", "", "", "", "", "", "", "", "", "", "", ""]
}, },
"pulseaudio": { "pulseaudio": {
"format": "VOL {volume}%", // "scroll-step": 1, // %, can be a float
"format-muted": "VOL MUTE", "format": "{icon} {volume}%",
"format-muted": "",
"format-icons": {
"default": ["", "", " "]
},
"on-click": "pavucontrol" "on-click": "pavucontrol"
}, },
"custom/wifi": {
"tooltip": false,
"on-click": "hyprctl dispatch exec [float] 'alacritty -e nmtui'",
"format": "WIFI"
},
"custom/lock": { "custom/lock": {
"tooltip": false, "tooltip": false,
"on-click": "sh -c '(sleep 0.5s; swaylock --grace 0)' & disown", "on-click": "sh -c '(sleep 0.5s; swaylock --grace 0)' & disown",
"format": "LOCK" "format": "",
}, },
"custom/power": { "custom/power": {
"tooltip": false, "tooltip": false,
"on-click": "wlogout &", "on-click": "wlogout &",
"format": "PWR" "format": ""
} }
} }

102
style.css
View File

@@ -1,22 +1,40 @@
@import "mocha.css"; @import "mocha.css";
* { * {
font-family: "FantasqueSansMono Nerd Font", monospace; font-family: FantasqueSansMono Nerd Font;
font-size: 15px; font-size: 17px;
min-height: 0; min-height: 0;
} }
#waybar { #waybar {
background: @base; background: transparent;
color: @text; color: @text;
border-radius: 0; margin: 5px 5px;
margin: 0; }
padding: 0;
#workspaces {
border-radius: 1rem;
margin: 5px;
background-color: @surface0;
margin-left: 1rem;
}
#workspaces button {
color: @lavender;
border-radius: 1rem;
padding: 0.4rem;
}
#workspaces button.active {
color: @sky;
border-radius: 1rem;
}
#workspaces button:hover {
color: @sapphire;
border-radius: 1rem;
} }
#workspaces,
#workspaces button,
#custom-haskell,
#custom-music, #custom-music,
#tray, #tray,
#backlight, #backlight,
@@ -25,44 +43,15 @@
#pulseaudio, #pulseaudio,
#custom-lock, #custom-lock,
#custom-power { #custom-power {
border-radius: 0; background-color: @surface0;
padding: 4px 8px; padding: 0.5rem 1rem;
margin: 0; margin: 5px 0;
background: transparent;
}
#custom-haskell {
color: @mauve;
font-size: 16px;
font-weight: 900;
}
#workspaces {
background: transparent;
}
#workspaces button {
color: @overlay1;
box-shadow: none;
border: none;
outline: none;
}
#workspaces button.active {
color: #eb3489;
font-weight: bold;
}
#workspaces button:hover {
color: @text;
font-weight: bold;
box-shadow: none;
border: none;
background: transparent;
} }
#clock { #clock {
color: @blue; color: @blue;
border-radius: 0px 1rem 1rem 0px;
margin-right: 1rem;
} }
#battery { #battery {
@@ -81,30 +70,33 @@
color: @yellow; color: @yellow;
} }
#backlight, #battery {
border-radius: 0;
}
#pulseaudio { #pulseaudio {
color: @maroon; color: @maroon;
border-radius: 1rem 0px 0px 1rem;
margin-left: 1rem;
} }
#custom-music { #custom-music {
color: @mauve; color: @mauve;
border-radius: 1rem;
} }
#custom-lock { #custom-lock {
color: @lavender; border-radius: 1rem 0px 0px 1rem;
color: @lavender;
} }
#custom-power { #custom-power {
color: @red; margin-right: 1rem;
border-radius: 0px 1rem 1rem 0px;
color: @red;
} }
#custom-haskell:hover, #tray {
#custom-music:hover, margin-right: 1rem;
#tray:hover, border-radius: 1rem;
#backlight:hover,
#clock:hover,
#battery:hover,
#pulseaudio:hover,
#custom-lock:hover,
#custom-power:hover {
font-weight: bold;
} }