.dsk: Migrate to DSK (hopefully)
This commit is contained in:
parent
2635dd4e4c
commit
e4d359c088
21
.config/dsk/dskrc
Normal file
21
.config/dsk/dskrc
Normal 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
2
.config/dsk/run/compton
Executable file
@ -0,0 +1,2 @@
|
||||
[[ "$HOST" == "vm-*" ]] && exit 0
|
||||
compton
|
1
.config/dsk/run/conky
Executable file
1
.config/dsk/run/conky
Executable file
@ -0,0 +1 @@
|
||||
conky
|
1
.config/dsk/run/dropbox
Executable file
1
.config/dsk/run/dropbox
Executable file
@ -0,0 +1 @@
|
||||
dropbox start
|
1
.config/dsk/run/dunst
Executable file
1
.config/dsk/run/dunst
Executable file
@ -0,0 +1 @@
|
||||
dunst
|
1
.config/dsk/run/i3wm
Executable file
1
.config/dsk/run/i3wm
Executable file
@ -0,0 +1 @@
|
||||
i3
|
2
.config/dsk/run/kded5
Executable file
2
.config/dsk/run/kded5
Executable file
@ -0,0 +1,2 @@
|
||||
kded5
|
||||
kcminit
|
1
.config/dsk/run/kdeinit5
Executable file
1
.config/dsk/run/kdeinit5
Executable file
@ -0,0 +1 @@
|
||||
kdeinit5
|
2
.config/dsk/run/nitrogen
Executable file
2
.config/dsk/run/nitrogen
Executable file
@ -0,0 +1,2 @@
|
||||
which nitrogen > /dev/null 2>&1 || exit 0
|
||||
nitrogen --restore
|
1
.config/dsk/run/polkit-kde
Executable file
1
.config/dsk/run/polkit-kde
Executable file
@ -0,0 +1 @@
|
||||
usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1
|
31
.config/dsk/run/polybar
Executable file
31
.config/dsk/run/polybar
Executable 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
1
.config/dsk/run/pulseaudio
Executable file
@ -0,0 +1 @@
|
||||
pulseaudio --daemonize=no
|
1
.config/dsk/run/redshift
Executable file
1
.config/dsk/run/redshift
Executable file
@ -0,0 +1 @@
|
||||
redshift
|
1
.config/dsk/run/syncthing
Executable file
1
.config/dsk/run/syncthing
Executable file
@ -0,0 +1 @@
|
||||
syncthing --no-browser
|
4
.config/dsk/run/xrdbupdate
Executable file
4
.config/dsk/run/xrdbupdate
Executable 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
4
.config/dsk/run/xset
Executable file
@ -0,0 +1,4 @@
|
||||
# No bell
|
||||
xset -b
|
||||
# No screen blanking
|
||||
xset s off
|
1
.dsk
Submodule
1
.dsk
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 306bd25a99429c14a63abedc5a58340c6b812157
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -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
|
||||
|
34
.xinitrc
34
.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
|
||||
}
|
||||
|
||||
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"
|
||||
if [ -x "$HOME/.dsk/dsk-xinit" ]; then
|
||||
export DSK_HOME="$HOME/.dsk"
|
||||
export STARTUP="$DSK_HOME/dsk-xinit"
|
||||
fi
|
||||
}
|
||||
[ -z ${STARTUP+x} ] && die
|
||||
|
||||
step_start_xsession() {
|
||||
# Execute Xsession stuff
|
||||
[ -r /etc/X11/Xsession ] && . /etc/X11/Xsession
|
||||
}
|
||||
|
||||
step_start_manual() {
|
||||
# Execute our target directly
|
||||
# Execute our target directly, if necessary
|
||||
[ -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
|
||||
# If we get here, we haven't exec'd a target and must die
|
||||
die
|
||||
}
|
||||
|
||||
main $@
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user