mirror of
https://github.com/NotXia/dotfiles.git
synced 2025-12-16 10:51:49 +01:00
Add Hyprland config
This commit is contained in:
188
.config/waybar/config-hypr
Normal file
188
.config/waybar/config-hypr
Normal file
@ -0,0 +1,188 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
|
||||
"margin-left": 3,
|
||||
"margin-bottom": 0,
|
||||
"margin-right": 3,
|
||||
|
||||
"spacing": 1,
|
||||
|
||||
"modules-left": [
|
||||
"hyprland/workspaces",
|
||||
"custom/screenshot_t",
|
||||
"idle_inhibitor"
|
||||
],
|
||||
"modules-right": [
|
||||
"cpu",
|
||||
"memory",
|
||||
"network",
|
||||
"bluetooth",
|
||||
"pulseaudio",
|
||||
"battery",
|
||||
"clock",
|
||||
// "custom/power",
|
||||
"tray"
|
||||
],
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Modules
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
"custom/screenshot_t": {
|
||||
"format":" ",
|
||||
"on-click": "~/.config/waybar/scripts/screenshot_full",
|
||||
"on-click-right":"~/.config/waybar/scripts/screenshot_area"
|
||||
},
|
||||
|
||||
"cpu": {
|
||||
"interval": 3,
|
||||
"format": "<span rise='1000'></span> {usage}%",
|
||||
"max-length": 7,
|
||||
"min-length": 7
|
||||
},
|
||||
|
||||
"memory": {
|
||||
"interval": 3,
|
||||
"format": "<span rise='1000'></span> {used:0.2f}GB",
|
||||
"max-length": 12,
|
||||
"min-length": 12
|
||||
},
|
||||
|
||||
"battery": {
|
||||
"interval": 5,
|
||||
"states": {
|
||||
"good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "<span rise='1000'>{icon}</span> {capacity}%",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-plugged": " {capacity}%",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
},
|
||||
|
||||
"network": {
|
||||
"format-wifi": " {signalStrength}% <span rise='1000'>|</span> <span rise='1000'></span> {bandwidthUpBytes} <span rise='1000'></span> {bandwidthDownBytes}",
|
||||
"format-ethernet": "{ifname} <span rise='1000'>|</span> <span rise='1000'></span> {bandwidthUpBytes} <span rise='1000'></span> {bandwidthDownBytes}",
|
||||
"format-linked": "{ifname} No IP",
|
||||
"format": "",
|
||||
"format-disconnected": "¯\\_(ツ)_/¯",
|
||||
"on-click": "alacritty -e 'nmtui'",
|
||||
"tooltip-format": "{ifname}\n{ipaddr}/{cidr}",
|
||||
"tooltip-format-wifi": "{essid} {frequency}MHz\nStrength: {signaldBm}dBm ({signalStrength}%)\nIP: {ipaddr}/{cidr}",
|
||||
"interval": 3,
|
||||
"min-length": 32
|
||||
},
|
||||
|
||||
"bluetooth": {
|
||||
"format-disabled": "<span rise='1200'></span> off",
|
||||
"format-off": "<span rise='1200'></span> off",
|
||||
"format-on": "<span rise='1200'></span> on",
|
||||
"interval": 3,
|
||||
"on-click": "blueman-manager"
|
||||
},
|
||||
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon} ",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
},
|
||||
"tooltip": "true"
|
||||
},
|
||||
|
||||
"custom/power": {
|
||||
"format": "",
|
||||
"tooltip": false,
|
||||
"on-click": "wlogout"
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"format": "<span rise='1500'> </span> {:%e %b %Y <span rise='1000'>|</span> <span rise='800'></span> %H:%M}"
|
||||
},
|
||||
|
||||
"hyprland/workspaces": {
|
||||
"all-outputs": true,
|
||||
"format": "{name}",
|
||||
"format-icons": {
|
||||
"1": "一",
|
||||
"2": "二",
|
||||
"3": "三",
|
||||
"4": "四",
|
||||
"5": "五",
|
||||
"6": "六",
|
||||
"7": "七",
|
||||
"8": "八",
|
||||
"9": "九",
|
||||
"10": "十"
|
||||
},
|
||||
"on-scroll-up": "hyprctl dispatch workspace e+1 1>/dev/null",
|
||||
"on-scroll-down": "hyprctl dispatch workspace e-1 1>/dev/null",
|
||||
"sort-by-number": true,
|
||||
"active-only": false
|
||||
},
|
||||
|
||||
"hyprland/window": {
|
||||
"max-length": 100,
|
||||
"separate-outputs": true
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"scroll-step": 3, // %, can be a float
|
||||
"format": "<span rise='1000'>{icon}</span> {volume}% <span rise='1000'>|</span> <span rise='1000'>{format_source}</span>",
|
||||
"format-bluetooth": "{volume}% {icon} <span rise='1000'>|</span> <span rise='1000'>{format_source}</span>",
|
||||
"format-bluetooth-muted": " {icon} <span rise='1000'>|</span> <span rise='1000'>{format_source}</span>",
|
||||
"format-muted": "<span rise='1000'></span> <span rise='1000'>|</span> <span rise='1000'>{format_source}</span>",
|
||||
//"format-source": "{volume}% ",
|
||||
//"format-source-muted": "",
|
||||
"format-source": "",
|
||||
"format-source-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
"on-click": "pavucontrol",
|
||||
"on-click-right": "amixer sset Master toggle"
|
||||
},
|
||||
|
||||
"wireplumber": {
|
||||
"on-click": "pavucontrol",
|
||||
"on-click-right": "amixer sset Master toggle 1>/dev/null",
|
||||
//on-click: "${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
//on-scroll-down: "${wpctl} set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.04+";
|
||||
//on-scroll-up: "${wpctl} set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0.04-";
|
||||
"format": "<span foreground='#fab387'>{icon}</span> {volume}%",
|
||||
"format-muted": " ",
|
||||
"format-source": "",
|
||||
"format-source-muted": "",
|
||||
//"format-muted": "<span foreground='#fab387'> </span>",
|
||||
//"format-icons": [ "<span foreground='#fab387'></span>" ]
|
||||
"format-icons": {
|
||||
"headphone": " ",
|
||||
"hands-free": " ",
|
||||
"headset": " ",
|
||||
"phone": " ",
|
||||
"portable": " ",
|
||||
"car": " ",
|
||||
"default": [" ", " ", " "]
|
||||
}
|
||||
},
|
||||
|
||||
"tray": {
|
||||
"icon-size": 15,
|
||||
"spacing": 5
|
||||
}
|
||||
}
|
||||
3
.config/waybar/scripts/screenshot
Executable file
3
.config/waybar/scripts/screenshot
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/bash
|
||||
grim -g "$(slurp)" - | wl-copy -t image/png
|
||||
notify-send "Screenshot copied to clipboard"
|
||||
3
.config/waybar/scripts/screenshot_area
Executable file
3
.config/waybar/scripts/screenshot_area
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/bash
|
||||
grimblast copy area || exit
|
||||
notify-send "Screenshot copied to clipboard"
|
||||
3
.config/waybar/scripts/screenshot_full
Executable file
3
.config/waybar/scripts/screenshot_full
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/bash
|
||||
grimblast copy output || exit
|
||||
notify-send "Screenshot copied to clipboard"
|
||||
193
.config/waybar/style.css
Normal file
193
.config/waybar/style.css
Normal file
@ -0,0 +1,193 @@
|
||||
* {
|
||||
font-family: "Mono";
|
||||
font-size: 9pt;
|
||||
font-weight: 600;
|
||||
padding: 0;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
min-height: 0;
|
||||
margin: 0.2em 0.2em 0.2em 0.2em;
|
||||
}
|
||||
|
||||
/* The whole bar */
|
||||
#waybar {
|
||||
/*background: @bg;*/
|
||||
background-color: transparent;
|
||||
/*color: @light;*/
|
||||
color: #ffffff;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
/*border-top: 8px transparent;*/
|
||||
border-radius: 0px;
|
||||
margin: 0px 0px;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 0px;
|
||||
color: #7984a4;
|
||||
background-color: transparent;
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: transparent;
|
||||
}
|
||||
#workspace button.hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
#workspaces button.active {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#window {
|
||||
color: #64727d;
|
||||
}
|
||||
|
||||
/* Each module */
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#wireplumber,
|
||||
#custom-screenshot_t,
|
||||
#tray,
|
||||
#mode,
|
||||
#idle_inhibitor,
|
||||
#bluetooth,
|
||||
#custom-hyprPicker,
|
||||
#custom-power-menu,
|
||||
#custom-power {
|
||||
padding: 0px 15px;
|
||||
color: #e5e5e5;
|
||||
/* color: #bf616a; */
|
||||
border-radius: 20px;
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces {
|
||||
border-radius: 20px;
|
||||
padding: 0px 10px;
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: #fb958b;
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
#memory {
|
||||
color: #ebcb8b;
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
#custom-power-menu {
|
||||
border-radius: 9.5px;
|
||||
background-color: #1b242b;
|
||||
border-radius: 7.5px;
|
||||
padding: 0 0px;
|
||||
}
|
||||
|
||||
#custom-launcher {
|
||||
background-color: #1b242b;
|
||||
color: #6a92d7;
|
||||
border-radius: 7.5px;
|
||||
padding: 0 0px;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: #7d9bba;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: #c8d2e0;
|
||||
}
|
||||
|
||||
#battery {
|
||||
color: #c0caf5;
|
||||
}
|
||||
|
||||
#battery.charging,
|
||||
#battery.full,
|
||||
#battery.plugged {
|
||||
color: #26a65b;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: rgba(30, 34, 42, 0.5);
|
||||
color: #abb2bf;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
color: #f53c3c;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
label:focus {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
#bluetooth {
|
||||
color: #707d9d;
|
||||
}
|
||||
|
||||
/* #bluetooth.disconnected {
|
||||
color: #f53c3c;
|
||||
} */
|
||||
|
||||
#network {
|
||||
color: #b48ead;
|
||||
}
|
||||
|
||||
/* #network.disconnected {
|
||||
color: #f53c3c;
|
||||
} */
|
||||
|
||||
#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;
|
||||
}
|
||||
10
.config/waybar/waybar.sh
Executable file
10
.config/waybar/waybar.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q waybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -x waybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch main
|
||||
waybar
|
||||
Reference in New Issue
Block a user