Compare commits

..

6 Commits

Author SHA1 Message Date
fanyx 00e1b15521 Update bspwm, sxhkd setup 2022-06-09 13:53:30 +02:00
fanyx 05f42e9d6e Add custom completions to bash 2022-06-09 13:53:09 +02:00
fanyx 8d27594354 Remove set shell 2022-06-09 13:51:55 +02:00
fanyx 62d271966d Default to Fira Sans and JetBrainsCode Nerd Fonts 2022-06-09 13:51:30 +02:00
fanyx 8c3b300da8 move git alias to git file 2022-06-09 13:50:46 +02:00
fanyx cc452f6a9e add void pkglist 2022-06-09 13:49:22 +02:00
10 changed files with 417 additions and 118 deletions

8
.alias
View File

@ -8,11 +8,8 @@ alias la="ll -a"
# applications
alias code="code-oss"
# git
alias gs="git status --short"
# dotfiles
alias dot="/usr/bin/git --git-dir=$HOME/git/dotfiles/ --work-tree=$HOME"
alias dot="git --git-dir=$HOME/git/dotfiles/ --work-tree=$HOME"
# sane mkdir
alias mkdir="mkdir -p"
@ -25,6 +22,3 @@ which kubectx kubens &>/dev/null && \
alias kx="kubectx" && \
alias kn="kubens"
# top
alias top="htop"
alias btop="bpytop"

View File

@ -1,21 +1,21 @@
#! /bin/bash
# [ -z "$WALLPAPER" ] &&
export WALLPAPER="/mnt/win/d/Sync/Pictures/Public/Wallpapers/365242.jpg"
# set outputs
xrandr --output DP-0 --primary --mode 2560x1440 --rate 165.08 --left-of DP-4 --output DP-4 --mode 2560x1440 --rate 74.92
: ${WALLPAPER:="/mnt/win/d/Sync/Pictures/Public/Wallpapers/365242.jpg"}
# feh --bg-scale $WALLPAPER
~/.fehbg
pgrep -x sxhkd > /dev/null || sxhkd &
pgrep -x redshift > /dev/null || redshift &
pgrep -x picom > /dev/null || picom &
$HOME/.config/polybar/launch.sh
xwallpaper --zoom $WALLPAPER
# $HOME/.config/polybar/launch.sh
xsetroot -cursor_name left_ptr &
wpg -s "$WALLPAPER"
xrdb -merge "$HOME/.cache/wal/colors.Xresources"
setxkbmap -model evdev -layout us -variant altgr-intl
setxkbmap -model evdev -layout eu
bspc monitor DP-4 -d I II III IV V
bspc monitor DP-2 -d VI VII VIII IX X
bspc monitor DP-0 -d term browser game code mail
bspc monitor DP-4 -d browser2 comm music server misc tmp
bspc config border_width 2
bspc config window_gap 12
@ -24,6 +24,8 @@ bspc config split_ratio 0.5
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config focus_follows_pointer true
# -------------------------------------------------------- Rules
#
#---------------------------------------------- Default to float
@ -36,11 +38,12 @@ bspc rule -a kitty state=tiled
bspc rule -a Firefox state=tiled
bspc rule -a Firefox:*:"Save Image" state=floating
# --------------------------------------- Discord => Workspace 7
bspc rule -a discord follow=on state=tiled desktop=VII
# ------------------------------------ Discord => Workspace Comm
bspc rule -a discord state=tiled desktop=comm
# ----------------------------------------- Steam => Workspace 4
bspc rule -a Steam follow=on state=tiled desktop=IV
# -------------------------------------- Steam => Workspace Game
bspc rule -a Steam state=tiled desktop=game
bspc rule -a 'Steam:*:Friends List' split_ratio=0.3
# ------------------------------------------- sxiv => Fullscreen
bspc rule -a Sxiv state=fullscreen
# ------------------------------------- Coding => Workspace Code
bspc rule -a "code - oss" state=tiled desktop=code

27
.config/completions/sv Normal file
View File

@ -0,0 +1,27 @@
# bash completion for runit sv(1)
_sv()
{
local cur prev words cword commands
_init_completion || return
commands='up down status once pause cont hup alarm interrupt 1 2 term kill exit start stop restart shutdown force-stop force-reload force-restart force-shutdown'
case $prev in
-w)
return
;;
-* | sv)
COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) )
return
;;
*)
COMPREPLY=( /var/service/* )
COMPREPLY+=( /home/hendrik/sv/* )
COMPREPLY=( ${COMPREPLY[@]##*/} )
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- ${cur}) )
return
;;
esac
}
complete -F _sv sv

133
.config/completions/xbps Normal file
View File

