chore: up
This commit is contained in:
		
							parent
							
								
									f893a5d054
								
							
						
					
					
						commit
						a378bda131
					
				
					 25 changed files with 299 additions and 720 deletions
				
			
		| 
						 | 
				
			
			@ -3,16 +3,16 @@
 | 
			
		|||
#
 | 
			
		||||
# Load sinks
 | 
			
		||||
#
 | 
			
		||||
pactl load-module module-null-sink  sink_name=output        sink_properties=device.description="Output"
 | 
			
		||||
pactl load-module module-null-sink  sink_name=applications  sink_properties=device.description="Applications"
 | 
			
		||||
pactl load-module module-null-sink formats=pcm,float32le  sink_name=output        sink_properties=device.description="Output"
 | 
			
		||||
pactl load-module module-null-sink formats=pcm,float32le sink_name=applications  sink_properties=device.description="Applications"
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Loopback audio to the correct places
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Application audio forwarded to microphone
 | 
			
		||||
pactl load-module module-loopback   latency_msec=25 source=applications.monitor sink=output
 | 
			
		||||
pactl load-module module-loopback latency_msec=25 source=applications.monitor sink=output
 | 
			
		||||
# Microphone
 | 
			
		||||
pactl load-module module-loopback   latency_msec=25 source=rnnoise_source sink=output
 | 
			
		||||
pactl load-module module-loopback latency_msec=25   source=rnnoise_source sink=output
 | 
			
		||||
# Application audio forwarded to me
 | 
			
		||||
pactl load-module module-loopback   latency_msec=25 source=applications.monitor sink=alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.pro-output-0
 | 
			
		||||
pactl load-module module-loopback latency_msec=25  source=applications.monitor sink=alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.pro-output-0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1 +0,0 @@
 | 
			
		|||
fish -c '~/.local/share/emacs/src/emacs'
 | 
			
		||||
| 
						 | 
				
			
			@ -1 +0,0 @@
 | 
			
		|||
fish -c "lvim $@"
 | 
			
		||||
| 
						 | 
				
			
			@ -1 +0,0 @@
 | 
			
		|||
fish -c 'lvim'
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -1,43 +0,0 @@
 | 
			
		|||
#!/var/home/wizardlink/.nimble/bin/nim r
 | 
			
		||||
 | 
			
		||||
from std/os import fileExists
 | 
			
		||||
from std/osproc import execProcess
 | 
			
		||||
import std/times
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  TimeTrack = tuple
 | 
			
		||||
    pcBreak: Duration
 | 
			
		||||
    pcBreakCycle: Duration
 | 
			
		||||
    eyeBreak: Duration
 | 
			
		||||
    eyeBreakCycle: Duration
 | 
			
		||||
  NextAlerts = tuple
 | 
			
		||||
    pcBreakCycle: Time
 | 
			
		||||
    eyeBreakCycle: Time
 | 
			
		||||
 | 
			
		||||
let
 | 
			
		||||
  trackingDefaults: TimeTrack = (
 | 
			
		||||
    pcBreak:       initDuration(minutes = 10),
 | 
			
		||||
    pcBreakCycle:  initDuration(hours = 2),
 | 
			
		||||
    eyeBreak:      initDuration(seconds = 20),
 | 
			
		||||
    eyeBreakCycle: initDuration(minutes = 20),
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
  nextAlerts: NextAlerts = (
 | 
			
		||||
    pcBreakCycle:  getTime() + trackingDefaults.pcBreakCycle,
 | 
			
		||||
    eyeBreakCycle: getTime() + trackingDefaults.eyeBreakCycle,
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
while true:
 | 
			
		||||
  let currentTime = getTime()
 | 
			
		||||
  if fileExists("/var/home/wizardlink/.local/share/scripts/.stop"):
 | 
			
		||||
    break
 | 
			
		||||
 | 
			
		||||
  if nextAlerts.pcBreakCycle <= currentTime:
 | 
			
		||||
    nextAlerts.pcBreakCycle += trackingDefaults.pcBreakCycle
 | 
			
		||||
    nextAlerts.eyeBreakCycle += trackingDefaults.eyeBreakCycle # Clashes since it happens every 20 minutes
 | 
			
		||||
    discard execProcess "pw-play /var/mnt/internal/personal/memes/tetris-pJF_LwW-EWo.mp3"
 | 
			
		||||
 | 
			
		||||
  elif nextAlerts.eyeBreakCycle <= currentTime:
 | 
			
		||||
    nextAlerts.eyeBreakCycle += trackingDefaults.eyeBreakCycle
 | 
			
		||||
    discard execProcess "pw-play /var/mnt/internal/personal/memes/noooooo-eoNtgM4KGzc.mp3"
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue