why have bspwm folder here

This commit is contained in:
vib 2021-12-14 12:20:03 +02:00
parent 9e853d012a
commit 10190a5abe
5 changed files with 0 additions and 202 deletions

View file

@ -1,116 +0,0 @@
#! /bin/sh
###
# AUTOSTART
###
# TODO launch apps based on the hostname
# TODO stop using `hostname` and use the $HOSTNAME variable instead
xsetroot -cursor_name left_ptr #fix background cursor being different
sxhkd &
~/.config/polybar/launch.sh &
nitrogen --restore
picom --experimental-backends &
dunst &
copyq &
nm-applet &
#blueman-applet &
xfce4-power-manager &
numlockx on &
/usr/bin/lxqt-policykit-agent &
###
# MONITORS
###
if [ "`hostname`" = "setsuna" ]; then
bspc monitor "HDMI-A-1" -d 1 2 3 4 5 6 7
bspc monitor "DVI-D-0" -d 8 9
elif [ "`hostname`" = "flare" ]; then
if [ -n "`polybar -m | grep "DP-1"`" ]; then
# for docked desktop use: assign 2 workspaces to the second VGA monitor accordingly if it is connected
if [ -n "`polybar -m | grep "VGA-0"`" ]; then
bspc monitor "DP-1" -d 1 2 3 4 5 6 7
bspc monitor "VGA-0" -d 8 9
else
bspc monitor "DP-1" -d 1 2 3 4 5 6 7 8 9
fi
#elif [ -n "`polybar -m | grep "VGA-0"`" ]; then
# if [ -n "`polybar -m | grep "LVDS-1-1"`" ]; then
# bspc monitor "LVDS-1-1" -d 1 2 3 4 5 6 7
# bspc monitor "VGA-0" -d 8 9
# else
# bspc monitor "VGA-0" -d 1 2 3 4 5 6 7 8 9
# fi
else
bspc monitor -d 1 2 3 4 5 6 7 8 9
#bspc monitor "DP-1" -d 1 2 3 4 5 6 7 8 9
#bspc monitor "LVDS1" -d 1 2 3 4 5 6 7 8 9
#bspc monitor "LVDS-1-1" -d 1 2 3 4 5 6 7 8 9
fi
elif [ "`hostname`" = "salad-book" ]; then
bspc monitor "eDP-1" -d 1 2 3 4 5 6 7 8 9
bspc monitor "HDMI-0" -d 1 2 3 4 5 6 7 8 9
bspc monitor "VGA-0" -d 1 2 3 4 5 6 7 8 9
fi
###
# GLOBAL SETTINGS
###
bspc config focus_follows_pointer true
bspc config remove_disabled_monitors true
bspc config remove_unplugged_monitors true
bspc config merge_overlapping_monitors true
bspc config pointer_follows_monitor true
bspc config center_pseudo_tiled false
#bspc config bottom_padding 25
#bspc config top_monocle_padding 0
bspc config border_width 2
bspc config window_gap 10
bspc config split_ratio 0.50
bspc config borderless_monocle true
bspc config gapless_monocle true
###
# COLORS
###
# Read colors from Xresources and use them upfront
# I am sorry for how cursed this is
clist=`xrdb -query`
echo "$clist" | while read line
do
name=$(echo $line | cut -d: -f1)
color=$(echo $line | cut -d: -f2)
case "$name" in
"*.color6") bspc config active_border_color $color \
&& bspc config presel_feedback_color $color ;;
"*.background") bspc config normal_border_color $color ;;
"*.foreground") bspc config focused_border_color $color ;;
esac
done
###
# RULES
###
bspc rule -a Gimp desktop='^6' state=floating follow=on
bspc rule -a Pavucontrol state=floating
bspc rule -a copyq state=floating
bspc rule -a Blueman-manager state=floating
bspc rule -a Arandr state=floating
bspc rule -a Galculator state=floating
bspc rule -a Nitrogen state=floating
bspc rule -a Emacs state=tiled
bspc rule -a Screenkey manage=off
bspc rule -a Navigator desktop='^1'
bspc rule -a discord desktop='^4'
bspc rule -a lightcord desktop='^4'
bspc rule -a Element desktop='^4'
bspc rule -a dosbox state=floating
bspc rule -a AlarmWindow state=floating
bspc rule -a pop-up state=floating
bspc rule -a setup state=floating

View file

@ -1,31 +0,0 @@
#!/bin/dash
if [ "`hostname`" = "freia" ]; then
choices="arandr\nLVDS_off\nLVDS_on\ndual"
chosen=$(echo "$choices" | dmenu -i)
case "$chosen" in
arandr) arandr ;;
LVDS_off) xrandr --output LVDS-1-1 --off & ;;
LVDS_on) xrandr --output LVDS-1-1 --auto ;;
dual) xrandr --output VGA-0 --mode 1024x768 --pos 1920x312 --rotate normal --output LVDS-0 --off --output DP-0 --off --output DP-1 --off --output DP-2 --off --output DP-3 --off --output DP-4 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-5 --off --output LVDS-1-1 --off --output VGA-1-1 --off ;;
esac
elif [ "`hostname`" = "setsuna" ]; then
choices="arandr\nsingle (hdmi)\ndual (hdmi+dvi)"
chosen=$(echo "$choices" | dmenu -i)
case "$chosen" in
arandr) arandr ;;
"single (hdmi)") xrandr --output HDMI-A-1 --auto --output DVI-D-0 --off ;;
"dual (hdmi+dvi)") xrandr --output HDMI-A-1 --auto --output DVI-D-0 --auto --right-of HDMI-A-1 ;;
esac
else
choices="arandr"
chosen=$(echo "$choices" | dmenu -i)
case "$chosen" in
arandr) arandr ;;
esac
fi
#choices="arandr\neDP_off\neDP_on\ndual"
#eDP_on) xrandr --output eDP --off & ;;
#eDP_off) xrandr --output eDP --auto ;;

View file

@ -1,15 +0,0 @@
#!/bin/sh
# change the desktop number here
FD9=$(bspc query -D -d '^9')
FD8=$(bspc query -D -d '^9')
FD7=$(bspc query -D -d '^9')
bspc subscribe node_add | while read msg ; do
desk_id=${msg[2]}
wid=${msg[4]}
for i in $FD7 $FD8 $FD9
do
[ "$i" = "$desk_id" ] && bspc node "$wid" -t floating
done
done

View file

@ -1,28 +0,0 @@
#!/bin/sh
sure() {
options="Yes\nNo"
chosen=`echo "$options" | dmenu -i -p "Are you sure?" -sb red -sf black`
case "$chosen" in
Yes) exec $1 ;;
No) exit ;;
esac
}
options="shutdown
reboot
hibernate
sleep"
chosen=`echo "$options" | dmenu -i`
case "$chosen" in
shutdown)
sure "systemctl poweroff" ;;
reboot)
sure "systemctl reboot" ;;
hibernate)
sure "systemctl hibernate" ;;
sleep)
systemctl suspend ;;
esac

View file

@ -1,12 +0,0 @@
#!/bin/sh
#TODO option to get existing area and shrink it
choices="4:3\nMain screen\nSecond screen"
chosen=$(echo "$choices" | dmenu -i)
case "$chosen" in
4:3) xsetwacom set "Wacom Intuos S 2 Pen stylus" Area 0 0 11400 8550 ;;
Main screen) xsetwacom set "Wacom Intuos S 2 Pen stylus" MapToOutput HEAD-0 ;;
second screen) xsetwacom set "Wacom Intuos S 2 Pen stylus" MapToOutput HEAD-1 ;;
esac