From 06d373d2ae46bcf4fa0bac0e09042111eba14c61 Mon Sep 17 00:00:00 2001 From: retrilzzy Date: Tue, 24 Dec 2024 10:38:21 +0500 Subject: [PATCH] =?UTF-8?q?hyprland:=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B1=D0=B8=D0=BD=D0=B4=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B8=20=D0=BE=D1=81=D0=BD=D0=BE=D0=B2=D0=BD=D0=BE?= =?UTF-8?q?=D0=B3=D0=BE=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configs/hypr/hyprland.conf | 71 +++++++++---------------------- Configs/hypr/hyprpaper.conf | 7 --- Configs/hypr/keybindings.conf | 12 +++--- Configs/hypr/rules.conf | 24 +++++++++++ Configs/hypr/scripts/wallpaper.sh | 68 ----------------------------- 5 files changed, 50 insertions(+), 132 deletions(-) delete mode 100644 Configs/hypr/hyprpaper.conf create mode 100644 Configs/hypr/rules.conf delete mode 100755 Configs/hypr/scripts/wallpaper.sh diff --git a/Configs/hypr/hyprland.conf b/Configs/hypr/hyprland.conf index 40ffe7e..7a29595 100644 --- a/Configs/hypr/hyprland.conf +++ b/Configs/hypr/hyprland.conf @@ -1,12 +1,14 @@ # https://wiki.hyprland.org/Configuring/Configuring-Hyprland/ - # Keybinds source = ~/.config/hypr/keybindings.conf # Plugins -#source = ~/.config/hypr/plugins.conf +source = ~/.config/hypr/plugins.conf + +# Rules +source = ~/.config/hypr/rules.conf ################2 ### MONITORS ### @@ -22,7 +24,7 @@ monitor = eDP-1,1920x1080@60,0x0,1 exec-once = waypaper --random --folder ~/Pictures/Wallpapers exec-once = hypridle exec-once = waybar -c $HOME/.config/waybar/config.jsonc -s $HOME/.config/waybar/styles.css -#exec-once = hyprpm reload +exec-once = hyprpm reload exec-once = nwg-look -a exec-once = swaync -c ~/.config/swaync/config.json exec-once = nm-applet @@ -38,7 +40,7 @@ exec-once = [workspace 5 silent] keepassxc ### ENVIRONMENT VARIABLES ### ############################# -# See https://wiki.hyprland.org/Configuring/Environment-variables/ +# https://wiki.hyprland.org/Configuring/Environment-variables/ env = XCURSOR_SIZE,20 env = HYPRCURSOR_SIZE,20 @@ -47,25 +49,22 @@ env = HYPRCURSOR_SIZE,20 ### LOOK AND FEEL ### ##################### -# Refer to https://wiki.hyprland.org/Configuring/Variables/ +# https://wiki.hyprland.org/Configuring/Variables/ -# https://wiki.hyprland.org/Configuring/Variables/#general general { gaps_in = 5 gaps_out = 7 border_size = 3 - # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors col.active_border = rgb(B4B4B4) rgb(595959) 25deg col.inactive_border = rgba(595959aa) - # Set to true enable resizing windows by clicking and dragging on borders and gaps resize_on_border = true layout = dwindle - # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + # https://wiki.hyprland.org/Configuring/Tearing/ allow_tearing = false } @@ -79,9 +78,9 @@ decoration { blur { enabled = true new_optimizations = true - size = 8 + size = 3 passes = 1 - brightness = 0.9 + brightness = 0.93 } } @@ -96,27 +95,27 @@ animations { animation = windowsIn, 1, 6, winIn, slide animation = windowsOut, 1, 5, winOut, slide animation = windowsMove, 1, 5, wind, slide - # animation = border, 1, 1, liner # border animation - # animation = borderangle, 1, 30, liner, loop + # animation = border, 1, 1, liner # border animation + # animation = borderangle, 1, 30, liner, loop # animation = fade, 1, 10, default animation = workspaces, 1, 5, wind } -# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more +# https://wiki.hyprland.org/Configuring/Dwindle-Layout/ dwindle { - pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below - preserve_split = true # You probably want this + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this } -# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more +# https://wiki.hyprland.org/Configuring/Master-Layout/ master { new_status = master } # https://wiki.hyprland.org/Configuring/Variables/#misc misc { - force_default_wallpaper = -1 # 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. :( + force_default_wallpaper = -1 # 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. :( } @@ -136,7 +135,7 @@ input { follow_mouse = 1 - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + sensitivity = 0 touchpad { natural_scroll = true @@ -148,35 +147,3 @@ input { gestures { workspace_swipe = true } - -# Example per-device config -# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more -# device { -# name = epic-mouse-v1 -# sensitivity = -0.3 -# } - -############################## -### WINDOWS AND WORKSPACES ### -############################## - -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules - -# Floating windows -# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ - -# Ignore maximize requests from apps. You'll probably like this. -windowrulev2 = suppressevent maximize, class:.* - -# Fix some dragging issues with XWayland -windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 - -# Opacity 100% & No blur -windowrulev2 = noblur, class:^(.*(brave-browser|libreoffice)).*$ -windowrulev2 = opaque, class:^(.*(brave-browser|libreoffice)).*$ - -# For Games -windowrulev2 = noshadow, onworkspace:6 -windowrulev2 = opaque, onworkspace:6 -windowrulev2 = noblur, onworkspace:6 diff --git a/Configs/hypr/hyprpaper.conf b/Configs/hypr/hyprpaper.conf deleted file mode 100644 index 5e61ce3..0000000 --- a/Configs/hypr/hyprpaper.conf +++ /dev/null @@ -1,7 +0,0 @@ -preload = $HOME/Pictures/Wallpapers/1.jpg - -wallpaper = eDP-1,$HOME/Pictures/Wallpapers/1.jpg - -#enable splash text rendering over the wallpaper -splash = false - diff --git a/Configs/hypr/keybindings.conf b/Configs/hypr/keybindings.conf index 92cce5a..781d68b 100644 --- a/Configs/hypr/keybindings.conf +++ b/Configs/hypr/keybindings.conf @@ -2,7 +2,7 @@ ### MY PROGRAMS ### ################### -# See https://wiki.hyprland.org/Configuring/Keywords/ +# https://wiki.hyprland.org/Configuring/Keywords/ $terminal = kitty $fileManager = nautilus $menu = rofi -show drun @@ -13,8 +13,8 @@ $browser = brave ### KEYBINDINGS ### ################### -# See https://wiki.hyprland.org/Configuring/Binds/ -# See https://wiki.hyprland.org/Configuring/Keywords/ +# https://wiki.hyprland.org/Configuring/Binds/ +# https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Sets "Windows" key as main modifier # Application shortcuts @@ -124,6 +124,8 @@ bindl = , XF86AudioPrev, exec, playerctl previous # Screenshots bind = $mainMod, PRINT, exec, hyprshot -z -m window -o ~/Pictures/Screen # Screenshot a window -bind = SHIFT, Print, exec, grim -g "$(slurp)" - | wl-copy && wl-paste > ~/Pictures/Screen/$(date +%F_%T)-grim.png | dunstify "Screenshot of the region taken" -t 2000 # Screenshot of a region -bind = , Print, exec, grim - | wl-copy && wl-paste > ~/Pictures/Screen/$(date +%F_%T)-grim.png | dunstify "Screenshot of whole screen taken" -t 2000 # Screenshot of the whole screen +bind = SHIFT, Print, exec, grim -c -g "$(slurp)" - | wl-copy && wl-paste > ~/Pictures/Screen/$(date +%F_%T)-grim.png | notify-send "Screenshot of the region taken" -t 2000 # Screenshot of a region +bind = , Print, exec, grim -c - | wl-copy && wl-paste > ~/Pictures/Screen/$(date +%F_%T)-grim.png | notify-send "Screenshot of whole screen taken" -t 2000 # Screenshot of the whole screen +# Emoji Picker +bind = $mainMod SHIFT, E, exec, emote diff --git a/Configs/hypr/rules.conf b/Configs/hypr/rules.conf new file mode 100644 index 0000000..3221e97 --- /dev/null +++ b/Configs/hypr/rules.conf @@ -0,0 +1,24 @@ +################### +### RULES ### +################### + +# https://wiki.hyprland.org/Configuring/Window-Rules/ +# https://wiki.hyprland.org/Configuring/Workspace-Rules/ + +# Floating windows +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ + +# Ignore maximize requests from apps. You'll probably like this. +windowrulev2 = suppressevent maximize, class:.* + +# Fix some dragging issues with XWayland +windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 + +# Opacity 100% & No blur +windowrulev2 = noblur, class:^(.*(brave-browser|libreoffice)).*$ +windowrulev2 = opaque, class:^(.*(brave-browser|libreoffice)).*$ + +# For Games +windowrulev2 = noshadow, onworkspace:6 +windowrulev2 = opaque, onworkspace:6 +windowrulev2 = noblur, onworkspace:6 diff --git a/Configs/hypr/scripts/wallpaper.sh b/Configs/hypr/scripts/wallpaper.sh deleted file mode 100755 index 7c2e2cf..0000000 --- a/Configs/hypr/scripts/wallpaper.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -WALLPAPER_DIR="$HOME/Pictures/Wallpapers" -INDEX_FILE="$HOME/.current_wallpaper_index" - -while [[ $# -gt 0 ]]; do - case $1 in - -d|--directory) - WALLPAPER_DIR="$2" - shift 2 - ;; - -n|--next) - ACTION="next" - shift - ;; - -p|--prev) - ACTION="prev" - shift - ;; - -c|--clear) - ACTION="clear" - shift - ;; - -r|--random) - ACTION="random" - shift - ;; - *) - echo "Неправильный флаг: $1" - exit 1 - ;; - esac -done - -if [ ! -f "$INDEX_FILE" ]; then - echo 0 > "$INDEX_FILE" -fi - -WALLPAPERS=("$WALLPAPER_DIR"/*) -WALLPAPER_COUNT=${#WALLPAPERS[@]} - -CURRENT_INDEX=$(<"$INDEX_FILE") - -if [[ "$ACTION" == "next" ]]; then - ((CURRENT_INDEX=(CURRENT_INDEX + 1) % WALLPAPER_COUNT)) -elif [[ "$ACTION" == "prev" ]]; then - ((CURRENT_INDEX=(CURRENT_INDEX - 1 + WALLPAPER_COUNT) % WALLPAPER_COUNT)) -elif [[ "$ACTION" == "clear" ]]; then - hyprctl hyprpaper unload all - notify-send "Все обои выгружены." - exit 0 -elif [[ "$ACTION" == "random" ]]; then - NEW_INDEX=$CURRENT_INDEX - while [[ $NEW_INDEX -eq $CURRENT_INDEX ]]; do - NEW_INDEX=$((RANDOM % WALLPAPER_COUNT)) - done - CURRENT_INDEX=$NEW_INDEX -else - exit 0 -fi - -echo "$CURRENT_INDEX" > "$INDEX_FILE" - -SELECTED_WALLPAPER="${WALLPAPERS[$CURRENT_INDEX]}" - -hyprctl hyprpaper preload "$SELECTED_WALLPAPER" -hyprctl hyprpaper wallpaper "eDP-1,$SELECTED_WALLPAPER" -