.dsk: Migrate to DSK (hopefully)

This commit is contained in:
Salt 2018-11-13 21:24:07 -06:00
parent 2635dd4e4c
commit e4d359c088
19 changed files with 94 additions and 37 deletions

21
.config/dsk/dskrc Normal file
View File

@ -0,0 +1,21 @@
#! /usr/bin/env bash
#
# dskrc
# Dotfile Session Kit configuration RC
#
# This file is sourced before DSK does anything else
# Put your basic configuration in here
#
export XDG_CURRENT_DESKTOP="kde"
export TERMINAL="konsole"
case "$HOSTNAME" in
dsk-cstm-0)
export PB_MODULE_ETH_INTERFACE=eno1
export PB_MODULE_WLAN_INTERFACE=wlp5s0
;;
*)
;;
esac

2
.config/dsk/run/compton Executable file
View File

@ -0,0 +1,2 @@
[[ "$HOST" == "vm-*" ]] && exit 0
compton

1
.config/dsk/run/conky Executable file
View File

@ -0,0 +1 @@
conky

1
.config/dsk/run/dropbox Executable file
View File

@ -0,0 +1 @@
dropbox start

1
.config/dsk/run/dunst Executable file
View File

@ -0,0 +1 @@
dunst

1
.config/dsk/run/i3wm Executable file
View File

@ -0,0 +1 @@
i3

2
.config/dsk/run/kded5 Executable file
View File

@ -0,0 +1,2 @@
kded5
kcminit

1
.config/dsk/run/kdeinit5 Executable file
View File

@ -0,0 +1 @@
kdeinit5

2
.config/dsk/run/nitrogen Executable file
View File

@ -0,0 +1,2 @@
which nitrogen > /dev/null 2>&1 || exit 0
nitrogen --restore

1
.config/dsk/run/polkit-kde Executable file
View File

@ -0,0 +1 @@
usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1

31
.config/dsk/run/polybar Executable file
View File

@ -0,0 +1,31 @@
# Make sure we have our xrdb stuff going
if $(which xrdbupdate) > /dev/null 2>&1; then
xrdbupdate > /dev/null 2>&1
fi
# Set some variables, if necessary
if [[ "$PB_BAR_BORDER_SIZE" == "" ]] && pgrep -U "$UID" bspwm > /dev/null 2>&1; then
if ! [[ "$BSPWM_WINDOW_GAP" == "" ]]; then
echo "Inferring bar size from BSPWM_WINDOW_GAP"
export PB_BAR_BORDER_SIZE="$BSPWM_WINDOW_GAP"
fi
fi
if pgrep -U "$UID" i3 > /dev/null 2>&1; then
export PB_WM_RESTACK="i3"
fi
# Spawn bars on the primary monitor
export PB_MONITOR=$(xrandr -q | awk '/primary/{print $1}')
polybar -r primary &
polybar -r primary-2 &
# 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
PB_MONITOR=$monitor
polybar -r secondary &
polybar -r secondary-2 &
done
return 0
wait

1
.config/dsk/run/pulseaudio Executable file
View File

@ -0,0 +1 @@
pulseaudio --daemonize=no

1
.config/dsk/run/redshift Executable file
View File

@ -0,0 +1 @@
redshift

1
.config/dsk/run/syncthing Executable file
View File

@ -0,0 +1 @@
syncthing --no-browser

4
.config/dsk/run/xrdbupdate Executable file
View File

@ -0,0 +1,4 @@
[ -r ~/.Xresources ] && xrdb ~/.Xresources
for file in $XDG_CONFIG_HOME/xrdb/*.xresources; do
[ -r "$file" ] && xrdb -merge "$file"
done

4
.config/dsk/run/xset Executable file
View File

@ -0,0 +1,4 @@
# No bell
xset -b
# No screen blanking
xset s off

1
.dsk Submodule

@ -0,0 +1 @@
Subproject commit 306bd25a99429c14a63abedc5a58340c6b812157

3
.gitmodules vendored
View File

@ -28,3 +28,6 @@
[submodule ".vim/bundle/lightline.vim"] [submodule ".vim/bundle/lightline.vim"]
path = .vim/bundle/lightline.vim path = .vim/bundle/lightline.vim
url = https://github.com/itchyny/lightline.vim url = https://github.com/itchyny/lightline.vim
[submodule ".dsk"]
path = .dsk
url = git@gitlab.com:rehashedsalt/dsk

View File

@ -11,44 +11,22 @@ die() {
exit 1 exit 1
} }
step_setup_target() { # Set up our session target
# Set up our session target which i3 > /dev/null 2>&1 && export STARTUP="i3"
which i3 > /dev/null 2>&1 && export STARTUP="i3" which bspwm > /dev/null 2>&1 && export STARTUP="bspwm"
which bspwm > /dev/null 2>&1 && export STARTUP="bspwm" [ -x "$HOME/.concession/concession" ] && export STARTUP="$HOME/.concession/concession"
[ -x "$HOME/.concession/concession" ] && export STARTUP="$HOME/.concession/concession" if [ -x "$HOME/.dsk/dsk-xinit" ]; then
[ -z ${STARTUP+x} ] && die export DSK_HOME="$HOME/.dsk"
} export STARTUP="$DSK_HOME/dsk-xinit"
fi
[ -z ${STARTUP+x} ] && die
step_setup_env() { # Execute Xsession stuff
# Ideally, you'd hook into a bunch of different DE startup stuff here [ -r /etc/X11/Xsession ] && . /etc/X11/Xsession
# But I only use Plasma, so there's only that here
if which kdeinit5 > /dev/null 2>&1; then
kdeinit5 &
kded5 &
export STARTUP="ksmserver \"$STARTUP\" --no-lockscreen"
fi
}
step_start_xsession() { # Execute our target directly, if necessary
# Execute Xsession stuff [ -z "${STARTUP+x}" ] || exec "$STARTUP"
[ -r /etc/X11/Xsession ] && . /etc/X11/Xsession
}
step_start_manual() { # If we get here, we haven't exec'd a target and must die
# Execute our target directly die
[ -z "${STARTUP+x}" ] || exec "$STARTUP"
}
main() {
# Set up the environment
step_setup_target
#step_setup_env
# Execute our target
step_start_xsession # Through Xsession scripts, or...
step_start_manual # ...manually, if need be
# Or maybe just die, I guess
die
}
main $@