Everywhere: Add Hyprland Wayland config
This commit is contained in:
@@ -0,0 +1,150 @@
|
||||
// -*- mode: jsonc -*-
|
||||
{
|
||||
// "layer": "top", // Waybar at top layer
|
||||
"position": "top",
|
||||
"height": 22, // Waybar height (to be removed for auto height)
|
||||
"spacing": 0, // Gaps between modules (4px)
|
||||
// Choose the order of the modules
|
||||
"modules-left": [
|
||||
"hyprland/workspaces",
|
||||
],
|
||||
"modules-center": [
|
||||
"hyprland/window"
|
||||
],
|
||||
"modules-right": [
|
||||
"custom/btc",
|
||||
"pulseaudio",
|
||||
"backlight",
|
||||
"network",
|
||||
"battery",
|
||||
"custom/battery-low",
|
||||
"clock",
|
||||
"tray",
|
||||
"custom/power"
|
||||
],
|
||||
// Modules configuration
|
||||
"hyprland/workspaces": {
|
||||
"disable-scroll": false,
|
||||
"on-scroll-up": "hyprctl dispatch workspace -1",
|
||||
"on-scroll-down": "hyprctl dispatch workspace +1",
|
||||
"all-outputs": true,
|
||||
"warp-on-scroll": false,
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"1": "一",
|
||||
"2": "二",
|
||||
"3": "三",
|
||||
"4": "四",
|
||||
"5": "五",
|
||||
"6": "六",
|
||||
"7": "七",
|
||||
"8": "八",
|
||||
"9": "九",
|
||||
"0": "十",
|
||||
"urgent": "",
|
||||
"focused": "",
|
||||
"default": ""
|
||||
// "persistent-workspaces": {
|
||||
// "*": 5, // 5 workspaces by default on every monitor
|
||||
// "HDMI-A-1": 3 // but only three on HDMI-A-1
|
||||
// }
|
||||
}
|
||||
},
|
||||
"custom/btc": {
|
||||
"escape": false,
|
||||
"exec": "$HOME/.local/bin/panel/btc.sh",
|
||||
"interval": 300,
|
||||
"format": " {}",
|
||||
"tooltip": false
|
||||
},
|
||||
"pulseaudio": {
|
||||
"scroll-step": 2, // %, can be a float
|
||||
"format": "{icon} {volume}%",
|
||||
"format-bluetooth": "{icon} {volume}%",
|
||||
"format-bluetooth-muted": " {icon}",
|
||||
"format-muted": " {volume}%",
|
||||
"format-source": "{volume}%",
|
||||
"format-source-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
"on-click": "pavucontrol"
|
||||
},
|
||||
"backlight": {
|
||||
"device": "intel_backlight",
|
||||
"format": "{percent}% {icon}",
|
||||
"format-icons": ["", "", "", "", "", "", "", "", ""]
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": " {signalStrength}%",
|
||||
"format-ethernet": "",
|
||||
"tooltip-format": "{ifname}: {ipaddr}/{cidr}\n via {gwaddr}",
|
||||
"tooltip-format-wifi": "{ifname}: {ipaddr}/{cidr}\n via {gwaddr}\n ssid {essid}",
|
||||
"tooltip-format-disconnected": "Disconnected",
|
||||
"format-linked": " (No IP)",
|
||||
"format-disconnected": "<span color='#676e7d'></span>",
|
||||
"on-click": "$HOME/.local/bin/panel/iface.sh"
|
||||
},
|
||||
"battery": {
|
||||
"bat": "BAT0",
|
||||
"interval": 30,
|
||||
"full-at": 98,
|
||||
"states": {
|
||||
"good": 95,
|
||||
"critical": 20
|
||||
},
|
||||
"format": "{icon} {capacity}% ({time})",
|
||||
"format-time": "{H}:{m}",
|
||||
"format-full": "{icon} {capacity}%",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-plugged": " {capacity}%",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
"custom/battery-low": {
|
||||
"exec": "$HOME/.local/bin/panel/battery.sh",
|
||||
"interval": 30,
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
"clock": {
|
||||
// "timezone": "America/New_York",
|
||||
"tooltip-format": "<tt><small>{calendar}</small></tt>",
|
||||
"calendar": {
|
||||
"mode" : "month",
|
||||
"mode-mon-col" : 3,
|
||||
"weeks-pos" : "right",
|
||||
"format": {
|
||||
"months": "<span color='#b294bb'><b>{}</b></span>",
|
||||
"days": "<span color='#fff'><b>{}</b></span>",
|
||||
"weeks": "<span color='#81a2be'><b>W{}</b></span>",
|
||||
"weekdays": "<span color='#8abeb7'><b>{}</b></span>",
|
||||
"today": "<span color='#f0c674'><b><u>{}</u></b></span>"
|
||||
}
|
||||
},
|
||||
"format": " {:%I:%M %p}",
|
||||
"on-click": "$HOME/.local/bin/panel/date.sh"
|
||||
},
|
||||
"tray": {
|
||||
// "icon-size": 21,
|
||||
"spacing": 10
|
||||
},
|
||||
"custom/power": {
|
||||
"format": "⏻",
|
||||
"tooltip": false,
|
||||
"menu": "on-click",
|
||||
"menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder
|
||||
"menu-actions": {
|
||||
"lock": "hyprlock",
|
||||
"shutdown": "shutdown",
|
||||
"reboot": "reboot",
|
||||
"suspend": "systemctl suspend",
|
||||
"hibernate": "systemctl hibernate"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkMenu" id="menu">
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="lock">
|
||||
<property name="label">Lock</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="suspend">
|
||||
<property name="label">Suspend</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="hibernate">
|
||||
<property name="label">Hibernate</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="shutdown">
|
||||
<property name="label">Shutdown</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="delimiter1"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="reboot">
|
||||
<property name="label">Reboot</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,228 @@
|
||||
@define-color black #000;
|
||||
@define-color red #a54242; /* 1 */
|
||||
@define-color orange #de935f; /* 3 */
|
||||
@define-color blue #5f819d; /* 4 */
|
||||
@define-color green #b5bd68; /* 10 */
|
||||
|
||||
@define-color bgcolor #404552;
|
||||
@define-color bgcolor-inactive #2b2e39;
|
||||
@define-color bgcolor-urgent #dc7a43;
|
||||
@define-color fgcolor #fff;
|
||||
@define-color fgcolor-inactive #676e7d;
|
||||
|
||||
* {
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-family: FontAwesome, DejaVu Sans Serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: @bgcolor-inactive;
|
||||
color: @fgcolor;
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
button:hover {
|
||||
background: inherit;
|
||||
box-shadow: inset 0 -3px @fgcolor;
|
||||
}
|
||||
|
||||
#custom-btc,
|
||||
#pulseaudio,
|
||||
#wireplumber,
|
||||
#custom-media,
|
||||
#backlight,
|
||||
#network,
|
||||
#battery,
|
||||
#clock,
|
||||
#tray,
|
||||
#custom-power {
|
||||
padding: 0 6px;
|
||||
color: @fgcolor;
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: @fgcolor;
|
||||
color: @black;
|
||||
}
|
||||
}
|
||||
|
||||
label:focus {
|
||||
background-color: @black;
|
||||
}
|
||||
|
||||
/* -------------------------------------- */
|
||||
/* Workspaces module */
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background-color: transparent;
|
||||
color: @fgcolor-inactive;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: @bgcolor;
|
||||
box-shadow: inset 0 -3px @blue;
|
||||
color: @fgcolor;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: @bgcolor-urgent;
|
||||
}
|
||||
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
.modules-left > widget:first-child > #workspaces {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* If workspaces is the rightmost module, omit right margin */
|
||||
.modules-right > widget:last-child > #workspaces {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
/* -------------------------------------- */
|
||||
/* BTC module */
|
||||
|
||||
#custom-btc:hover {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
|
||||
/* -------------------------------------- */
|
||||
/* Media modules */
|
||||
|
||||
#pulseaudio, #wireplumber {
|
||||
color: @fgcolor;
|
||||
}
|
||||
|
||||
#pulseaudio:hover, #wireplumber:hover {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
|
||||
#pulseaudio.muted, #wireplumber.muted {
|
||||
color: @fgcolor-inactive
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
color: @green;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
#custom-media.custom-spotify {
|
||||
color: @green;
|
||||
}
|
||||
|
||||
#custom-media.custom-vlc {
|
||||
color: @orange;
|
||||
}
|
||||
|
||||
/* -------------------------------------- */
|
||||
/* Backlight module */
|
||||
|
||||
#backlight:hover {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
|
||||
/* -------------------------------------- */
|
||||
/* Network module */
|
||||
|
||||
#network:hover {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: @bgcolor-inactive;
|
||||
}
|
||||
|
||||
/* -------------------------------------- */
|
||||
/* Battery module */
|
||||
|
||||
#battery:hover {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
|
||||
#battery.good {
|
||||
color: @green;
|
||||
}
|
||||
|
||||
/* Using steps() instead of linear as a timing function to limit cpu usage */
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: @bgcolor-urgent;
|
||||
animation-name: blink;
|
||||
animation-duration: 2s;
|
||||
animation-timing-function: steps(3);
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
/* -------------------------------------- */
|
||||
/* Clock module */
|
||||
|
||||
#clock:hover {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
|
||||
/* -------------------------------------- */
|
||||
/* Tray module */
|
||||
|
||||
#tray:hover {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
|
||||
#tray > .passive {
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
background-color: @bgcolor-urgent;
|
||||
}
|
||||
|
||||
/* -------------------------------------- */
|
||||
/* Power module */
|
||||
|
||||
#custom-power {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#custom-power:hover {
|
||||
background-color: @bgcolor;
|
||||
}
|
||||
|
||||
/* If power module is the leftmost module, set left margin */
|
||||
.modules-left > widget:first-child > #custom-power {
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
/* If power module is the rightmost module, set right margin */
|
||||
.modules-right > widget:last-child > #custom-power {
|
||||
margin-right: 6px;
|
||||
}
|
||||
Reference in New Issue
Block a user