mirror of
				https://github.com/WarrenHood/dotfiles.git
				synced 2025-11-04 04:58:41 +00:00 
			
		
		
		
	Added screenshotting, window cycling etc to hyprland configs
This commit is contained in:
		
							parent
							
								
									e58683bb5e
								
							
						
					
					
						commit
						19282115eb
					
				| 
						 | 
					@ -34,7 +34,7 @@ input {
 | 
				
			||||||
    kb_options =
 | 
					    kb_options =
 | 
				
			||||||
    kb_rules =
 | 
					    kb_rules =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    follow_mouse = 1
 | 
					    follow_mouse = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    touchpad {
 | 
					    touchpad {
 | 
				
			||||||
        natural_scroll = false
 | 
					        natural_scroll = false
 | 
				
			||||||
| 
						 | 
					@ -133,7 +133,7 @@ $mainMod = SUPER
 | 
				
			||||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
 | 
					# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
 | 
				
			||||||
bind = $mainMod, RETURN, exec, $terminal
 | 
					bind = $mainMod, RETURN, exec, $terminal
 | 
				
			||||||
bind = $mainMod SHIFT, C, killactive,
 | 
					bind = $mainMod SHIFT, C, killactive,
 | 
				
			||||||
bind = $mainMod, M, exit,
 | 
					bind = $mainMod SHIFT, Q, exit,
 | 
				
			||||||
bind = $mainMod, E, exec, $fileManager
 | 
					bind = $mainMod, E, exec, $fileManager
 | 
				
			||||||
bind = $mainMod CTRL, SPACE, togglefloating,
 | 
					bind = $mainMod CTRL, SPACE, togglefloating,
 | 
				
			||||||
bind = $mainMod, R, exec, $menu
 | 
					bind = $mainMod, R, exec, $menu
 | 
				
			||||||
| 
						 | 
					@ -146,6 +146,11 @@ bind = $mainMod, L, movefocus, r
 | 
				
			||||||
bind = $mainMod, K, movefocus, u
 | 
					bind = $mainMod, K, movefocus, u
 | 
				
			||||||
bind = $mainMod, J, movefocus, d
 | 
					bind = $mainMod, J, movefocus, d
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Toggle fullscreen
 | 
				
			||||||
 | 
					bind = $mainMod, M, fullscreen
 | 
				
			||||||
 | 
					# Fake (internal) fullscreen
 | 
				
			||||||
 | 
					bind = $mainMod SHIFT, M, fakefullscreen
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Switch workspaces with mainMod + [0-9]
 | 
					# Switch workspaces with mainMod + [0-9]
 | 
				
			||||||
bind = $mainMod, 1, workspace, 1
 | 
					bind = $mainMod, 1, workspace, 1
 | 
				
			||||||
bind = $mainMod, 2, workspace, 2
 | 
					bind = $mainMod, 2, workspace, 2
 | 
				
			||||||
| 
						 | 
					@ -175,8 +180,8 @@ bind = $mainMod, S, togglespecialworkspace, magic
 | 
				
			||||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
 | 
					bind = $mainMod SHIFT, S, movetoworkspace, special:magic
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Scroll through existing workspaces with mainMod + scroll
 | 
					# Scroll through existing workspaces with mainMod + scroll
 | 
				
			||||||
bind = $mainMod, LEFT, workspace, e+1
 | 
					bind = $mainMod, RIGHT, workspace, e+1
 | 
				
			||||||
bind = $mainMod, RIGHT, workspace, e-1
 | 
					bind = $mainMod, LEFT, workspace, e-1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Move/resize windows with mainMod + LMB/RMB and dragging
 | 
					# Move/resize windows with mainMod + LMB/RMB and dragging
 | 
				
			||||||
bindm = $mainMod, mouse:272, movewindow
 | 
					bindm = $mainMod, mouse:272, movewindow
 | 
				
			||||||
| 
						 | 
					@ -184,3 +189,12 @@ bindm = $mainMod, mouse:273, resizewindow
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Open up browser
 | 
					# Open up browser
 | 
				
			||||||
bind = $mainMod, B, exec, $browser
 | 
					bind = $mainMod, B, exec, $browser
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Screenshots with grim, slurp and swappy
 | 
				
			||||||
 | 
					bind = $mainMod SHIFT, S, exec, grim -g "$(slurp)" - | swappy -f -
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Cycle between windows
 | 
				
			||||||
 | 
					bind = ALT, TAB, cyclenext
 | 
				
			||||||
 | 
					bind = ALT, TAB, bringactivetotop
 | 
				
			||||||
 | 
					bind = ALT SHIFT, TAB, cyclenext, prev
 | 
				
			||||||
 | 
					bind = ALT SHIFT, TAB, bringactivetotop
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										25
									
								
								setup
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								setup
									
									
									
									
									
								
							| 
						 | 
					@ -5,11 +5,33 @@ echo "Setting up the stuff..."
 | 
				
			||||||
git submodule init
 | 
					git submodule init
 | 
				
			||||||
git submodule update
 | 
					git submodule update
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					! command -v git &> /dev/null && echo "Ensure git is install before running this" && exit -1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[ ! -d ~/git ]] && echo "Creating git directory in $HOME" && mkdir ~/git
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Wayland + Hyprland seems cool
 | 
					# Wayland + Hyprland seems cool
 | 
				
			||||||
setup_hyprland_arch() {
 | 
					setup_hyprland_arch() {
 | 
				
			||||||
    echo "Setting up Hyprland..."
 | 
					    echo "Setting up Hyprland..."
 | 
				
			||||||
    sudo pacman -S wayland hyprland waybar dmenu dunst pipewire wireplumber xdg-desktop-portal-hyprland polkit-kde-agent qt5-wayland qt6-wayland
 | 
					    sudo pacman -S wayland hyprland waybar dmenu dunst pipewire wireplumber xdg-desktop-portal-hyprland polkit-kde-agent qt5-wayland qt6-wayland
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # grim + slurp + swappy for screenshots
 | 
				
			||||||
 | 
					    sudo pacman -S grim slurp swappy wl-clipboard
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Setup paru
 | 
				
			||||||
 | 
					setup_paru() {
 | 
				
			||||||
 | 
					    if ! command -v paru &> /dev/null; then
 | 
				
			||||||
 | 
					        echo "Setting up paru..."
 | 
				
			||||||
 | 
					        pushd ~/git
 | 
				
			||||||
 | 
					        sudo pacman -S --needed base-devel
 | 
				
			||||||
 | 
					        git clone https://aur.archlinux.org/paru.git
 | 
				
			||||||
 | 
					        cd paru
 | 
				
			||||||
 | 
					        makepkg -si
 | 
				
			||||||
 | 
					        popd
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        echo "paru is already installed"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -40,6 +62,9 @@ else
 | 
				
			||||||
    # sudo systemctl enable --now thermald
 | 
					    # sudo systemctl enable --now thermald
 | 
				
			||||||
    # sudo thermald --systemd
 | 
					    # sudo thermald --systemd
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    # Install paru
 | 
				
			||||||
 | 
					    setup_paru
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Install wayland + hyprland
 | 
					    # Install wayland + hyprland
 | 
				
			||||||
    setup_hyprland_arch
 | 
					    setup_hyprland_arch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue