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 # applications
alias code="code-oss" alias code="code-oss"
# git
alias gs="git status --short"
# dotfiles # 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 # sane mkdir
alias mkdir="mkdir -p" alias mkdir="mkdir -p"
@ -25,6 +22,3 @@ which kubectx kubens &>/dev/null && \
alias kx="kubectx" && \ alias kx="kubectx" && \
alias kn="kubens" alias kn="kubens"
# top
alias top="htop"
alias btop="bpytop"

View File

@ -1,21 +1,21 @@
#! /bin/bash #! /bin/bash
# [ -z "$WALLPAPER" ] && # set outputs
export WALLPAPER="/mnt/win/d/Sync/Pictures/Public/Wallpapers/365242.jpg" 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 sxhkd > /dev/null || sxhkd &
pgrep -x redshift > /dev/null || redshift &
pgrep -x picom > /dev/null || picom & pgrep -x picom > /dev/null || picom &
$HOME/.config/polybar/launch.sh # $HOME/.config/polybar/launch.sh
xwallpaper --zoom $WALLPAPER
xsetroot -cursor_name left_ptr & xsetroot -cursor_name left_ptr &
wpg -s "$WALLPAPER" setxkbmap -model evdev -layout eu
xrdb -merge "$HOME/.cache/wal/colors.Xresources"
setxkbmap -model evdev -layout us -variant altgr-intl
bspc monitor DP-4 -d I II III IV V bspc monitor DP-0 -d term browser game code mail
bspc monitor DP-2 -d VI VII VIII IX X bspc monitor DP-4 -d browser2 comm music server misc tmp
bspc config border_width 2 bspc config border_width 2
bspc config window_gap 12 bspc config window_gap 12
@ -24,6 +24,8 @@ bspc config split_ratio 0.5
bspc config borderless_monocle true bspc config borderless_monocle true
bspc config gapless_monocle true bspc config gapless_monocle true
bspc config focus_follows_pointer true
# -------------------------------------------------------- Rules # -------------------------------------------------------- Rules
# #
#---------------------------------------------- Default to float #---------------------------------------------- Default to float
@ -36,11 +38,12 @@ bspc rule -a kitty state=tiled
bspc rule -a Firefox state=tiled bspc rule -a Firefox state=tiled
bspc rule -a Firefox:*:"Save Image" state=floating bspc rule -a Firefox:*:"Save Image" state=floating
# --------------------------------------- Discord => Workspace 7 # ------------------------------------ Discord => Workspace Comm
bspc rule -a discord follow=on state=tiled desktop=VII bspc rule -a discord state=tiled desktop=comm
# ----------------------------------------- Steam => Workspace 4 # -------------------------------------- Steam => Workspace Game
bspc rule -a Steam follow=on state=tiled desktop=IV bspc rule -a Steam state=tiled desktop=game
bspc rule -a 'Steam:*:Friends List' split_ratio=0.3
# ------------------------------------------- sxiv => Fullscreen # ------------------------------------- Coding => Workspace Code
bspc rule -a Sxiv state=fullscreen 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'?> <?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig> <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"> <match target="pattern">
<test name="family" qual="any"> <test name="family" qual="any">
<string>monospace</string> <string>monospace</string>
</test> </test>
<edit name="family" mode="prepend" binding="strong"> <edit name="family" mode="prepend" binding="strong">
<string>JetBrains Mono</string> <string>JetBrainsMono Nerd Font Mono</string>
<string>FiraCode Nerd Font Mono</string>
</edit> </edit>
</match> </match>
<match> <match>
@ -15,7 +51,8 @@
<string>regular</string> <string>regular</string>
</test> </test>
<edit name="family" mode="prepend" binding="strong"> <edit name="family" mode="prepend" binding="strong">
<string>FOT-RodinBokutoh Pro</string> <string>Fira Sans</string>
<string>FiraCode Nerd Font</string>
</edit> </edit>
</match> </match>
<match> <match>
@ -23,7 +60,8 @@
<string>sans-serif</string> <string>sans-serif</string>
</test> </test>
<edit name="family" mode="prepend" binding="strong"> <edit name="family" mode="prepend" binding="strong">
<string>FOT-RodinBokutoh Pro</string> <string>Fira Sans</string>
<string>FiraCode Nerd Font</string>
</edit> </edit>
</match> </match>
<match> <match>
@ -31,20 +69,10 @@
<string>serif</string> <string>serif</string>
</test> </test>
<edit name="family" mode="prepend" binding="strong"> <edit name="family" mode="prepend" binding="strong">
<string>FOT-RodinBokutoh Pro</string> <string>Fira Sans</string>
<string>FiraCode Nerd Font</string>
</edit> </edit>
</match> </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> </fontconfig>

View File

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

5
.vimrc
View File

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

View File

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

View File

@ -8,6 +8,7 @@
[[ $- != *i* ]] && return [[ $- != *i* ]] && return
PATH=~/.local/bin:$PATH PATH=~/.local/bin:$PATH
PATH=~/.luarocks/bin:$PATH
################################# #################################
# - bash_aliases # - bash_aliases
@ -16,6 +17,12 @@ PATH=~/.local/bin:$PATH
# always bash-completion first # always bash-completion first
[[ -r /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion [[ -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 # integrate git prompt functions
# will break PS1 if not used # will break PS1 if not used
[[ -f /usr/share/git/git-prompt.sh ]] && . /usr/share/git/git-prompt.sh [[ -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