@ -0,0 +1,133 @@
_xbps_parse_help() {
local IFS line word
$1 --help 2>&1 | while IFS=$'\n' read -r line; do
[[ $line == *([ $'\t'])-* ]] || continue
IFS=$' \t,='
for word in $line; do
[[ $word == -* ]] || continue
printf -- '%s\n' $word
done
done | sort | uniq
}
_xbps_all_packages() {
xbps-query -Rs "$1*" | sed 's/^... \([^ ]*\)-.* .*/\1/'
}
_xbps_installed_packages() {
xbps-query -l | sed 's/^.. \([^ ]*\)-.* .*/\1/'
}
_xbps_all_reply() {
COMPREPLY=( $( compgen -W '$(_xbps_all_packages "$1")' -- "$1") )
}
_xbps_installed_reply() {
COMPREPLY=( $( compgen -W '$(_xbps_installed_packages)' -- "$1") )
}
_xbps_complete() {
local cur prev words cword
_init_completion || return
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _xbps_parse_help "$1" )' -- "$cur") )
return
fi
local common='C|-config|r|-rootdir'
local morecommon="$common|c|-cachedir"
local modes='auto manual hold unhold'
local props='architecture
archive-compression-type
automatic-install
build-options
conf_files
conflicts
filename-sha256
filename-size
homepage
install-date
install-msg
install-script
installed_size
license
maintainer
metafile-sha256
packaged-with
pkgver
preserve
provides
remove-msg
remove-script
replaces
repository
shlib-provides
shlib-requires
short_desc
source-revisions
state'
case $1 in
xbps-dgraph)
if [[ $prev != -@(c|o|r) ]]; then
_xbps_installed_reply $cur
return
fi
;;
xbps-install | xi)
if [[ $prev != -@($morecommon) ]]; then
_xbps_all_reply $cur
return
fi
;;
xbps-pkgdb)
if [[ $prev == -@(m|-mode) ]]; then
COMPREPLY=( $( compgen -W "$modes" -- "$cur") )
return
fi
if [[ $prev != -@($common) ]]; then
_xbps_installed_reply $cur
return
fi
;;
xbps-query)
if [[ $prev == -@(p|-property) ]]; then
COMPREPLY=( $( compgen -W "$props" -- "$cur") )
return
fi
if [[ $prev != -@($morecommon|o|-ownedby) ]]; then
local w
for w in "${words[@]}"; do
if [[ "$w" == -@(R|-repository) ]]; then
_xbps_all_reply $cur
return
fi
done
_xbps_installed_reply $cur
return
fi
;;
xbps-reconfigure)
if [[ $prev != -@($common) ]]; then
_xbps_installed_reply $cur
return
fi
;;
xbps-remove | xr)
if [[ $prev != -@($morecommon) ]]; then
_xbps_installed_reply $cur
return
fi
;;
esac
_filedir
}
complete -F _xbps_complete xbps-checkvers xbps-create xbps-dgraph xbps-install \
xbps-pkgdb xbps-query xbps-reconfigure xbps-remove xbps-rindex xi xr

View File

@ -1,13 +1,49 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<dir prefix="xdg">fonts</dir>
<!-- Alias Helvetica and Courier New -->
<alias>
<family>Helvetica</family>
<prefer><family>sans-serif</family></prefer>
</alias>
<alias>
<family>Helvetica Neue</family>
<prefer><family>sans-serif</family></prefer>
</alias>
<alias>
<family>Courier New</family>
<prefer><family>monospace</family></prefer>
</alias>
<alias>
<family>Arial</family>
<prefer><family>sans-serif</family></prefer>
</alias>
<alias>
<family>Times New Roman</family>
<prefer><family>serif</family></prefer>
</alias>
<alias>
<family>Liberation Mono</family>
<prefer><family>monospace</family></prefer>
</alias>
<!-- Fuck Helvetica -->
<match>
<test name="family"><string>Helvetica</string></test>
<edit binding="same" mode="assign" name="family">
<string>Fira Sans</string>
</edit>
</match>
<!-- Set default fonts -->
<match target="pattern">
<test name="family" qual="any">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>JetBrains Mono</string>
<string>JetBrainsMono Nerd Font Mono</string>
<string>FiraCode Nerd Font Mono</string>
</edit>
</match>
<match>
@ -15,7 +51,8 @@
<string>regular</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>FOT-RodinBokutoh Pro</string>
<string>Fira Sans</string>
<string>FiraCode Nerd Font</string>
</edit>
</match>
<match>
@ -23,7 +60,8 @@
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>FOT-RodinBokutoh Pro</string>
<string>Fira Sans</string>
<string>FiraCode Nerd Font</string>
</edit>
</match>
<match>
@ -31,20 +69,10 @@
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>FOT-RodinBokutoh Pro</string>
<string>Fira Sans</string>
<string>FiraCode Nerd Font</string>
</edit>
</match>
<alias>
<family>Helvetica</family>
<prefer>
<family>FOT-RodinBokutoh Pro</family>
</prefer>
</alias>
<alias>
<family>Liberation Mono</family>
<prefer>
<family>JetBrains Mono</family>
</prefer>
</alias>
<dir>~/.fonts</dir>
</fontconfig>

