mirror of
				https://github.com/ItsDrike/nixdots
				synced 2025-10-22 15:56:36 +00:00 
			
		
		
		
	For a long time now, I've been using a custom shell script to handle focusing to a workspace, which handled (xmonad-like) monitor swapping. However recently, the option `focusworkspaceoncurrentmonitor` has been added to Hyprland, which does the exact same. That means the script is no longer necessary and we can move to the new built-in option.
		
			
				
	
	
		
			12 lines
		
	
	
	
		
			332 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
	
		
			332 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| # shellcheck source=include
 | |
| source "./scripts/include"
 | |
| 
 | |
| if [ "$1" = "--switch" ]; then
 | |
| 	hyprctl dispatch focusworkspaceoncurrentmonitor "$2" >/dev/null
 | |
| elif [ "$1" = "--loop" ]; then
 | |
| 	hyprland_ipc "workspace|createworkspace|destroyworkspace" | ./scripts/workspaces.py "$@"
 | |
| else
 | |
| 	./scripts/workspaces.py "$@"
 | |
| fi
 |