Personal configuration files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

94 lines
2.6 KiB

#!/bin/sh
_() { bspc config "$@"; }
br() { bspc rule -a "$@"; }
au() {
! pgrep -x "$1" >/dev/null &&
"$@" 2>/dev/null &
}
rs() {
[ "$(command -v "$1")" ] &&
pkill -x "$1";
{ sleep 0.1; "$@" & };
}
# Set wallpaper
if [ -e "$HOME"/pictures/wallpapers/wallpaper.jpg ]; then
hsetroot -fill $HOME/pictures/wallpapers/wallpaper.jpg &
else
hsetroot -solid "#1c1e2b" &
fi
# Auto-start processes
au mpd
au pl
au memcached
au mbsync -c ${XDG_CONFIG_HOME:-$HOME/.config}/isync/mbsyncrc -a
au unclutter -idle 2
au picom
au inp tp --off
au inp xid --off webcam
au inp xid --off touchscreen
au xset -dpms s off
# Restart processes
rs sxhkd
rs wm subscribe
rs dunst
rs transmission-daemon
rs setxkbmap -layout us,gb,es -option grp:shift_caps_toggle
rs xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources
rs xsetroot -cursor_name left_ptr
# Listen on IMAP mailbox changes
for mailbox in work personal uni; do
if ! pgrep -a -f "goimap.*${mailbox}" >/dev/null; then
goimapnotify -conf ${XDG_CONFIG_HOME:-$HOME/.config}/imapnotify/imapnotify_${mailbox}.conf &
fi
done
# Start rmuxinator projects
! pgrep "tmux" >/dev/null &&
for project in main media work; do
rmuxinator start ${XDG_CONFIG_HOME:-$HOME/.config}/rmuxinator/"$project".toml &
done
# Start Seafile daemon
! pgrep -x "seaf-daemon" 2>/dev/null &&
seaf-cli start -c $XDG_CONFIG_HOME/seafile/ccnet
# Start mpd-mpris
pgrep -x mpd 2>/dev/null && mpd-mpris 2>/dev/null &
# Basic settings
_ top_padding 22
_ top_monocle_padding 0
for side in top bottom left right; do
_ -d focused "$side"_padding 0
done
_ border_width 2
_ window_gap 15
_ split_ratio 0.5
_ borderless_monocle true
_ gapless_monocle false
_ click_to_focus button1
_ focus_follows_pointer true
_ remove_disabled_monitors true
_ remove_unplugged_monitors true
_ pointer_modifier mod4
_ pointer_action1 move
_ pointer_action2 resize_side
_ pointer_action3 resize_corner
_ normal_border_color '#12141E'
_ active_border_color '#5F6FAB'
_ focused_border_color '#5F6FAB'
_ presel_feedback_color '#5F6FAB'
# Rules
br Zathura state=tiled follow=off
br Yad state=floating border=off
br mpv state=floating center=on
br imv state=floating border=off
br feh state=floating border=off
br "Signal Beta" state=floating desktop='any.!occupied' center=on rectangle=1000x600+0+0
br Emacs state=tiled