View File

@ -19,12 +19,12 @@ super + alt + {q,r}
bspc {quit,wm -r}
# close and kill
super + shift + {w,q}
super + {w,q}
bspc node -{c,k}
# alternate between the tiled and monocle layout
super + m
bspc desktop -l next
# super + m
# bspc desktop -l next
# send the newest marked node to the newest preselected node
super + y
@ -46,6 +46,13 @@ super + {t,shift + t,s,f}
super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private}
# send node to left tree and rotate 90 degrees
ctrl + alt + {h,j,k,l}
bspc node -n {west,south,north,east}
ctrl + alt + r
bspc node -r 90
#
# focus/swap
#
@ -54,31 +61,33 @@ super + ctrl + {m,x,y,z}
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 paired desktop
super + {1-5}
select={1-5}; \
current="$(bspc query -M -m focused)"; \
opposite="$(bspc query -M -m 'any.!focused')"; \
bspc desktop -f "$opposite:^$select"; \
bspc desktop -f "$current:^$select"
# focus the next/previous window in the current desktop
super + {_,shift + }c
bspc node -f {next,prev}.local.!hidden.window
# focus or move node to single desktop
super + ctrl + {1-9,0}
bspc desktop -f "^{1-9,0}"
# focus the next/previous desktop in the current monitor
super + bracket{left,right}
bspc desktop -f {prev,next}.local
# send note to single desktop
super + shift + {1-9,0}
bspc node -d "^{1-9,0}" --follow
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
# swap current desktop with target desktop and switch to paired desktop afterwards
super + alt + {1-5}
select={1-5}; \
current="$(bspc query -M -m focused)"; \
opposite="$(bspc query -M -m 'any.!focused')"; \
bspc desktop -s "$current:^$select" --follow; \
bspc desktop -f "$opposite:^$select"
# 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}'
# move current window to tmp desktop // or recall tmp windows
super + m
bspc node -d "tmp"
#
# preselect
@ -88,30 +97,10 @@ super + {_,shift + }{1-9,0}
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}
# super + ctrl + shift + space
# bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel

5
.vimrc
View File

@ -37,8 +37,8 @@ set laststatus=2
set wildmenu
set tabpagemax=50
set noerrorbells
set visualbell
set mouse=a
" set visualbell
" set mouse=a
set title
" Folding
@ -53,5 +53,4 @@ set formatoptions+=j
set nomodeline
set noswapfile
set nrformats-=octal
set shell
set wildignore+=.pyc,.swp

View File

@ -3,11 +3,17 @@
# import general use aliases
[[ -r ~/.alias ]] && . ~/.alias
# config files
alias cb="vim ~/.config/bspwm/bspwmrc"
alias cs="vim ~/.config/sxhkd/sxhkdrc"
# xbps-install
# use xtools instead
# alias xin="doas xbps-install -S"
alias xup="xi -Su"
complete -F _xbps_complete xi
# xbps-query
alias xqr="xbps-query"
alias xs="xqr -Rs"

View File

@ -8,6 +8,7 @@
[[ $- != *i* ]] && return
PATH=~/.local/bin:$PATH
PATH=~/.luarocks/bin:$PATH
#################################
# - bash_aliases
@ -16,6 +17,12 @@ PATH=~/.local/bin:$PATH
# always bash-completion first
[[ -r /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
if [[ -d ~/.config/completions ]]; then
for i in ~/.config/completions/*; do
. $i
done
fi
# integrate git prompt functions
# will break PS1 if not used
[[ -f /usr/share/git/git-prompt.sh ]] && . /usr/share/git/git-prompt.sh

113
.void.pkgs Normal file
View File

@ -0,0 +1,113 @@
ImageMagick
NetworkManager
NetworkManager
Signal
adwaita
arandr
asunder
base
bash
bsdtar
bspwm
curl
dbus
direnv
discord
dmenu
docker
docker
easyeffects
elixir
elogind
eog
exa
feh
ffmpeg
firefox
font
font
fontmanager
gnome
gpick
grub
hplip
htop
hydrus
jq
keepassxc
kitty
latte
lesspipe
libdrm
libgcc
libstdc++
libu2f
lightdm
lua54
luarocks
lutris
lxappearance
mesa
mgba
nautilus
neofetch
nerd
net
network
noto
noto
noto
noto
ntfs
nvidia
nvidia
obmenu
obs
openjdk8
openntpd
openvpn
pam
papirus
papirus
pavucontrol
picom
piper
pipewire
polybar
ppsspp
protontricks
pulseaudio
qbittorrent
qrencode
qt5
redshift
redshift
schedtool
scrot
socklog
source
sqlitebrowser
steam
strace
sxhkd
syncthing
syncthing
telegram
unzip
vim
vlc
void
void
void
vscode
wget
wine
wine
wine
winetricks
wireguard
xfd
xorg
xterm
xtitle
xtools