feat(linux): Set up Hyprland

This commit is contained in:
js0ny 2025-01-26 00:23:33 +00:00
parent 346a975e80
commit 49693c7657
20 changed files with 533 additions and 35 deletions

View file

@ -0,0 +1,37 @@
{
"include": "~/.config/waybar/modules",
"name": "main-bar",
"id": "main-bar",
"layer": "top",
"mode": "dock",
"exclusive": true,
"passthrough": false,
"position": "top",
"output": "DP-2",
"height": 32,
"width": "",
"spacing": 6,
"margin": 0,
"margin-top": 0,
"margin-bottom": 0,
"margin-left": 0,
"margin-right": 0,
"fixed-center": true,
"ipc": true,
"modules-left": [
"custom/menu",
"hyprland/workspaces"
],
// "modules-center": [
// "hyprland/window",
// "mpd"
// ],
"modules-right": [
"tray",
"pulseaudio",
"custom/weather",
"battery",
"clock",
"custom/power"
]
}

View file

@ -0,0 +1,149 @@
// Waybar modules configuration
{
// waybar-backlight
"backlight": {
"interval": 2,
"align": 0,
"rotate": 0,
//"device": "amdgpu_bl0",
"format": "{icon} {percent}%",
"format-icons": [
"",
"",
"",
""
],
// Commands to execute on events
"on-click": "",
"on-click-middle": "",
"on-click-right": "",
"on-update": "",
"on-scroll-up": "light -A 5%",
"on-scroll-down": "light -U 5%",
"smooth-scrolling-threshold": 1
},
"hyprland/workspaces": {
"format": "{icon} {windows}",
"format-window-separator": " ",
"window-rewrite-default": "",
"window-rewrite": {
"title<.*youtube.*>": "",
"class<firefox>": "",
"class<.*wezterm>": "",
"class<kitty>": "",
"class<wofi>": "󱓞",
"class<firefox> title<.*github.*>": "",
"class<Vivaldi.*>": "󰰬",
"obsidian": "󱓩",
"foot": "",
"Cider": "",
"class<org.kde.dolphin>": "",
"code": "󰨞",
"class<.*telegram.*>": "",
"discord": "",
"neovide": "",
"class<org.kde.okular>": "",
"class<.*wechat.*>": "",
"QQ": "",
"class<Tor Browser>": "",
"Zotero": "",
"class<ticktick>": "",
"class<net.ankiweb.Anki>": "",
}
},
// waybar-battery
"battery": {
"interval": 60,
"align": 0,
"rotate": 0,
//"bat": "BAT1",
//"adapter": "ACAD",
"full-at": 100,
"design-capacity": false,
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-full": "{icon} Full",
//"format-good": "",
"format-alt": "{icon} {time}",
"format-icons": [
"",
"",
"",
"",
""
],
"format-time": "{H}h {M}min",
"tooltip": true
},
// waybar-clock
"clock": {
"interval": 1,
"align": 0,
"rotate": 0,
"tooltip-format": "<big>{:%B %Y}</big>\n<tt><small>{calendar}</small></tt>",
"format": " {:%H:%M:%S}",
"format-alt": " {:%a %b %d, %G}"
},
// waybar-cpu
"cpu": {
"interval": 5,
"format": " {usage}%"
},
// waybar-custom
"custom/menu": {
"format": "󰣇 ",
"tooltip": false,
"on-click": "wofi"
},
"custom/power": {
"format": "⏻",
"tooltip": false,
"on-click": "wlogout"
},
// weather-custom
"custom/weather": {
"format": "{}",
"format-alt": "{alt}: {}",
"format-alt-click": "click-right",
"interval": 1800,
"return-type": "json",
"exec": "~/.config/hypr/scripts/weather.sh",
"exec-if": "ping wttr.in -c1"
},
// waybar-tray
"tray": {
"icon-size": 16,
"spacing": 10
},
"pulseaudio": {
"format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon}",
"format-muted": "",
"format-icons": {
"alsa_output.pci-0000_00_1f.3.analog-stereo": "",
"alsa_output.pci-0000_00_1f.3.analog-stereo-muted": "",
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"phone-muted": "",
"portable": "",
"car": "",
"default": [
"",
""
]
},
"scroll-step": 1,
"on-click": "pavucontrol",
"ignored-sinks": [
"Easy Effects Sink"
]
}
}

View file

@ -0,0 +1,184 @@
/** ********** Fonts ********** **/
* {
font-family: "JetBrains Mono", "Iosevka Nerd Font", archcraft, sans-serif;
font-size: 12px;
}
/** ********** Waybar Window ********** **/
window#waybar {
background-color: #1e1e2e;
color: #1e1e2e;
border-bottom: 2px solid #313244;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.5;
}
/** ********** Backlight ********** **/
#backlight {
background-color: #cba6f7;
}
/** ********** Battery ********** **/
#battery {
background-color: #f9e2af;
}
#battery.charging {
}
#battery.plugged {
}
@keyframes blink {
to {
color: #000000;
}
}
#battery.critical:not(.charging) {
background-color: #f38ba8;
color: #f38ba8;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
/** ********** Clock ********** **/
#clock {
background-color: #a6e3a1;
}
/** ********** CPU ********** **/
#cpu {
background-color: #89dceb;
}
/** ********** Memory ********** **/
#memory {
background-color: #eba0ac;
}
/** ********** Disk ********** **/
#disk {
background-color: #b4befe;
}
/** ********** Tray ********** **/
#tray {
background-color: #cdd6f4;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
}
#tray > .active {
}
/** ********** MPD ********** **/
#mpd {
background-color: #94e2d5;
}
#mpd.disconnected {
background-color: #f38ba8;
}
#mpd.stopped {
background-color: #f5c2e7;
}
#mpd.playing {
background-color: #74c7ec;
}
#mpd.paused {
}
/** ********** Pulseaudio ********** **/
#pulseaudio {
background-color: #fab387;
}
#pulseaudio.bluetooth {
background-color: #f5c2e7;
}
#pulseaudio.muted {
background-color: #313244;
color: #cdd6f4;
}
/** ********** Network ********** **/
#network {
background-color: #89b4fa;
}
#network.disconnected,#network.disabled {
background-color: #313244;
color: #cdd6f4;
}
#network.linked {
}
#network.ethernet {
}
#network.wifi {
}
/** ********** Custom ********** **/
#custom-menu, #custom-power, #custom-weather, #custom-updater {
border-radius: 4px;
margin: 6px 0px;
padding: 2px 8px;
}
#custom-menu {
background-color: #f5c2e7;
margin-left: 6px;
padding: 2px 6px;
font-size: 16px;
}
#custom-power {
background-color: #f38ba8;
margin-right: 6px;
padding: 2px 8px;
font-size: 16px;
}
#custom-updater {
background-color: #e6ed7b;
margin-right: 6px;
padding: 2px 8px;
font-size: 12px;
}
#custom-weather {
background-color: #cba6f7;
margin-right: 6px;
padding: 2px 8px;
font-size: 12px;
}
/** Common style **/
#backlight,
#battery,
#clock,
#cpu,
#disk,
#mode,
#memory,
#mpd,
#tray,
#pulseaudio,
#network {
border-radius: 4px;
margin: 6px 0px;
padding: 2px 8px;
}