Created
          July 15, 2024 11:17 
        
      - 
      
- 
        Save appleseedexm/4e20d39ba03f03f05503a9de95c367b6 to your computer and use it in GitHub Desktop. 
    Set Hyprland instance signature based of found instances
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/sh | |
| get_instance_line() { | |
| hyprctl instances | grep -i instance | |
| } | |
| INSTANCE_COUNT=$(get_instance_line | grep -c instance) | |
| if [ $INSTANCE_COUNT -eq "1" ]; then | |
| export HYPRLAND_INSTANCE_SIGNATURE=$(get_instance_line | grep -o -E '[a-zA-Z0-9_]+') | |
| printf "Instance signature set to %s\n" "$HYPRLAND_INSTANCE_SIGNATURE" | |
| else | |
| printf "Found %s instances, unable to set instance signature.\n" "$INSTANCE_COUNT" | |
| exit 1 | |
| fi | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment