adopt hypridle and hyprlock; byebye swayidle and swaylock

This commit is contained in:
end-4
2024-02-20 22:24:39 +07:00
parent f2cbac2e6a
commit ac2b144f97
13 changed files with 228 additions and 62 deletions
+34
View File
@@ -0,0 +1,34 @@
$SLURP_COMMAND="$(slurp -d -c f8daeeBB -b 55405044 -s 00000000)"
general {
col.active_border = rgba(eae0e445)
col.inactive_border = rgba(9a8d9533)
}
misc {
background_color = rgba(1f1a1dFF)
}
plugin {
hyprbars {
# Honestly idk if it works like css, but well, why not
bar_text_font = Rubik, Geist, AR One Sans, Reddit Sans, Inter, Roboto, Ubuntu, Noto Sans, sans-serif
bar_height = 30
bar_padding = 10
bar_button_padding = 5
bar_precedence_over_border = true
bar_part_of_window = true
bar_color = rgba(120F11FF)
col.text = rgba(eae0e4FF)
# example buttons (R -> L)
# hyprbars-button = color, size, on-click
hyprbars-button = rgb(eae0e4), 13, 󰖭, hyprctl dispatch killactive
hyprbars-button = rgb(eae0e4), 13, 󰖯, hyprctl dispatch fullscreen 1
hyprbars-button = rgb(eae0e4), 13, 󰖰, hyprctl dispatch movetoworkspacesilent special
}
}
windowrulev2 = bordercolor rgba(ffabf1AA) rgba(ffabf177),pinned:1
+21
View File
@@ -0,0 +1,21 @@
########## Input method ##########
## See https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland
env = QT_IM_MODULE, fcitx
env = XMODIFIERS, @im=fcitx
# env = GTK_IM_MODULE, wayland # Crashes electron apps in xwayland
# env = GTK_IM_MODULE, fcitx # My Gtk apps no longer require this to work with fcitx5 hmm
env = SDL_IM_MODULE, fcitx
env = GLFW_IM_MODULE, ibus
env = INPUT_METHOD, fcitx
############# Themes #############
env = QT_QPA_PLATFORM, wayland
env = QT_QPA_PLATFORMTHEME, qt5ct
# env = QT_STYLE_OVERRIDE,kvantum
env = WLR_NO_HARDWARE_CURSORS, 1
######### Screen tearing #########
# env = WLR_DRM_NO_ATOMIC, 1
############# Others #############
+23
View File
@@ -0,0 +1,23 @@
# Bar, wallpaper
exec-once = swww kill; swww init
exec-once = ags &
# Input method
exec-once = fcitx5
# Core components (authentication, lock screen, notification daemon)
exec-once = gnome-keyring-daemon --start --components=secrets &
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
exec-once = hypridle &
exec-once = dbus-update-activation-environment --all &
exec-once = sleep 1 && dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # Some fix idk
# Clipboard: history
# exec-once = wl-paste --watch cliphist store &
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
# Cursor
exec-once = hyprctl setcursor Bibata-Modern-Classic 24
+200
View File
@@ -0,0 +1,200 @@
#################### It just works™ keybinds ###################
# Volume
bindl = ,XF86AudioMute, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0%
bindl = Super+Shift,M, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0%
bindle=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
bindle=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
# Brightness
#bindle=, XF86MonBrightnessUp, exec, brightnessctl set '12.75+'
#bindle=, XF86MonBrightnessDown, exec, brightnessctl set '12.75-'
bindle=, XF86MonBrightnessUp, exec, ags run-js 'brightness.screen_value += 0.05;'
bindle=, XF86MonBrightnessDown, exec, ags run-js 'brightness.screen_value -= 0.05;'
#################################### Applications ###################################
# Apps: just normal apps
bind = Super, C, exec, code --password-store=gnome --enable-features=UseOzonePlatform --ozone-platform=wayland
bind = Super, T, exec, foot --override shell=fish
#bind = Super, Return, exec, foot --override shell=fish
bind = Super, E, exec, nautilus --new-window
bind = Super+Alt, E, exec, thunar
bind = Super, W, exec, firefox
bind = Control+Super, W, exec, thorium-browser --ozone-platform-hint=wayland --gtk-version=4 --ignore-gpu-blocklist --enable-features=TouchpadOverscrollHistoryNavigation
bind = Control+Super+Alt, E, exec, /usr/bin/microsoft-edge-stable --password-store=gnome --ozone-platform-hint=wayland --gtk-version=4 --ignore-gpu-blocklist --enable-features=TouchpadOverscrollHistoryNavigation
bind = Super, X, exec, gnome-text-editor --new-window
bind = Super+Shift, W, exec, wps
# Apps: Settings and config
bind = Super, I, exec, XDG_CURRENT_DESKTOP="gnome" gnome-control-center
bind = Control+Super, V, exec, pavucontrol
bind = Control+Shift, Escape, exec, gnome-system-monitor
# Actions
bind = Super, Period, exec, pkill fuzzel || ~/.local/bin/fuzzel-emoji
bind = Super, Q, killactive,
bind = Super+Alt, Space, togglefloating,
bind = Shift+Super+Alt, Q, exec, hyprctl kill
bind = Control+Shift+Alt, Delete, exec, pkill wlogout || wlogout -p layer-shell
bind = Control+Shift+Alt+Super, Delete, exec, systemctl poweroff
# Screenshot, Record, OCR, Color picker, Clipboard history
bind = Super+Shift+Alt, S, exec, grim -g $SLURP_COMMAND - | swappy -f -
bindl=,Print,exec,grim - | wl-copy
bind = Super+Shift, S, exec, grim -g $SLURP_COMMAND - | wl-copy
bind = Super+Alt, R, exec, ~/.config/ags/scripts/record-script.sh
bind = Control+Alt, R, exec, ~/.config/ags/scripts/record-script.sh --fullscreen
bind = Super+Shift+Alt, R, exec, ~/.config/ags/scripts/record-script.sh --fullscreen-sound
bind = Super+Shift, C, exec, hyprpicker -a
bind = Super, V, exec, pkill fuzzel || cliphist list | fuzzel --no-fuzzy --dmenu | cliphist decode | wl-copy
# Text-to-image
# Normal
bind = Control+Super+Shift,S,exec,grim -g $SLURP_COMMAND "tmp.png" && tesseract "tmp.png" - | wl-copy && rm "tmp.png"
# English
bind = Super+Shift,T,exec,grim -g $SLURP_COMMAND "tmp.png" && tesseract -l eng "tmp.png" - | wl-copy && rm "tmp.png"
# Japanese
bind = Super+Shift,J,exec,grim -g $SLURP_COMMAND "tmp.png" && tesseract -l jpn "tmp.png" - | wl-copy && rm "tmp.png"
# Media
bindl= Super+Shift, N, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"`
bindl= ,XF86AudioNext, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"`
bindl= Super+Shift, B, exec, playerctl previous
bindl= Super+Shift, P, exec, playerctl play-pause
bindl= ,XF86AudioPlay, exec, playerctl play-pause
#Lock screen | blur: --effect-blur=20x202
bind = Super, L, exec, hyprlock
bind = Super+Shift, L, exec, hyprlock
bindl = Super+Shift, L, exec, sleep 0.1 && systemctl suspend
# App launcher
bind = Control+Super, Slash, exec, pkill anyrun || anyrun
###################################### AGS keybinds #####################################
bindr = Control+Super, R, exec, killall ags ydotool; ags &
bindr = Control+Super+Alt, R, exec, hyprctl reload; killall ags ydotool; ags &
bind = Control+Super, T, exec, ~/.config/ags/scripts/color_generation/switchwall.sh
bindir = Super, Super_L, exec, ags -t 'overview'
bind = Super, Tab, exec, ags -t 'overview'
bind = Super, Slash, exec, ags -t 'cheatsheet'
bind = Super, B, exec, ags -t 'sideleft'
bind = Super, A, exec, ags -t 'sideleft'
bind = Super, O, exec, ags -t 'sideleft'
bind = Super, N, exec, ags -t 'sideright'
bind = Super, M, exec, ags run-js 'openMusicControls.value = (!Mpris.getPlayer() ? false : !openMusicControls.value);'
bind = Super, Comma, exec, ags run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);'
bind = Super, K, exec, ags -t 'osk'
bind = Control+Alt, Delete, exec, ags -t 'session'
bindle = , XF86AudioRaiseVolume, exec, ags run-js 'indicator.popup(1);'
bindle = , XF86AudioLowerVolume, exec, ags run-js 'indicator.popup(1);'
bindl = , XF86AudioMute, exec, ags run-js 'indicator.popup(1);'
bindl = Super+Shift,M, exec, ags run-js 'indicator.popup(1);'
bindle = , XF86MonBrightnessUp, exec, ags run-js 'indicator.popup(1);'
bindle = , XF86MonBrightnessDown, exec, ags run-js 'indicator.popup(1);'
###################################### Plugins #########################################
bind = Control+Super, P, exec, hyprctl plugin load "~/.config/hypr/plugins/droidbars.so"
bind = Control+Super, O, exec, hyprctl plugin unload "~/.config/hypr/plugins/droidbars.so"
## Testing
# bind = SuperAlt, f12, exec, notify-send "Hyprland version: $(hyprctl version | head -2 | tail -1 | cut -f2 -d ' ')" "owo" -a 'Hyprland keybind'
# bind = Super+Alt, f12, exec, notify-send "Millis since epoch" "$(date +%s%N | cut -b1-13)" -a 'Hyprland keybind'
bind = Super+Alt, f12, exec, notify-send 'Test notification' "Here's a really long message to test truncation and wrapping\nYou can middle click or flick this notification to dismiss it!" -a 'Shell' -A "Test1=I got it!" -A "Test2=Another action"
bind = Super+Alt, Equal, exec, notify-send "Urgent notification" "Ah hell no" -u critical -a 'Hyprland keybind'
############################ Keybinds for Hyprland ############################
# Swap windows
bind = Super+Shift, left, movewindow, l
bind = Super+Shift, right, movewindow, r
bind = Super+Shift, up, movewindow, u
bind = Super+Shift, down, movewindow, d
bind = Super, P, pin
# Move focus
bind = Super, left, movefocus, l
bind = Super, right, movefocus, r
bind = Super, up, movefocus, u
bind = Super, down, movefocus, d
bind = Super, BracketLeft, movefocus, l
bind = Super, BracketRight, movefocus, r
# Workspace, window, tab switch with keyboard
bind = Control+Super, right, workspace, +1
bind = Control+Super, left, workspace, -1
bind = Control+Super, BracketLeft, workspace, -1
bind = Control+Super, BracketRight, workspace, +1
bind = Control+Super, up, workspace, -5
bind = Control+Super, down, workspace, +5
bind = Super, Page_Down, workspace, +1
bind = Super, Page_Up, workspace, -1
bind = Control+Super, Page_Down, workspace, +1
bind = Control+Super, Page_Up, workspace, -1
bind = Super+Alt, Page_Down, movetoworkspace, +1
bind = Super+Alt, Page_Up, movetoworkspace, -1
bind = Super+Shift, Page_Down, movetoworkspace, +1
bind = Super+Shift, Page_Up, movetoworkspace, -1
bind = Control+Super+Shift, Right, movetoworkspace, +1
bind = Control+Super+Shift, Left, movetoworkspace, -1
bind = Super+Shift, mouse_down, movetoworkspace, -1
bind = Super+Shift, mouse_up, movetoworkspace, +1
bind = Super+Alt, mouse_down, movetoworkspace, -1
bind = Super+Alt, mouse_up, movetoworkspace, +1
# Window split ratio
binde = Super, Minus, splitratio, -0.1
binde = Super, Equal, splitratio, 0.1
binde = Super, Semicolon, splitratio, -0.1
binde = Super, Apostrophe, splitratio, 0.1
# Fullscreen
bind = Super, F, fullscreen, 0
bind = Super, D, fullscreen, 1
bind = Super_Alt, F, fakefullscreen, 0
# Switching
bind = Super, 1, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh workspace 1
bind = Super, 2, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh workspace 2
bind = Super, 3, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh workspace 3
bind = Super, 4, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh workspace 4
bind = Super, 5, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh workspace 5
bind = Super, 6, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh workspace 6
bind = Super, 7, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh workspace 7
bind = Super, 8, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh workspace 8
bind = Super, 9, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh workspace 9
bind = Super, 0, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh workspace 10
bind = Super, S, togglespecialworkspace,
bind = Control+Super, S, togglespecialworkspace,
bind = Alt, Tab, cyclenext
bind = Alt, Tab, bringactivetotop, # bring it to the top
# Move window to workspace Super + Alt + [0-9]
bind = Super+Alt, 1, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh movetoworkspacesilent 1
bind = Super+Alt, 2, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh movetoworkspacesilent 2
bind = Super+Alt, 3, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh movetoworkspacesilent 3
bind = Super+Alt, 4, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh movetoworkspacesilent 4
bind = Super+Alt, 5, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh movetoworkspacesilent 5
bind = Super+Alt, 6, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh movetoworkspacesilent 6
bind = Super+Alt, 7, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh movetoworkspacesilent 7
bind = Super+Alt, 8, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh movetoworkspacesilent 8
bind = Super+Alt, 9, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh movetoworkspacesilent 9
bind = Super+Alt, 0, exec, ~/.config/ags/scripts/hyprland/workspace_action.sh movetoworkspacesilent 10
bind = Control+Shift+Super, Up, movetoworkspacesilent, special
bind = Super+Alt, S, movetoworkspacesilent, special
# Scroll through existing workspaces with (Control) + Super + scroll
bind = Super, mouse_up, workspace, +1
bind = Super, mouse_down, workspace, -1
bind = Control+Super, mouse_up, workspace, +1
bind = Control+Super, mouse_down, workspace, -1
# Move/resize windows with Super + LMB/RMB and dragging
bindm = Super, mouse:272, movewindow
bindm = Super, mouse:273, resizewindow
# bindm = Super, mouse:274, movewindow
bindm = Super, Z, movewindow
bind = Control+Super, Backslash, resizeactive, exact 640 480
bindle = Alt, I, exec, ydotool key 103:1 103:0
bindle = Alt, K, exec, ydotool key 108:1 108:0
bindle = Alt, J, exec, ydotool key 105:1 105:0
bindle = Alt, L, exec, ydotool key 106:1 106:0
+61
View File
@@ -0,0 +1,61 @@
######## Window rules ########
windowrule = noblur,.* # Disables blur for windows. Substantially improves performance.
# windowrule = opacity 0.89 override 0.89 override, .* # Applies transparency to EVERY WINDOW
windowrule = float, ^(steam)$
windowrule = float, ^(guifetch)$ # FlafyDev/guifetch
windowrulev2 = tile,class:(wpsoffice)
# Dialogs
windowrule=float,title:^(Open File)(.*)$
windowrule=float,title:^(Select a File)(.*)$
windowrule=float,title:^(Choose wallpaper)(.*)$
windowrule=float,title:^(Open Folder)(.*)$
windowrule=float,title:^(Save As)(.*)$
windowrule=float,title:^(Library)(.*)$
######## Layer rules ########
layerrule = xray 1, .*
#layerrule = noanim, .*
layerrule = noanim, selection
layerrule = noanim, overview
layerrule = noanim, anyrun
layerrule = blur, swaylock
layerrule = blur, eww
layerrule = ignorealpha 0.8, eww
layerrule = noanim, noanim
layerrule = blur, noanim
layerrule = blur, gtk-layer-shell
layerrule = ignorezero, gtk-layer-shell
layerrule = blur, launcher
layerrule = ignorealpha 0.5, launcher
layerrule = blur, notifications
layerrule = ignorealpha 0.69, notifications
# ags
layerrule = blur, session
layerrule = noanim, sideright
layerrule = noanim, sideleft
#layerrule = blur, bar
#layerrule = ignorealpha 0.64, bar
#layerrule = blur, corner.*
#layerrule = ignorealpha 0.69, corner.*
#layerrule = blur, dock
#layerrule = ignorealpha 0.69, dock
#layerrule = blur, indicator.*
#layerrule = ignorealpha 0.69, indicator.*
#layerrule = blur, overview
#layerrule = ignorealpha 0.69, overview
#layerrule = blur, cheatsheet
#layerrule = ignorealpha 0.69, cheatsheet
#layerrule = blur, sideright
#layerrule = ignorealpha 0.69, sideright
#layerrule = blur, sideleft
#layerrule = ignorealpha 0.69, sideleft
#layerrule = blur, indicator*
#layerrule = ignorealpha 0.69, indicator*
#layerrule = blur, osk
#layerrule = ignorealpha 0.69, osk