Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
xvzc committed Jul 12, 2024
1 parent 04ee697 commit f72f52c
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 95 deletions.
42 changes: 18 additions & 24 deletions dot_config/bspwm/executable_bspwmrc
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
#! /bin/sh
bspc monitor -d 1 2 3 4 5 6 7 8 9 0

pgrep -x picom > /dev/null || picom --config ~/.config/bspwm/picom.conf &
pgrep -x sxhkd > /dev/null || sxhkd -c ~/.config/bspwm/sxhkdrc &
pgrep -x polybar > /dev/null || polybar -c ~/.config/bspwm/polybar.ini &
nitrogen --restore &

bspc monitor -d 1 2 3 4 5 6 7 8 9 0 11 12

bspc config window_gap 34
bspc config window_gap 28

bspc config split_ratio 0.5
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config border_width 0
bspc config border_width 1
bspc config click_to_focus true
# bspc config focused_border_color "#09ad32"
# bspc config active_border_color "#d9fccf"
bspc config focused_border_color "#d9fccf"
bspc config pointer_modifier mod1

nitrogen --restore &
flameshot &
(pgrep -x picom > /dev/null && pkill -9 picom);
(picom --config ~/.config/bspwm/picom.conf &)
(pgrep -x sxhkd > /dev/null && pkill -9 sxhkd);
(sxhkd -c ~/.config/bspwm/sxhkdrc &)

(pgrep -x polybar > /dev/null && pkill -9 polybar);
(polybar -c ~/.config/bspwm/polybar.ini &)

bspc config external_rules_command "$HOME/.config/bspwm/scripts/external-rules"
(pgrep -x trayer > /dev/null && pkill -9 trayer);
(trayer -l --margin 0 --align right --edge top --height 29 --distance 0,0 --distancefrom right,top --transparent true --alpha 0 --tint '#000000' &)

# usage: (<class_name>|*)[:(<instance_name>|*)[:(<name>|*)]]
bspc rule -a 'Google Chrome:*:*' desktop='^2' follow=on focus=on
# bspc rule -a "Alacritty" desktop='^1' follow=on focus=on
# bspc rule -a "kakaotalk.exe:*:*" desktop='^11' follow=on focus=on
bspc rule -a "discord:*:*" desktop='^11' follow=off focus=off
bspc rule -a "Slack" desktop='^11' follow=off focus=off
bspc rule -a "Spotify" desktop='^12' follow=off focus=off

test discord && discord &
test spotify && spotify &
# bspc rule -a Gimp desktop='^8' state=floating follow=on
# bspc rule -a mplayer2 state=floating
# bspc rule -a Kupfer.py focus=on
# bspc rule -a Screenkey manage=off
65 changes: 29 additions & 36 deletions dot_config/bspwm/polybar.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[colors]

background = #262729
background = #000000
; background-alt = #330680
foreground = #c9c9c9
primary = #d6d4d4
Expand All @@ -18,16 +18,15 @@ alert = #f7768e
; -----------------------------------------------------------------------------
[var]

bar-height = 38pt
bar-height = 21pt
monitor-width = 3840pt
; monitor_width - bar_width
left-bar-offset-x = 300pt
# left-bar-offset-x = 300pt
; 2160pt - 34pt
right-bar-offset-x = 2160pt
override-redirect = false
# right-bar-offset-x = 2160pt
line-size = 2
border-size = 0
radius = 15.0
radius = 0
workspace-padding = 1

; -----------------------------------------------------------------------------
Expand All @@ -38,11 +37,11 @@ margin-top = 0
; -----------------------------------------------------------------------------
[bar/polybar]

width = 80%
offset-x = 10%
width = 56.74%
; offset-x = 10%
height = ${var.bar-height}
radius-bottom = ${var.radius}
override-redirect = ${var.override-redirect}
override-redirect = false
line-size = ${var.line-size}
border-size = ${var.border-size}

Expand All @@ -52,19 +51,19 @@ background = ${colors.background}
foreground = ${colors.foreground}

padding-left = 18pt
padding-right = 20pt
padding-right = 18pt
padding-bottom = 2pt
module-margin = 4pt

separator = " "
separator-foreground = ${colors.orange}

