Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2018-08-07 22:31:39 +03:00
parent 22eac4d45f
commit 7e99d071c0
17 changed files with 33 additions and 30 deletions

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env watchman
service_command='/bin/compton'
service_args=( --vsync opengl -f -D 3 -e 1.0 )

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env watchman
#service_respawn='true'
service_command='/usr/bin/dunst'

View File

@@ -0,0 +1,4 @@
#!/bin/env watchman
service_command='/usr/bin/jackd'
service_args=( -d alsa )

View File

@@ -0,0 +1,33 @@
#!/usr/bin/env ssm
# vim: ft=sh
service_respawn='true'
service_command="$HOME/bin/lockd"
service_args=( i3lock-extra -s -o ~/pics/lock.png -g -p )
function do_notify {
declare output; var output
output = "$( "$@" )"
if output; then
notify-send "ssm ($service_name)" "$output"
fi
}
function start_or_lock {
if status; then
notify-send 'ssm' "Starting $service_name"
start
else
notify-send 'ssm' "Locking..."
kill -USR1 "$service_pid"
fi
}
function toggle {
if status; then
do_notify "$0" "$service_name" stop
else
do_notify "$0" "$service_name" start
fi
}

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env watchman
#service_respawn='true'
service_command='/home/fbt/bin/moltenbar'
service_depends_ready=( compton )
post_start() {
# Die if the thing didn't start
timer 5 nullexec xdo id -a moltenbar || return 1
# Set the layer on which lemonbar resides
xdo above -t $( xdo id -n root ) $( xdo id -a moltenbar )
# Set the top badding for bspwm
bspc config top_padding $(( 14 + 9 )) &>/tmp/debug.log
}
pre_stop() {
bspc config top_padding 0
}

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env watchman
#service_respawn='true'
service_command="$HOME/bin/mpc-notify"

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env ssm
service_tmpfiles=( "/run/user/$UID/mpd:dir" )
# service_respawn=false
service_command='/usr/bin/mpd'
service_args=( --no-daemon -v )
post_start() { ready; }

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env watchman
privoxy_configfile="$HOME/.config/privoxy/config"
service_respawn='true'
service_command='/usr/bin/privoxy'
service_args=( --no-daemon "$privoxy_configfile" )
privoxy::configtest() {
"$service_command" --config-test "${service_args[@]}"
}
restart() {
privoxy::configtest || {
watchman.err "Config test failed, not restarting!"
return 1
}
stop
start
}

View File

@@ -0,0 +1,14 @@
#!/bin/env watchman
service_depends=( jackd )
service_command='/usr/bin/pulseaudio'
service_args=(
--realtime=false
--exit-idle-time=-1
-L module-jack-sink
-L module-jack-source
-L module-native-protocol-tcp
)
stop () { "$service_command" -k; }

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env ssm
service_respawn='true'
service_command='/usr/bin/crond'
service_args=( -n -f ~/.config/crontab )

View File

@@ -0,0 +1,13 @@
#!/usr/bin/bash
[[ $PROXY_USER ]] || PROXY_USER='proxy'
[[ $PROXY_HOST ]] || PROXY_HOST='malganis.priv'
service_respawn=true
service_command=( /usr/bin/ssh -i ~/.ssh/proxy/id_ecdsa -ND 8080 "$PROXY_USER@$PROXY_HOST" )
function info {
printf 'Name: %s\n' "$service_name"
printf 'Command: %s\n' "${service_command[*]}"
(( service_respawn )) && printf 'Respawn: yes\n'
}

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env watchman
service_command='/usr/bin/ssh-agent'
service_args=( -d -a "/tmp/${USER}-ssh-auth.sock" )

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env watchman
service_respawn='true'
service_command='/usr/bin/sxhkd'
service_reload_signal='USR1'

View File

@@ -0,0 +1,4 @@
#!/bin/env watchman
#service_respawn='true'
service_command='/usr/bin/syncthing'

View File

@@ -0,0 +1,4 @@
#!/bin/env watchman
service_command='/usr/bin/transmission-daemon'
service_args=( -f )

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env watchman
#service_respawn='true'
service_command='/usr/bin/ufwd'
service_args=( -n -c -- -p )