initial pikachu configuration
This commit is contained in:
		
							
								
								
									
										19
									
								
								bin/pikachu/set-battery-max-charge
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										19
									
								
								bin/pikachu/set-battery-max-charge
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,19 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					[[ $EUID -eq 0 ]] || {
 | 
				
			||||||
 | 
						echo "root access required" >&2
 | 
				
			||||||
 | 
						exit 1
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					MAX_CHARGE_THRESHOLD=$1
 | 
				
			||||||
 | 
					[ "$MAX_CHARGE_THRESHOLD" ] \
 | 
				
			||||||
 | 
						|| MAX_CHARGE_THRESHOLD=75
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DEVICE_SETTING_FILE=/sys/class/power_supply/BAT1/charge_control_end_threshold
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[ "$MAX_CHARGE_THRESHOLD" ] && [[ $MAX_CHARGE_THRESHOLD -ge 40 ]] && [[ $MAX_CHARGE_THRESHOLD -le 100 ]] || {
 | 
				
			||||||
 | 
						echo -e "Value '$MAX_CHARGE_THRESHOLD' is invalid. If you REALLY want to do this, overwrite the setting yourself\n$DEVICE_SETTING_FILE" >&2
 | 
				
			||||||
 | 
						exit 2
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "$MAX_CHARGE_THRESHOLD" > "$DEVICE_SETTING_FILE"
 | 
				
			||||||
@@ -1,6 +1,20 @@
 | 
				
			|||||||
#!/bin/zsh
 | 
					#!/bin/zsh
 | 
				
			||||||
LAYOUT="$DOTWRYN/bin/$(hostnamectl --static)/default"
 | 
					LAYOUT="$DOTWRYN/bin/$(hostnamectl --static)/default"
 | 
				
			||||||
[ -f $LAYOUT ] && {
 | 
					
 | 
				
			||||||
	until xrandr -q >/dev/null 2>&1; do sleep .1; done
 | 
					until xrandr -q >/dev/null 2>&1; do sleep .1; done
 | 
				
			||||||
	$LAYOUT
 | 
					
 | 
				
			||||||
}
 | 
					[ -f "$LAYOUT" ] \
 | 
				
			||||||
 | 
						&& XRANDR_LAYOUT_MODE=manual \
 | 
				
			||||||
 | 
						|| XRANDR_LAYOUT_MODE=auto \
 | 
				
			||||||
 | 
						;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					case $XRANDR_LAYOUT_MODE in
 | 
				
			||||||
 | 
						manual )
 | 
				
			||||||
 | 
							"$LAYOUT"
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
 | 
						auto )
 | 
				
			||||||
 | 
							xrandr --auto
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
					unset XRANDR_LAYOUT_MODE
 | 
				
			||||||
 | 
					true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,3 +9,15 @@ primary        = #6911aa
 | 
				
			|||||||
secondary      = #11bb98
 | 
					secondary      = #11bb98
 | 
				
			||||||
alert          = #c80064
 | 
					alert          = #c80064
 | 
				
			||||||
disabled       = #424253
 | 
					disabled       = #424253
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					primary-gradient-0   = #420069
 | 
				
			||||||
 | 
					primary-gradient-1   = #490099
 | 
				
			||||||
 | 
					primary-gradient-2   = #6911aa
 | 
				
			||||||
 | 
					primary-gradient-3   = #8811cc
 | 
				
			||||||
 | 
					primary-gradient-4   = #9922dd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					secondary-gradient-0 = #006942
 | 
				
			||||||
 | 
					secondary-gradient-1 = #009949
 | 
				
			||||||
 | 
					secondary-gradient-2 = #00aa79
 | 
				
			||||||
 | 
					secondary-gradient-3 = #11bb98
 | 
				
			||||||
 | 
					secondary-gradient-4 = #22ccba
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1932
									
								
								config/pikachu/X11/xkeymap
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1932
									
								
								config/pikachu/X11/xkeymap
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,4 +1,5 @@
 | 
				
			|||||||
include-file = $DOTWRYN/colorschemes/active/polybar.ini
 | 
					include-file = $DOTWRYN/colorschemes/active/polybar.ini
 | 
				
			||||||
 | 
					include-file = $HOME/.config/polybar/local.ini
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[settings]
 | 
					[settings]
 | 
				
			||||||
screenchange-reload = true
 | 
					screenchange-reload = true
 | 
				
			||||||
@@ -10,8 +11,6 @@ width = 100%
 | 
				
			|||||||
height = 24pt
 | 
					height = 24pt
 | 
				
			||||||
radius = 0
 | 
					radius = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
; dpi = 96
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
background = ${colors.background}
 | 
					background = ${colors.background}
 | 
				
			||||||
foreground = ${colors.foreground}
 | 
					foreground = ${colors.foreground}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -64,7 +63,7 @@ label-urgent-padding = 1
 | 
				
			|||||||
#####################################################################
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[bar/i3]
 | 
					[bar/i3]
 | 
				
			||||||
modules-center = tray
 | 
					modules-center = tray battery0 battery1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[module/tray]
 | 
					[module/tray]
 | 
				
			||||||
type = internal/tray
 | 
					type = internal/tray
 | 
				
			||||||
@@ -72,12 +71,70 @@ type = internal/tray
 | 
				
			|||||||
format-margin = 8pt
 | 
					format-margin = 8pt
 | 
				
			||||||
tray-spacing = 8pt
 | 
					tray-spacing = 8pt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[module/backlight]
 | 
				
			||||||
 | 
					type = internal/backlight
 | 
				
			||||||
 | 
					format = <bar>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[module/battery0]
 | 
				
			||||||
 | 
					type = internal/battery
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					battery = BAT0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					interval = 31
 | 
				
			||||||
 | 
					ramp-capacity-0 = 
 | 
				
			||||||
 | 
					ramp-capacity-1 = 
 | 
				
			||||||
 | 
					ramp-capacity-2 = 
 | 
				
			||||||
 | 
					ramp-capacity-3 = 
 | 
				
			||||||
 | 
					ramp-capacity-4 = 
 | 
				
			||||||
 | 
					ramp-capacity-0-foreground = ${colors.alert}
 | 
				
			||||||
 | 
					ramp-capacity-1-foreground = ${colors.foreground}
 | 
				
			||||||
 | 
					ramp-capacity-2-foreground = ${colors.secondary-gradient-2}
 | 
				
			||||||
 | 
					ramp-capacity-3-foreground = ${colors.secondary-gradient-3}
 | 
				
			||||||
 | 
					ramp-capacity-4-foreground = ${colors.secondary-gradient-4}
 | 
				
			||||||
 | 
					format-charging    = <ramp-capacity>
 | 
				
			||||||
 | 
					format-discharging = <ramp-capacity>
 | 
				
			||||||
 | 
					format-full        = <ramp-capacity> <label-full>
 | 
				
			||||||
 | 
					format-low         = <ramp-capacity> <label-low>
 | 
				
			||||||
 | 
					full-at = 74
 | 
				
			||||||
 | 
					label-full = c:
 | 
				
			||||||
 | 
					label-full-foreground = ${colors.secondary-gradient-4}
 | 
				
			||||||
 | 
					low-at  = 39
 | 
				
			||||||
 | 
					label-low = ⚠
 | 
				
			||||||
 | 
					label-low-foreground = ${colors.alert}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[module/battery1]
 | 
				
			||||||
 | 
					type = internal/battery
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					battery = BAT1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					interval = 31
 | 
				
			||||||
 | 
					ramp-capacity-0 = 
 | 
				
			||||||
 | 
					ramp-capacity-1 = 
 | 
				
			||||||
 | 
					ramp-capacity-2 = 
 | 
				
			||||||
 | 
					ramp-capacity-3 = 
 | 
				
			||||||
 | 
					ramp-capacity-4 = 
 | 
				
			||||||
 | 
					ramp-capacity-0-foreground = ${colors.alert}
 | 
				
			||||||
 | 
					ramp-capacity-1-foreground = ${colors.foreground}
 | 
				
			||||||
 | 
					ramp-capacity-2-foreground = ${colors.secondary-gradient-2}
 | 
				
			||||||
 | 
					ramp-capacity-3-foreground = ${colors.secondary-gradient-3}
 | 
				
			||||||
 | 
					ramp-capacity-4-foreground = ${colors.secondary-gradient-4}
 | 
				
			||||||
 | 
					format-charging    = <ramp-capacity>
 | 
				
			||||||
 | 
					format-discharging = <ramp-capacity>
 | 
				
			||||||
 | 
					format-full        = <ramp-capacity> <label-full>
 | 
				
			||||||
 | 
					format-low         = <ramp-capacity> <label-low>
 | 
				
			||||||
 | 
					full-at = 74
 | 
				
			||||||
 | 
					label-full = c:
 | 
				
			||||||
 | 
					label-full-foreground = ${colors.secondary-gradient-4}
 | 
				
			||||||
 | 
					low-at  = 39
 | 
				
			||||||
 | 
					label-low = ⚠
 | 
				
			||||||
 | 
					label-low-foreground = ${colors.alert}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#####################################################################
 | 
					#####################################################################
 | 
				
			||||||
### modules-right ###################################################
 | 
					### modules-right ###################################################
 | 
				
			||||||
#####################################################################
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[bar/i3]
 | 
					[bar/i3]
 | 
				
			||||||
modules-right = fs memory cpu wlan eth datetime backlight battery
 | 
					modules-right = fs memory cpu wlan eth datetime backlight
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[module/fs]
 | 
					[module/fs]
 | 
				
			||||||
type = internal/fs
 | 
					type = internal/fs
 | 
				
			||||||
@@ -133,19 +190,3 @@ type = custom/script
 | 
				
			|||||||
label-foreground = ${colors.foreground}
 | 
					label-foreground = ${colors.foreground}
 | 
				
			||||||
interval = 0.5
 | 
					interval = 0.5
 | 
				
			||||||
exec = echo $(date +"%A %B %d, %Y : %I:%M:%S-%P") $(TZ=UTC date +"{%H:%M-UTC}")
 | 
					exec = echo $(date +"%A %B %d, %Y : %I:%M:%S-%P") $(TZ=UTC date +"{%H:%M-UTC}")
 | 
				
			||||||
 | 
					 | 
				
			||||||
[module/backlight]
 | 
					 | 
				
			||||||
type = internal/backlight
 | 
					 | 
				
			||||||
format = <bar>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[module/battery]
 | 
					 | 
				
			||||||
type = internal/battery
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
interval = 13
 | 
					 | 
				
			||||||
format-charging    = <bar-capacity>
 | 
					 | 
				
			||||||
format-discharging = <bar-capacity>
 | 
					 | 
				
			||||||
format-full        = <bar-capacity>
 | 
					 | 
				
			||||||
format-low         = <bar-capacity> <label-low>
 | 
					 | 
				
			||||||
low-at = 10
 | 
					 | 
				
			||||||
label-low = ⚠
 | 
					 | 
				
			||||||
label-low-foreground = ${colors.alert}
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,9 @@
 | 
				
			|||||||
### scwrypts runtime configuration (group 'dotwryn') ################
 | 
					### scwrypts runtime configuration (group 'dotwryn') ################
 | 
				
			||||||
