blob: 1c662f4a07cb402fd652e0e7214d80ece75fd700 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
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
|