updated for niri config

This commit is contained in:
danmac
2025-06-08 23:16:14 +09:30
parent d66f51c324
commit 399f3ef876
61 changed files with 1114 additions and 495 deletions

View File

@@ -1,196 +0,0 @@
{
"layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 36, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
// "gtk-layer-shell": "false",
// Choose the order of the modules
"modules-left": ["hyprland/workspaces", "hyprland/mode"],
"modules-center": ["hyprland/window"],
"modules-right": ["custom/zypper", "network", "bluetooth", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "pulseaudio", "custom/layout", "tray", "clock", "custom/notification"],
"sway/mode": {
"format": " {}"
},
"sway/workspaces": {
"all-outputs": false,
"disable-scroll": true,
"format": " {icon} ",
"format-icons": {
"urgent": "",
"focused": "",
"default": ""
}
},
"hyprland/window": {
"max-length": 80,
"tooltip": false
},
"custom/layout": {
"tooltip": false,
"exec": "swaymsg -mrt subscribe '[\"input\"]' | jq -r --unbuffered \"select(.change == \\\"xkb_layout\\\") | .input | select(.type == \\\"keyboard\\\") | .xkb_active_layout_name | .[0:2]\""
},
"custom/zypper": {
"format": "{} ",
"interval": 3600,
"exec": "zypper lu | grep 'v |' | wc -l; echo 'packages to update'",
"exec-if": "exit 0",
"on-click": "exec alacritty -e sudo sh -c 'zypper ref; zypper dup; pkill -SIGRTMIN+8 waybar'",
"signal": 8
},
// Modules configuration
// "sway/workspaces": {
// "disable-scroll": true,
// "all-outputs": true,
// "format": "{name}: {icon}",
// "format-icons": {
// "1": "",
// "2": "",
// "3": "",
// "4": "",
// "5": "",
// "urgent": "",
// "focused": "",
// "default": ""
// }
// },
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
// "timezone": "America/New_York",
"format": " {:%b %d %Y %R}",
"format-alt": "{:%a %d %b w:%V %H:%M}",
"tooltip-format": "<span color='#35b9ab'><tt><small>{calendar}</small></tt></span>",
"calendar": {
"mode-mon-col" : 4,
"weeks-pos" : "left",
"on-scroll" : 1,
"on-click-right" : "mode",
"format": {
"months": "<span color='#35b9ab'><b>{}</b></span>",
"weeks": "<span color='#73ba25'><b>{}</b></span>",
"weekdays": "<span color='#21a4df'><b>{}</b></span>",
"today": "<span color='#21a4df'><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right" : "mode",
"on-scroll-up" : "shift_up",
"on-scroll-down" : "shift_down"
},
"interval": 10
},
"cpu": {
"format": "{usage}% ",
"tooltip": false,
"on-click-right": "exec alacritty -e btm"
},
"memory": {
"format": "{}% ",
"on-click-right": "exec alacritty -e btm"
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", ""]
},
"backlight": {
// "device": "acpi_video1",
"format": "{percent}% {icon}",
"format-icons": ["", ""]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon}",
"format-charging": "",
"format-plugged": "",
"format-alt": "{capacity}% {time}",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "",
"format-ethernet": "",
"format-linked": "",
"format-disconnected": "⚠",
"format-alt": "{ifname} {essid} ({signalStrength}%)"
},
"bluetooth": {
"format": "",
"format-disabled": "",
"format-off": "",
"format-connected": " {num_connections}",
// "format-connected": " {device_alias}",
"tooltip-format": "{controller_address} {status}\n\n{num_connections} connected",
"tooltip-format-disabled": "{status}",
"tooltip-format-connected": "{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
"format-connected-battery": " {device_alias} {device_battery_percentage}%",
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%",
// "format-device-preference": [ "device1", "device2" ], // preference list deciding the displayed device
"on-click": "bluetooth toggle; pkill -SIGRTMIN+8 waybar",
"on-click-right": "blueman-manager"
},
"pulseaudio": {
"format": "{icon}",
"format-alt": "{volume} {icon}",
"format-alt-click": "click-right",
"format-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"scroll-step": 10,
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"on-click-right": "pavucontrol",
"tooltip": false
},
"custom/scratchpad": {
"format-text": "{}",
"return-type": "json",
"interval": 3,
"exec": "/usr/share/openSUSEway/helpers/scratchpad-indicator.sh 2> /dev/null",
"exec-if": "exit 0",
"on-click": "swaymsg 'scratchpad show'",
"on-click-right": "swaymsg 'move scratchpad'"
},
"custom/notification": {
"tooltip": true,
"format": "{icon}",
"format-icons": {
"notification": "<span foreground='red'><small><sup>⬤</sup></small></span>",
"none": " ",
"dnd-notification": "<span foreground='red'><small><sup>⬤</sup></small></span>",
"dnd-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
}
}

172
waybar/config.jsonc Normal file
View File

@@ -0,0 +1,172 @@
{
"layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
"height": 36, // Waybar height (to be removed for auto height)
// Choose the order of the modules
"modules-left": ["custom/launcher", "wlr/taskbar", "custom/spacer", "niri/workspaces", "custom/spacer", "niri/window"],
"modules-center": ["custom/swaync", "clock"],
"modules-right": ["idle_inhibitor", "cpu", "memory", "temperature", "pulseaudio", "tray", "custom/power"],
// Modules configuration
"wlr/taskbar": {
"on-click": "activate",
"on-click-middle": "close",
"app_ids-mapping": {
"msedge-_cifhbcnohmdccbgoicgdjpfamggdegmo-Default": "msedge-cifhbcnohmdccbgoicgdjpfamggdegmo-Default",
"msedge-_faolnafnngnfdaknnbpnkhgohbobgegn-Default": "msedge-faolnafnngnfdaknnbpnkhgohbobgegn-Default",
"steam_app_2357570": "Overwatch 2.desktop"
}
},
"custom/spacer": {
"format": " "
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
// "timezone": "America/New_York",
"format": " {:%d %b %Y %R}",
"format-alt": "{:%a %d %b w:%V %H:%M}",
"tooltip-format": "<span><tt>{calendar}</tt></span>",
"calendar": {
"mode-mon-col" : 4,
"weeks-pos" : "left",
"on-scroll" : 1,
"on-click-right" : "mode",
"format": {
"months": "<span><b>{}</b></span>",
"weeks": "<span><b>{}</b></span>",
"weekdays": "<span><b>{}</b></span>",
"today": "<span><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right" : "mode",
"on-scroll-up" : "shift_up",
"on-scroll-down" : "shift_down"
},
"interval": 10
},
"cpu": {
"format": "{usage}% ",
"tooltip": false,
"on-click-right": "exec wezterm -e btm"
},
"memory": {
"format": "{}% ",
"on-click-right": "exec wezterm -e btm"
},
"temperature": {
// "thermal-zone": 1,
// "hwmon-path": "/sys/class/hwmon/hwmon5/temp1_input",
"hwmon-path-abs": "/sys/devices/pci0000:00/0000:00:18.3/hwmon/",
"input-filename": "temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", ""]
},
"backlight": {
// "device": "acpi_video1",
"format": "{percent}% {icon}",
"format-icons": ["", ""]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon}",
"format-charging": "",
"format-plugged": "",
"format-alt": "{capacity}% {time}",
"format-icons": ["", "", "", "", ""]
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "",
"format-ethernet": "",
"format-linked": "",
"format-disconnected": "⚠",
"format-alt": "{ifname} {essid} ({signalStrength}%)"
},
"bluetooth": {
"format": "",
"format-disabled": "",
"format-off": "",
"format-connected": " {num_connections}",
// "format-connected": " {device_alias}",
"tooltip-format": "{controller_address} {status}\n\n{num_connections} connected",
"tooltip-format-disabled": "{status}",
"tooltip-format-connected": "{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
"format-connected-battery": " {device_alias} {device_battery_percentage}%",
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%",
// "format-device-preference": [ "device1", "device2" ], // preference list deciding the displayed device
"on-click": "bluetooth toggle; pkill -SIGRTMIN+8 waybar",
"on-click-right": "blueman-manager"
},
"pulseaudio": {
"format-muted": "󰝟",
"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": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"scroll-step": 10,
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"on-click-right": "pavucontrol",
"tooltip": false
},
"custom/power": {
"format" : "⏻ ",
"tooltip": false,
"menu": "on-click",
"menu-file": "/usr/share/waybar/custom_modules/power_menu.xml", // Menu file in resources folder
"menu-actions": {
"shutdown": "systemctl poweroff",
"reboot": "systemctl reboot",
"suspend": "systemctl suspend",
"logout": "niri msg action quit"
}
},
"custom/swaync": {
"tooltip": true,
"tooltip-format": "Left Click: Launch Notification Center\nRight Click: Do not Disturb",
"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": "sleep 0.1 && swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true,
},
}

View File

