From 660f4d366d6e3e9f4698e6b1e6febd583bb9ef92 Mon Sep 17 00:00:00 2001 From: Christian Colglazier Date: Thu, 15 Aug 2024 21:33:10 -0400 Subject: [PATCH] Hyprland config files --- hyprland/.config/hypr/bind-all.conf | 49 ++++++++++ hyprland/.config/hypr/bind-framework.conf | 17 ++++ hyprland/.config/hypr/env.conf | 4 + hyprland/.config/hypr/general.conf | 50 ++++++++++ hyprland/.config/hypr/hyprland.conf | 110 +--------------------- 5 files changed, 125 insertions(+), 105 deletions(-) create mode 100644 hyprland/.config/hypr/bind-all.conf create mode 100644 hyprland/.config/hypr/bind-framework.conf create mode 100644 hyprland/.config/hypr/env.conf create mode 100644 hyprland/.config/hypr/general.conf diff --git a/hyprland/.config/hypr/bind-all.conf b/hyprland/.config/hypr/bind-all.conf new file mode 100644 index 0000000..287ad17 --- /dev/null +++ b/hyprland/.config/hypr/bind-all.conf @@ -0,0 +1,49 @@ +$mainMod = SUPER + +# Keybindings +bind = $mainMod, return, exec, $terminal +bind = $mainMod, Q, killactive, +bind = $mainMod, C, exit, +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, V, togglefloating, +bind = $mainMod, D, exec, $menu +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, J, togglesplit, # dwindle + +# Move focus window +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# Switch workspaces +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 +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 + +# 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 diff --git a/hyprland/.config/hypr/bind-framework.conf b/hyprland/.config/hypr/bind-framework.conf new file mode 100644 index 0000000..6aa2727 --- /dev/null +++ b/hyprland/.config/hypr/bind-framework.conf @@ -0,0 +1,17 @@ +# Screen brightness controls +exec-once = light -N 1 +bind = ,XF86MonBrightnessUp, exec, light -A 5 # increase screen brightness +bind = ,XF86MonBrightnessDown, exec, light -U 5 # decrease screen brightness + +# Pulse Audio controls +bind = ,XF86AudioRaiseVolume, exec, amixer set Master 3%+ #increase sound volume +bind = ,XF86AudioLowerVolume, exec, amixer set Master 3%- #decrease sound volume +bind = ,XF86AudioMute, exec, amixer set Master toggle # toggle sound + +# Media controls +bind = ,XF86AudioPrev, exec, playerctl previous +bind = ,XF86AudioPlay, exec, playerctl play-pause +bind = ,XF86AudioNext, exec, playerctl next + +# Lockscreen +bind = $mainMod, escape, exec, swaylock \ No newline at end of file diff --git a/hyprland/.config/hypr/env.conf b/hyprland/.config/hypr/env.conf new file mode 100644 index 0000000..6496890 --- /dev/null +++ b/hyprland/.config/hypr/env.conf @@ -0,0 +1,4 @@ +# Programs +$terminal = alacritty +$fileManager = dolphin +$menu = wofi --show drun diff --git a/hyprland/.config/hypr/general.conf b/hyprland/.config/hypr/general.conf new file mode 100644 index 0000000..a97e5fc --- /dev/null +++ b/hyprland/.config/hypr/general.conf @@ -0,0 +1,50 @@ +general { + gaps_in = 5 + gaps_out = 5 + border_size = 2 + col.active_border = rgba(e91e63ee) rgba(ffcdd2ee) 45deg + col.inactive_border = rgba(0288d1aa) + layout = dwindle + allow_tearing = false +} + +decoration { + rounding = 5 + + blur { + enabled = true + size = 3 + passes = 1 + } + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + animation = windows, 1, 3, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 2, default +} + +dwindle { + pseudotile = yes + preserve_split = yes + force_split = 2 +} + +master { + orientation = right + new_is_master = true +} + +gestures { + workspace_swipe = on +} diff --git a/hyprland/.config/hypr/hyprland.conf b/hyprland/.config/hypr/hyprland.conf index 4bd2456..a1f4aa5 100644 --- a/hyprland/.config/hypr/hyprland.conf +++ b/hyprland/.config/hypr/hyprland.conf @@ -3,80 +3,27 @@ monitor=eDP-1,2256x1504@60,0x0,1.175 # Startup programs exec-once = waybar & firefox -# Programs -$terminal = alacritty -$fileManager = dolphin -$menu = wofi --show drun +source = ~/.config/hypr/env.conf # Default env vars env = XCURSOR_SIZE,24 env = QT_QPA_PLATFORMTHEME,qt5ct +source = ~/.config/hypr/general.conf + input { kb_layout = us kb_variant = kb_model = kb_options = kb_rules = - follow_mouse = 1 - touchpad { natural_scroll = yes } - sensitivity = 0 } -general { - gaps_in = 5 - gaps_out = 5 - border_size = 2 - col.active_border = rgba(e91e63ee) rgba(ffcdd2ee) 45deg - col.inactive_border = rgba(0288d1aa) - layout = dwindle - allow_tearing = false -} - -decoration { - rounding = 5 - - blur { - enabled = true - size = 3 - passes = 1 - } - - drop_shadow = yes - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) -} - -animations { - enabled = yes - bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - animation = windows, 1, 3, myBezier - animation = windowsOut, 1, 7, default, popin 80% - animation = border, 1, 10, default - animation = borderangle, 1, 8, default - animation = fade, 1, 7, default - animation = workspaces, 1, 2, default -} - -dwindle { - pseudotile = yes - preserve_split = yes -} - -master { - orientation = right - new_is_master = true -} - -gestures { - workspace_swipe = on -} misc { force_default_wallpaper = 0 @@ -84,52 +31,5 @@ misc { windowrulev2 = suppressevent maximize, class:.* -$mainMod = SUPER - -# Keybindings -bind = $mainMod, return, exec, $terminal -bind = $mainMod, Q, killactive, -bind = $mainMod, C, exit, -bind = $mainMod, E, exec, $fileManager -bind = $mainMod, V, togglefloating, -bind = $mainMod, D, exec, $menu -bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod, J, togglesplit, # dwindle - -# Move focus window -bind = $mainMod, left, movefocus, l -bind = $mainMod, right, movefocus, r -bind = $mainMod, up, movefocus, u -bind = $mainMod, down, movefocus, d - -# Switch workspaces -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 -bind = $mainMod SHIFT, 1, movetoworkspace, 1 -bind = $mainMod SHIFT, 2, movetoworkspace, 2 -bind = $mainMod SHIFT, 3, movetoworkspace, 3 -bind = $mainMod SHIFT, 4, movetoworkspace, 4 -bind = $mainMod SHIFT, 5, movetoworkspace, 5 -bind = $mainMod SHIFT, 6, movetoworkspace, 6 -bind = $mainMod SHIFT, 7, movetoworkspace, 7 -bind = $mainMod SHIFT, 8, movetoworkspace, 8 -bind = $mainMod SHIFT, 9, movetoworkspace, 9 -bind = $mainMod SHIFT, 0, movetoworkspace, 10 - -# 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 +source = ~/.config/hypr/bind-all.conf +source = ~/.config/hypr/bind-framework.conf