breaking Hyprland

This commit is contained in:
iFargle 2024-01-03 23:33:36 +09:00
parent 917b3c67f6
commit 2753c62224
3 changed files with 100 additions and 147 deletions

View file

@ -1,104 +1,105 @@
{ theme, ... }: { { theme, ... }: {
home.file = { wayland.windowManager.hyprland = {
".config/hypr/hyprland.conf" = { settings = {
enable = true; exec-once = ''bash ~/.config/hypr/start.sh'';
text = '' bind = [
# See https://wiki.hyprland.org/Configuring/Keywords/ for more ''SUPER, Q, exec, kitty''
''SUPER, C, killactive,''
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more ''SUPER, M, exit,''
bind = $mainMod, Q, exec, kitty ''SUPER, V, togglefloating,''
bind = $mainMod, C, killactive, ''SUPER, P, pseudo, # dwindle''
bind = $mainMod, M, exit, ''SUPER, J, togglesplit, # dwindle''
bind = $mainMod, V, togglefloating,
# bind = $mainMod, R, exec, wofi --show drun
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# Move focus with mainMod + arrow keys # Move focus with mainMod + arrow keys
bind = SUPER_ALT, left, movefocus, l ''SUPER_ALT, left, movefocus, l''
bind = SUPER_ALT, right, movefocus, r ''SUPER_ALT, right, movefocus, r''
bind = SUPER_ALT, up, movefocus, u ''SUPER_ALT, up, movefocus, u''
bind = SUPER_ALT, down, movefocus, d ''SUPER_ALT, down, movefocus, d''
bind = SUPER_ALT, H, movefocus, l ''SUPER_ALT, H, movefocus, l''
bind = SUPER_ALT, L, movefocus, r ''SUPER_ALT, L, movefocus, r''
bind = SUPER_ALT, K, movefocus, u ''SUPER_ALT, K, movefocus, u''
bind = SUPER_ALT, J, movefocus, d ''SUPER_ALT, J, movefocus, d''
# Switch workspaces with mainMod + [0-9] # Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1 ''SUPER, 1, workspace, 1''
bind = $mainMod, 2, workspace, 2 ''SUPER, 2, workspace, 2''
bind = $mainMod, 3, workspace, 3 ''SUPER, 3, workspace, 3''
bind = $mainMod, 4, workspace, 4 ''SUPER, 4, workspace, 4''
bind = $mainMod, 5, workspace, 5 ''SUPER, 5, workspace, 5''
bind = $mainMod, 6, workspace, 6 ''SUPER, 6, workspace, 6''
bind = $mainMod, 7, workspace, 7 ''SUPER, 7, workspace, 7''
bind = $mainMod, 8, workspace, 8 ''SUPER, 8, workspace, 8''
bind = $mainMod, 9, workspace, 9 ''SUPER, 9, workspace, 9''
bind = $mainMod, 0, workspace, 10 ''SUPER, 0, workspace, 10''
# Move active window to a workspace with mainMod + SHIFT + [0-9] # Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1 ''SUPER SHIFT, 1, movetoworkspace, 1''
bind = $mainMod SHIFT, 2, movetoworkspace, 2 ''SUPER SHIFT, 2, movetoworkspace, 2''
bind = $mainMod SHIFT, 3, movetoworkspace, 3 ''SUPER SHIFT, 3, movetoworkspace, 3''
bind = $mainMod SHIFT, 4, movetoworkspace, 4 ''SUPER SHIFT, 4, movetoworkspace, 4''
bind = $mainMod SHIFT, 5, movetoworkspace, 5 ''SUPER SHIFT, 5, movetoworkspace, 5''
bind = $mainMod SHIFT, 6, movetoworkspace, 6 ''SUPER SHIFT, 6, movetoworkspace, 6''
bind = $mainMod SHIFT, 7, movetoworkspace, 7 ''SUPER SHIFT, 7, movetoworkspace, 7''
bind = $mainMod SHIFT, 8, movetoworkspace, 8 ''SUPER SHIFT, 8, movetoworkspace, 8''
bind = $mainMod SHIFT, 9, movetoworkspace, 9 ''SUPER SHIFT, 9, movetoworkspace, 9''
bind = $mainMod SHIFT, 0, movetoworkspace, 10 ''SUPER SHIFT, 0, movetoworkspace, 10''
# Scroll through existing workspaces with mainMod + scroll # Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1 ''SUPER, mouse_down, workspace, e+1''
bind = $mainMod, mouse_up, workspace, e-1 ''SUPER, mouse_up, workspace, e-1''
# Move/resize windows with mainMod + LMB/RMB and dragging # Resize
bindm = $mainMod, mouse:272, movewindow ''SUPER, R, exec, notify-send "Entered resize mode. Press ESC to quit."''
bindm = $mainMod, mouse:273, resizewindow ''SUPER, R, submap, resize''
############################################################################# #############################################################################
# Custom keybinds # Custom keybinds
# Show Rofi on SUPER-SPACE # Show Rofi on SUPER-SPACE
bind = $mainMod, space, exec, rofi -show combi -show-icons ''SUPER, space, exec, rofi -show combi -show-icons''
# bind = $mainMod, space, exec, rofi -show drun -show-icons # ''SUPER, space, exec, rofi -show drun -show-icons
# Take a screenshot with the Print key # Take a screenshot with the Print key''
bind = , Print, exec, grim -g "$(slurp)" | wl-copy -t image/png '', Print, exec, grim -g "$(slurp)" | wl-copy -t image/png''
# Move to the previous / next workspace with SUPER-LEFT and SUPER-RIGHT # Move to the previous / next workspace with SUPER-LEFT and SUPER-RIGHT
bind = $mainMod , right, workspace, e+1 ''SUPER , right, workspace, e+1''
bind = $mainMod , left , workspace, e-1 ''SUPER , left , workspace, e-1''
bind = $mainMod SHIFT, right, movetoworkspace, e+1 ''SUPER SHIFT, right, movetoworkspace, e+1''
bind = $mainMod SHIFT, left , movetoworkspace, e-1 ''SUPER SHIFT, left , movetoworkspace, e-1''
bind = SHIFT ALT, L, workspace, e+1 ''SHIFT ALT, L, workspace, e+1''
bind = SHIFT ALT, H, workspace, e-1 ''SHIFT ALT, H, workspace, e-1''
# Lock the screen, send to swaylock and pause music # Lock the screen, send to swaylock and pause music
bind = $mainMod, L, exec, swaylock ''SUPER, L, exec, swaylock''
bind = $mainMod, L, exec, playerctl pause ''SUPER, L, exec, playerctl pause''
# to switch between windows in a floating workspace # to switch between windows in a floating workspace
bind = $mainMod ,Tab, cyclenext, # change focus to another window ''SUPER ,Tab, cyclenext, # change focus to another window''
bind = $mainMod ,Tab, bringactivetotop, # bring it to the top ''SUPER ,Tab, bringactivetotop, # bring it to the top''
# Resize ];
bind = $mainMod, R, exec, notify-send "Entered resize mode. Press ESC to quit." bindm = [
bind = $mainMod, R, submap, resize # Move/resize windows with mainMod + LMB/RMB and dragging
submap = resize ''SUPER, mouse:272, movewindow''
binde = , H, resizeactive,-50 0 ''SUPER, mouse:273, resizewindow''
binde = , L, resizeactive,50 0 ];
binde = , K, resizeactive,0 -50 submap = {
binde = , J, resizeactive,0 50 resize = {
binde = , left, resizeactive,-50 0 bind = [
binde = , right, resizeactive,50 0 '', escape, submap, reset''
binde = , up, resizeactive,0 -50 ];
binde = , down, resizeactive,0 50 binde = [
bind = , escape, submap, reset '', H, resizeactive,-50 0''
submap = reset '', L, resizeactive,50 0''
'', K, resizeactive,0 -50''
# Start the config: '', J, resizeactive,0 50''
exec-once=bash ~/.config/hypr/start.sh '', left, resizeactive,-50 0''
''; '', right, resizeactive,50 0''
'', up, resizeactive,0 -50''
'', down, resizeactive,0 50''
];
};
reset = {};
};
}; };
};
} }

View file

@ -1,5 +1,4 @@
{ theme, ... }: { { theme, ... }: {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,70 +1,23 @@
{ theme, ... }: { { theme, ... }: {
home.file = { wayland.windowManager.hyprland = {
".config/hypr/hyprland.conf" = { settings = {
enable = true; monitor = ",highrr,auto,1.25";
text = '' bind = [
'', XF86AudioMute, exec, swayosd --output-volume=mute-toggle''
# Laptop specific: '', XF86AudioPrev, exec, playerctl previous''
monitor=,highrr,auto,1.25 ];
$mainMod = SUPER binde = [
'', XF86AudioPlay, exec, playerctl play-pause''
# Set up the FN keys: '', XF86AudioNext, exec, playerctl next''
'', XF86MonBrightnessDown, exec, light -U 5''
# F1 - Mute '', XF86MonBrightnessUp, exec, light -A 5''
# bind = , XF86AudioMute, exec, amixer set Master toggle && swayosd --output-volume=mute-toggle '', XF86AudioLowerVolume, exec, swayosd --output-volume=lower''
bind = , XF86AudioMute, exec, swayosd --output-volume=mute-toggle '', XF86AudioRaiseVolume, exec, swayosd --output-volume=raise''
];
# F2 - Volume Down bindl = [
# binde = , XF86AudioLowerVolume, exec, amixer set Master 3%- '',switch:on:1241ec0,exec,hyprctl keyword monitor "eDP-1, 2560x1600, 0x0, 1"''
binde = , XF86AudioLowerVolume, exec, swayosd --output-volume=lower '',switch:off:1241ec0,exec,hyprctl keyword monitor "eDP-1, disable"''
];
# F3 - Volume Up
# binde = , XF86AudioRaiseVolume, exec, amixer set Master 3%+
binde = , XF86AudioRaiseVolume, exec, swayosd --output-volume=raise
# F4 - Previous Track
# bind = , XF86AudioMicMute, exec, amixer set Capture toggle
bind = , XF86AudioPrev, exec, playerctl previous
# F5 - Play/Pause
# binde = , XF86MonBrightnessDown, exec, light -U 5
binde = , XF86AudioPlay, exec, playerctl play-pause
# F6 - Next Track
# binde = , XF86MonBrightnessUp, exec, light -A 5
binde = , XF86AudioNext, exec, playerctl next
# F7 - Brightness Down
# bind = , XF86
binde = , XF86MonBrightnessDown, exec, light -U 5
# F8 - Brightness Up
# bind = , XF86
binde = , XF86MonBrightnessUp, exec, light -A 5
# F9 - External Displays
# bind = , XF86
# F10 - Airplane Mode
# bind = , XF86
# F11 - PRT SCR
# bind = , XF86
# F12 - "Framework Button"
# bind = , XF86
# Use rofi as an alt-tab switcher
# bind = ALT, TAB, exec, rofi -show window
# Lid closure:
# trigger when the switch is toggled
# bindl=,switch:[switch name],exec,swaylock
# trigger when the switch is turning on
bindl=,switch:on:1241ec0,exec,hyprctl keyword monitor "eDP-1, 2560x1600, 0x0, 1"
# trigger when the switch is turning off
bindl=,switch:off:1241ec0,exec,hyprctl keyword monitor "eDP-1, disable"
'';
}; };
# Set the custom launcher script # Set the custom launcher script
".config/hypr/start.sh" = { ".config/hypr/start.sh" = {