From 1651a0891aab4630c13594c47e316bc67e58e7db Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 22 Feb 2026 20:02:57 +0000 Subject: [PATCH] Add WM stuff --- .config/hypr/bind.conf | 56 ++++++++++ .config/hypr/exec.conf | 11 ++ .config/hypr/hyprland.conf | 6 ++ .config/hypr/hyprpaper.conf | 4 + .config/hypr/input.conf | 16 +++ .config/hypr/monitor.conf | 1 + .config/hypr/window.conf | 55 ++++++++++ .config/hypr/windowrule.conf | 33 ++++++ .config/nvim | 2 +- .config/swayidle/config | 4 + .config/swaylock/config | 31 ++++++ .config/waybar/config.jsonc | 80 ++++++++++++++ .config/waybar/scripts/waybar-wttr.py | 124 +++++++++++++++++++++ .config/waybar/style.css | 149 ++++++++++++++++++++++++++ .config/wlogout/layout | 36 +++++++ .config/wlogout/style.css | 51 +++++++++ .config/wofi/style.css | 74 +++++++++++++ 17 files changed, 732 insertions(+), 1 deletion(-) create mode 100644 .config/hypr/bind.conf create mode 100644 .config/hypr/exec.conf create mode 100644 .config/hypr/hyprland.conf create mode 100644 .config/hypr/hyprpaper.conf create mode 100644 .config/hypr/input.conf create mode 100644 .config/hypr/monitor.conf create mode 100644 .config/hypr/window.conf create mode 100644 .config/hypr/windowrule.conf create mode 100644 .config/swayidle/config create mode 100644 .config/swaylock/config create mode 100644 .config/waybar/config.jsonc create mode 100644 .config/waybar/scripts/waybar-wttr.py create mode 100644 .config/waybar/style.css create mode 100644 .config/wlogout/layout create mode 100644 .config/wlogout/style.css create mode 100644 .config/wofi/style.css diff --git a/.config/hypr/bind.conf b/.config/hypr/bind.conf new file mode 100644 index 0000000..e5447c7 --- /dev/null +++ b/.config/hypr/bind.conf @@ -0,0 +1,56 @@ +$mainMod = SUPER + +bind = $mainMod, Return, exec, kitty +bind = $mainMod, Q, killactive, +bind = $mainMod, M, exec, wlogout --protocol layer-shell +bind = $mainMod, E, exec, thunar +bind = $mainMod, V, togglefloating +bind = $mainMod, D, exec, wofi --show drun +bind = $mainMod, P, pseudo, #dwindle +bind = $mainMod, S, togglesplit, #dwindle +bind = $mainMod SHIFT, Q, exec, swaylock +bind = , PRINT, exec, hyprshot -m region --clipboard-only + +bind = $mainMod, h, movefocus, l +bind = $mainMod, l, movefocus, r +bind = $mainMod, k, movefocus, u +bind = $mainMod, j, movefocus, d + +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 + +bind = $mainMod CTRL, l, resizeactive, 10 0 +bind = $mainMod CTRL, h, resizeactive, -10 0 +bind = $mainMod CTRL, k, resizeactive, 0 -10 +bind = $mainMod CTRL, j, resizeactive, 0 10 + +bind = $mainMod SHIFT, l, movewindow, r +bind = $mainMod SHIFT, h, movewindow, l +bind = $mainMod SHIFT, k, movewindow, u +bind = $mainMod SHIFT, j, movewindow, d + +bind = $mainMod, b, exec, firefox +bind = $mainMod, c, exec, thunderbird + +# Move/resize windws with mainMod + LMB/RMB and draggin +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow diff --git a/.config/hypr/exec.conf b/.config/hypr/exec.conf new file mode 100644 index 0000000..f492e72 --- /dev/null +++ b/.config/hypr/exec.conf @@ -0,0 +1,11 @@ +exec-once = dbus-update-activation-environment --systemd --all +exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +exec-once = waybar & hyprpaper +exec-once = swayidle -w +exec-once = nwg-look -a +exec-once = [workspace 2 silent] firefox +exec-once = [workspace 10 silent] telegram-desktop +exec-once = [workspace 10 silent] vesktop +exec-once = [workspace 3 silent] thunderbird +exec-once = [workspace 5 silent] steam diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf new file mode 100644 index 0000000..b5a2417 --- /dev/null +++ b/.config/hypr/hyprland.conf @@ -0,0 +1,6 @@ +source = ~/.config/hypr/monitor.conf +source = ~/.config/hypr/exec.conf +source = ~/.config/hypr/bind.conf +source = ~/.config/hypr/input.conf +source = ~/.config/hypr/window.conf +source = ~/.config/hypr/windowrule.conf diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf new file mode 100644 index 0000000..fac88b0 --- /dev/null +++ b/.config/hypr/hyprpaper.conf @@ -0,0 +1,4 @@ +#preload = ~/.config/wallpaper/wall.png +#wallpaper = HDMI-A-1, ~/.config/wallpapers/wall.png +splash = false + diff --git a/.config/hypr/input.conf b/.config/hypr/input.conf new file mode 100644 index 0000000..7933132 --- /dev/null +++ b/.config/hypr/input.conf @@ -0,0 +1,16 @@ +input { + kb_layout = gb, us, ro + + kb_variant = + kb_model = + kb_options = grp:alt_shift_toggle, caps:swapescape + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = 0 # -1.0 -1.0, 0 means no modification +} diff --git a/.config/hypr/monitor.conf b/.config/hypr/monitor.conf new file mode 100644 index 0000000..5fb209c --- /dev/null +++ b/.config/hypr/monitor.conf @@ -0,0 +1 @@ +monitor=HDMI-A-1,2560x1440@164.835999, 0x0, 1 diff --git a/.config/hypr/window.conf b/.config/hypr/window.conf new file mode 100644 index 0000000..ddb3289 --- /dev/null +++ b/.config/hypr/window.conf @@ -0,0 +1,55 @@ +general { + gaps_in = 5 + gaps_out = 10 + border_size = 1 + col.active_border = rgb(8aadf4) rgb(24273a) rgb(24273a) rgb(8aadf4) 45deg + col.inactive_border = rgb(24273a) rgb(24273a) rgb(24273a) rgb(24273a) 45deg + layout = dwindle + allow_tearing = false +} + +decoration { + rounding = 10 + blur { + enabled = true + size = 2 + passes = 2 + new_optimizations = true + xray = true + } + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + bezier = overshot, 0.05, 0.9, 0.1, 1.05 + bezier = smoothOut, 0.3, 0, 0.66, -0.56 + bezier = smoothIn, 0.25, 1, 0.5, 1 + animation = windows, 1, 5, overshot, slide + animation = windowsOut, 1, 4, smoothOut, slide + animation = windowsMove, 1, 4, default + animation = border, 1, 10, default + animation = fade, 1, 10, smoothIn + animation = fadeDim, 1, 10, smoothIn + animation = workspaces, 1, 6, default +} + +dwindle { + pseudotile = yes + preserve_split = yes +} + +master { + new_is_master = true +} + +gestures { + workspace_swipe = off +} + +misc { + force_default_wallpaper = 0 +} diff --git a/.config/hypr/windowrule.conf b/.config/hypr/windowrule.conf new file mode 100644 index 0000000..c19a2db --- /dev/null +++ b/.config/hypr/windowrule.conf @@ -0,0 +1,33 @@ +windowrule = float, file_progress +windowrule = float, confirm +windowrule = float, dialog +windowrule = float, download +windowrule = float, notification +windowrule = float, error +windowrule = float, splash +windowrule = float, confirmreset +windowrule = float, title:Open File +windowrule = float, title:branchdialog +windowrule = float, viewnior +windowrule = float, pavucontrol-qt +windowrule = float, pavucontrol +windowrule = float, file-roller +windowrule = fullscreen, wlogout +windowrule = float, title:wlogout +windowrule = fullscreen, title:wlogout +windowrule = idleinhibit stayfocused, mpv +windowrulev2 = float, title:^(Media viewer)$ + +# Picture in picture windows +windowrulev2 = float, title:^(Picture-inPicture)$ +windowrulev2 = pin, title:^(Picture-inPicture)$ +windowrulev2 = float, class:^(vesktop)$,title:^(Discord Popout)$ +windowrulev2 = pin, class:^(vesktop)$,title:^(Discord Popout)$ +windowrulev2 = float, class:^(steam)$,title:^(Friends List)$ + +# Workspace assign +windowrulev2 = workspace: 1, class:^(kitty)$ +windowrulev2 = workspace: 2, class:^(firefox)$ +windowrulev2 = workspace: 5, class:^(steam)$ +windowrulev2 = workspace: 10, class:^(org.telegram.desktop)$ +windowrulev2 = workspace: 10, class:^(vesktop)$ diff --git a/.config/nvim b/.config/nvim index 20d080e..cc7139c 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit 20d080e2232c6b3a7fa86d446377f8510a4328e5 +Subproject commit cc7139c2ffb3fcba6d91812c6e6535f3e92b6f90 diff --git a/.config/swayidle/config b/.config/swayidle/config new file mode 100644 index 0000000..fb63ee9 --- /dev/null +++ b/.config/swayidle/config @@ -0,0 +1,4 @@ +timeout 300 'swaylock' +timeout 420 'systemctl suspend' +before-sleep 'swaylock' + diff --git a/.config/swaylock/config b/.config/swaylock/config new file mode 100644 index 0000000..ffacb75 --- /dev/null +++ b/.config/swaylock/config @@ -0,0 +1,31 @@ +daemonize +indicator +clock +screenshots + +effect-blur=11x11 +font=JetBrains Mono +indicator-radius=80 +indicator-thickness=8 +timestr=%I:%M %p +datestr=%F + +inside-color=#181926 +ring-color=#8bd5ca +key-hl-color=#cad3f5 +text-color=#cad3f5 +layout-text-color=#cad3f5 +layout-bg-color=#cad3f5 +text-caps-lock-color=#cad3f5 + +inside-clear-color=#f4dbd6 +ring-clear-color=#f0c6c6 +text-clear-color=#1e2030 + +inside-ver-color=#91d7e3 +ring-ver-color=#7dc4e4 +text-ver-color=#1e2030 + +inside-wrong-color=#ee99a0 +ring-wrong-color=#ed8796 +text-wrong-color=#1e2030 diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc new file mode 100644 index 0000000..1688a3e --- /dev/null +++ b/.config/waybar/config.jsonc @@ -0,0 +1,80 @@ +{ + "layer": "top", + "position": "top", + "mod": "dock", + "exclusice": true, + "passthrough": false, + "gtk-layer-shell": true, + "height": 0, + "modules-left": [ + "hyprland/workspaces" + ], + "modules-center": ["hyprland/window"], + "modules-right": [ + "tray", + "custom/updates", + "hyprland/language", + "pulseaudio", + "pulseaudio#microphone", + "clock", + "custom/weather" + ], + "hyprland/window": { + "format": {} + }, + "hyprland/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "on-click": "activate", + "persisten_workspaces": { + "1": [] + } + }, + "hyprland/language": { + "format": "{}", + "format-en": "EN", + "format-ro": "RO" + }, + "custom/weather": { + "tooltip": true, + "format": "{}", + "interval": 30, + "exec": "~/.config/waybar/scripts/waybar-wttr.py", + "return-type": "json" + }, + "tray": { + "icon-size": 16, + "spacing": 10 + }, + "clock": { + "format": "{:%R %d%M}", + "tooltip-format": "{:%Y %B}\n{calendar}" + }, + "pulseaudio": { + "format": "{icon} {volume}%", + "tooltip": false, + "format-muted": "Muted", + "on-click": "pamixer -t", + "on-scroll-up": "pamixer -i 5", + "on-scroll-down": "pamixer -d 5", + "scroll-step": 5 + // "format-icons": { + // "headphones": "", + // "hands-free": "", + // "headset": "", + // "phone": "", + // "portable": "", + // "car": "", + // "default": ["", "", ""] + // } + }, + "pulseaudio#microphone": { + "format": "{format_source}", + "format-source": "{volume}%", + "format-source-muted": "Muted", + "on-click": "pamixer --default-source -t", + "on-scroll-up": "pamixer --default-source -i 5", + "on-scroll-down": "pamixer --default-source -d 5", + "scroll-step": 5 + } +} diff --git a/.config/waybar/scripts/waybar-wttr.py b/.config/waybar/scripts/waybar-wttr.py new file mode 100644 index 0000000..b68d17b --- /dev/null +++ b/.config/waybar/scripts/waybar-wttr.py @@ -0,0 +1,124 @@ +#!/run/current-system/sw/bin/python + +import json +from datetime import datetime + +import requests + +WEATHER_CODES = { + "113": "Sunny", + "116": "Patchy", + "119": "Cloudy", + "122": "Cloudy", + "143": "Cloudy", + "176": "Rain", + "179": "Rain", + "182": "Rain", + "185": "Rain", + "200": "Storm", + "227": "Rain", + "230": "Rain", + "248": "Cloudy", + "260": "Cloudy", + "263": "Rain", + "266": "Rain", + "281": "Rain", + "284": "Rain", + "293": "Rain", + "296": "Rain", + "299": "Rain", + "302": "Rain", + "305": "Rain", + "308": "Rain", + "311": "Rain", + "314": "Rain", + "317": "Rain", + "320": "Rain", + "323": "Rain", + "326": "Rain", + "329": "Snow", + "332": "Snow", + "335": "Snow", + "338": "Snow", + "350": "Rain", + "353": "Rain", + "356": "Rain", + "359": "Rain", + "362": "Rain", + "365": "Rain", + "368": "Rain", + "371": "Snow", + "374": "Rain", + "377": "Rain", + "386": "Rain", + "389": "Rain", + "392": "Rain", + "395": "Snow", +} + +data = {} + +weather = request.get("https://wttr.in/?format=j1").json() + +def format_time(time): + return time.replace("00", "").zfill(2) + +def format_temp(temp): + return(temp["FeelsLikeC"] + "o").ljust(3) + +def format_chances(hour): + chances = { + "chancesoffog": "Fog", + "chancesoffrost": "Frost", + "chancesofovercast": "Overcast", + "chancesofrain": "Rain", + "chancesofsnow": "Snow", + "chancesofsunshine": "Sunshine", + "chancesofthunder": "Thunder", + "chancesofwindy": "Wind", + } + + conditions = [] + for event in chances.keys(): + if int(hour[event]) > 0: + conditions.append(chances[event] + "" + hour[event] + "%") + return ", ".join(conditions) + +tempint = int(weather["current_condition"][0]["FeelsLikeC"]) +extrachar = "" +if tempint > 0 and tempint < 10: + extrachar = "+" + +data["text"] = ( + " " + + WEATHER_CODES[weather["current_condition"][0]["weatherCode"]] + + " " + + extrachar + + weather["current_condition"][0]["FeelsLikeC"] + + "o" +) + +data["tooltip"] = ( + f"{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_C']}o\n" +) +data["tooltip"] += f"Feels like: {weather['current_condition'][0]['FeelsLikeC']}o\n" +data["tooltip"] += f"Wind: {weather['current_condition'][0]['WindspeedKmph']}Km/h\n" +data["tooltip"] += f"Humidity: {weather['current_condition'][0]['FeelsLikeC']}%\n" +for i, day in enumerate(weather["weather"]): + data["tooltip"] += f"\n" + if i == 0: + data["tooltip"] += "Today, " + if i == 1: + data["tooltip"] += "Tomorrow, " + data["tooltip"] += f"{day['date']}\n" + data["tooltip"] += f"Up {day['maxtempC']}o Down {day['mintempC']}o " + data["tooltip"] += f"Sunrise {day['astronomy'][0]['sunrise']} Sunset {day['astronomy'][0]['sunset']} \n" + + for hour in day["hourly"]: + if i == 0" + if int(format_time(hour["time"])) < datetime.now().hour - 2: + continue + + data["tooltip"] += f"{format_time(hour['time'])} {WEATHER_CODES[hour['weatherCode']]} {format_temp(hour['FeelsLikeC'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n" + +print(json.dumps(data)) diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..173840c --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,149 @@ +* { + border: none; + border-radius: 0; + font-family: + JetBrains Mono Nerd Font, + monospace; + font-weight: bold; + font-size: 14px; + min-height: 0; +} + +window#waybar { + background: rgba(21, 18, 27, 0); + color: #cdd6f4; +} + +tooltip { + background: #1e1e2e; + border-radius: 10px; + border-width: 2px; + border-style: solid; + border-color: #11111b; +} + +#workspaces button { + padding: 5px; + color: #313244; + margin-right: 5px; +} + +#workspaces button.active { + color: #a6adc8; +} + +#workspaces button.focused { + color: #a6adc8; + background: #eba0ac; + border-radius: 10px; +} + +#workspaces button.urgent { + color: #11111b; + background: #a6e3a1; + border-radius: 10px; +} + +#workspaces button.active { + color: #11111b; + background: #cdd6f4; + border-radius: 10px; +} + +#language, +#custom-updates, +#custom-caffeine, +#custom-weather, +#window, +#clock, +#battery, +#pulseaudio, +#network, +#workspaces, +#tray, +#backlight { + background: #1e1e2e; + padding: 0px 10px; + margin: 3px 0px; + margin-top: 10px; + border: 1px solid #181825; +} + +#tray { + border-radius: 10px; + margin-right: 10px; +} + +#workspaces { + background: #1e1e2e; + border-radius: 10px; + margin-left: 10px; + padding-right: 0px; + padding-left: 5px; +} + +#custom-caffeine { + color: #89dceb; + border-radius: 10px 0 0 10px; + border-right: 0; + margin-left: 10px; +} + +#custom-language { + color: #f38ba8; + border-right: 0; + border-left: 0; +} + +#custom-updates { + color: #f5c2e7; + border-radius: 10px 0 0 10px; + border-left: 0; + border-right: 0; +} + +#window { + border-radius: 10px; + margin-left: 0; + margin-right: 0; +} + +#clock { + color: #fab387; + border-radius: 10px 0 0 10px; + margin-left: 5px; + border-right: 0px; +} + +#network { + color: #f9e2af; + border-left: 0px; + border-right: 0px; +} + +#pulseaudio { + color: #89b4fa; + border-left: 0px; + border-right: 0px; +} + +#pulseaudio.microphone { + color: #cba6f7; + border-radius: 0 10px 10px 0; + border-left: 0; + border-right: 0; + margin-right: 5px; +} + +#battery { + color: #a6e3a1; + border-radius: 0 10px 10px 0; + margin-right: 10px; + border-left: 0px; +} + +#custom-weather { + border-radius: 0 10px 10px 0; + border-right: 0; + margin-left: 0; +} diff --git a/.config/wlogout/layout b/.config/wlogout/layout new file mode 100644 index 0000000..09c5774 --- /dev/null +++ b/.config/wlogout/layout @@ -0,0 +1,36 @@ +{ + "label" : "lock", + "action" : "swaylock", + "text" : "Lock", + "keybind" : "l", +} +{ + "label" : "hibernate", + "action" : "systemctl hibernate", + "text" : "Hibernate", + "keybind" : "h", +} +{ + "label" : "logout", + "action" : "sleep 1; hyprctl dispatch exit", + "text" : "Logout", + "keybind" : "e", +} +{ + "label" : "shutdown", + "action" : "systemctl poweroff", + "text" : "Shutdown", + "keybind" : "s", +} +{ + "label" : "suspend", + "action" : "systemctl suspend", + "text" : "Suspend", + "keybind" : "u", +} +{ + "label" : "reboot", + "action" : "systemctl reboot", + "text" : "Reboot", + "keybind" : "r", +} diff --git a/.config/wlogout/style.css b/.config/wlogout/style.css new file mode 100644 index 0000000..8f377f6 --- /dev/null +++ b/.config/wlogout/style.css @@ -0,0 +1,51 @@ +* { + background-image: none; +} + +window { + background-color: rgba(36,39,58,0.9) +} + +button { + margin: 8px; + color: #cad3f5; + background-color: #363a4f; + border-style: solid; + border-width: 2px; + background-repeat: no-repeat; + background-position: center; + background-size: 25%; +} + +button:active, +button:focus, +button:hover { + color: #8bd5ca; + background-color: #24273a; + outline-style: none; +} + +#lock{ + /* background-image: image(url("icons/lock.png")); */ +} + +#logout{ + /* background-image: image(url("icons/logout.png")); */ +} + +#suspend{ + /* background-image: image(url("icons/suspend.png")); */ +} + +#hibernate{ + /* background-image: image(url("icons/hibernate.png")); */ +} + +#shutdown{ + /* background-image: image(url("icons/shutdown.png")); */ +} + +#reboot{ + /* background-image: image(url("icons/reboot.png")); */ +} + diff --git a/.config/wofi/style.css b/.config/wofi/style.css new file mode 100644 index 0000000..111c727 --- /dev/null +++ b/.config/wofi/style.css @@ -0,0 +1,74 @@ +@define-color lavender #b7bdf8; +@define-color base #24273a; +@define-color red #ed8796; +@define-color mauve #c6a0f6; + +* { + font-family: "Inconsolata Nerd Font", monospace; + font-size: 14px; +} + +window { + margin: 0; + padding: 10px; + border: 0.16em solid @lavender; + border-radius: 0.1em; + background-color: @base; +} + +#inner-box { + margin: 5px; + padding: 10px; + border: none; + background-color: @base; +} + +#outer-box { + margin: 5px; + padding: 10px; + border: none; + background-color: @base; +} + +#scroll { + margin: o; + padding: 10px; + border none; + background-color: @base; +} + +#input image { + border: none; + color: @red; +} + +#input * { + outline: 4px solid @red !important; +} + +#text { + margin: 5px; + border: none; + color: @text; +} + +#entry { + background-color: @base; +} + +#entry array { + border: none; + color: @lavender; +} + +#entry:selected { + border: 0.11em solid @lavender; +} + +#entry:selected #text { + color: @mauve; +} + +#entry:drop(active) { + background-color: @lavender !important; +}