diff --git a/.config/dsk/dskrc b/.config/dsk/dskrc new file mode 100644 index 00000000..5c84c4ed --- /dev/null +++ b/.config/dsk/dskrc @@ -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 + diff --git a/.config/dsk/run/compton b/.config/dsk/run/compton new file mode 100755 index 00000000..a7e856f7 --- /dev/null +++ b/.config/dsk/run/compton @@ -0,0 +1,2 @@ +[[ "$HOST" == "vm-*" ]] && exit 0 +compton diff --git a/.config/dsk/run/conky b/.config/dsk/run/conky new file mode 100755 index 00000000..66456f77 --- /dev/null +++ b/.config/dsk/run/conky @@ -0,0 +1 @@ +conky diff --git a/.config/dsk/run/dropbox b/.config/dsk/run/dropbox new file mode 100755 index 00000000..8dd1bd05 --- /dev/null +++ b/.config/dsk/run/dropbox @@ -0,0 +1 @@ +dropbox start diff --git a/.config/dsk/run/dunst b/.config/dsk/run/dunst new file mode 100755 index 00000000..053749f9 --- /dev/null +++ b/.config/dsk/run/dunst @@ -0,0 +1 @@ +dunst diff --git a/.config/dsk/run/i3wm b/.config/dsk/run/i3wm new file mode 100755 index 00000000..04ad29f0 --- /dev/null +++ b/.config/dsk/run/i3wm @@ -0,0 +1 @@ +i3 diff --git a/.config/dsk/run/kded5 b/.config/dsk/run/kded5 new file mode 100755 index 00000000..1740d23a --- /dev/null +++ b/.config/dsk/run/kded5 @@ -0,0 +1,2 @@ +kded5 +kcminit diff --git a/.config/dsk/run/kdeinit5 b/.config/dsk/run/kdeinit5 new file mode 100755 index 00000000..5e10071a --- /dev/null +++ b/.config/dsk/run/kdeinit5 @@ -0,0 +1 @@ +kdeinit5 diff --git a/.config/dsk/run/nitrogen b/.config/dsk/run/nitrogen new file mode 100755 index 00000000..6ffe291a --- /dev/null +++ b/.config/dsk/run/nitrogen @@ -0,0 +1,2 @@ +which nitrogen > /dev/null 2>&1 || exit 0 +nitrogen --restore diff --git a/.config/dsk/run/polkit-kde b/.config/dsk/run/polkit-kde new file mode 100755 index 00000000..6317c28d --- /dev/null +++ b/.config/dsk/run/polkit-kde @@ -0,0 +1 @@ +usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1 diff --git a/.config/dsk/run/polybar b/.config/dsk/run/polybar new file mode 100755 index 00000000..1ee9ff9c --- /dev/null +++ b/.config/dsk/run/polybar @@ -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 diff --git a/.config/dsk/run/pulseaudio b/.config/dsk/run/pulseaudio new file mode 100755 index 00000000..aa621536 --- /dev/null +++ b/.config/dsk/run/pulseaudio @@ -0,0 +1 @@ +pulseaudio --daemonize=no diff --git a/.config/dsk/run/redshift b/.config/dsk/run/redshift new file mode 100755 index 00000000..8e6b266d --- /dev/null +++ b/.config/dsk/run/redshift @@ -0,0 +1 @@ +redshift diff --git a/.config/dsk/run/syncthing b/.config/dsk/run/syncthing new file mode 100755 index 00000000..736d7dae --- /dev/null +++ b/.config/dsk/run/syncthing @@ -0,0 +1 @@ +syncthing --no-browser diff --git a/.config/dsk/run/xrdbupdate b/.config/dsk/run/xrdbupdate new file mode 100755 index 00000000..32ebd9cc --- /dev/null +++ b/.config/dsk/run/xrdbupdate @@ -0,0 +1,4 @@ +[ -r ~/.Xresources ] && xrdb ~/.Xresources +for file in $XDG_CONFIG_HOME/xrdb/*.xresources; do + [ -r "$file" ] && xrdb -merge "$file" +done diff --git a/.config/dsk/run/xset b/.config/dsk/run/xset new file mode 100755 index 00000000..dfd7115f --- /dev/null +++ b/.config/dsk/run/xset @@ -0,0 +1,4 @@ +# No bell +xset -b +# No screen blanking +xset s off diff --git a/.dsk b/.dsk new file mode 160000 index 00000000..306bd25a --- /dev/null +++ b/.dsk @@ -0,0 +1 @@ +Subproject commit 306bd25a99429c14a63abedc5a58340c6b812157 diff --git a/.gitmodules b/.gitmodules index fcce3215..c681546d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,3 +28,6 @@ [submodule ".vim/bundle/lightline.vim"] path = .vim/bundle/lightline.vim url = https://github.com/itchyny/lightline.vim +[submodule ".dsk"] + path = .dsk + url = git@gitlab.com:rehashedsalt/dsk diff --git a/.xinitrc b/.xinitrc index 74b9bd4a..eb2510fc 100755 --- a/.xinitrc +++ b/.xinitrc @@ -11,44 +11,22 @@ die() { exit 1 } -step_setup_target() { - # Set up our session target - which i3 > /dev/null 2>&1 && export STARTUP="i3" - which bspwm > /dev/null 2>&1 && export STARTUP="bspwm" - [ -x "$HOME/.concession/concession" ] && export STARTUP="$HOME/.concession/concession" - [ -z ${STARTUP+x} ] && die -} +# Set up our session target +which i3 > /dev/null 2>&1 && export STARTUP="i3" +which bspwm > /dev/null 2>&1 && export STARTUP="bspwm" +[ -x "$HOME/.concession/concession" ] && export STARTUP="$HOME/.concession/concession" +if [ -x "$HOME/.dsk/dsk-xinit" ]; then + export DSK_HOME="$HOME/.dsk" + export STARTUP="$DSK_HOME/dsk-xinit" +fi +[ -z ${STARTUP+x} ] && die -step_setup_env() { - # Ideally, you'd hook into a bunch of different DE startup stuff here - # 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 -} +# Execute Xsession stuff +[ -r /etc/X11/Xsession ] && . /etc/X11/Xsession -step_start_xsession() { - # Execute Xsession stuff - [ -r /etc/X11/Xsession ] && . /etc/X11/Xsession -} +# Execute our target directly, if necessary +[ -z "${STARTUP+x}" ] || exec "$STARTUP" -step_start_manual() { - # Execute our target directly - [ -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 $@ +# If we get here, we haven't exec'd a target and must die +die