diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-11-29 19:05:45 -0500 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-11-29 19:05:45 -0500 |
| commit | d5bff3fb167634f9ed5c58b95a4cffd04266e56c (patch) | |
| tree | 44df519af02502401e78d2c55ff6130f97ea7e6c /x/.xinitrc | |
| parent | Add openbsd login conf (diff) | |
| download | dotfiles-d5bff3fb167634f9ed5c58b95a4cffd04266e56c.zip | |
Update x dotfiles to support desktop/laptop
Diffstat (limited to 'x/.xinitrc')
| -rw-r--r-- | x/.xinitrc | 41 |
1 files changed, 32 insertions, 9 deletions
@@ -1,15 +1,38 @@ #!/bin/sh set -e -export MOZ_ACCELERATED=1 -export MOZ_WEBRENDER=1 +main() { + export MOZ_ACCELERATED=1 + export MOZ_WEBRENDER=1 -xrdb -merge ~/.Xresources -setxkbmap -option caps:ctrl_modifier -setxkbmap -option altwin:swap_alt_win + xrdb -merge ~/.Xresources + setxkbmap -option caps:ctrl_modifier + setxkbmap -option altwin:swap_lalt_lwin + xinput set-prop /dev/wsmouse "Device Accel Constant Deceleration" 1.0 -~/.fehbg & -~/.config/lemonbar-xft/bar.sh | lemonbar-xft -f "Hack:size=12" -g x24 -B "#1c1c1c" -F "#d0d0d0" & -~/.local/bin/sct-daemon & + ~/.fehbg & + start_lemonbar + ~/.local/bin/sct-daemon & -exec cwm + exec cwm +} + +start_lemonbar() { + _lemonbar_fontsize="10" + _lemonbar_width="48" + if is_laptop; then + _lemonbar_fontsize="12" + _lemonbar_width="24" + fi + ~/.config/lemonbar-xft/bar.sh | + lemonbar-xft \ + -f "Hack:size=${_lemonbar_fontsize}" \ + -g x${_lemonbar_width} \ + -B "#1c1c1c" -F "#d0d0d0" & +} + +is_laptop() { + [ "$(hostname -s)" = "openbsd-laptop" ] +} + +main |