From 2a3f8f72944dadf8941255231ecab6e257016f0b Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Thu, 7 Aug 2025 06:06:53 +0200 Subject: [PATCH] chnages --- hypr/hyprlock.conf | 2 +- hypr/hyprpaper.conf | 4 +- hypr/modules/autostart.conf | 3 +- hypr/modules/env.conf | 7 +- hypr/modules/input.conf | 10 +- hypr/modules/theme.conf | 1 + hypr/modules/window_rules.conf | 21 +++- waybar/config.jsonc | 172 +++++++++++++++++++++++++-- waybar/scripts/cycle_audio_output.sh | 12 ++ waybar/scripts/get_audio_output.sh | 12 ++ waybar/style.css | 13 +- waybar/style.css-without-borders | 157 ------------------------ waybar/style.css.bak | 81 ------------- 13 files changed, 229 insertions(+), 266 deletions(-) create mode 100755 waybar/scripts/cycle_audio_output.sh create mode 100755 waybar/scripts/get_audio_output.sh delete mode 100644 waybar/style.css-without-borders delete mode 100644 waybar/style.css.bak diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf index 4956cc4..c1f419f 100644 --- a/hypr/hyprlock.conf +++ b/hypr/hyprlock.conf @@ -12,7 +12,7 @@ general { # BACKGROUND background { monitor = - path = $HOME/Pictures/rem/rem-latte.jpg + path = $HOME/Pictures/wallpapers/rem-latte.jpg blur_passes = 0 color = $base } diff --git a/hypr/hyprpaper.conf b/hypr/hyprpaper.conf index eadce91..1858595 100644 --- a/hypr/hyprpaper.conf +++ b/hypr/hyprpaper.conf @@ -1,4 +1,4 @@ +# preload = ~/Pictures/red_moon/red_moon-latte.jpg preload = ~/Pictures/red_moon/red_moon-latte.jpg -preload = ~/Pictures/rem/rem-latte.jpg # wallpaper = ,~/Pictures/red_moon/red_moon-latte.jpg -wallpaper = ,~/Pictures/rem/rem-latte.jpg +wallpaper = , ~/Pictures/red_moon/red_moon-latte.jpg diff --git a/hypr/modules/autostart.conf b/hypr/modules/autostart.conf index e03c95d..9c652ff 100644 --- a/hypr/modules/autostart.conf +++ b/hypr/modules/autostart.conf @@ -2,9 +2,8 @@ # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: -# exec-once = uwsm app -- waybar exec-once = uwsm app -- nm-applet exec-once = uwsm app -- nextcloud --background exec-once = uwsm app -- rclone mount google_drive: ~/gdrive exec-once = uwsm app -- protonvpn-app -# exec-once = uwsm app -- hyprpaper +exec-once = uwsm app -- sh -c "/usr/bin/discord discord --enable-features=UseOzonePlatform --ozone-platform=wayland --start-minimized &> /dev/null" diff --git a/hypr/modules/env.conf b/hypr/modules/env.conf index be5d85f..bdfa8d8 100644 --- a/hypr/modules/env.conf +++ b/hypr/modules/env.conf @@ -6,5 +6,8 @@ env = HYPRCURSOR_SIZE,24 env = XCURSOR_SIZE,24 env = XCURSOR_THEME,Bibata-Modern-Classic env = XDG_CURRENT_DESKTOP,Hyprland -env = debug:full_cm_proto=true -env = QT_QPA_PLATFORMTHEME=qt6ct +env = debug:full_cm_proto,true +env = QT_QPA_PLATFORMTHEME,qt6ct +env = LIBVA_DRIVER_NAME,radeonsi +env = VDPAU_DRIVER,radeonsi +env = MOZ_ENABLE_WAYLAND,1 diff --git a/hypr/modules/input.conf b/hypr/modules/input.conf index ad20a96..cad4bb7 100644 --- a/hypr/modules/input.conf +++ b/hypr/modules/input.conf @@ -2,8 +2,7 @@ # https://wiki.hyprland.org/Configuring/Variables/#input input { kb_layout = us - kb_variant = dvorak-intl, intl - # kb_variant = intl + kb_variant = intl kb_model = kb_options = kb_rules = @@ -18,6 +17,13 @@ input { } } +device { + name = at-translated-set-2-keyboard + resolve_binds_by_sym = 1 + kb_layout = us + kb_variant = dvorak-intl +} + # https://wiki.hyprland.org/Configuring/Variables/#gestures gestures { workspace_swipe = false diff --git a/hypr/modules/theme.conf b/hypr/modules/theme.conf index 2a15be3..106f322 100644 --- a/hypr/modules/theme.conf +++ b/hypr/modules/theme.conf @@ -97,6 +97,7 @@ misc { force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( vrr = 1 + vfr = true font_family = FiraCode Nerd Font } diff --git a/hypr/modules/window_rules.conf b/hypr/modules/window_rules.conf index 6adc327..d35d215 100644 --- a/hypr/modules/window_rules.conf +++ b/hypr/modules/window_rules.conf @@ -12,6 +12,7 @@ windowrulev2=noblur,class:^()$,title:^()$ # games for tearing add the immediate rule windowrule = immediate, class:^(cs2)$ +windowrule = immediate, class:^(gamescope)$ # Float Windows windowrule=float,title:^(Open File)$ @@ -46,10 +47,20 @@ windowrule=center,title:^(pinentry-gtk-2)$ windowrule=center,title:^(Confirm to replace files)$ windowrule=center,title:^(File Operation Progress)$ windowrule=center,class:^(pavucontrol|blueman-manager|nm-connection-editor)$ +windowrule=noblur,title:^(Open File)$ +windowrule=noblur,title:^(Select a File)$ +windowrule=noblur,title:^(Choose a file)$ +windowrule=noblur,title:^(Save As)$ +windowrule=noblur,title:^(Save File)$ +windowrule=noblur,title:^(branchdialog)$ +windowrule=noblur,title:^(pinentry-gtk-2)$ +windowrule=noblur,title:^(Confirm to replace files)$ +windowrule=noblur,title:^(File Operation Progress)$ +windowrule=noblur,class:^(pavucontrol|blueman-manager|nm-connection-editor)$ # Workspace Rules -windowrule=workspace 1,class:^(firefox)$ -windowrule=workspace 2,class:^(kitty)$ -windowrule=workspace 3,class:^(Code)$ -windowrule=workspace 4,class:^(steam)$ -windowrule=workspace 5,class:^(discord)$ +# windowrule=workspace 1,class:^(firefox)$ +# windowrule=workspace 2,class:^(kitty)$ +# windowrule=workspace 3,class:^(Code)$ +# windowrule=workspace 4,class:^(steam)$ +# windowrule=workspace 5,class:^(discord)$ diff --git a/waybar/config.jsonc b/waybar/config.jsonc index fe94a61..b3b0149 100644 --- a/waybar/config.jsonc +++ b/waybar/config.jsonc @@ -1,11 +1,23 @@ // ~/.config/waybar/config.jsonc -{ +[{ "layer": "top", "position": "top", + "output": "!eDP-1", "height": 35, "modules-left": ["hyprland/workspaces"], "modules-center": [], - "modules-right": ["tray", "wireplumber", "custom/pixelbuds", "custom/anc", "network", "cpu", "memory", "custom/tlp", "clock", "custom/power"], + "modules-right": [ + "tray", + "wireplumber", + "custom/audio-output", + "network", + "cpu", + "memory", + "custom/tlp", + "clock", + "custom/power" + ], + "hyprland/workspaces": { "format": "{icon}", @@ -31,7 +43,7 @@ "format-wifi": "{essid} ({signalStrength}%): {ipaddr}", "format-ethernet": "{ifname}: {ipaddr}", "format-disconnected": "Disconnected", - "tooltip-format": "{ifname} via {gwaddr}", + "tooltip-format": "{ifname} via {gwaddr}" }, "wireplumber": { "format": "{volume}% {icon}", @@ -80,8 +92,7 @@ "critical": 15 }, "format": "{capacity}%", - "format-charging": "{capacity}%", - "format-plugged": "{capacity}%", + "format-charging": "{capacity}%", "format-plugged": "{capacity}%", "format-alt": "{time} {icon}", "format-full": "{capacity}%", "format-icons": ["", "", "", "", ""] @@ -90,15 +101,154 @@ "format": "{}", "return-type": "json", "exec": "~/.config/waybar/scripts/pixelbuds.sh", - "interval": 5, // Check status every 30 seconds - "on-click": "bluetoothctl disconnect B4:23:A2:09:D3:53" // Optional: opens Bluetooth manager on click + "interval": 5, + "on-click": "bluetoothctl disconnect B4:23:A2:09:D3:53" }, "custom/anc": { "format": "{}", "return-type": "json", "exec": "~/.config/waybar/scripts/anc_control.sh", - "interval": 5, // Check status every 5 seconds - "on-click": "~/.config/waybar/scripts/anc_control.sh off", // Left-click - "on-click-right": "~/.config/waybar/scripts/anc_control.sh cycle" // Right-click + "interval": 5, + "on-click": "~/.config/waybar/scripts/anc_control.sh off", + "on-click-right": "~/.config/waybar/scripts/anc_control.sh cycle" + }, + "custom/audio-output": { + "format": "{}", + "return-type": "json", + "exec": "/home/narl/.config/waybar/scripts/get_audio_output.sh", + "on-click": "/home/narl/.config/waybar/scripts/cycle_audio_output.sh", + "interval": 1 + }, + "custom/gamemode": { + "format": "󰮂", + "on-click": "~/.config/hypr/scripts/gamemode.sh" } -} +}, +{ + "layer": "top", + "height": 35, + "output": "eDP-1", + "modules-left": ["hyprland/workspaces"], + "modules-center": [], + "modules-right": [ + "tray", + "wireplumber", + "custom/audio-output", + "custom/pixelbuds", + "custom/anc", + "network", + "cpu", + "memory", + "custom/tlp", + "clock", + "custom/power" + ], + + "hyprland/workspaces": { + "format": "{icon}", + "on-click": "activate" + }, + "hyprland/window": { + "format": "{}", + "max-length": 35 + }, + "clock": { + "format": "{:%H:%M}", + "format-alt": "{:%a, %b %d}", + "tooltip-format": "{:%Y %B}\n{calendar}" + }, + "cpu": { + "format": "CPU: {usage}%", + "tooltip": true + }, + "memory": { + "format": "MEM: {}%" + }, + "network": { + "format-wifi": "{essid} ({signalStrength}%): {ipaddr}", + "format-ethernet": "{ifname}: {ipaddr}", + "format-disconnected": "Disconnected", + "tooltip-format": "{ifname} via {gwaddr}" + }, + "wireplumber": { + "format": "{volume}% {icon}", + "format-muted": "Muted ", + "format-icons": { + "headphone": "", + "hands-free": "", + "default": ["", ""] + }, + "on-click": "pavucontrol", + "scroll-step": 1 + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-muted": " Muted", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", ""] + }, + "on-click": "pavucontrol" + }, + "tray": { + "icon-size": 18, + "spacing": 10 + }, + "custom/power": { + "format": "", + "tooltip": false, + "on-click": "~/.config/hypr/scripts/powermenu.sh" + }, + "custom/tlp": { + "format": "{}", + "exec": "~/.config/waybar/scripts/tlp-profile.sh", + "return-type": "json", + "interval": 5 + }, + "battery": { + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{capacity}%", + "format-charging": "{capacity}%", "format-plugged": "{capacity}%", + "format-alt": "{time} {icon}", + "format-full": "{capacity}%", + "format-icons": ["", "", "", "", ""] + }, + "custom/pixelbuds": { + "format": "{}", + "return-type": "json", + "exec": "~/.config/waybar/scripts/pixelbuds.sh", + "interval": 5, + "on-click": "bluetoothctl disconnect B4:23:A2:09:D3:53" + }, + "custom/anc": { + "format": "{}", + "return-type": "json", + "exec": "~/.config/waybar/scripts/anc_control.sh", + "interval": 5, + "on-click": "~/.config/waybar/scripts/anc_control.sh off", + "on-click-right": "~/.config/waybar/scripts/anc_control.sh cycle" + }, + "custom/audio-output": { + "format": "{}", + "return-type": "json", + "exec": "/home/narl/.config/waybar/scripts/get_audio_output.sh", + "on-click": "/home/narl/.config/waybar/scripts/cycle_audio_output.sh", + "interval": 1 + }, + "custom/gamemode": { + "format": "󰮂", + "on-click": "~/.config/hypr/scripts/gamemode.sh" + } + +}] + + diff --git a/waybar/scripts/cycle_audio_output.sh b/waybar/scripts/cycle_audio_output.sh new file mode 100755 index 0000000..4cc214c --- /dev/null +++ b/waybar/scripts/cycle_audio_output.sh @@ -0,0 +1,12 @@ +#!/bin/bash +SINKS=($(pactl list short sinks | awk '{print $2}')) +CURRENT_SINK=$(pactl info | grep 'Default Sink' | cut -d ' ' -f3) +NUM_SINKS=${#SINKS[@]} + +for i in "${!SINKS[@]}"; do + if [[ "${SINKS[$i]}" == "$CURRENT_SINK" ]]; then + NEXT_INDEX=$(( (i + 1) % NUM_SINKS )) + pactl set-default-sink "${SINKS[$NEXT_INDEX]}" + break + fi +done diff --git a/waybar/scripts/get_audio_output.sh b/waybar/scripts/get_audio_output.sh new file mode 100755 index 0000000..30d10bb --- /dev/null +++ b/waybar/scripts/get_audio_output.sh @@ -0,0 +1,12 @@ +#!/bin/bash +DEFAULT_SINK=$(pactl info | grep 'Default Sink' | cut -d ' ' -f3) +DESCRIPTION=$(pactl list sinks | grep -A2 "Name: $DEFAULT_SINK" | grep "Description:" | cut -d ' ' -f2-) + +if [ -z "$DESCRIPTION" ]; then + DESCRIPTION=$DEFAULT_SINK +fi + +TEXT=$(echo "$DESCRIPTION" | cut -c -20) + +printf '{"text": "%s", "tooltip": "%s"} +' "$TEXT" "$DESCRIPTION" diff --git a/waybar/style.css b/waybar/style.css index b2c0d5c..432fd48 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -1,4 +1,3 @@ - /* ~/.config/waybar/style.css */ @import "./catppuccin-waybar/themes/mocha.css"; @@ -57,6 +56,7 @@ window#waybar.hidden { #memory, #cpu, #custom-power, +#custom-gamemode, #custom-tlp, #battery, #backlight, @@ -65,7 +65,8 @@ window#waybar.hidden { #clock, #tray, #custom-pixelbuds, -#custom-anc { +#custom-anc, +#custom-audio-output { border-radius: 4px; margin: 6px 3px; padding: 6px 12px; @@ -91,7 +92,8 @@ window#waybar.hidden { #custom-anc.disconnected { } -#custom-power { +#custom-power, +#custom-gamemode { color: @red; padding: 6px 12px 6px 10px; } @@ -151,6 +153,11 @@ window#waybar.hidden { border-bottom: 3px solid @mauve; } +#custom-audio-output { + color: @mauve; + border-bottom: 3px solid @mauve; +} + #network { color: @mauve; padding-right: 15px; diff --git a/waybar/style.css-without-borders b/waybar/style.css-without-borders deleted file mode 100644 index c3d8dca..0000000 --- a/waybar/style.css-without-borders +++ /dev/null @@ -1,157 +0,0 @@ - -/* ~/.config/waybar/style.css */ -@import "./catppuccin-waybar/themes/mocha.css"; - -* { - border: none; - border-radius: 0; - min-height: 0; - font-family: JetBrainsMono Nerd Font; - font-size: 13px; -} - -window#waybar { - background-color: alpha(@base, 0.6); - margin: 10px; - transition-property: background-color; - transition-duration: 0.5s; - color: @text; -} - -window#waybar.hidden { - opacity: 0.5; -} - -#workspaces { -} - -#workspaces 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: 3px; - background-color: alpha(@base, 0.9); - color: @text; -} - -#workspaces button.active { - border-bottom: 3px solid @green; -} - -#workspaces button:hover { - box-shadow: inherit; - text-shadow: inherit; - background-color: @teal; - color: @base; -} - -#workspaces button.urgent { - border-bottom: 3px solid @red; -} - -#memory, -#cpu, -#custom-power, -#custom-tlp, -#battery, -#backlight, -#wireplumber, -#network, -#clock, -#tray { - border-radius: 4px; - margin: 6px 3px; - padding: 6px 12px; - background-color: @base; - color: @text; -} - -#custom-power { - color: @red; - padding: 6px 12px 6px 10px; -} - -#custom-tlp { - padding: 0 10px; - padding-right: 10px; - margin-right: 0; -} - -#custom-tlp.ac { - color: @green; /* Catppuccin Green for AC power */ -} - -#custom-tlp.bat { - color: @yellow; /* Catppuccin Yellow for Battery power */ -} - -#battery { - color: @text; - padding: 0 10px; - padding-left: 0; - margin-left: 0; -} - -#battery.charging, #battery.plugged { - color: @green; -} - -#battery.warning { - color: @yellow; -} - -#battery.critical { - color: @red; - animation-name: blink; - animation-duration: 0.8s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; -} - -@keyframes blink { - to { - color: @text; - } -} - -#memory, -#cpu { - color: @maroon; -} - - -#backlight { - color: @mauve; -} - -#wireplumber { - color: @mauve; - padding-right: 15px; -} - -#network { - color: @mauve; - padding-right: 15px; -} - -#clock { - font-family: JetBrainsMono Nerd Font; - color: @mauve; -} - -tooltip { - border-radius: 8px; - padding: 15px; - background-color: @base; -} - -tooltip label { - padding: 5px; - background-color: @base; -} diff --git a/waybar/style.css.bak b/waybar/style.css.bak deleted file mode 100644 index f5a09ce..0000000 --- a/waybar/style.css.bak +++ /dev/null @@ -1,81 +0,0 @@ -/* ~/.config/waybar/style.css */ -@import "./catppuccin-waybar/themes/mocha.css"; - -* { - font-family: "0xProto Nerd Font", FontAwesome, sans-serif; - font-size: 14px; - padding: 0 5px; -} - -window#waybar { - background-color: alpha(@base, 0.9); - border-bottom: 3px solid @mauve; - color: @text; -} - -#workspaces { - margin-bottom: 5px; -} - -#workspaces button { - padding: 0 5px; - background-color: transparent; - color: @surface2; -} - -#workspaces button.active { - color: @mauve; - border-bottom: 3px solid @pink; -} - -#workspaces button:hover { - background: @surface0; - box-shadow: inherit; - text-shadow: inherit; -} - -#custom-power { - color: @red; - padding: 0 10px; -} - -#custom-tlp { - padding: 0 10px; -} - -#custom-tlp.ac { - color: @green; /* Catppuccin Green for AC power */ -} - -#custom-tlp.bat { - color: @yellow; /* Catppuccin Yellow for Battery power */ -} - -#battery { - color: @text; - padding: 0 10px; - padding-left: 0; -} - -#battery.charging, #battery.plugged { - color: @green; -} - -#battery.warning { - color: @yellow; -} - -#battery.critical { - color: @red; - animation-name: blink; - animation-duration: 0.8s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; -} - -@keyframes blink { - to { - color: @text; - } -}