Remove nix-shell shebang from autostart-manage
This commit is contained in:
		
							parent
							
								
									1458d5b334
								
							
						
					
					
						commit
						cee6671913
					
				
					 3 changed files with 8 additions and 7 deletions
				
			
		|  | @ -1,6 +1,4 @@ | |||
| #!/usr/bin/env nix-shell | ||||
| #!nix-shell -i bash -p dasel hostname | ||||
| # shellcheck shell=bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| _systemctl () { | ||||
| 	systemctl --user "${@:2}" "autostart@$1.service" | ||||
|  | @ -61,8 +59,10 @@ _autostart_manage_enable_all () { | |||
| } | ||||
| 
 | ||||
| _get_autostart_cmd () { | ||||
| 	hostname=$(cat /proc/sys/kernel/hostname) | ||||
| 
 | ||||
| 	selector_base="all()" | ||||
| 	selector_host="all().filter(equal(type(),object)).filter(equal(key(),$(hostname))).all()" | ||||
| 	selector_host="all().filter(equal(type(),object)).filter(equal(key(),$hostname)).all()" | ||||
| 	selector_entry="filter(not(equal(type(),object))).filter(equal(key(),$1))" | ||||
| 	cmd=$(_dasel "$selector_base.$selector_entry") | ||||
| 	cmd_local=$(_dasel "$selector_host.$selector_entry") | ||||
|  |  | |||
|  | @ -10,13 +10,13 @@ bspc config active_border_color "#bd93f9" | |||
| bspc config focused_border_color "#ff79c6" | ||||
| bspc config presel_feedback_color "#6272a4" | ||||
| 
 | ||||
| host_name=$(cat /proc/sys/kernel/hostname) | ||||
| hostname=$(cat /proc/sys/kernel/hostname) | ||||
| mode=$(cat /tmp/bspwm_mode) | ||||
| 
 | ||||
| primary="${MONITOR_PRIMARY:-primary}" | ||||
| secondary="${MONITOR_SECONDARY:-secondary}" | ||||
| 
 | ||||
| if [ "$host_name" = "portalo" ]; then | ||||
| if [ "$hostname" = "portalo" ]; then | ||||
|     if [ "$mode" = "presenter" ]; then | ||||
|         xrandr --output "$primary" --mode 2560x1440 --refresh 144 | ||||
|         xrandr --output "$secondary" --auto --left-of "$primary" | ||||
|  | @ -35,7 +35,7 @@ if [ "$host_name" = "portalo" ]; then | |||
|         bspc monitor "$secondary" -d side-view voip messenger | ||||
|     fi | ||||
| 
 | ||||
| #elif echo "$host_name" | grep -Eq "laptop"; then | ||||
| #elif echo "$hostname" | grep -Eq "laptop"; then | ||||
| else | ||||
|     xrandr --output "$primary" --auto | ||||
|     xrandr --output "$secondary" --left-of "$primary" --auto | ||||
|  |  | |||
|  | @ -4,6 +4,7 @@ | |||
|   # Packages that should be installed to the user profile. | ||||
|   home.packages = with pkgs; [ | ||||
|     bat # cat-alternative | ||||
|     dasel # tool to manage yq, jq, toml and more | ||||
|     direnv # tool to load custom environments | ||||
|     docker-credential-helpers | ||||
|     exa # ls-alternative | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue