summaryrefslogtreecommitdiff
path: root/desktop-x11/.config/bspwm
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-x11/.config/bspwm')
-rwxr-xr-xdesktop-x11/.config/bspwm/bspwmrc134
1 files changed, 134 insertions, 0 deletions
diff --git a/desktop-x11/.config/bspwm/bspwmrc b/desktop-x11/.config/bspwm/bspwmrc
new file mode 100755
index 0000000..1c662f4
--- /dev/null
+++ b/desktop-x11/.config/bspwm/bspwmrc
@@ -0,0 +1,134 @@
+#! /bin/sh
+
+# set -xv
+# exec 2>>/tmp/bspwm.log
+
+pgrep -x sxhkd > /dev/null || sxhkd &
+
+# setxkbmap -rules evdev -model pc105 -layout ck61 -variant ck61 -option caps:escape
+# setxkbmap -option caps:escape
+# xmodmap $HOME/.Xmodmap
+
+# My monitors:
+# DP-2-2
+# HDMI-2
+# eDP-1
+CONNECTED_MONITORS=`xrandr -q | grep -w connected | cut -d ' ' -f1`
+MONITORS_COUNT=`echo "$CONNECTED_MONITORS" | wc -l`
+
+# Network Interfaces for Polybar modules
+NETWORK_INTERFACES=`nmcli -t device | grep -v bridge`
+ETHERNET_INTERFACES=`echo "$NETWORK_INTERFACES" | grep ":ethernet:"`
+ETHERNET_COUNT=`echo "$ETHERNET_INTERFACES" | wc -l`
+ETHER_IFACE=
+if [[ "$ETHERNET_COUNT" == "1" ]]; then
+ ETHER_IFACE=`echo "$ETHERNET_INTERFACES" | cut -d ':' -f1`
+else
+ ETHER_IFACE=`echo "$ETHERNET_INTERFACES" | grep ":connected" | cut -d ':' -f1`
+fi
+WIFI_INTERFACES=`echo "$NETWORK_INTERFACES" | grep ":wifi:"`
+WIFI_COUNT=`echo "$WIFI_INTERFACES" | wc -l`
+WIFI_IFACE=
+if [[ "$WIFI_COUNT" == "1" ]]; then
+ WIFI_IFACE=`echo "$WIFI_INTERFACES" | cut -d ':' -f1`
+else
+ WIFI_IFACE=`echo "$WIFI_INTERFACES" | grep ":connected" | cut -d ':' -f1`
+fi
+
+killall polybar
+xrandr --output eDP-1 --mode 1920x1080
+
+if [ "$MONITORS_COUNT" = "1" ]; then
+ bspc monitor eDP-1 -d I II III IV V VI VII VIII IX X
+ # PRIMARY_MONITOR="eDP-1" WIFI_IFACE="wlp4s0" polybar primary-monitor &
+ PRIMARY_MONITOR="eDP-1" ETHER_IFACE="$ETHER_IFACE" WIFI_IFACE="$WIFI_IFACE" polybar primary-monitor &
+else
+ EXTERNAL_MONITOR=`echo "$CONNECTED_MONITORS" | grep -v "eDP-1" | head -n1`
+ if [ "$EXTERNAL_MONITOR" = "DP-2-1" ] || [ "$EXTERNAL_MONITOR" = "DP-2-2" ]; then
+ EXTERNAL_MONITOR_RESOLUTION="2560x1080"
+ # xrandr --output $EXTERNAL_MONITOR --primary --mode 2560x1080 --left-of eDP-1
+ # bspc monitor eDP-1 -d IX X
+ # bspc monitor $EXTERNAL_MONITOR -d I II III IV V VI VII VIII
+ else
+ EXTERNAL_MONITOR_RESOLUTION="1920x1080"
+ # xrandr --output $EXTERNAL_MONITOR --primary --mode 1920x1080 --left-of eDP-1
+ # bspc monitor eDP-1 -d I II
+ # bspc monitor $EXTERNAL_MONITOR -d III IV V VI VII VIII IX X
+ fi
+ xrandr --output $EXTERNAL_MONITOR --primary --mode $EXTERNAL_MONITOR_RESOLUTION --left-of eDP-1
+ bspc monitor eDP-1 -d IX X
+ bspc monitor $EXTERNAL_MONITOR -d I II III IV V VI VII VIII
+ SECONDARY_MONITOR="eDP-1" polybar secondary-monitor &
+ PRIMARY_MONITOR="$EXTERNAL_MONITOR" ETHER_IFACE="$ETHER_IFACE" WIFI_IFACE="$WIFI_IFACE" polybar primary-monitor &
+fi
+
+bspc config border_width 1
+bspc config window_gap 3
+
+bspc config split_ratio 0.52 # 0.6
+bspc config borderless_monocle false # true
+bspc config gapless_monocle true
+
+bspc config focus_follows_pointer true
+bspc config pointer_follows_focus true
+bspc config pointer_follows_monitor true
+
+# Border colors
+# Original
+# bspc config normal_border_color "#484848"
+# bspc config focused_border_color "#21BA45"
+# bspc config active_border_color "#BA9521"
+# bspc config presel_feedback_color "#E2FF20"
+
+# Vault Tec
+bspc config normal_border_color "#345985"
+bspc config focused_border_color "#FDF070"
+bspc config active_border_color "#5C835E"
+bspc config presel_feedback_color "#A63C45"
+
+# xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources
+pgrep -x picom > /dev/null || picom &
+pgrep -x unclutter > /dev/null || unclutter &
+pgrep -x dunst > /dev/null || dunst &
+pgrep -x nm-applet > /dev/null || nm-applet &
+# /usr/bin/gnome-keyring-daemon --start --components=ssh
+xset r rate 300 50
+
+feh --bg-fill $HOME/Dropbox/Images/wallpapers/dore-christ-leaving-the-praetorium.jpeg
+# wal -i $HOME/Dropbox/Images/wallpapers/dore-christ-leaving-the-praetorium.jpeg >/dev/null 2>&1
+
+# bspc rule -a Gimp desktop='^8' state=floating follow=on
+# bspc rule -a Chromium desktop='^2'
+# bspc rule -a mplayer2 state=floating
+# bspc rule -a Kupfer.py focus=on
+# bspc rule -a Screenkey manage=off
+
+bspc rule -a Floating state=floating center=true follow=on
+
+bspc rule -a Arandr state=floating
+bspc rule -a Blueman-manager state=floating
+bspc rule -a Cheese state=floating center=true follow=on
+bspc rule -a Clocks state=floating center=true follow=on
+bspc rule -a Eog state=floating center=true follow=on
+bspc rule -a Gitg state=floating center=true follow=on
+bspc rule -a Gitk state=floating center=true follow=on
+bspc rule -a Gnome-calculator state=floating center=true follow=on
+bspc rule -a Gnome-calendar state=floating center=true follow=on
+bspc rule -a Gnome-control-center state=floating center=true follow=on
+bspc rule -a Gnome-screenshot state=floating center=true follow=on
+bspc rule -a Gnome-todo state=floating center=true follow=on
+bspc rule -a Gnome-tweaks state=floating center=true follow=on
+bspc rule -a MuPDF state=floating center=true follow=on
+bspc rule -a Pavucontrol state=floating center=true follow=on
+bspc rule -a Qemu-system-i386 state=floating center=true follow=on
+bspc rule -a Qemu-system-x86_64 state=floating center=true follow=on
+bspc rule -a Signal state=floating
+bspc rule -a SimpleScreenRecorder state=floating center=true follow=on
+bspc rule -a Surf state=floating center=true follow=on
+bspc rule -a Sxiv state=floating center=true follow=on
+bspc rule -a mpv state=floating center=true follow=on
+bspc rule -a "Org.gnome.Characters:*:*" state=floating center=true follow=on
+bspc rule -a "Gpick:*:*" state=floating center=true follow=on
+bspc rule -a "*:*:Picture-in-Picture" state=floating follow=on
+bspc rule -a "*:*:Network Connections" state=floating follow=on
+bspc rule -a gnome-calculator state=floating center=true follow=on