diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf index 377ccdb..cdc4cf1 100644 --- a/hypr/hypridle.conf +++ b/hypr/hypridle.conf @@ -1,36 +1,21 @@ general { - lock_cmd = hyprlock > /tmp/pidor.txt # avoid starting multiple hyprlock instances. + lock_cmd = hyprlock > /tmp/pidor.txt # avoid starting multiple hyprlock instances. before_sleep_cmd = loginctl lock-session # lock before suspend. after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. } listener { - timeout = 140 # 2.5min. - #on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor. + timeout = 290 # 5min - 10s (for the screen fade delay). on-timeout = touch /tmp/asleepin && /home/greg/.config/hypr/scripts/dimscreen.sh on-resume = rm /tmp/asleepin && brightnessctl -r - #on-resume = brightnessctl -r # monitor backlight restore. } -# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight. -# listener { -# timeout = 150 # 2.5min. -# on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight. -# on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight. -# } - listener { - timeout = 150 # 1min + timeout = 300 # 5min on-timeout = loginctl lock-session # lock screen when timeout has passed } -# listener { -# timeout = 150 # 5.5min -# on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed -# on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected after timeout has fired. -# } - listener { - timeout = 900 # 30min + timeout = 1800 # 30min on-timeout = systemctl suspend # suspend pc } diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 2059e22..7d53fda 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -1,8 +1,5 @@ -################ -### MONITORS ### -################ - source = ~/.config/hypr/monitors.conf +source = ~/.config/hypr/permissions.conf ################### ### MY PROGRAMS ### @@ -45,6 +42,7 @@ exec-once = $startDelay && ~/.config/hypr/scripts/sounds.sh exec-once = $startDelay && ~/.config/hypr/scripts/random_wallpaper.sh exec-once = $startDelay && ~/.config/hypr/scripts/autofreezer.sh exec-once = .cargo/bin/mpd-discord-rpc +exec-once = .venv312/bin/python3 .venv312/bin/jellyfin-rpc --ini-path $HOME/.config/jellyfin-rpc/jellyfin_rpc.ini exec-shutdown = play -v 0.7 $HOME/Templates/Sounds/teleport.mp3 @@ -55,10 +53,6 @@ exec-shutdown = play -v 0.7 $HOME/Templates/Sounds/teleport.mp3 env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 -################### -### PERMISSIONS ### -################### - ##################### ### LOOK AND FEEL ### ##################### @@ -169,6 +163,8 @@ workspace = 6, monitor:HDMI-A-1 workspace = 7, monitor:HDMI-A-1 workspace = 8, monitor:HDMI-A-1 workspace = 9, monitor:HDMI-A-1 +workspace = special:magic +workspace = special:dungeon dwindle { pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below @@ -198,6 +194,7 @@ misc { size_limits_tiled = true on_focus_under_fullscreen = 0 exit_window_retains_fullscreen = false + close_special_on_empty = false } ############## @@ -215,8 +212,6 @@ cursor { input { kb_layout = us,ru kb_options = grp:caps_toggle,grp_led:caps - repeat_rate = 25 - repeat_delay = 200 follow_mouse = 2 float_switch_override_focus = 0 @@ -228,6 +223,8 @@ input { disable_while_typing = true middle_button_emulation = true } + + special_fallthrough = true } gestures { @@ -259,13 +256,14 @@ $mainMod = SUPER binds { allow_workspace_cycles = true + hide_special_on_workspace_change = true } # Exit hyprland bind = $mainMod ALT, Q, exit, # Shutdown -bind = $mainMod SHIFT, delete, exec, shutdown now +bind = $mainMod SHIFT, delete, exec, sudo poweroff -f # Menu dropdown bind = $mainMod, P, sendshortcut, , Menu, activewindow @@ -327,18 +325,32 @@ bind = $mainMod, k, movefocus, u bind = $mainMod, j, movefocus, d # Switch workspaces with mainMod + [0,1,2,3,4,5,6,7,8,9,0,-,=] -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, minus, workspace, 11 -bind = $mainMod, equal, workspace, 12 +bindr = $mainMod, 1, workspace, 1 +bindr = $mainMod, 2, workspace, 2 +bindr = $mainMod, 3, workspace, 3 +bindr = $mainMod, 4, workspace, 4 +bindr = $mainMod, 5, workspace, 5 +bindr = $mainMod, 6, workspace, 6 +bindr = $mainMod, 7, workspace, 7 +bindr = $mainMod, 8, workspace, 8 +bindr = $mainMod, 9, workspace, 9 +bindr = $mainMod, 0, workspace, 10 +bindr = $mainMod, minus, workspace, 11 +bindr = $mainMod, equal, workspace, 12 + +# Switch to workspace and send it to another monitor +bindo = $mainMod, 1, exec, hyprctl dispatch workspace 1 && hyprctl dispatch movecurrentworkspacetomonitor +1 +bindo = $mainMod, 2, exec, hyprctl dispatch workspace 2 && hyprctl dispatch movecurrentworkspacetomonitor +1 +bindo = $mainMod, 3, exec, hyprctl dispatch workspace 3 && hyprctl dispatch movecurrentworkspacetomonitor +1 +bindo = $mainMod, 4, exec, hyprctl dispatch workspace 4 && hyprctl dispatch movecurrentworkspacetomonitor +1 +bindo = $mainMod, 5, exec, hyprctl dispatch workspace 5 && hyprctl dispatch movecurrentworkspacetomonitor +1 +bindo = $mainMod, 6, exec, hyprctl dispatch workspace 6 && hyprctl dispatch movecurrentworkspacetomonitor +1 +bindo = $mainMod, 7, exec, hyprctl dispatch workspace 7 && hyprctl dispatch movecurrentworkspacetomonitor +1 +bindo = $mainMod, 8, exec, hyprctl dispatch workspace 8 && hyprctl dispatch movecurrentworkspacetomonitor +1 +bindo = $mainMod, 9, exec, hyprctl dispatch workspace 9 && hyprctl dispatch movecurrentworkspacetomonitor +1 +bindo = $mainMod, 0, exec, hyprctl dispatch workspace 10 && hyprctl dispatch movecurrentworkspacetomonitor +1 +bindo = $mainMod, minus, exec, hyprctl dispatch workspace 11 && hyprctl dispatch movecurrentworkspacetomonitor +1 +bindo = $mainMod, equal, exec, hyprctl dispatch workspace 12 && hyprctl dispatch movecurrentworkspacetomonitor +1 # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1 @@ -357,17 +369,13 @@ bind = $mainMod SHIFT, equal, movetoworkspacesilent, 12 # Cycle monitors bind = $mainMod, O, focusmonitor, +1 -# Move current workspace to another monitor -bind = $mainMod SHIFT, y, movecurrentworkspacetomonitor, +1 -bind = $mainMod SHIFT, v, moveworkspacetomonitor, +0 +1 - # Example special workspace (scratchpad) bind = $mainMod, M, togglespecialworkspace, magic bind = $mainMod SHIFT, M, movetoworkspace, special:magic # Go to previous/next workspace -bind = $mainMod, bracketleft, workspace, -1 -bind = $mainMod, bracketright, workspace, +1 +bind = $mainMod, bracketleft, workspace, r-1 +bind = $mainMod, bracketright, workspace, r+1 # Go to previous/next occupied workspace bind = $mainMod SHIFT, bracketleft, workspace, m-1 @@ -560,33 +568,6 @@ bind = $mainMod, Tab, submap, reset bind = $mainMod, Escape, submap, reset submap = reset -# Activate MPD submap with $mainMod + U -bind = $mainMod, U, submap, mpd - -# Define the MPD submap -submap = mpd - -# MPD controls (actions that exit submap) -bind = , P, exec, mpc toggle -bind = SHIFT, H, exec, mpc prev -bind = SHIFT, L, exec, mpc next - -# MPD Seek -binde = , H, exec, mpc seek "-00:00:5" -binde = , L, exec, mpc seek "+00:00:5" - -# Volume controls (remain in submap for repeated adjustments) -bind = , J, exec, mpc volume -5 -bind = , K, exec, mpc volume +5 - -# Alternative exit methods -bind = , escape, submap, reset -bind = , Return, submap, reset -bind = , Space, submap, reset - -# End the submap definition -submap = reset - ############################## ### WINDOWS AND WORKSPACES ### ############################## @@ -881,7 +862,13 @@ plugin { } } +ecosystem { + no_donation_nag = true +} + debug { disable_logs = false overlay = false + error_position = 1 } + diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf index c21ab2b..4023757 100644 --- a/hypr/hyprlock.conf +++ b/hypr/hyprlock.conf @@ -1,7 +1,7 @@ # BACKGROUND background { monitor = - path = /home/greg/Pictures/Wallpapers/waporvape-dark-tvlike-pink.png + path = ~/.config/hypr/hyprlock.png blur_passes = 0 contrast = 0.8916 brightness = 0.8172 @@ -19,7 +19,7 @@ general { # Time-Hour label { monitor = - text = cmd[update:1000] echo "$(date +"%I")" + text = cmd[update:1000] echo "$(date +"%H")" color = rgba(255, 255, 255, 1) font_size = 125 font_family = StretchPro diff --git a/hypr/hyprlock.png b/hypr/hyprlock.png new file mode 100644 index 0000000..70d798e Binary files /dev/null and b/hypr/hyprlock.png differ diff --git a/hypr/permissions.conf b/hypr/permissions.conf new file mode 100644 index 0000000..2189c88 --- /dev/null +++ b/hypr/permissions.conf @@ -0,0 +1,19 @@ +################### +### PERMISSIONS ### +################### + +permission = /usr/bin/hypr.*, screencopy, deny +permission = /usr/bin/hyprpm, screencopy, deny +permission = /usr/bin/hyprlock, screencopy, allow +permission = /usr/bin/hyprpicker, screencopy, allow +permission = /usr/bin/grim, screencopy, allow +permission = /usr/bin/obs, screencopy, allow +permission = /usr/bin/obs-ffmpeg-mux, screencopy, allow +permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow +permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow +permission = *, keyboard, ask + +ecosystem:enforce_permissions = true +ecosystem { + enforce_permissions = false +} diff --git a/hypr/privacy.conf b/hypr/privacy.conf index e231175..c0bf032 100644 --- a/hypr/privacy.conf +++ b/hypr/privacy.conf @@ -71,6 +71,12 @@ windowrule { match:class = ^(Mullvad VPN)$ } +windowrule { + name = privacy-rule-qbittorrent + tag = privacy + match:class = ^(org.qbittorrent.qBittorrent)$ +} + windowrule { name = privacy-rule-13 tag = privacy diff --git a/hypr/shaders/grayscale.glsl b/hypr/shaders/grayscale.glsl new file mode 100644 index 0000000..13a1b21 --- /dev/null +++ b/hypr/shaders/grayscale.glsl @@ -0,0 +1,14 @@ +#version 320 es + +precision mediump float; +in vec2 v_texcoord; // Use 'in' instead of 'varying' +uniform sampler2D tex; + +out vec4 fragColor; // Use 'out' instead of 'gl_FragColor' + +void main() { + vec4 this_colour = texture(tex, v_texcoord); + float new_colour = (this_colour.r + this_colour.g + this_colour.b) / 3.0; + fragColor = vec4(new_colour, new_colour, new_colour, 0.0); +} + diff --git a/hypr/xdph.conf b/hypr/xdph.conf new file mode 100644 index 0000000..176b0c9 --- /dev/null +++ b/hypr/xdph.conf @@ -0,0 +1,3 @@ +screencopy { + allow_token_by_default = true +} diff --git a/waybar/config_bottom.jsonc b/waybar/config_bottom.jsonc index 00aa47f..850c214 100644 --- a/waybar/config_bottom.jsonc +++ b/waybar/config_bottom.jsonc @@ -13,8 +13,8 @@ "spacing": 0, "reload_style_on_change": true, "modules-left": [ - "tray" - // "custom/pomodoro" + "tray", + "custom/pomodoro" ], "modules-center": [ "wlr/taskbar", diff --git a/waybar/config_top.jsonc b/waybar/config_top.jsonc index e4a4fd1..676692b 100644 --- a/waybar/config_top.jsonc +++ b/waybar/config_top.jsonc @@ -33,9 +33,8 @@ } }, "hyprland/workspaces": { + "persistent-only": true, "disable-scroll": true, - "all-outputs": false, - "active-only": false, "warp-on-scroll": false, "move-to-monitor": true, "persistent-workspaces": { diff --git a/waybar/run.sh b/waybar/run.sh index 09865e5..13f49f0 100755 --- a/waybar/run.sh +++ b/waybar/run.sh @@ -8,8 +8,10 @@ TOP_STYLE="$DIR/style/style_top.css" BOTTOM_CONFIG="$DIR/config_bottom.jsonc" BOTTOM_STYLE="$DIR/style/style_bottom.css" -DOCK_CONFIG="$DIR/config_dock.jsonc" -DOCK_STYLE="$DIR/style/style_dock.css" +# A hack needed for the bar to recognize the special workspaces defined in the +# Hyprland config instead of creating regular workspaces with the same name, +# breaking the functionality. +# POPULATE_SPECIAL_WORKSPACES=1 kill_bars() { if pgrep waybar > /dev/null; then @@ -20,9 +22,22 @@ kill_bars() { } run_bars() { + + # if [ $POPULATE_SPECIAL_WORKSPACES -eq 1 ]; then + # hyprctl dispatch exec [ workspace special:dungeon silent ] "kitty --class kitty-specialkludge1" + # hyprctl dispatch exec [ workspace special:magic silent ] "kitty --class kitty-specialkludge2" + # sleep 1 + # fi + waybar -c "$TOP_CONFIG" -s "$TOP_STYLE" & waybar -c "$BOTTOM_CONFIG" -s "$BOTTOM_STYLE" & - waybar -c "$DOCK_CONFIG" -s "$DOCK_STYLE" & + + # if [ $POPULATE_SPECIAL_WORKSPACES -eq 1 ]; then + # sleep 2 + # hyprctl dispatch closewindow class:kitty-specialkludge1 + # hyprctl dispatch closewindow class:kitty-specialkludge2 + # fi + return 0 } diff --git a/waybar/style/colors.css b/waybar/style/colors.css index b254e87..ff0917f 100644 --- a/waybar/style/colors.css +++ b/waybar/style/colors.css @@ -4,9 +4,9 @@ @define-color bg-opaque rgba(23, 28, 39, 0.8); @define-color border-color-section rgba(0,0,0,0); @define-color border-color rgba(90, 104, 115, 0.8); /* Matches --noti-border-color */ -@define-color text-primary #ffffff; +@define-color text-primary #cccccc; @define-color text-secondary alpha(@text-primary,.2); -@define-color accent #E83C82; +@define-color accent #FD5164; @define-color attention #FFFF00; @define-color warning #FFAA00; @define-color danger #FF0000; diff --git a/waybar/style/style_top.css b/waybar/style/style_top.css index b3c4f59..900302f 100644 --- a/waybar/style/style_top.css +++ b/waybar/style/style_top.css @@ -77,12 +77,16 @@ window#waybar.chromium { } /* Workspace States */ -#workspaces button.empty { +#workspaces button.empty:not(.special) { color: @text-secondary; } -#workspaces button.empty:not(.hosting-monitor) { - color: alpha(@text-secondary, 0.1); +#workspaces button.active:not(.hosting-monitor) { + text-shadow: 0px 0px 8px @accent; +} + +#workspaces button.special.active { + text-shadow: 0px 0px 8px @primary; } #workspaces button.active.hosting-monitor { @@ -91,6 +95,10 @@ window#waybar.chromium { animation: hover 0.8s 1; } +#workspaces button.empty:not(.hosting-monitor):not(.special) { + color: alpha(@text-secondary, 0.45); +} + #workspaces button.urgent { color: @attention; font-weight: 700; @@ -105,7 +113,7 @@ window#waybar.chromium { text-shadow: 0px -2px 3px @text-primary; } -#workspaces button:not(.hosting-monitor):not(.empty) { +#workspaces button:not(.hosting-monitor):not(.empty):not(.special) { color: alpha(@accent, 0.2); } @@ -119,18 +127,13 @@ window#waybar.chromium { /* -------------------------------------------------------------------------- SIDE PANEL GROUPS -------------------------------------------------------------------------- */ -#mpd, #mpris, .modules-center, .modules-right { +#mpd, #mpris, #workspaces, .modules-right { /* Layout & Box Model */ border: 1px solid @border-color; border-radius: 15px; /* Colors */ background-color: @bg-panel; - /* color: @text-primary; */ - - /* Effects & Transitions */ - /* transition-property: background-color; */ - /* transition-duration: 0.5s; */ } .modules-left { @@ -269,7 +272,7 @@ window#waybar.chromium { -------------------------------------------------------------------------- */ #window, #workspaces { - margin: 0 0px; + margin: 0 2.5px; } .modules-left > widget:first-child > #workspaces {