#####################################################################
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# enlighten BACKLIGHT_DEVICE (see 'man enlighten')
 | 
				
			||||||
 | 
					export DESKTOP__BACKLIGHT_DEVICE=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# directory containing sound effects
 | 
					# directory containing sound effects
 | 
				
			||||||
export DESKTOP__SFX_PATH="$HOME/Media/sfx"
 | 
					export DESKTOP__SFX_PATH="$HOME/Media/sfx"
 | 
				
			||||||
export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg"
 | 
					export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,9 @@
 | 
				
			|||||||
### scwrypts runtime configuration (group 'dotwryn') ################
 | 
					### scwrypts runtime configuration (group 'dotwryn') ################
 | 
				
			||||||
#####################################################################
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# enlighten BACKLIGHT_DEVICE (see 'man enlighten')
 | 
				
			||||||
 | 
					export DESKTOP__BACKLIGHT_DEVICE=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# directory containing sound effects
 | 
					# directory containing sound effects
 | 
				
			||||||
export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local
 | 
					export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local
 | 
				
			||||||
export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local
 | 
					export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,9 @@
 | 
				
			|||||||
### scwrypts runtime configuration (group 'dotwryn') ################
 | 
					### scwrypts runtime configuration (group 'dotwryn') ################
 | 
				
			||||||
#####################################################################
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# enlighten BACKLIGHT_DEVICE (see 'man enlighten')
 | 
				
			||||||
 | 
					export DESKTOP__BACKLIGHT_DEVICE=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# directory containing sound effects
 | 
					# directory containing sound effects
 | 
				
			||||||
export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local
 | 
					export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local
 | 
				
			||||||
export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local
 | 
					export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,9 @@
 | 
				
			|||||||
### scwrypts runtime configuration (group 'dotwryn') ################
 | 
					### scwrypts runtime configuration (group 'dotwryn') ################
 | 
				
			||||||
#####################################################################
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# enlighten BACKLIGHT_DEVICE (see 'man enlighten')
 | 
				
			||||||
 | 
					export DESKTOP__BACKLIGHT_DEVICE=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# directory containing sound effects
 | 
					# directory containing sound effects
 | 
				
			||||||
export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local
 | 
					export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local
 | 
				
			||||||
export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local
 | 
					export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,9 @@
 | 
				
			|||||||
### scwrypts runtime configuration (group 'dotwryn') ################
 | 
					### scwrypts runtime configuration (group 'dotwryn') ################
 | 
				
			||||||
#####################################################################
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# enlighten BACKLIGHT_DEVICE (see 'man enlighten')
 | 
				
			||||||
 | 
					export DESKTOP__BACKLIGHT_DEVICE=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# directory containing sound effects
 | 
					# directory containing sound effects
 | 
				
			||||||
export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local
 | 
					export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local
 | 
				
			||||||
export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local
 | 
					export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								config/scwrypts/environments/dotwryn/local.pikachu
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								config/scwrypts/environments/dotwryn/local.pikachu
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					#!/bin/zsh
 | 
				
			||||||
 | 
					#####################################################################
 | 
				
			||||||
 | 
					### scwrypts runtime configuration (group 'dotwryn') ################
 | 
				
			||||||
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# enlighten BACKLIGHT_DEVICE (see 'man enlighten')
 | 
				
			||||||
 | 
					export DESKTOP__BACKLIGHT_DEVICE=amdgpu_bl1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# directory containing sound effects
 | 
				
			||||||
 | 
					export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local
 | 
				
			||||||
 | 
					export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# home server data
 | 
				
			||||||
 | 
					export WRYN__SERVER_HOSTNAMES=
 | 
				
			||||||
@@ -3,6 +3,9 @@
 | 
				
			|||||||
### scwrypts runtime configuration (group 'dotwryn') ################
 | 
					### scwrypts runtime configuration (group 'dotwryn') ################
 | 
				
			||||||
#####################################################################
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# enlighten BACKLIGHT_DEVICE (see 'man enlighten')
 | 
				
			||||||
 | 
					export DESKTOP__BACKLIGHT_DEVICE=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# directory containing sound effects
 | 
					# directory containing sound effects
 | 
				
			||||||
export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local
 | 
					export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local
 | 
				
			||||||