font-0 = Font Awesome 6 Free:style=Solid:size=24;5
font-1 = Font Awesome 6 Brands:style=Solid:size=24;5
font-2 = HurmitNerdFontMono:style=Bold:size=19;5
font-0 = Font Awesome 6 Free:style=Solid:size=14;3
font-1 = Font Awesome 6 Brands:style=Solid:size=14;3
font-2 = HurmitNerdFontMono:style=Bold:size=14;3

modules-left = pulseaudio temperature storage
modules-center = bspwm
modules-right = systray date time
modules-left = pulseaudio temperature storage time
modules-right = bspwm

cursor-click = pointer
cursor-scroll = ns-resize
Expand All @@ -77,18 +76,16 @@ wm-restack = bspwm

type = internal/bspwm

ws-icon-0 = 1;$
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-8 = 9;
ws-icon-9 = 0;
ws-icon-10 = 11;
ws-icon-11 = 12;
ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-8 = 9;
ws-icon-9 = 0;

reverse-scroll = false

Expand Down Expand Up @@ -121,6 +118,7 @@ label-empty-padding = ${var.workspace-padding}
label-focused-foreground = #ffffff
label-focused-background = #3f3f3f


; Available tokens:
; %name%
; %icon%
Expand All @@ -135,14 +133,9 @@ screenchange-reload = true
pseudo-transparency = true

; -----------------------------------------------------------------------------
[module/systray]

type=custom/ipc

label =
hook-0 = pkill -8 trayer > /dev/null; trayer -l --widthtype request --margin 0 --align right --edge top --height 30 --distance 0,0 --distancefrom right,top --transparent true --alpha 255 &
format-font = 2
initial = 1
; [module/tray]
; type = internal/tray
; format = <tray>

; -----------------------------------------------------------------------------
[module/builtin_tray]
Expand Down
41 changes: 11 additions & 30 deletions dot_config/bspwm/sxhkdrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ alt + space
rofi -show drun

# make sxhkd reload its configuration files:
alt + shift + r
pkill -9 polybar; \
nohup polybar -c ~/.config/bspwm/polybar.ini > /dev/null 2>&1; \
bscp wm -r
alt + super + r
bspc wm -r



# close and kill
Expand All @@ -32,13 +31,13 @@ alt + ctrl + s
# state/flags
#

# set the window state
alt + {t,shift + t,s,f}
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
set the window state
alt + super + {i,t,f}
bspc node -t {\~tiled,\~floating,\~fullscreen}

alt + super + y
bspc node -g sticky

# set the node flags
# alt + ctrl + {m,x,y,z}
# bspc node -g {marked,locked,sticky,private}

#
# focus/swap
Expand All @@ -48,7 +47,7 @@ alt + {t,shift + t,s,f}
alt + {h,j,k,l}
bspc node -f {west,south,north,east}

alt + shift + {h,j,k,l}
alt + super + {h,j,k,l}
bspc node -s {west,south,north,east}

# focus the node for the given path jump
Expand Down Expand Up @@ -77,24 +76,6 @@ alt + {o,i}
alt + {1-9,0}
bspc desktop -f '^{1-9,10}'

alt + bracket{left,right}
bspc desktop -f '^{11,12}'

alt + shift + {1-9,0}
alt + super + {1-9,0}
bspc node -d '^{1-9,10}' --follow

alt + shift + bracket{left,right}
bspc node -d '^{11,12}' --follow

#
# move/resize
#

alt + ctrl + {h,j,k,l}
n=10; \
{ d1=left; d2=right; dx=-$n; dy=0; \
, d1=bottom; d2=top; dx=0; dy=$n; \
, d1=top; d2=bottom; dx=0; dy=-$n; \
, d1=right; d2=left; dx=$n; dy=0; \
} \
bspc node --resize $d1 $dx $dy || bspc node --resize $d2 $dx $dy
5 changes: 2 additions & 3 deletions dot_config/tmux/tmux.options.conf.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# vim:filetype=tmux :tw=80:et

# set -g default-terminal "wezterm"
set -g default-terminal "xterm-256color"
set -as terminal-features ",xterm-256color:RGB"
set -g default-terminal "wezterm"
set -as terminal-features ",wezterm:RGB"

# 0 is too far from ` ;)
setw -g pane-base-index 1
Expand Down
3 changes: 1 addition & 2 deletions dot_xinitrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ export LANG=en_US.UTF-8

# export "$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)"

exec awesome

exec bspwm

0 comments on commit f72f52c

Please sign in to comment.