reorganize to use stow to manage configs, remove fish and stumpwm configs
This commit is contained in:
13
bspwm/.Xresources
Normal file
13
bspwm/.Xresources
Normal file
@ -0,0 +1,13 @@
|
||||
#if HEIGHT == 2160
|
||||
Xft.dpi: 160
|
||||
Xcursor.size: 48
|
||||
#define EM_FONT Iosevka:pixelsize=30:antialias=true:autohint=true
|
||||
#else
|
||||
#define EM_FONT Iosevka:pixelsize=22:antialias=true:autohint=true
|
||||
#endif
|
||||
|
||||
emacs.font: EM_FONT
|
||||
emacs.cursorBlink: false
|
||||
emacs.scrollBarWidth: 20
|
||||
emacs.background: #424242
|
||||
emacs.foreground: #E0E0E0
|
35
bspwm/.config/bspwm/bspwmrc
Executable file
35
bspwm/.config/bspwm/bspwmrc
Executable file
@ -0,0 +1,35 @@
|
||||
#! /bin/sh
|
||||
|
||||
xdo kill $(xdo id -N Polybar)
|
||||
i=0
|
||||
monitors=$(bspc query -M --names)
|
||||
for monitor in $monitors; do
|
||||
MONITOR="$monitor" polybar panel &
|
||||
i=$((i + 1))
|
||||
done
|
||||
if [ $i -eq 1 ]; then
|
||||
bspc monitor -d 1 2 3 4 5 6 7 8 9 0
|
||||
else
|
||||
monitor1=$(echo $monitors | cut -d ' ' -f 1)
|
||||
monitor2=$(echo $monitors | cut -d ' ' -f 2)
|
||||
bspc monitor "$monitor2" -d 1 2 3 4 5 6 7 8 9
|
||||
bspc monitor "$monitor1" -d 0
|
||||
bspc monitor "$monitor1" -s "$monitor2"
|
||||
bspc monitor "$monitor2" -f
|
||||
fi
|
||||
|
||||
bspc config border_width 4
|
||||
bspc config window_gap 12
|
||||
|
||||
sh ~/.config/bspwm/commands.sh dark-colors
|
||||
|
||||
bspc config split_ratio 0.50
|
||||
bspc config single_monocle true
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
||||
|
||||
bspc config pointer_follows_focus true
|
||||
bspc config pointer_follows_monitor true
|
||||
bspc config focus_follows_pointer true
|
||||
|
||||
bspc rule -a Gimp desktop='^8' state=floating follow=on
|
76
bspwm/.config/bspwm/commands.sh
Normal file
76
bspwm/.config/bspwm/commands.sh
Normal file
@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
|
||||
CMD="$1"
|
||||
shift
|
||||
|
||||
is_light() {
|
||||
bspc config focused_border_color | grep '#068c70' > /dev/null
|
||||
}
|
||||
|
||||
if [ "$CMD" = switch-colors ]; then
|
||||
if is_light; then
|
||||
CMD=dark-colors
|
||||
SCHEME=dark
|
||||
else
|
||||
CMD=light-colors
|
||||
SCHEME=light
|
||||
fi
|
||||
elif is_light; then
|
||||
SCHEME=light
|
||||
else
|
||||
SCHEME=dark
|
||||
fi
|
||||
|
||||
FONT=Iosevka:pixelsize=30
|
||||
BAR_FONT='Iosevka:pixelsize=23:antialias=true:autohint=true;5'
|
||||
BAR_HEIGHT=40
|
||||
|
||||
if [ "$SCHEME" = light ]; then
|
||||
ROOT_BG=#c1e6c2
|
||||
BAR_BG=#e1e6d2
|
||||
BAR_FG=#1a343a
|
||||
BAR_ACTIVE=#b0decc
|
||||
BAR_URGENT=#9b0640
|
||||
BAR_EMPTY=#b0b0b0
|
||||
NORMAL_BORDER=#b0b0b0
|
||||
FOCUS_BORDER=#068c70
|
||||
EMACS_THEME=lupan-light
|
||||
else
|
||||
ROOT_BG=#343a1a
|
||||
BAR_BG=#1a343a
|
||||
BAR_FG=#f2f6e1
|
||||
BAR_ACTIVE=#3585ce
|
||||
BAR_URGENT=#9b0640
|
||||
BAR_EMPTY=#808080
|
||||
NORMAL_BORDER=#808080
|
||||
FOCUS_BORDER=#3585ce
|
||||
EMACS_THEME=lupan-dark
|
||||
fi
|
||||
|
||||
switch_colors() {
|
||||
xrdb -merge <<EOF
|
||||
polybar.background: ${BAR_BG}
|
||||
polybar.foreground: ${BAR_FG}
|
||||
polybar.active: ${BAR_ACTIVE}
|
||||
polybar.urgent: ${BAR_URGENT}
|
||||
polybar.empty: ${BAR_EMPTY}
|
||||
polybar.font: ${BAR_FONT}
|
||||
polybar.height: ${BAR_HEIGHT}
|
||||
EOF
|
||||
polybar-msg cmd restart
|
||||
xsetroot -solid "${ROOT_BG}"
|
||||
bspc config normal_border_color "${NORMAL_BORDER}"
|
||||
bspc config focused_border_color "${FOCUS_BORDER}"
|
||||
bspc config presel_feedback_color "${FOCUS_BORDER}"
|
||||
python ~/.config/alacritty/switch_bg.py "$SCHEME"
|
||||
emacsclient --eval "(my-select-theme '${EMACS_THEME})"
|
||||
}
|
||||
|
||||
case "$CMD" in
|
||||
light-colors|dark-colors)
|
||||
switch_colors
|
||||
;;
|
||||
dmenu|dmenu_run)
|
||||
exec "$CMD" -nb "${BAR_BG}" -nf "${BAR_FG}" -sb "${BAR_ACTIVE}" -sf "${BAR_FG}" -fn "$FONT" "$@"
|
||||
;;
|
||||
esac
|
51
bspwm/.config/polybar/config
Normal file
51
bspwm/.config/polybar/config
Normal file
@ -0,0 +1,51 @@
|
||||
[colors]
|
||||
background = ${xrdb:polybar.background:#1a343a}
|
||||
foreground = ${xrdb:polybar.foreground:#f2f6e1}
|
||||
active = ${xrdb:polybar.active:#3585ce}
|
||||
urgent = ${xrdb:polybar.urgent:#9b0640}
|
||||
empty = ${xrdb:polybar.empty:#808080}
|
||||
|
||||
[bar/panel]
|
||||
monitor = ${env:MONITOR:}
|
||||
modules-left = bspwm xwindow
|
||||
modules-right = mpd date
|
||||
wm-restack = bspwm
|
||||
enable-ipc = true
|
||||
font-0 = ${xrdb:polybar.font:Iosevka:pixelsize=23:antialias=true:autohint=true;5}
|
||||
height = ${xrdb:polybar.height:40}
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
padding-left = 2
|
||||
padding-right = 2
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
line-size = 0
|
||||
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
label-focused = %name%
|
||||
label-occupied = %name%
|
||||
label-urgent = %name%
|
||||
label-empty = %name%
|
||||
label-focused-padding = 1
|
||||
label-occupied-padding = 1
|
||||
label-urgent-padding = 1
|
||||
label-empty-padding = 1
|
||||
label-focused-background = ${colors.active}
|
||||
label-urgent-background = ${colors.urgent}
|
||||
label-empty-foreground = ${colors.empty}
|
||||
|
||||
[module/xwindow]
|
||||
type = internal/xwindow
|
||||
label = %title%
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
format-online = <label-song>
|
||||
label-song-maxlen = 70
|
||||
label-song-ellipsis = true
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
time = %H:%M
|
||||
label = %time%
|
145
bspwm/.config/sxhkd/sxhkdrc
Normal file
145
bspwm/.config/sxhkd/sxhkdrc
Normal file
@ -0,0 +1,145 @@
|
||||
#
|
||||
# wm independent hotkeys
|
||||
#
|
||||
|
||||
# terminal emulator
|
||||
super + Return
|
||||
alacritty
|
||||
|
||||
# program launcher
|
||||
super + @space
|
||||
sh ~/.config/bspwm/commands.sh dmenu_run
|
||||
|
||||
# make sxhkd reload its configuration files:
|
||||
super + Escape
|
||||
pkill -USR1 -x sxhkd
|
||||
|
||||
super + e
|
||||
emacsclient -n -c
|
||||
|
||||
super + r ; {e,f,t}
|
||||
{emacsclient -n -c,firefox,thunderbird}
|
||||
|
||||
super + shift + @space
|
||||
bspc node -f $(xtitle -f '%u %s\n' $(bspc query -N -n .window) | sh ~/.config/bspwm/commands.sh dmenu -l 20 -i | cut -f 1 -d ' ')
|
||||
|
||||
super + semicolon ; shift + {h,l,s}
|
||||
{systemctl hibernate,slock,systemctl suspend}
|
||||
|
||||
super + F6
|
||||
sh ~/.config/bspwm/commands.sh switch-colors
|
||||
|
||||
XF86AudioPlay
|
||||
mpc toggle
|
||||
|
||||
XF86Audio{Lower,Raise}Volume
|
||||
pamixer -{d,i} 5
|
||||
|
||||
XF86AudioMute
|
||||
pamixer -t
|
||||
|
||||
#
|
||||
# bspwm hotkeys
|
||||
#
|
||||
|
||||
# quit/restart bspwm
|
||||
super + alt + {q,r}
|
||||
bspc {quit,wm -r}
|
||||
|
||||
# close and kill
|
||||
super + {_,shift + }w
|
||||
bspc node -{c,k}
|
||||
|
||||
# alternate between the tiled and monocle layout
|
||||
super + m
|
||||
bspc desktop -l next
|
||||
|
||||
# send the newest marked node to the newest preselected node
|
||||
super + y
|
||||
bspc node newest.marked.local -n newest.!automatic.local
|
||||
|
||||
# swap the current node and the biggest node
|
||||
super + g
|
||||
bspc node -s biggest
|
||||
|
||||
#
|
||||
# state/flags
|
||||
#
|
||||
|
||||
# set the window state
|
||||
super + {t,shift + t,s,f}
|
||||
bspc node -t {tiled,pseudo_tiled,floating,'~fullscreen'}
|
||||
|
||||
# set the node flags
|
||||
super + ctrl + {m,x,y,z}
|
||||
bspc node -g {marked,locked,sticky,private}
|
||||
|
||||
#
|
||||
# focus/swap
|
||||
#
|
||||
|
||||
# focus the node in the given direction
|
||||
super + {_,shift + }{h,j,k,l}
|
||||
bspc node -{f,s} {west,south,north,east}
|
||||
|
||||
# focus the node for the given path jump
|
||||
super + {p,b,comma,period}
|
||||
bspc node -f @{parent,brother,first,second}
|
||||
|
||||
# focus the next/previous node in the current desktop
|
||||
super + {_,shift + }c
|
||||
bspc node -f {next,prev}.local
|
||||
|
||||
# focus the next/previous desktop in the current monitor
|
||||
super + bracket{left,right}
|
||||
bspc desktop -f {prev,next}.local
|
||||
|
||||
# focus the last node/desktop
|
||||
super + {grave,Tab}
|
||||
bspc {node,desktop} -f last
|
||||
|
||||
# focus the older or newer node in the focus history
|
||||
super + {o,i}
|
||||
bspc wm -h off; \
|
||||
bspc node {older,newer} -f; \
|
||||
bspc wm -h on
|
||||
|
||||
# focus or send to the given desktop
|
||||
super + {_,shift + }{1-9,0}
|
||||
bspc {desktop -f,node -d} '^{1-9,10}'
|
||||
|
||||
#
|
||||
# preselect
|
||||
#
|
||||
|
||||
# preselect the direction
|
||||
super + ctrl + {h,j,k,l}
|
||||
bspc node -p {west,south,north,east}
|
||||
|
||||
# preselect the ratio
|
||||
super + ctrl + {1-9}
|
||||
bspc node -o 0.{1-9}
|
||||
|
||||
# cancel the preselection for the focused node
|
||||
super + ctrl + space
|
||||
bspc node -p cancel
|
||||
|
||||
# cancel the preselection for the focused desktop
|
||||
super + ctrl + shift + space
|
||||
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
|
||||
|
||||
#
|
||||
# move/resize
|
||||
#
|
||||
|
||||
# expand a window by moving one of its side outward
|
||||
super + alt + {h,j,k,l}
|
||||
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
|
||||
|
||||
# contract a window by moving one of its side inward
|
||||
super + alt + shift + {h,j,k,l}
|
||||
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
|
||||
|
||||
# move a floating window
|
||||
super + {Left,Down,Up,Right}
|
||||
bspc node -v {-20 0,0 20,0 -20,20 0}
|
31
bspwm/.xsession
Executable file
31
bspwm/.xsession
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$EDITOR" ]; then
|
||||
. ~/.profile
|
||||
fi
|
||||
|
||||
xrandr --auto
|
||||
xrandr --output HDMI1 --right-of DP1
|
||||
xsetroot -solid '#224242'
|
||||
xrdb -merge ~/.Xresources
|
||||
setxkbmap pl -option ctrl:nocaps
|
||||
|
||||
# lock screen on suspend/hibernate
|
||||
if which xss-lock slock >/dev/null; then
|
||||
xss-lock slock &
|
||||
else
|
||||
( echo "Missing command(s):"; which xss-lock slock 2>&1 ) | xmessage -file -
|
||||
fi
|
||||
|
||||
# run emacs daemon if not running
|
||||
emacsclient --eval nil -a '' &
|
||||
|
||||
if which bspwm > /dev/null; then
|
||||
sxhkd &
|
||||
xsetroot -cursor_name left_ptr
|
||||
exec bspwm
|
||||
fi
|
||||
exec /usr/bin/i3
|
||||
dwm-clock &
|
||||
exec /usr/local/bin/dwm
|
||||
exec xterm
|
Reference in New Issue
Block a user