@@ -1,350 +1,162 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
border: none;
border-radius: 0;
min-height: 0;
font-family: NotoSans NF SemBd;
font-size: 14px;
}
window#waybar {
background-color: rgba(43, 48, 59, 0.5);
/*border-bottom: 3px solid rgba(100, 114, 125, 0.5);*/
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
/* background-color: rgba(30, 30, 46, 0.5); */
background: transparent;
transition-property: background-color;
transition-duration: 0.5s;
}
window#waybar.hidden {
opacity: 0.2;
opacity: 0.5;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
#workspaces {
background-color: transparent;
}
window#waybar.chromium {
background-color: #000000;
border: none;
#workspaces button,
#taskbar button {
all: initial;
/* Remove GTK theme values (waybar #1351) */
min-width: 0;
/* Fix weird spacing in materia (waybar #450) */
box-shadow: inset 0 -3px transparent;
/* Use box-shadow instead of border so the text isn't offset */
padding: 6px 18px;
margin: 6px 3px;
border-radius: 4px;
background-color: #1e1e2e;
color: #cdd6f4;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
#workspaces button.active,
#taskbar button.active {
color: #1e1e2e;
background-color: #cdd6f4;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button {
margin: 5px 0px;
}
#workspaces button:first-child{
border-radius: 10px 0px 0px 10px;
margin-left: 5px;
}
#workspaces button:last-child{
border-radius: 0px 10px 10px 0px;
}
#workspaces button {
padding: 0 5px;
background-color: #31404A;
color: #ffffff;
#taskbar button {
padding: 6px 8px;
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.active {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
box-shadow: inherit;
text-shadow: inherit;
color: #1e1e2e;
background-color: #cdd6f4;
}
#workspaces button.urgent {
background-color: #eb4d4b;
background-color: #f38ba8;
}
#mode {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
#custom-spacer {
margin: 12px;
border-left: 2px solid white;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#custom-power,
#battery,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#network,
#clock,
#cpu,
#bluetooth,
#mode,
#idle_inhibitor,
#scratchpad,
#power-profiles-daemon,
#mpd {
padding: 0 10px;
color: #ffffff;
margin: 5px;
border-radius: 10px;
}
#pulseaudio,
#temperature,
#window,
#workspaces {
margin: 0 4px;
#idle_inhibitor,
#custom-swaync,
#tray {
border-radius: 4px;
margin: 6px 3px;
padding: 6px 12px;
background-color: #1e1e2e;
color: #181825;
}
.modules-center {
background: #288f75;
border-radius: 10px;
margin: 5px 0px;
padding: 0 10px;
#custom-power {
margin-right: 6px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
#custom-logo {
padding-right: 7px;
padding-left: 7px;
margin-left: 5px;
font-size: 15px;
border-radius: 8px 0px 0px 8px;
color: #1793d1;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#clock {
background-color: #64727D;
#memory,
#cpu {
background-color: #f5a97f;
}
#battery {
background-color: #ffffff;
color: #000000;
background-color: #f38ba8;
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #26A65B;
#battery.warning,
#battery.critical,
#battery.urgent {
background-color: #ff0000;
color: #FFFF00;
}
#battery.charging {
background-color: #a6e3a1;
color: #181825;
}
#backlight,
#bluetooth {
color: #000000;
background-color: #ffffff;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
/* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
#power-profiles-daemon {
padding-right: 15px;
}
#power-profiles-daemon.performance {
background-color: #f53c3c;
color: #ffffff;
}
#power-profiles-daemon.balanced {
background-color: #2980b9;
color: #ffffff;
}
#power-profiles-daemon.power-saver {
background-color: #2ecc71;
color: #000000;
}
label:focus {
background-color: #000000;
}
#cpu {
background-color: #2ecc71;
color: #000000;
}
#memory {
background-color: #9b59b6;
}
#disk {
background-color: #964B00;
}
#backlight {
background-color: #90b1b1;
}
#network {
background-color: #2980b9;
}
#network.disconnected {
background-color: #f53c3c;
background-color: #8aadf4;
}
#wireplumber,
#pulseaudio {
background-color: #f1c40f;
color: #000000;
background-color: #a6da95;
}
#pulseaudio.muted {
background-color: #90b1b1;
color: #2a5c45;
#network,
#custom-swaync {
background-color: #8bd5ca;
}
#wireplumber {
background-color: #fff0f5;
color: #000000;
}
#wireplumber.muted {
background-color: #f53c3c;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
#clock,
#custom-power,
#idle_inhibitor,
#window {
color: #cdd6f4;
}
#power,
#temperature {
background-color: #f0932b;
background-color: #b7bdf8;
}
#temperature.critical {
background-color: #eb4d4b;
tooltip {
border-radius: 8px;
padding: 15px;
background-color: rgba(30, 30, 46, 0.8);
}
#tray {
background-color: #2980b9;
tooltip label {
padding: 5px;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}
#privacy {
padding: 0;
}
#privacy-item {
padding: 0 5px;
color: white;
}
#privacy-item.screenshare {
background-color: #cf5700;
}
#privacy-item.audio-in {
background-color: #1ca000;
}
#privacy-item.audio-out {
background-color: #0069d4;
menu {
border-radius: 8px;
padding: 15px;
background-color: rgba(30, 30, 46, 0.8);
}