From 0391e12ffbf18edba79e76a299f7f84cabbe762b Mon Sep 17 00:00:00 2001 From: spl3g Date: Tue, 23 Jan 2024 23:11:39 +0300 Subject: some emacs and hypr changes --- home-manager/laptop/hyprland/hyprland.conf | 285 ++++++++++++++++------------- 1 file changed, 156 insertions(+), 129 deletions(-) (limited to 'home-manager/laptop/hyprland/hyprland.conf') diff --git a/home-manager/laptop/hyprland/hyprland.conf b/home-manager/laptop/hyprland/hyprland.conf index 376dd52..81ef9eb 100644 --- a/home-manager/laptop/hyprland/hyprland.conf +++ b/home-manager/laptop/hyprland/hyprland.conf @@ -1,41 +1,71 @@ -monitor = eDP-1,preferred,auto,1 -monitor = ,highres,auto,1,mirror,eDP-1 +monitor=,preferred,auto,1 +# Execute your favorite apps at launch +exec-once = waybar & swww init + +# Set programs that you use +$terminal = alacritty +$fileManager = emacs +$menu = rofi --show drun +$scripts=~/.config/hypr/scripts + +# Some default env vars. +env = XCURSOR_SIZE,18 +env = QT_QPA_PLATFORMTHEME, gtk3 +env = QT_STYLE_OVERRIDE, gtk2 +env = QT_QPA_PLATFORM, wayland +env = TERMINAL, "alacritty" +env = BROWSER, "firefox" + + +# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { - kb_file= kb_layout = us,ru - kb_variant= - kb_model= + kb_variant = + kb_model = kb_options = grp:win_space_toggle - kb_rules= + kb_rules = follow_mouse = 1 touchpad { - natural_scroll = yes - clickfinger_behavior = yes - scroll_factor = 0.8 - # disable_while_typing = no + natural_scroll = yes + # disable_while_typing = no } - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + sensitivity = 0.1 # -1.0 - 1.0, 0 means no modification. } general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + gaps_in = 5 gaps_out = 20 border_size = 3 col.active_border = 0xFF6e6a86 col.inactive_border = 0xFF363a4f - apply_sens_to_raw = 0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse) + layout = dwindle + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false } decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + rounding = 7 - drop_shadow = false - shadow_range = 5 - shadow_offset = [100, 100] + + blur { + enabled = true + size = 3 + passes = 1 + } + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) } animations { @@ -47,85 +77,85 @@ animations { } dwindle { - pseudotile = 0 # enable pseudotiling on dwindle + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this +} + +master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + new_is_master = true } gestures { - workspace_swipe = yes + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe = on } +misc { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + force_default_wallpaper = 1 # Set to 0 to disable the anime mascot wallpapers +} + +# Example windowrule v1 +# windowrule = float, ^(kitty)$ +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +windowrulev2 = nomaximizerequest, class:.* # You'll probably like this. windowrulev2 = float, title:^(Firrfox — Sharing Indicator)$ windowrulev2 = nofullscreenrequest, title:^(Firefox — Sharing Indicator)$ windowrulev2 = noborder, title:^(Firefox — Sharing Indicator)$ windowrulev2 = rounding 0, title:^(Firefox — Sharing Indicator)$ windowrulev2 = float, title:^(firefox)$, title:^(Picture-in-Picture)$ windowrulev2 = pin, title:^(firefox)$, title:^(Picture-in-Picture)$ -windowrulev2 = rounding 7, title:^(rofi)$ layerrule = blur, waybar -# some nice mouse binds -bindm = SUPER,mouse:272,movewindow -bindm = SUPER,mouse:273,resizewindow - -# Binds -bind = SUPER_SHIFT,Q,exec,$scripts/kill -bind = SUPER_SHIFT,E,exit, -bind = ,0x1008FF2A,exec,nwg-bar -bind = SUPER,V,togglefloating, -bind = SUPER_SHIFT,V,centerwindow -bind = SUPER,P,pseudo, -bind = SUPER,F,fullscreen,0 -bind = SUPER_SHIFT,F,fakefullscreen -bind = SUPER,M,fullscreen,1 -bind = SUPER,N,exec,killall -SIGUSR1 waybar -bind = SUPER_SHIFT,N,exec,killall -SIGUSR2 waybar - -# Lockscreen -bind = SUPER_SHIFT,P,exec,bash -c ~/Games/swaylock-blur.sh - -# Change colume -bind = ,0x1008FF11,exec,wpctl status | grep '*' -m 1 | awk '{print $3 - 0}' | xargs -I _ wpctl set-volume _ 5%- -bind = ,0x1008FF13,exec,wpctl status | grep '*' -m 1 | awk '{print $3 - 0}' | xargs -I _ wpctl set-volume _ 5%+ -bind = ,0x1008FF12,exec,wpctl status | grep '*' -m 1 | awk '{print $3 - 0}' | xargs -I _ wpctl set-mute _ toggle - -# Change brightness -bind = ,0x1008FF02,exec,brightnessctl s +5% -bind = ,0x1008FF03,exec,brightnessctl s 5%- -# App binds -bind = SUPER,Q,exec,alacritty -bind = SUPER,B,exec,firefox -bind = SUPER_SHIFT,R,exec,nautilus -bind = SUPER,T,exec,telegram-desktop -bind = SUPER,E,exec,emacsclient -c -a "emacs" -bind = SUPER_CONTROL,E,exec,emacs - -# Rofi -bind = SUPER,D,exec,killall rofi || rofi -show-icons -show drun -bind = SUPER,C,exec,$scripts/rofi-modes - -# Screenshots -bind = ,Print,exec,$scripts/hshot -m -bind = CONTROL,Print,exec,$scripts/hshot -m -c -bind = SHIFT,Print,exec,$scripts/hshot -s -bind = CONTROL_SHIFT,Print,exec,$scripts/hshot -s -c -bind = ALT,Print,exec,$scripts/hshot -w -bind = ALT_CONTROL,Print,exec,$scripts/hshot -w -c - -# Cycle through windows -bind = SUPER,J,movefocus,d -bind = SUPER,K,movefocus,u -bind = SUPER,H,movefocus,l -bind = SUPER,L,movefocus,r - -# Resize windows -# bind = SUPER_CONTROL,K,resizeactive,0 -50 -# bind = SUPER_CONTROL,J,resizeactive,0 50 -# bind = SUPER_CONTROL,H,resizeactive,-50 0 -# bind = SUPER_CONTROL,L,resizeactive,50 0 -bind = SUPER_CONTROL,K,splitratio,0.5 -bind = SUPER_CONTROL,J,splitratio,-0.5 +# See https://wiki.hyprland.org/Configuring/Keywords/ for more +$mainMod = SUPER + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod, Q, exec, $terminal +bind = $mainMod, V, togglefloating, +bind = SUPER, D, exec, killall rofi || rofi -show-icons -show drun +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, I, togglesplit, # dwindle +bind = $mainMod, F, fullscreen, 0 +bind = $mainMod, M, fullscreen, 1 +bind = $mainMod SHIFT,F,fakefullscreen +bind = $mainMod SHIFT, Q, killactive, +bind = $mainMod SHIFT, E, exit, + +# Apps +bind = $mainMod, B, exec, firefox +bind = $mainMod, T, exec, telegram-desktop +bind = $mainMod, E, exec, emacsclient -c -a "emacs" +bind = $mainMod CONTROL, E, exec, emacs + +# Screenshooting +bind = , Print, exec, $scripts/hshot -m +bind = ALT, Print, exec, $scripts/hshot -w +bind = SHIFT, Print, exec, $scripts/hshot -s +bind = CONTROL, Print, exec, $scripts/hshot -m -c +bind = ALT_CONTROL, Print, exec, $scripts/hshot -w -c +bind = CONTROL_SHIFT, Print, exec, $scripts/hshot -s -c + +# Volume +$volDev = wpctl status | grep '*' -m 1 | awk '{print $3 - 0}' | xargs -I _ +bind = ,0x1008FF11,exec,$volDev wpctl set-volume _ 5%- +bind = ,0x1008FF13,exec,$volDev wpctl set-volume _ 5%+ +bind = ,0x1008FF12,exec,$volDev wpctl set-mute _ toggle + +# Brightness +bind = ,XF86MonBrightnessUp,exec,brightnessctl s +5% +bind = ,0x1008FF03,exec,brightnessctl s 5%- +# Move focus with mainMod + arrow keys +bind = $mainMod, J, movefocus, d +bind = $mainMod, K, movefocus, u +bind = $mainMod, H, movefocus, l +bind = $mainMod, L, movefocus, r # Move windows bind = SUPER_SHIFT,J,movewindow,d @@ -133,53 +163,50 @@ bind = SUPER_SHIFT,K,movewindow,u bind = SUPER_SHIFT,H,movewindow,l bind = SUPER_SHIFT,L,movewindow,r -# Move through workspaces -bind = SUPER,1,workspace,1 -bind = SUPER,2,workspace,2 -bind = SUPER,3,workspace,3 -bind = SUPER,4,workspace,4 -bind = SUPER,5,workspace,5 -bind = SUPER,6,workspace,6 -bind = SUPER,7,workspace,7 -bind = SUPER,8,workspace,8 -bind = SUPER,9,workspace,9 -bind = SUPER,0,workspace,10 - -# Move app to workspace -bind = ALT,1,movetoworkspace,1 -bind = ALT,2,movetoworkspace,2 -bind = ALT,3,movetoworkspace,3 -bind = ALT,4,movetoworkspace,4 -bind = ALT,5,movetoworkspace,5 -bind = ALT,6,movetoworkspace,6 -bind = ALT,7,movetoworkspace,7 -bind = ALT,8,movetoworkspace,8 -bind = ALT,9,movetoworkspace,9 -bind = ALT,0,movetoworkspace,10 - -# Move app to workspace silent -bind = SUPER_SHIFT,1,movetoworkspacesilent,1 -bind = SUPER_SHIFT,2,movetoworkspacesilent,2 -bind = SUPER_SHIFT,3,movetoworkspacesilent,3 -bind = SUPER_SHIFT,4,movetoworkspacesilent,4 -bind = SUPER_SHIFT,5,movetoworkspacesilent,5 -bind = SUPER_SHIFT,6,movetoworkspacesilent,6 -bind = SUPER_SHIFT,7,movetoworkspacesilent,7 -bind = SUPER_SHIFT,8,movetoworkspacesilent,8 -bind = SUPER_SHIFT,9,movetoworkspacesilent,9 -bind = SUPER_SHIFT,0,movetoworkspacesilent,10 - -# Mouse binds -bind = SUPER,mouse_down,workspace,e+1 -bind = SUPER,mouse_up,workspace,e-1 -bind = SUPER,up,workspace,e+1 - -# Startup apps -exec-once = mako -exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -exec-once = /usr/lib/polkit-kde-authentication-agent-1 -exec-once = emacs --daemon -exec-once = wl-paste --type text --watch cliphist store -exec-once = wl-paste --type image --watch cliphist store -exec-once = hyprctl setcursor Bibata-Modern-Ice 13 -exec-once = swww init \ No newline at end of file +# Switch workspaces with mainMod + [0-9] +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 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1 +bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2 +bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3 +bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4 +bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5 +bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6 +bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7 +bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8 +bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9 +bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10 + +bind = $mainMod ALT, 1, movetoworkspace, 1 +bind = $mainMod ALT, 2, movetoworkspace, 2 +bind = $mainMod ALT, 3, movetoworkspace, 3 +bind = $mainMod ALT, 4, movetoworkspace, 4 +bind = $mainMod ALT, 5, movetoworkspace, 5 +bind = $mainMod ALT, 6, movetoworkspace, 6 +bind = $mainMod ALT, 7, movetoworkspace, 7 +bind = $mainMod ALT, 8, movetoworkspace, 8 +bind = $mainMod ALT, 9, movetoworkspace, 9 +bind = $mainMod ALT, 0, movetoworkspace, 10 + + +# Example special workspace (scratchpad) +bind = $mainMod, S, togglespecialworkspace, magic +bind = $mainMod SHIFT, S, movetoworkspace, special:magic + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow -- cgit v1.2.3