Refactoring

This commit is contained in:
2020-07-23 11:32:09 +09:00
parent acddc8d3b4
commit ec36193ef9
16 changed files with 87 additions and 637 deletions

View File

@@ -1,9 +1,16 @@
#! /bin/sh
bspc monitor -d I II III IV V VI VII VIII IX X
function kill_program {
if ps -A | grep $1; then
killall -q $1
fi
}
bspc config border_width 1
bspc config window_gap 24
bspc monitor -d     
bspc config border_width $(echo 1 \* $SCALE | bc)
bspc config window_gap $(echo 12 \* $SCALE | bc)
bspc config split_ratio 0.52
bspc config borderless_monocle true
@@ -22,12 +29,15 @@ bspc rule -a Org.gnome.Nautilus desktop='^5' follow=on
bspc rule -a baka-mplayer state=floating sticky=on
bspc rule -a smplayer state=floating sticky=on
function kill_program {
if ps -A | grep $1; then
killall -q $1
fi
}
# restart subscribers
kill_program bspc
bash $HOME/.config/bspwm/set_subscribers.sh &
# set wallpaper
systemctl --user start wallpaper.timer
feh --bg-fill --randomize ${HOME}/.config/wallpaper/*
# restart programs
kill_program gnome-keyring-daemon
kill_program picom
kill_program pasystray
@@ -36,6 +46,8 @@ kill_program dunst
kill_program polkit-gnome-authentication-agent-1
kill_program gsd-xsettings
kill_program nautilus
kill_program blueman-applet
kill_program network-manager-applet
gnome-keyring-daemon --start --components=pkcs11 &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
@@ -48,9 +60,25 @@ dunst &
sxhkd &
nautilus &
transgui &
blueman-applet &
network-manager-applet &
dex -a
libinput-gestures-setup restart
[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
# Elan input setting
xinput set-prop 'Elan Touchpad' 'libinput Tapping Enabled' 1
xinput set-prop 'Elan Touchpad' 'libinput Natural Scrolling Enabled' 1
xinput set-prop 'Elan TrackPoint' 'libinput Accel Speed' -0.3
# Magic Trackpad 2
xinput set-prop 'Apple Inc. Magic Trackpad 2' 'libinput Natural Scrolling Enabled' 1
xinput set-prop 'Apple Inc. Magic Trackpad 2' 'libinput Accel Speed' 0.5
# Macbook Pro Trackpad
xinput set-prop "bcm5974" "libinput Natural Scrolling Enabled" 1
xinput set-prop "bcm5974" "libinput Accel Speed" 0.5
# Logitech G402
xinput set-prop 'Logitech Gaming Mouse G402' 'libinput Accel Speed' -0.8
# Logitech G102
xinput set-prop 'Logitech G102 LIGHTSYNC Gaming Mouse' 'libinput Natural Scrolling Enabled' 1
xinput set-prop 'Logitech G102 LIGHTSYNC Gaming Mouse' 'libinput Accel Speed' -0.5

View File

@@ -0,0 +1,20 @@
#!/bin/bash
bspc subscribe node_add | while read -r _ _ desktop _ node; do
num=$(bspc query -N -d $desktop | grep -f <(bspc query -N -n .leaf) | wc -l)
if [ $num = "1" ];then
xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0
else
bspc query -N -d | while read -r node; do
xprop -id "$node" -remove _PICOM_ROUNDED
done
fi
done &
bspc subscribe node_remove | while read -r _ _ desktop _ node; do
num=$(bspc query -N -d $desktop | grep -f <(bspc query -N -n .leaf) | wc -l)
if [ $num = "1" ];then
bspc query -N -d | while read -r node; do
xprop -id "$node" -f _PICOM_ROUNDED 32c -set _PICOM_ROUNDED 0
done
fi
done &