export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local
 | 
					export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										7
									
								
								config/scwrypts/environments/remote/local.pikachu
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								config/scwrypts/environments/remote/local.pikachu
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					#!/bin/zsh
 | 
				
			||||||
 | 
					#####################################################################
 | 
				
			||||||
 | 
					### scwrypts runtime configuration (group 'remote') #################
 | 
				
			||||||
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# session name for remote connection (default 'remote')
 | 
				
			||||||
 | 
					export REMOTE_TMUX_SESSION=
 | 
				
			||||||
							
								
								
									
										51
									
								
								config/scwrypts/environments/scwrypts/local.pikachu
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								config/scwrypts/environments/scwrypts/local.pikachu
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,51 @@
 | 
				
			|||||||
 | 
					#!/bin/zsh
 | 
				
			||||||
 | 
					#####################################################################
 | 
				
			||||||
 | 
					### scwrypts runtime configuration (group 'scwrypts') ###############
 | 
				
			||||||
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# standard AWS environment variables used by awscli and other tools
 | 
				
			||||||
 | 
					export AWS_ACCOUNT=088935110352 # from local
 | 
				
			||||||
 | 
					export AWS_PROFILE=yage # from local
 | 
				
			||||||
 | 
					export AWS_REGION=us-east-2 # from local
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# fully-qualified path to mount the EFS drive
 | 
				
			||||||
 | 
					export AWS__EFS__LOCAL_MOUNT_POINT=/mnt/efs/yage # from local
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# details for a directus instance
 | 
				
			||||||
 | 
					export DIRECTUS__API_TOKEN=
 | 
				
			||||||
 | 
					export DIRECTUS__BASE_URL=https://heretic.directus.app # from local
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# details for discord bot
 | 
				
			||||||
 | 
					export DISCORD__BOT_TOKEN=
 | 
				
			||||||
 | 
					export DISCORD__CONTENT_FOOTER=
 | 
				
			||||||
 | 
					export DISCORD__CONTENT_HEADER='<@380809228450922507> ' # from local
 | 
				
			||||||
 | 
					export DISCORD__DEFAULT_AVATAR_URL=
 | 
				
			||||||
 | 
					export DISCORD__DEFAULT_CHANNEL_ID=
 | 
				
			||||||
 | 
					export DISCORD__DEFAULT_USERNAME=
 | 
				
			||||||
 | 
					export DISCORD__DEFAULT_WEBHOOK=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# linear.app project management configuration
 | 
				
			||||||
 | 
					export LINEAR__API_TOKEN=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# s3 bucket name and filesystem targets for media backups
 | 
				
			||||||
 | 
					export MEDIA_SYNC__S3_BUCKET=yage # from local
 | 
				
			||||||
 | 
					export MEDIA_SYNC__TARGETS=(
 | 
				
			||||||
 | 
						Pictures
 | 
				
			||||||
 | 
						Documents
 | 
				
			||||||
 | 
						Media
 | 
				
			||||||
 | 
						.local/.porn
 | 
				
			||||||
 | 
						.local/share/dolphin-emu
 | 
				
			||||||
 | 
						Games/roms
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# redis connection credentials
 | 
				
			||||||
 | 
					export REDIS_AUTH=
 | 
				
			||||||
 | 
					export REDIS_HOST=
 | 
				
			||||||
 | 
					export REDIS_PORT=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# twilio account / credentials
 | 
				
			||||||
 | 
					export TWILIO__ACCOUNT_SID=ACac926b109b3cd8a78685a2a0994d0271 # from local
 | 
				
			||||||
 | 
					export TWILIO__API_KEY=
 | 
				
			||||||
 | 
					export TWILIO__API_SECRET=
 | 
				
			||||||
 | 
					export TWILIO__DEFAULT_PHONE_FROM=
 | 
				
			||||||
 | 
					export TWILIO__DEFAULT_PHONE_TO=
 | 
				
			||||||
@@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					ACTION=="add", RUN+="/home/w0ryn/.wryn/bin/pikachu/set-battery-max-charge"
 | 
				
			||||||
							
								
								
									
										1
									
								
								config/system/pikachu/udev/rules.d/91-backlight.rules
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								config/system/pikachu/udev/rules.d/91-backlight.rules
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					SUBSYSTEM=="backlight", ACTION=="add", RUN+="/usr/bin/env chgrp video %S%p/brightness", RUN+="/usr/bin/env chmod g+w %S%p/brightness"
 | 
				
			||||||
							
								
								
									
										40
									
								
								config/system/pikachu/xinit/10-optimus-manager.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								config/system/pikachu/xinit/10-optimus-manager.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
				
			|||||||
 | 
					Section "Files"
 | 
				
			||||||
 | 
						ModulePath "/usr/lib/nvidia"
 | 
				
			||||||
 | 
						ModulePath "/usr/lib32/nvidia"
 | 
				
			||||||
 | 
						ModulePath "/usr/lib32/nvidia/xorg/modules"
 | 
				
			||||||
 | 
						ModulePath "/usr/lib32/xorg/modules"
 | 
				
			||||||
 | 
						ModulePath "/usr/lib64/nvidia/xorg/modules"
 | 
				
			||||||
 | 
						ModulePath "/usr/lib64/nvidia/xorg"
 | 
				
			||||||
 | 
						ModulePath "/usr/lib64/xorg/modules"
 | 
				
			||||||
 | 
					EndSection
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Section "ServerLayout"
 | 
				
			||||||
 | 
						Identifier "layout"
 | 
				
			||||||
 | 
						Screen 0 "integrated"
 | 
				
			||||||
 | 
						Inactive "nvidia"
 | 
				
			||||||
 | 
						Option "AllowNVIDIAGPUScreens"
 | 
				
			||||||
 | 
					EndSection
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Section "Device"
 | 
				
			||||||
 | 
						Identifier "integrated"
 | 
				
			||||||
 | 
						Driver "modesetting"
 | 
				
			||||||
 | 
						BusID "PCI:101:0:0"
 | 
				
			||||||
 | 
						Option "DRI" "3"
 | 
				
			||||||
 | 
					EndSection
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Section "Screen"
 | 
				
			||||||
 | 
						Identifier "integrated"
 | 
				
			||||||
 | 
						Device "integrated"
 | 
				
			||||||
 | 
					EndSection
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Section "Device"
 | 
				
			||||||
 | 
						Identifier "nvidia"
 | 
				
			||||||
 | 
						Driver "nvidia"
 | 
				
			||||||
 | 
						BusID "PCI:100:0:0"
 | 
				
			||||||
 | 
						Option "Coolbits" "28"
 | 
				
			||||||
 | 
					EndSection
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Section "Screen"
 | 
				
			||||||
 | 
						Identifier "nvidia"
 | 
				
			||||||
 | 
						Device "nvidia"
 | 
				
			||||||
 | 
					EndSection
 | 
				
			||||||
@@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					Host *
 | 
				
			||||||
 | 
						IdentityAgent ~/.1password/agent.sock
 | 
				
			||||||
@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					PasswordAuthentication no
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Match Address 192.168.68.*
 | 
				
			||||||
 | 
						PasswordAuthentication yes
 | 
				
			||||||
 | 
					Match All
 | 
				
			||||||
@@ -28,7 +28,7 @@ set -g mouse off
 | 
				
			|||||||
set -g status-style fg=brightmagenta,bg=black
 | 
					set -g status-style fg=brightmagenta,bg=black
 | 
				
			||||||
set -g window-status-current-style fg=black,bg=brightmagenta
 | 
					set -g window-status-current-style fg=black,bg=brightmagenta
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set -g status-right "#(cat /sys/class/power_supply/BAT0/capacity)% | #[fg=magneta]%d %b %R | #(ip address 2>&1 | grep wlp0 | sed -n 's/^.*\\(192.[^/]*\\)\\/.*$/\\1/p') "
 | 
					set -g status-right "#(cat /sys/class/power_supply/BAT[01]/capacity | head -n1)% | #[fg=magneta]%d %b %R | #(ip address 2>&1 | grep wlp0 | sed -n 's/^.*\\(192.[^/]*\\)\\/.*$/\\1/p') "
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#####################################################################
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,4 @@
 | 
				
			|||||||
include "%L"
 | 
					include "%L"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<Multi_key> <n> <n> : "ñ"
 | 
					<Multi_key> <n> <n> : "ñ"
 | 
				
			||||||
 | 
					<Multi_key> <N> <N> : "Ñ"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,4 +21,10 @@ done
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
for XINITRC in $(find /etc/X11/xinit/xinitrc.d); do source "$XINITRC"; done
 | 
					for XINITRC in $(find /etc/X11/xinit/xinitrc.d); do source "$XINITRC"; done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[ -f "$HOME/.config/X11/xmodmap" ] \
 | 
				
			||||||
 | 
						&& xmodmap "$HOME/.config/X11/xmodmap"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[ -f "$HOME/.config/X11/xkeymap" ] \
 | 
				
			||||||
 | 
						&& xkbcomp "$HOME/.config/X11/xkeymap" ${DISPLAY}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
unset PREFERRED_TERMINAL PREFERRED_BROWSER XINITRC
 | 
					unset PREFERRED_TERMINAL PREFERRED_BROWSER XINITRC
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
#!/bin/zsh
 | 
					#!/bin/zsh
 | 
				
			||||||
 | 
					export DESKTOP__BACKLIGHT_DEVICE=
 | 
				
			||||||
export DESKTOP__SFX_PATH=
 | 
					export DESKTOP__SFX_PATH=
 | 
				
			||||||
export DESKTOP__WALLPAPER_PATH=
 | 
					export DESKTOP__WALLPAPER_PATH=
 | 
				
			||||||
export WRYN__SERVER_HOSTNAMES=
 | 
					export WRYN__SERVER_HOSTNAMES=
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,4 @@
 | 
				
			|||||||
 | 
					DESKTOP__BACKLIGHT_DEVICE | enlighten BACKLIGHT_DEVICE (see 'man enlighten')
 | 
				
			||||||
DESKTOP__SFX_PATH         | directory containing sound effects
 | 
					DESKTOP__SFX_PATH         | directory containing sound effects
 | 
				
			||||||
DESKTOP__DESKTOP_PATH     | directory containing desktop background images
 | 
					DESKTOP__DESKTOP_PATH     | directory containing desktop background images
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,16 @@
 | 
				
			|||||||
---
 | 
					---
 | 
				
			||||||
desktop:
 | 
					desktop:
 | 
				
			||||||
 | 
					  backlight-device:
 | 
				
			||||||
 | 
					    .DESCRIPTION: >-
 | 
				
			||||||
 | 
					      enlighten BACKLIGHT_DEVICE (see 'man enlighten')
 | 
				
			||||||
 | 
					    .ENVIRONMENT: DESKTOP__BACKLIGHT_DEVICE
 | 
				
			||||||
 | 
					  sfx-path:
 | 
				
			||||||
    .DESCRIPTION: >-
 | 
					    .DESCRIPTION: >-
 | 
				
			||||||
      directory containing sound effects
 | 
					      directory containing sound effects
 | 
				
			||||||
  sfx-path:
 | 
					 | 
				
			||||||
    .ENVIRONMENT: DESKTOP__SFX_PATH
 | 
					    .ENVIRONMENT: DESKTOP__SFX_PATH
 | 
				
			||||||
  wallpaper-path:
 | 
					  wallpaper-path:
 | 
				
			||||||
 | 
					    .DESCRIPTION: >-
 | 
				
			||||||
 | 
					      directory containing wallpaper images
 | 
				
			||||||
    .ENVIRONMENT: DESKTOP__WALLPAPER_PATH
 | 
					    .ENVIRONMENT: DESKTOP__WALLPAPER_PATH
 | 
				
			||||||
wryn:
 | 
					wryn:
 | 
				
			||||||
  .DESCRIPTION: >-
 | 
					  .DESCRIPTION: >-
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,8 @@
 | 
				
			|||||||
#!/bin/zsh
 | 
					#!/bin/zsh
 | 
				
			||||||
use desktop/notify --group dotwryn
 | 
					use desktop/notify --group dotwryn
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					__CHECK_ENV_VAR DESKTOP__BACKLIGHT_DEVICE --optional
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#####################################################################
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MAIN() {
 | 
					MAIN() {
 | 
				
			||||||
@@ -11,10 +14,10 @@ MAIN() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	[[ $UTIL =~ ^enlighten$ ]] && {
 | 
						[[ $UTIL =~ ^enlighten$ ]] && {
 | 
				
			||||||
		CURRENT_PERCENT=$(enlighten | sed 's/.*(//;s/%.*//')
 | 
							CURRENT_PERCENT=$(enlighten | sed 's/.*(//;s/%.*//')
 | 
				
			||||||
		[[ $CURRENT_PERCENT -gt 60 ]] && DELTA=20
 | 
							[[ $CURRENT_PERCENT -gt 60 ]] && DELTA=40
 | 
				
			||||||
		[[ $CURRENT_PERCENT -le 60 ]] && DELTA=10
 | 
							[[ $CURRENT_PERCENT -le 60 ]] && DELTA=20
 | 
				
			||||||
		[[ $CURRENT_PERCENT -le 40 ]] && DELTA=5
 | 
							[[ $CURRENT_PERCENT -le 40 ]] && DELTA=10
 | 
				
			||||||
		[[ $CURRENT_PERCENT -le 10 ]] && DELTA=1
 | 
							[[ $CURRENT_PERCENT -le 10 ]] && DELTA=5
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	case $1 in
 | 
						case $1 in
 | 
				
			||||||
@@ -25,7 +28,7 @@ MAIN() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
				enlighten )
 | 
									enlighten )
 | 
				
			||||||
					[[ $CURRENT_PERCENT -ge 99 ]] && NOTIFY_SEND 'at maximum brightness' && exit 0
 | 
										[[ $CURRENT_PERCENT -ge 99 ]] && NOTIFY_SEND 'at maximum brightness' && exit 0
 | 
				
			||||||
					enlighten +${DELTA}%
 | 
										BACKLIGHT_DEVICE=$DESKTOP__BACKLIGHT_DEVICE enlighten +${DELTA}%
 | 
				
			||||||
					;;
 | 
										;;
 | 
				
			||||||
			esac
 | 
								esac
 | 
				
			||||||
			;;
 | 
								;;
 | 
				
			||||||
@@ -43,7 +46,7 @@ MAIN() {
 | 
				
			|||||||
				enlighten )
 | 
									enlighten )
 | 
				
			||||||
					[[ $CURRENT_PERCENT -le 1 ]] && NOTIFY_SEND 'at minimum brightness' && exit 0
 | 
										[[ $CURRENT_PERCENT -le 1 ]] && NOTIFY_SEND 'at minimum brightness' && exit 0
 | 
				
			||||||
					[[ $CURRENT_PERCENT -le 2 ]] && ARGS='=1%' || ARGS="-${DELTA}%"
 | 
										[[ $CURRENT_PERCENT -le 2 ]] && ARGS='=1%' || ARGS="-${DELTA}%"
 | 
				
			||||||
					enlighten "$ARGS"
 | 
										BACKLIGHT_DEVICE=$DESKTOP__BACKLIGHT_DEVICE enlighten "$ARGS"
 | 
				
			||||||
					;;
 | 
										;;
 | 
				
			||||||
			esac
 | 
								esac
 | 
				
			||||||
			;;
 | 
								;;
 | 
				
			||||||
@@ -52,22 +55,22 @@ MAIN() {
 | 
				
			|||||||
			case $UTIL in
 | 
								case $UTIL in
 | 
				
			||||||
				xbacklight     ) xbacklight -set $2 ;;
 | 
									xbacklight     ) xbacklight -set $2 ;;
 | 
				
			||||||
				gmux_backlight ) gmux_backlight $2  ;;
 | 
									gmux_backlight ) gmux_backlight $2  ;;
 | 
				
			||||||
				enlighten      ) enlighten "=$2"    ;;
 | 
									enlighten      ) BACKLIGHT_DEVICE=$DESKTOP__BACKLIGHT_DEVICE enlighten "=$2"    ;;
 | 
				
			||||||
			esac
 | 
								esac
 | 
				
			||||||
			;;
 | 
								;;
 | 
				
			||||||
		min | minimum )
 | 
							min | minimum )
 | 
				
			||||||
			case $UTIL in
 | 
								case $UTIL in
 | 
				
			||||||
				enlighten ) enlighten '=1%' ;;
 | 
									enlighten ) BACKLIGHT_DEVICE=$DESKTOP__BACKLIGHT_DEVICE enlighten '=1%' ;;
 | 
				
			||||||
			esac
 | 
								esac
 | 
				
			||||||
			;;
 | 
								;;
 | 
				
			||||||
		max | maximum )
 | 
							max | maximum )
 | 
				
			||||||
			case $UTIL in
 | 
								case $UTIL in
 | 
				
			||||||
				enlighten ) enlighten '=100%' ;;
 | 
									enlighten ) BACKLIGHT_DEVICE=$DESKTOP__BACKLIGHT_DEVICE enlighten '=100%' ;;
 | 
				
			||||||
			esac
 | 
								esac
 | 
				
			||||||
			;;
 | 
								;;
 | 
				
			||||||
		query | '' )
 | 
							query | '' )
 | 
				
			||||||
			case $UTIL in
 | 
								case $UTIL in
 | 
				
			||||||
				enlighten ) NOTIFY_SUCCESS "current brightness : $(enlighten)" ;;
 | 
									enlighten ) NOTIFY_SUCCESS "current brightness : $(BACKLIGHT_DEVICE=$DESKTOP__BACKLIGHT_DEVICE enlighten)" ;;
 | 
				
			||||||
			esac
 | 
								esac
 | 
				
			||||||
			;;
 | 
								;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,6 +12,18 @@ primary        = #$(_GET_HEX .polybar.primary    .material.base.primary   .ansi.
 | 
				
			|||||||
secondary      = #$(_GET_HEX .polybar.secondary  .material.base.secondary .ansi.blue.regular)
 | 
					secondary      = #$(_GET_HEX .polybar.secondary  .material.base.secondary .ansi.blue.regular)
 | 
				
			||||||
alert          = #$(_GET_HEX .polybar.alert      .material.base.error     .ansi.red.regular)
 | 
					alert          = #$(_GET_HEX .polybar.alert      .material.base.error     .ansi.red.regular)
 | 
				
			||||||
disabled       = #$(_GET_HEX .polybar.disabled   .ansi.gray.regular)
 | 
					disabled       = #$(_GET_HEX .polybar.disabled   .ansi.gray.regular)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					primary-gradient-0   = #$(_GET_HEX .polybar.primary-gradient-0     .material.primary.700   .ansi.green.regular)
 | 
				
			||||||
 | 
					primary-gradient-1   = #$(_GET_HEX .polybar.primary-gradient-1     .material.primary.600   .ansi.green.regular)
 | 
				
			||||||
 | 
					primary-gradient-2   = #$(_GET_HEX .polybar.primary-gradient-2     .material.primary.500   .ansi.green.regular)
 | 
				
			||||||
 | 
					primary-gradient-3   = #$(_GET_HEX .polybar.primary-gradient-3     .material.primary.400   .ansi.green.regular)
 | 
				
			||||||
 | 
					primary-gradient-4   = #$(_GET_HEX .polybar.primary-gradient-4     .material.primary.300   .ansi.green.regular)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					secondary-gradient-0 = #$(_GET_HEX .polybar.secondary-gradient-0   .material.secondary.700 .ansi.blue.regular )
 | 
				
			||||||
 | 
					secondary-gradient-1 = #$(_GET_HEX .polybar.secondary-gradient-1   .material.secondary.600 .ansi.blue.regular )
 | 
				
			||||||
 | 
					secondary-gradient-2 = #$(_GET_HEX .polybar.secondary-gradient-2   .material.secondary.500 .ansi.blue.regular )
 | 
				
			||||||
 | 
					secondary-gradient-3 = #$(_GET_HEX .polybar.secondary-gradient-3   .material.secondary.400 .ansi.blue.regular )
 | 
				
			||||||
 | 
					secondary-gradient-4 = #$(_GET_HEX .polybar.secondary-gradient-4   .material.secondary.300 .ansi.blue.regular )
 | 
				
			||||||
" | sed '$d' > "$_COLORSCHEME_FILE__polybar"
 | 
					" | sed '$d' > "$_COLORSCHEME_FILE__polybar"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										54
									
								
								scwrypts/dotwryn/lib/system/config.module.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								scwrypts/dotwryn/lib/system/config.module.zsh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,54 @@
 | 
				
			|||||||
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DEPENDENCIES+=(hostnamectl)
 | 
				
			||||||
 | 
					REQUIRED_ENV+=(DOTWRYN)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${SCWRYPTS_MODULE}setup() {
 | 
				
			||||||
 | 
						STATUS "configuring system applications"
 | 
				
			||||||
 | 
						local \
 | 
				
			||||||
 | 
							APPLICATION \
 | 
				
			||||||
 | 
							CONFIG \
 | 
				
			||||||
 | 
							SOURCE_DIR SOURCE_CONFIG \
 | 
				
			||||||
 | 
							SYSTEM_DIR SYSTEM_CONFIG \
 | 
				
			||||||
 | 
							;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for SOURCE_DIR in $({
 | 
				
			||||||
 | 
								find "${DOTWRYN}/config/system/"                         -mindepth 1 -maxdepth 1 -type d
 | 
				
			||||||
 | 
								find "${DOTWRYN}/config/system/$(hostnamectl --static)/" -mindepth 1 -maxdepth 1 -type d
 | 
				
			||||||
 | 
							} 2>/dev/null | sort -u)
 | 
				
			||||||
 | 
						do
 | 
				
			||||||
 | 
							APPLICATION="$(echo "${SOURCE_DIR}" | sed 's|.*/||')"
 | 
				
			||||||
 | 
							case ${APPLICATION} in
 | 
				
			||||||
 | 
								( ssh | udev )
 | 
				
			||||||
 | 
									SYSTEM_DIR=/etc/${APPLICATION}
 | 
				
			||||||
 | 
									;;
 | 
				
			||||||
 | 
								( xinit )
 | 
				
			||||||
 | 
									SYSTEM_DIR=/etc/X11/xinit/xinitrc.d/
 | 
				
			||||||
 | 
									;;
 | 
				
			||||||
 | 
								( * )
 | 
				
			||||||
 | 
									SYSTEM_DIR=''
 | 
				
			||||||
 | 
									;;
 | 
				
			||||||
 | 
							esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							[ "${SYSTEM_DIR}" ] && sudo [ -d "${SYSTEM_DIR}" ] \
 | 
				
			||||||
 | 
								|| continue
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for CONFIG in $(cd -- "${SOURCE_DIR}"; find . -mindepth 1 -type f | sed 's|^\./||')
 | 
				
			||||||
 | 
							do
 | 
				
			||||||
 | 
								SOURCE_CONFIG="${SOURCE_DIR}/${CONFIG}"
 | 
				
			||||||
 | 
								SYSTEM_CONFIG="${SYSTEM_DIR}/${CONFIG}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								sudo [ -f "${SYSTEM_CONFIG}" ] && {
 | 
				
			||||||
 | 
									STATUS "already linked '${APPLICATION}/${CONFIG}'"
 | 
				
			||||||
 | 
									continue
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								sudo ln -s "${SOURCE_CONFIG}" "${SYSTEM_CONFIG}" \
 | 
				
			||||||
 | 
									&& STATUS "linked '${APPLICATION}/${CONFIG}'" \
 | 
				
			||||||
 | 
									|| WARNING "cannot link '${APPLICATION}/${CONFIG}'" \
 | 
				
			||||||
 | 
									;
 | 
				
			||||||
 | 
							done
 | 
				
			||||||
 | 
						done
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										7
									
								
								scwrypts/dotwryn/lib/system/system.module.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								scwrypts/dotwryn/lib/system/system.module.zsh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					#
 | 
				
			||||||
 | 
					# provides system setup utilities
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SCWRYPTS_MODULE=dotwryn.system.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use system/config --group dotwryn
 | 
				
			||||||
							
								
								
									
										17
									
								
								scwrypts/dotwryn/system/setup
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										17
									
								
								scwrypts/dotwryn/system/setup
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,17 @@
 | 
				
			|||||||
 | 
					#!/bin/zsh
 | 
				
			||||||
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use system --group dotwryn
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					USAGE__description='
 | 
				
			||||||
 | 
						sets up links to things like /etc/*.d/ configurations
 | 
				
			||||||
 | 
						or systemd services; requires root access
 | 
				
			||||||
 | 
					'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#####################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					MAIN() {
 | 
				
			||||||
 | 
						dotwryn.system.setup
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -65,7 +65,10 @@ MAIN() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			* ) ERROR "unknown argument '$1'" ;;
 | 
								* ) ERROR "unknown argument '$1'" ;;
 | 
				
			||||||
		esac
 | 
							esac
 | 
				
			||||||
		shift $_S
 | 
							[[ $_S -le $# ]] \
 | 
				
			||||||
 | 
								&& shift $_S \
 | 
				
			||||||
 | 
								|| ERROR "missing argument for '$1'" \
 | 
				
			||||||
 | 
								|| shift $#
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	CHECK_ERRORS
 | 
						CHECK_ERRORS
 | 
				
			||||||
@@ -149,7 +152,9 @@ MAIN() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	[ $BASTION_HOST ] && {
 | 
						[ $BASTION_HOST ] && {
 | 
				
			||||||
		PASSTHROUGH_COMMAND="$(GET_PASSTHROUGH_PREFIX) connect $REMOTE_NAME -- -c $(printf "%q " "$REMOTE_COMMAND")"
 | 
							DEBUG "REMOTE_COMMAND : $REMOTE_COMMAND"
 | 
				
			||||||
 | 
							PASSTHROUGH_COMMAND="$(GET_PASSTHROUGH_PREFIX) connect $REMOTE_NAME --"
 | 
				
			||||||
 | 
							[ "$REMOTE_COMMAND" ] && PASSTHROUGH_COMMAND+=" -c $(printf "%q " "$REMOTE_COMMAND")"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		BASTION_TARGET=$REMOTE_NAME REMOTE__TARGET=$BASTION_HOST MAIN --command "$PASSTHROUGH_COMMAND"
 | 
							BASTION_TARGET=$REMOTE_NAME REMOTE__TARGET=$BASTION_HOST MAIN --command "$PASSTHROUGH_COMMAND"
 | 
				
			||||||
		return $?
 | 
							return $?
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,3 @@
 | 
				
			|||||||
GET_PASSTHROUGH_PREFIX() {
 | 
					GET_PASSTHROUGH_PREFIX() {
 | 
				
			||||||
	echo "SUBSCWRYPT=$((SUBSCWRYPT+1)) SCWRYPTS_LOG_LEVEL=$SCWRYPTS_LOG_LEVEL scwrypts"
 | 
						echo "source ~/.zshrc &>/dev/null; SUBSCWRYPT=$((SUBSCWRYPT+1)) SCWRYPTS_LOG_LEVEL=$SCWRYPTS_LOG_LEVEL scwrypts"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -60,7 +60,10 @@ MAIN() {
 | 
				
			|||||||
				;;
 | 
									;;
 | 
				
			||||||
			* ) ERROR "unrecognized argument '$1'" ;;
 | 
								* ) ERROR "unrecognized argument '$1'" ;;
 | 
				
			||||||
		esac
 | 
							esac
 | 
				
			||||||
		shift $_S
 | 
							[[ $_S -le $# ]] \
 | 
				
			||||||
 | 
								&& shift $_S \
 | 
				
			||||||
 | 
								|| ERROR "missing argument for '$1'" \
 | 
				
			||||||
 | 
								|| shift $#
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	[ $CONNECTION_STRING ] \
 | 
						[ $CONNECTION_STRING ] \
 | 
				
			||||||
@@ -108,7 +111,7 @@ MAIN() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			CONNECTION_TEST() {
 | 
								CONNECTION_TEST() {
 | 
				
			||||||
				[ $REMOTE_NAME ] && {
 | 
									[ $REMOTE_NAME ] && {
 | 
				
			||||||
					[[ $(REMOTE__QUERY_CONNECTION .sessions.$REMOTE_NAME) =~ false ]] && {
 | 
										[[ $(REMOTE__QUERY_CONNECTION .sessions.$REMOTE_NAME.enabled) =~ false ]] && {
 | 
				
			||||||
						return 1
 | 
											return 1
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
#!/bin/zsh
 | 
					#!/usr/bin/env zsh
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# works as a standalone zsh script
 | 
					# works as a standalone zsh script
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,7 +9,7 @@ set-window-option -g  status-keys vi
 | 
				
			|||||||
setw              -gq utf8 on
 | 
					setw              -gq utf8 on
 | 
				
			||||||
set               -g  status-style fg=brightmagenta,bg=black
 | 
					set               -g  status-style fg=brightmagenta,bg=black
 | 
				
			||||||
set               -g  window-status-current-style fg=black,bg=brightmagenta
 | 
					set               -g  window-status-current-style fg=black,bg=brightmagenta
 | 
				
			||||||
set               -g  status-right "omni host : #(hostnamectl --static) | #(cat /sys/class/power_supply/BAT0/capacity)% "
 | 
					set               -g  status-right "omni host : #(hostnamectl --static) | #(cat /sys/class/power_supply/BAT[01]/capacity | head -n1)% "
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# navigate between hosts with ALT+window-number
 | 
					# navigate between hosts with ALT+window-number
 | 
				
			||||||
set -g base-index 1
 | 
					set -g base-index 1
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user