dtfscript: Move to dedicated folder
This commit is contained in:
19
.dtfscripts/services/bspwm_sxhkd.dtf
Executable file
19
.dtfscripts/services/bspwm_sxhkd.dtf
Executable file
@@ -0,0 +1,19 @@
|
||||
#! /usr/bin/env bash
|
||||
#
|
||||
# Simple wmstartup service
|
||||
# Copyright (C) 2018 salt <salt@lap-th-e560-0>
|
||||
#
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
service_name="sxhkd"
|
||||
service_process="sxhkd"
|
||||
|
||||
function prestart-extra() {
|
||||
if ! pgrep bspwm > /dev/null 2>&1; then
|
||||
svc_log "Not under bspwm" 2
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
19
.dtfscripts/services/compton.dtf
Executable file
19
.dtfscripts/services/compton.dtf
Executable file
@@ -0,0 +1,19 @@
|
||||
#! /usr/bin/env bash
|
||||
#
|
||||
# Simple wmstartup service
|
||||
# Copyright (C) 2018 salt <salt@lap-th-e560-0>
|
||||
#
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
service_name="Compton"
|
||||
service_process="compton"
|
||||
|
||||
function prestart-extra() {
|
||||
if [[ "$HOST" == "vm-*" ]]; then
|
||||
svc_log "Will not start: in a VM" 2
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
31
.dtfscripts/services/conky.dtf
Executable file
31
.dtfscripts/services/conky.dtf
Executable file
@@ -0,0 +1,31 @@
|
||||
#! /usr/bin/env bash
|
||||
#
|
||||
# Simple wmstartup service
|
||||
# Copyright (C) 2018 salt <salt@lap-th-e560-0>
|
||||
#
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
service_name="Conky"
|
||||
service_process="conky"
|
||||
|
||||
function start() {
|
||||
for file in $XDG_CONFIG_HOME/conky/*.conf; do
|
||||
svc_log "Starting with config $file"
|
||||
conky -c $file > /dev/null 2>&1 &
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
function start-extra() {
|
||||
for i in {1..100}; do
|
||||
if xprop -name "Conky" > /dev/null 2>&1; then break; fi
|
||||
sleep 0.01
|
||||
if (( $i > 99 )); then
|
||||
svc_log "Conky may spawn behind the current desktop" 2
|
||||
break
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
12
.dtfscripts/services/dropbox.dtf
Executable file
12
.dtfscripts/services/dropbox.dtf
Executable file
@@ -0,0 +1,12 @@
|
||||
#! /usr/bin/env bash
|
||||
#
|
||||
# Simple wmstartup service
|
||||
# Copyright (C) 2018 salt <salt@lap-th-e560-0>
|
||||
#
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
service_name="Dropbox"
|
||||
service_process="dropbox"
|
||||
service_kill_on_reload="false"
|
||||
|
11
.dtfscripts/services/dunst.dtf
Executable file
11
.dtfscripts/services/dunst.dtf
Executable file
@@ -0,0 +1,11 @@
|
||||
#! /usr/bin/env bash
|
||||
#
|
||||
# Simple wmstartup service
|
||||
# Copyright (C) 2018 salt <salt@lap-th-e560-0>
|
||||
#
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
service_name="Dunst"
|
||||
service_process="dunst"
|
||||
|
11
.dtfscripts/services/plasmashell.dtf
Executable file
11
.dtfscripts/services/plasmashell.dtf
Executable file
@@ -0,0 +1,11 @@
|
||||
#! /usr/bin/env bash
|
||||
#
|
||||
# Simple wmstartup service
|
||||
# Copyright (C) 2018 salt <salt@lap-th-e560-0>
|
||||
#
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
service_name="Plasma"
|
||||
service_process="plasmashell"
|
||||
|
39
.dtfscripts/services/polybar.dtf
Executable file
39
.dtfscripts/services/polybar.dtf
Executable file
@@ -0,0 +1,39 @@
|
||||
#! /usr/bin/env bash
|
||||
#
|
||||
# Simple wmstartup service
|
||||
# Copyright (C) 2018 salt <salt@lap-th-e560-0>
|
||||
#
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
service_name="Polybar"
|
||||
service_process="polybar"
|
||||
|
||||
function start() {
|
||||
# Set some variables, if necessary
|
||||
if [[ "$PB_BAR_BORDER_SIZE" == "" ]] && pgrep bspwm > /dev/null 2>&1; then
|
||||
if ! [[ "$BSPWM_WINDOW_GAP" == "" ]]; then
|
||||
svc_log "Inferring bar size from BSPWM_WINDOW_GAP"
|
||||
export PB_BAR_BORDER_SIZE="$BSPWM_WINDOW_GAP"
|
||||
fi
|
||||
fi
|
||||
# Spawn bars on the primary monitor
|
||||
export PB_MONITOR=$(xrandr -q | awk '/primary/{print $1}')
|
||||
svc_log "Starting primary bar(s) on monitor $PB_MONITOR"
|
||||
polybar -r primary >/dev/null 2>/dev/null &
|
||||
polybar -r primary-2 >/dev/null 2>/dev/null &
|
||||
|
||||
# Spawn more for each secondary
|
||||
export secondary_monitors=$(xrandr -q | grep ' connected' | grep -v 'primary' | awk '{print $1}')
|
||||
if [[ "$secondary_monitors" == "" ]]; then
|
||||
return 0
|
||||
fi
|
||||
for monitor in $secondary_monitors; do
|
||||
svc_log "Starting secondary bar(s) on monitor $monitor"
|
||||
PB_MONITOR=$monitor
|
||||
polybar -r secondary >/dev/null 2>/dev/null &
|
||||
polybar -r secondary-2 >/dev/null 2>/dev/null &
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
12
.dtfscripts/services/redshift.dtf
Executable file
12
.dtfscripts/services/redshift.dtf
Executable file
@@ -0,0 +1,12 @@
|
||||
#! /usr/bin/env bash
|
||||
#
|
||||
# Simple wmstartup service
|
||||
# Copyright (C) 2018 salt <salt@lap-th-e560-0>
|
||||
#
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
service_name="Redshift"
|
||||
service_process="redshift"
|
||||
service_kill_on_reload="false"
|
||||
|
13
.dtfscripts/services/syncthing.dtf
Executable file
13
.dtfscripts/services/syncthing.dtf
Executable file
@@ -0,0 +1,13 @@
|
||||
#! /usr/bin/env bash
|
||||
#
|
||||
# Simple wmstartup service
|
||||
# Copyright (C) 2018 salt <salt@lap-th-e560-0>
|
||||
#
|
||||
# Distributed under terms of the MIT license.
|
||||
#
|
||||
|
||||
service_name="Syncthing"
|
||||
service_process="syncthing"
|
||||
service_kill_on_reload="false"
|
||||
service_flags="--no-browser"
|
||||
|
Reference in New Issue
Block a user