Compare commits

..

No commits in common. "master" and "0082e1bd6bcaea2930f8cc70d14f2da24f2fd2aa" have entirely different histories.

89 changed files with 37 additions and 3380 deletions

27
.alias
View File

@ -1,29 +1,26 @@
# utils
alias ls="eza --group-directories-first -gm"
# exa and ls
alias ls="exa --group-directories-first -gm"
alias ll="ls -lhF"
alias lt="ll -TL $1"
alias ld="ll -d"
alias la="ll -a"
alias cat="bat -pp"
# applications
alias code="code-oss"
alias code="codium"
# git
alias gs="git status --short"
# dotfiles
alias dot="git --git-dir=$HOME/git/dotfiles/ --work-tree=$HOME"
alias dot="/usr/bin/git --git-dir=$HOME/git/dotfiles/ --work-tree=$HOME"
# sane mkdir
alias mkdir="mkdir -p"
# k8s
alias k="kubectl"
alias kga="k get all"
alias kgp="k get pod"
alias kgsc="k get secrets"
alias kgsv="k get services"
complete -F __start_kubectl k
alias dps='docker ps --format '\''table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Networks}}'\'''
# kx, kn
command -v kubectx kubens &>/dev/null && \
which kubectx kubens >/dev/null && \
alias kx="kubectx" && \
alias kn="kubens"

View File

@ -1,61 +0,0 @@
#! /bin/bash
# Set outputs
xrandr --output DP-0 --primary --mode 2560x1440 --rate 165.08 --left-of DP-4 --output DP-4 --mode 2560x1440 --rate 74.92
# Monitor description
bspc monitor DP-0 -d term browser game code misc
bspc monitor DP-4 -d browser2 comm music server mail tmp
# Restore wallpaper
~/.fehbg
# Autolaunch
pgrep -x Discord >/dev/null || Discord &
pgrep -x steam >/dev/null || steam &
# Utilities
xsetroot -cursor_name left_ptr &
setxkbmap -model evdev -layout eu
# Configuration
bspc config border_width 3
bspc config window_gap 18
bspc config normal_border_color '#21201E'
bspc config active_border_color '#21201E'
bspc config focused_border_color '#C93B59'
bspc config split_ratio 0.5
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config focus_follows_pointer false
# -------------------------------------------------------- Rules
#
#---------------------------------------------- Default to float
bspc rule -a \* state=floating
#---------------------------------------------- Terminal / Kitty
bspc rule -a kitty state=tiled
#------------------------------------------------------- Firefox
bspc rule -a Firefox state=tiled
bspc rule -a "Firefox:*:Save Image" state=floating
bspc rule -a "Firefox:*:File Upload" state=floating
# ------------------------------------ Discord => Workspace Comm
bspc rule -a discord state=tiled desktop=comm
# -------------------------------------- Steam => Workspace Game
bspc rule -a Steam state=tiled desktop=game
bspc rule -a "Steam:Friends List" split_ratio=0.3
# ------------------------------------- Coding => Workspace Code
bspc rule -a "Code - OSS" state=tiled desktop=code
# ------------------------------------------------------- Hydrus
bspc rule -a "Hydrus Client:*:main" state=tiled desktop=misc
bspc rule -a "Hydrus Client:*:main - hydrus 488" state=tiled desktop=misc
bspc rule -a "Hydrus Client:*:hydrus client media viewer" state=tiled

View File

@ -1,5 +0,0 @@
# alias for kubectl to k
command -v 2>&1 >/dev/null kubectl && source <(kubectl completion bash)
complete -o default -F __start_kubectl k

View File

@ -1,28 +0,0 @@
# 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}/sv/* )
COMPREPLY=( ${COMPREPLY[@]##*/} )
COMPREPLY=( "${COMPREPLY[@]/README.md}" )
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- ${cur}) )
return
;;
esac
}
complete -F _sv sv

View File

@ -1,133 +0,0 @@
_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 +0,0 @@
user_pref("media.suspend-bkgnd-video.enabled", false);

View File

@ -1,75 +0,0 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- 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>Fira Code</string>
<string>JetBrains Mono</string>
</edit>
</match>
<match>
<test name="family" qual="any">
<string>regular</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Fira Sans</string>
</edit>
</match>
<match>
<test name="family" qual="any">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Fira Sans</string>
</edit>
</match>
<match>
<test name="family" qual="any">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Fira Sans</string>
</edit>
</match>
</fontconfig>

View File

@ -1,55 +0,0 @@
[user]
email = fanyx@posteo.net
name = fanyx
[includeIf "gitdir:~/b1/"]
path = ~/b1/.config/git/config
[includeIf "gitdir:~/b1/customer/sap/"]
path = ~/b1/customer/sap/.config/git/config
[alias]
# branches
branches = branch -a
sb = switch
sc = switch -c
# commits
cm = commit -m
fixup = "!git log -n50 --pretty='format:%h %s' --no-merges | fzf | cut -c -7 | xargs -o git commit --fixup"
ri = "rebase -i"
# push
pushf = "push --force-with-lease"
# log
l = log --pretty='format:%h %G? %s%d' -n20 --graph --color
fzs = "!git log -n50 --pretty='format:%h %s' --no-merges | fzf | cut -c -7 | xargs -o git show"
# status
s = status -sb
ss = s -uno
# other
tags = tag -l
remotes = remote -v
[color]
diff = auto
[column]
ui = auto
[init]
defaultBranch = main
[branch]
sort = -committerdate
[rebase]
autosquash = true
[credential]
helper = store
[core]
editor = vim

View File

@ -1,15 +0,0 @@
#!/bin/bash
# xlint all changed templates
# xgensum all changed templates
EX_ERR=1
FILES=$(git diff --name-only --staged | grep template)
for FILE in ${FILES}; do
stat "${FILE}" &> /dev/null || continue
echo "linting ${FILE}:"
xlint $FILE || exit $EX_ERR
xgensum -i $FILE || exit $EX_ERR
echo "all clear."
done

View File

@ -1,16 +0,0 @@
[Settings]
gtk-theme-name=Orchis-Pink-Dark
gtk-icon-theme-name=la-capitaine-icon-theme
gtk-font-name=Sans 10
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintmedium
gtk-cursor-theme-name=Qogir
gtk-application-prefer-dark-theme=1

View File

@ -1,21 +0,0 @@
background #1e1e1e
foreground #b8bcb9
cursor #eee
selection_background #efcc00
color0 #3a3c43
color8 #888987
color1 #be3e48
color9 #fb001e
color2 #869a3a
color10 #0e712e
color3 #c4a535
color11 #c37033
color4 #4e76a1
color12 #176ce3
color5 #855b8d
color13 #fb0067
color6 #568ea3
color14 #2d6f6c
color7 #b8bcb9
color15 #fcffb8
selection_foreground #1e1e1e

View File

@ -1,54 +0,0 @@
background #1E1C31
foreground #CBE3E7
cursor #A1EFD3
selection_background #3E3859
selection_foreground #CBE3E7
# black
color0 #1E1C31
color8 #585273
# red
color1 #F48FB1
color9 #F02E6E
# green
color2 #A1EFD3
color10 #7FE9C3
# yellow
color3 #FFE6B3
color11 #F2B482
# blue
color4 #91DDFF
color12 #78A8FF
# magenta
color5 #D4BFFF
color13 #7676FF
# cyan
color6 #ABF8F7
color14 #63F2F1
# white
color7 #CBE3E7
color15 #8A889D
active_border_color #A1EFD3
inactive_border_color #585273
bell_border_color #F56574
active_tab_foreground #2D2B40
active_tab_background #63F2F1
active_tab_font_style bold
inactive_tab_foreground #CBE3E7
inactive_tab_background #585273
inactive_tab_font_style normal
url_color #D4BFFF

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
#!/usr/bin/env bash
kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty

View File

@ -1,13 +0,0 @@
#!/usr/bin/env bash
file=$1
w=$2
h=$3
x=$4
y=$5
if [[ "$( file -Lb --mime-type "$file")" =~ ^image ]]; then
kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$file" < /dev/null > /dev/tty
exit 1
fi
# pistol "$file"

View File

@ -1,51 +0,0 @@
# kitty previewer
set previewer ~/.config/lf/lf_kitty_preview
set cleaner ~/.config/lf/lf_kitty_clean
# extract the current file with the right command
# (xkcd link: https://xkcd.com/1168/)
cmd extract ${{
set -f
case $f in
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
*.tar.gz|*.tgz) tar xzvf $f;;
*.tar.xz|*.txz) tar xJvf $f;;
*.zip) unzip $f;;
*.rar) unrar x $f;;
*.7z) 7z x $f;;
esac
}}
# compress current file or selected files with tar and gunzip
cmd tar ${{
set -f
mkdir $1
cp -r $fx $1
tar czf $1.tar.gz $1
rm -rf $1
}}
# compress current file or selected files with zip
cmd zip ${{
set -f
mkdir $1
cp -r $fx $1
zip -r $1.zip $1
rm -rf $1
}}
# zoxide
cmd cd %{{
result="$(zoxide query --exclude $PWD $@ | sed 's/\\/\\\\/g;s/"/\\"/g')"
lf -remote "send $id cd \"$result\""
}}
cmd cdi ${{
result="$(zoxide query -i | sed 's/\\/\\\\/g;s/"/\\"/g')"
lf -remote "send $id cd \"$result\""
}}
cmd on-cd &{{
zoxide add "$PWD"
}}

View File

@ -1,16 +0,0 @@
db_file "~/.config/mpd/mpd.db"
pid_file "~/.config/mpd/mpd.pid"
state_file "~/.config/mpd/state"
sticker_file "~/.config/mpd/sticker.sql"
log_file "syslog"
music_directory "~/Sync/Public/Music"
playlist_directory "~/.config/mpd/playlists"
auto_update "yes"
audio_output {
type "pulse"
name "pulse"
}

View File

@ -1,49 +0,0 @@
Final Fantasy/Final Fantasy I & II - Dawn of Souls/203 Battle Scene 1.flac
Final Fantasy/Final Fantasy I & II - Dawn of Souls/224 Battle Scene A.flac
Final Fantasy/Final Fantasy I & II - Dawn of Souls/226 Battle Scene 2.flac
Final Fantasy/Final Fantasy I Original Soundtrack/16 Battle.ogg
Final Fantasy/Final Fantasy II Original Soundtrack/01 Battle Theme 1.ogg
Final Fantasy/Final Fantasy II Original Soundtrack/16 Battle Theme 2.ogg
Final Fantasy/Final Fantasy III - DS Original Soundtrack/04 Battle 1.ogg
Final Fantasy/Final Fantasy III - DS Original Soundtrack/27 Battle 2.ogg
Final Fantasy/Final Fantasy III - DS Original Soundtrack/56 The Final Battle -3-.ogg
Final Fantasy/Final Fantasy III Original Soundtrack/03 Battle 1.ogg
Final Fantasy/Final Fantasy III Original Soundtrack/26 Battle 2.ogg
Final Fantasy/Final Fantasy III Original Soundtrack/55 This is the Last Battle -3-.ogg
Final Fantasy/Final Fantasy IV - DS Original Soundtrack/09 Battle 1.ogg
Final Fantasy/Final Fantasy IV - DS Original Soundtrack/14 Big Battle 2.ogg
Final Fantasy/Final Fantasy IV - DS Original Soundtrack/04 Battle with Golbeza's Four Kings.ogg
Final Fantasy/Final Fantasy IV - DS Original Soundtrack/19 Final Battle.ogg
Final Fantasy/Final Fantasy IV Original Soundtrack/08 Fight 1.ogg
Final Fantasy/Final Fantasy IV Original Soundtrack/13 Fight 2.ogg
Final Fantasy/Final Fantasy IV Original Soundtrack/28 The Dreadful Fight.ogg
Final Fantasy/Final Fantasy IV Original Soundtrack/43 The Final Battle.ogg
Final Fantasy/Final Fantasy IX Original Soundtrack/18 Battle.ogg
Final Fantasy/Final Fantasy IX Original Soundtrack/21 Boss Battle.ogg
Final Fantasy/Final Fantasy IX Original Soundtrack/15 Dark Messenger.ogg
Final Fantasy/Final Fantasy IX Original Soundtrack/16 Final Battle.ogg
Final Fantasy/Final Fantasy V Original Soundtrack/07 The Battle.ogg
Final Fantasy/Final Fantasy V Original Soundtrack/19 The Fierce Battle.ogg
Final Fantasy/Final Fantasy V Original Soundtrack/03 Battle with Gilgamesh.ogg
Final Fantasy/Final Fantasy V Original Soundtrack/16 The Decisive Battle.ogg
Final Fantasy/Final Fantasy V Original Soundtrack/17 The Last Battle.ogg
Final Fantasy/Final Fantasy VI Original Soundtrack/05 Battle Theme.ogg
Final Fantasy/Final Fantasy VI Original Soundtrack/24 The Decisive Battle.ogg
Final Fantasy/Final Fantasy VI Original Soundtrack/03 The Fierce Battle.ogg
Final Fantasy/Final Fantasy VI Original Soundtrack/14 Dancing Mad (part 5).ogg
Final Fantasy/Final Fantasy VII Original Soundtrack/10 Fighting.ogg
Final Fantasy/Final Fantasy VII Original Soundtrack/20 Still More Fighting.ogg
Final Fantasy/Final Fantasy VII Original Soundtrack/22 Crazy Motorcycle Chase.ogg
Final Fantasy/Final Fantasy VII Original Soundtrack/14 J-E-N-O-V-A.ogg
Final Fantasy/Final Fantasy VII Original Soundtrack/15 The Birth of God.ogg
Final Fantasy/Final Fantasy VII Original Soundtrack/16 One-Winged Angel.ogg
Final Fantasy/Final Fantasy VIII Original Soundtrack/04 Don't Be Afraid.ogg
Final Fantasy/Final Fantasy VIII Original Soundtrack/10 Force Your Way.ogg
Final Fantasy/Final Fantasy VIII Original Soundtrack/19 The Man With the Machine Gun.ogg
Final Fantasy/Final Fantasy VIII Original Soundtrack/09 The Extreme.ogg
Final Fantasy/Final Fantasy X Original Soundtrack/05 Other World (Alternate 3).ogg
Final Fantasy/Final Fantasy X Original Soundtrack/09 Battle.ogg
Final Fantasy/Final Fantasy X Original Soundtrack/16 Enemy Attack.ogg
Final Fantasy/Final Fantasy X Original Soundtrack/10 Challenge.ogg
Final Fantasy/Final Fantasy X Original Soundtrack/15 Seymour Battle.ogg
Final Fantasy/Final Fantasy X Original Soundtrack/18 Decisive Battle.ogg

View File

@ -1,37 +0,0 @@
vim.cmd('source ~/.vimrc')
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
vim.g.mapleader = " "
require("lazy").setup("plugins", {
defaults = { lazy = false },
install = { colorscheme = { "tokyonight" } },
checker = { enabled = false },
change_detection = { notify = false },
performance = {
rtp = {
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})
require("config")

View File

@ -1,13 +0,0 @@
require("config.settings")
-- require("config.yaml")
-- Remaps
vim.keymap.set("n", "<leader><C-e>", vim.cmd.Ex)
-- Telescope
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.git_files, {})
-- Nvim-Tree

View File

@ -1,21 +0,0 @@
vim.o.tabstop = 4
vim.o.expandtab = true
vim.o.softtabstop = 4
vim.o.shiftwidth = 4
vim.o.number = true
vim.o.relativenumber = true
vim.o.swapfile = false
vim.o.backup = false
vim.o.hlsearch = false
vim.o.incsearch = true
vim.o.termguicolors = true
vim.o.scrolloff = 8
vim.o.updatetime = 50
vim.opt.colorcolumn = '80'

View File

@ -1,4 +0,0 @@
return {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
}

View File

@ -1,6 +0,0 @@
local fugitive = {
'tpope/vim-fugitive',
}
return fugitive

View File

@ -1,6 +0,0 @@
local gitsigns = {
'lewis6991/gitsigns.nvim',
}
return gitsigns

View File

@ -1,9 +0,0 @@
local monokai = {
'tanvirtin/monokai.nvim',
config = function()
vim.cmd([[colorscheme monokai]])
end
}
return { monokai }

View File

@ -1,9 +0,0 @@
local telescope = {
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim"
}
}
return { telescope }

View File

@ -1,239 +0,0 @@
[colors]
background = #21201E
foreground = #EAD17F
primary = #F0C674
secondary = #8ABEB7
yellow = #d79921
blue = #458588
purple = #b16286
eggplant = #3E2441
red = #E01D4D
white = #ebdbb2
aqua = #689d6a
alert = #A54242
disabled = #76573A
; character clothing colors
color-1 = #C5A55C
color-2 = #B43F1C
color-3 = #D0C0AD
color-4 = #88748F
; deep crystal colors
crystal-1 = #BA3320
crystal-2 = #CDB648
crystal-3 = #568125
crystal-4 = #4048A4
; light crystal colors
; crystal-1 = #D57F5E
; crystal-2 = #E7D570
; crystal-3 = #B4D175
; crystal-4 = #A3B3CA
[fonts]
font-0 = Font Awesome 5 Free:style=solid:size=13;3
font-1 = FiraCode Nerd Font Mono:style=bold:size=13;3
font-2 = JetBrainsMono Nerd Font Mono:style=bold:size=11;3
font-3 = JetBrainsMono Nerd Font Mono:style=bold:size=10;3
[bar/primary]
monitor = DP-0
width = 100%
height = 32
padding-right = 2
enable-ipc = true
fixed-center = true
wm-restack = bspwm
override-redirect = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
font-0 = ${fonts.font-0}
font-1 = ${fonts.font-1}
font-2 = ${fonts.font-2}
font-3 = ${fonts.font-3}
modules-left = bspwm xwindow
modules-center = mpd
modules-right = pulseaudio cpu memory eth sep date
[bar/secondary]
monitor = DP-4
width = 100%
height = 30
fixed-center = true
wm-restack = bspwm
tray-position = right
override-redirect = false
background = ${colors.background}
foreground = ${colors.foreground}
font-0 = ${fonts.font-0}
font-1 = ${fonts.font-1}
font-2 = ${fonts.font-2}
font-3 = ${fonts.font-3}
modules-left = bspwm
# modules-center = date
modules-right = date sep
[module/bspwm]
type = internal/bspwm
pin-workspaces = true
enable-click = true
ws-icon-0 = term;
ws-icon-1 = browser;
ws-icon-2 = game;
ws-icon-3 = code;
ws-icon-4 = mail;
ws-icon-5 = browser2;
ws-icon-6 = comm;
ws-icon-7 = music;
ws-icon-8 = server;
ws-icon-9 = misc;
ws-icon-10 = tmp;
format = <label-state>
format-font = 1
label-focused = %icon%
label-focused-background = ${colors.eggplant}
label-focused-padding = 2
label-occupied = %icon%
label-occupied-padding = 2
label-urgent = %icon%
label-urgent-padding = 2
label-urgent-background = ${colors.alert}
label-empty = %icon%
label-empty-padding = 2
label-empty-foreground = ${colors.disabled}
label-separator = |
label-separator-foreground = ${colors.disabled}
[module/sep]
type = custom/text
content = |
content-foreground = ${colors.disabled}
content-padding = 1
[module/xwindow]
type = internal/xwindow
format = <label>
format-padding = 2
format-font = 4
label = %title%
label-maxlen = 50
[module/pulseaudio]
type = internal/pulseaudio
use-ui-max = false
format-volume = <ramp-volume> <label-volume>
format-volume-foreground = ${colors.foreground}
format-volume-underline = ${colors.crystal-1}
format-volume-padding = 1
ramp-volume-0 = " "
ramp-volume-1 = " "
ramp-volume-2 = " "
ramp-volume-font = 1
ramp-volume-foreground = ${colors.foreground}
label-volume = %percentage%%
label-volume-font = 3
format-muted-padding = 1
label-muted = ""
label-muted-foreground = ${colors.disabled}
click-middle = pavucontrol
[module/cpu]
type = internal/cpu
interval = 2
format-padding = 1
format-prefix = " "
format-prefix-font = 1
format-prefix-foreground = ${colors.foreground}
format-prefix-underline = ${colors.crystal-2}
label = %percentage:2%%
label-underline = ${colors.crystal-2}
label-font = 3
[module/memory]
type = internal/memory
interval = 2
format-padding = 1
format-prefix = " "
format-prefix-font = 1
format-prefix-foreground = ${colors.underline}
format-prefix-underline = ${colors.crystal-3}
label = %percentage_used:2%%
label-underline = ${colors.crystal-3}
label-font = 3
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-connected-padding = 1
format-connected-prefix-padding-right = 1
format-connected-prefix-font = 1
format-connected-prefix-foreground = ${colors.foreground}
format-connected-prefix-underline = ${colors.crystal-4}
label-connected-font = 3
label-connected-underline = ${colors.crystal-4}
format-disconnected = <label-disconnected>
format-disconnected-foreground = ${colors.disabled}
format-disconnected-padding = 2
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
label-disconnected-font = 3
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip%
[module/eth]
inherit = network-base
interface-type = wired
format-connected-prefix = " "
label-connected = "%local_ip%"
[module/date]
type = internal/date
interval = 1
date-alt = %H:%M
# date = %Y-%m-%d %H:%M:%S
date = %a %e %b %H:%M:%S
label = %date%
label-foreground = ${colors.primary}
label-font = 3
format =  <label>
format-underline = ${colors.foreground}
format-padding = 1
[settings]
screenchange-reload = true
pseudo-transparency = true
; vim:ft=dosini

View File

@ -1,8 +0,0 @@
#!/bin/env bash
pkill polybar >/dev/null
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
polybar primary &
polybar secondary &

View File

@ -1,5 +0,0 @@
configuration {
show-icons: true;
icon-theme: "Papirus";
}
@theme "/usr/share/rofi/themes/gruvbox-dark.rasi"

View File

@ -1,13 +0,0 @@
#!/bin/sh
rofi \
-show drun \
-modi run,drun \
-no-lazy-grab \
-scroll-method 0 \
-drun-match-fields all \
-drun-display-format "{name}" \
-no-drun-show-actions \
-terminal kitty
# -theme "${HOME}/.config/rofi/themes/launcher.rasi"

View File

@ -1,44 +0,0 @@
#!/bin/bash
DIR="$HOME/.config/rofi"
rofi_command="rofi -theme $DIR/themes/screenshot.rasi"
time=`date +%Y-%m-%d-%H-%M-%S`
dir="$HOME/Pictures/Screenshots"
file="Screenshot_${time}.png"
screenleft="< "
area=""
screenright=" >"
shotscreenleft() {
cd ${dir} && sleep 0.5 && maim -u -f png -g 2560x1440+0+0 | tee "$file" | xclip -selection clipboard -t image/png
}
shotscreenright() {
cd ${dir} && sleep 0.5 && maim -u -f png -g 2560x1440+2560+0 | tee "$file" | xclip -selection clipboard -t image/png
}
shotarea() {
cd ${dir} && sleep 0.5 && maim -u -f png -s -b 2 -c 0.35,0.55,0.85,0.25 -l | tee "$file" | xclip -selection clipboard -t image/png
}
if [[ ! -d "$dir" ]]; then
mkdir -p "$dir"
fi
options="$screenleft\n$area\n$screenright"
chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 1)"
case $chosen in
$screenleft)
shotscreenleft
;;
$area)
shotarea
;;
$screenright)
shotscreenright
;;
esac

View File

@ -1,9 +0,0 @@
* {
background: #21201E;
foreground: #EAD17F;
selected: #F0C674;
highlight: #8ABEB7;
urgent: #BF616A;
on: #3E2441;
off: #76573A;
}

View File

@ -1,3 +0,0 @@
configuration {
sidebar-mode: true;
}

View File

@ -1,86 +0,0 @@
configuration {
font: "Font Awesome 5 Free 20";
show-icons: false;
disable-history: false;
click-to-exit: true;
}
@import "colors.rasi"
* {
background-color: @background;
text-color: @foreground;
}
window {
transparency: "real";
border-radius: 0px;
location: center;
width: 500px;
x-offset: -15px;
y-offset: -45px;
}
listview {
columns: 3;
lines: 1;
spacing: 12px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @background;
children: [ listview ];
spacing: 12px;
margin: 12px;
}
element {
background-color: @background;
text-color: @foreground;
orientation: vertical;
border-radius: 0px;
}
element-text {
background-color: inherit;
text-color: inherit;
font: "Font Awesome 5 Free 20";
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 48px 0px 48px 0px;
}
element normal.urgent,
element alternate.urgent {
background-color: @off;
text-color: @background;
border-radius: 0px;
}
element normal.active,
element alternate.active {
background-color: @on;
text-color: @background;
}
element selected {
background-color: @selected;
text-color: @background;
border: 0px;
border-radius: 0px;
border-color: @highlight;
}
element selected.urgent {
background-color: @on;
text-color: @background;
}
element selected.active {
background-color: @off;
color: @background;
}

View File

@ -1,41 +0,0 @@
"$schema" = 'https://starship.rs/config-schema.json'
add_newline = false
format = '''\[[$username $hostname](bold green)\] $directory$python$fill$time$fill$container$git_branch$git_commit$git_state$git_status
$character[\$](bold green) '''
right_format = '''$elixir$elm$cmd_duration'''
[username]
show_always = true
format = '[$user]($style) @'
style_user = 'bold green'
[hostname]
ssh_only = false
format = '[$hostname]($style)'
style = 'bold green'
[character]
success_symbol = '[✔](bold green)'
# success_symbol = '[\$](bold green)'
error_symbol = '[✗](bold red)'
# error_symbol = '[\$](bold red)'
[container]
style = 'bold blue dimmed'
[directory]
truncation_symbol = '.../'
truncate_to_repo = false
before_repo_root_style = 'bold cyan'
repo_root_style = 'bold bright-cyan'
repo_root_format = '[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($repo_root_style)[$read_only]($read_only_style) '
[fill]
symbol = ' '
[time]
disabled = false
format = '[$time]($style)'

View File

@ -1 +0,0 @@
OPTS=

View File

@ -1,5 +0,0 @@
#!/bin/sh
[ -r conf ] && source conf
exec 2>&1
exec ashuffle ${OPTS}

View File

@ -1,3 +0,0 @@
#!/bin/sh
exec >/dev/null 2>&1
exec dbus-send --session / org.freedesktop.DBus.Peer.Ping

View File

@ -1,4 +0,0 @@
#!/bin/execlineb -P
importas -i XDG_RUNTIME_DIR XDG_RUNTIME_DIR
dbus-daemon --session --nofork --nopidfile --address=unix:path=${XDG_RUNTIME_DIR}/bus

View File

View File

@ -1,3 +0,0 @@
#!/bin/sh
exec 2>&1
exec mpd --no-daemon

View File

@ -1,3 +0,0 @@
#!/bin/sh
svlogd -tt .

View File

@ -1,5 +0,0 @@
#!/bin/bash
export DISPLAY=:0
exec 2>&1
polybar primary

View File

@ -1,3 +0,0 @@
#!/bin/sh
svlogd -tt .

View File

@ -1,5 +0,0 @@
#!/bin/bash
export DISPLAY=:0
exec 2>&1
polybar secondary

View File

@ -1,3 +0,0 @@
#!/bin/sh
rm -f "${XDG_RUNTIME_DIR}/ssh-agent" && exit 0

View File

@ -1,2 +0,0 @@
#!/bin/sh
exec ssh-agent -D -a "${XDG_RUNTIME_DIR}/ssh-agent"

View File

@ -1,8 +0,0 @@
#!/bin/sh
export DISPLAY=:0
export SHELL=/bin/bash
cd /home/hendrik
exec 2>&1
exec sxhkd

View File

@ -1,4 +0,0 @@
#!/bin/sh
exec 2>&1
exec svlogd -tt .

View File

@ -1,3 +0,0 @@
#!/bin/sh
exec 2>&1
exec /usr/bin/syncthing --logflags 0 --no-restart --home="$HOME/.config/syncthing"

View File

@ -1,118 +0,0 @@
# wm independent hotkeys
# terminal emulator
super + Return
kitty
super + e
nautilus
super + f
firefox
# program launcher
# super + space
# dmenu_run
super + space
~/.config/rofi/scripts/launcher
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
# bspwm hotkeys
# quit/restart bspwm
super + alt + {q,r}
bspc {quit,wm -r}
# close and kill
super + {w,q}
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 window
super + g
bspc node -s biggest.window
super + shift + s
~/.config/rofi/scripts/screenshot
#
# 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}
# 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 the node in the given direction
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# 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 or move node to single desktop
super + ctrl + {1-9,0}
bspc desktop -f "^{1-9,0}"
# send note to single desktop
super + shift + {1-9,0}
bspc node -d "^{1-9,0}" --follow
# 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"
# move current window to tmp desktop // or recall tmp windows
super + m
bspc node -d "tmp"
#
# preselect
#
# preselect the direction
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# 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

View File

@ -1 +0,0 @@
/home/hendrik/git/game-configs/csgo/autoexec.cfg

View File

@ -1 +0,0 @@
/home/hendrik/git/game-configs/csgo/practice.cfg

View File

@ -1,15 +0,0 @@
root = true
[*]
# charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_size = 4
indent_style = space
[*.{yml,yaml}]
indent_size = 2
indent_style = space

2
.fehbg
View File

@ -1,2 +0,0 @@
#!/bin/sh
feh --no-fehbg --bg-scale '/mnt/win/d/Sync/Pictures/Public/Wallpapers/365242.jpg'

Binary file not shown.

Binary file not shown.

1
.gitignore vendored
View File

@ -1 +0,0 @@
.config/nvim/lazy-lock.json

View File

@ -1,18 +0,0 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/hendrik/.gtkrc-2.0.mine"
gtk-theme-name="Orchis-Pink-Dark"
gtk-icon-theme-name="la-capitaine-icon-theme"
gtk-font-name="Sans 10"
gtk-cursor-theme-name="Qogir"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintmedium"

View File

@ -1,5 +0,0 @@
# Custom binary files
sqs is not created by me, please take a look at the original creator's repository:
[syncthing-quick-status](https://github.com/serl/syncthing-quick-status)

View File

@ -1,215 +0,0 @@
#!/bin/bash
if ((BASH_VERSINFO[0] < 4)); then
echo "This script needs at least bash 4."
missing_deps=1
fi
for dep in curl jq; do
if ! command -v $dep &>/dev/null; then
echo "$dep is required but not found."
missing_deps=1
fi
done
[[ $missing_deps ]] &&
exit 1
if [[ -z $SYNCTHING_API_KEY ]]; then
: "${SYNCTHING_CONFIG_FILE:="$HOME/.config/syncthing/config.xml"}"
apikey_regex='^\s+<apikey>([^<]+)</apikey>$'
apikey_line="$(grep -E "$apikey_regex" "$SYNCTHING_CONFIG_FILE")"
[[ $apikey_line =~ $apikey_regex ]] &&
SYNCTHING_API_KEY=${BASH_REMATCH[1]}
fi
if [[ -z $SYNCTHING_API_KEY ]]; then
echo "No API key in env. Set one of the variables SYNCTHING_API_KEY or SYNCTHING_CONFIG_FILE and try again..."
exit 1
fi
: "${SYNCTHING_ADDRESS:="localhost:8384"}"
COLOR_PURPLE='\e[95m'
COLOR_GRAY='\e[90m'
COLOR_GREEN='\e[92m'
COLOR_BLUE='\e[34m'
COLOR_RED='\e[31m'
COLOR_RESET='\e[0m'
RECENT_CHANGES_LIMIT=5
LOG_ENTRIES_LIMIT=15
LOG_MAX_AGE=300 # seconds
declare -A api_cache=()
function get_api_response() { # $0 api_name
if [[ -z ${api_cache["$1"]} ]]; then
[[ $DEBUG ]] && echo -e "${COLOR_GRAY}CALLING API: $1${COLOR_RESET}" >&2
api_cache["$1"]="$(curl --silent --insecure -L -H "X-API-Key: $SYNCTHING_API_KEY" "http://$SYNCTHING_ADDRESS/rest/$1")"
fi
RESULT="${api_cache["$1"]}"
# using stdout and piping directly to jq would jump over the cache... not sure why :/
[[ $RESULT == "CSRF Error" ]] && return 1
return 0
}
function jq_arg() {
echo "$1" | jq -r "$2"
}
function call_jq() { # $0 api_name jq_commands
get_api_response "$1" &&
RESULT="$(jq_arg "$RESULT" "$2")"
}
function format_time() {
echo "${COLOR_GRAY}$(echo "$1" | cut -d'.' -f1)${COLOR_RESET}"
}
function get_messages() { # $0 api_name jq_commands message_color_control_code max_age_in_seconds
call_jq "$1" "$2"
RESULT="$(jq_arg "$RESULT" '.when + " " + .message' | tail -n "$LOG_ENTRIES_LIMIT")"
local message_color="$3"
local max_age="${4:-0}"
local min_timestamp="$(($(date +%s) - max_age))"
local result=
local formatted_line=
while IFS= read -r line; do
[[ -z $line ]] && continue
when="$(echo "$line" | cut -d' ' -f1)"
message="$(echo "$line" | cut -d' ' -f2-)"
timestamp="$(date --date="$when" +%s)"
formatted_line="$(format_time "$when") ${message_color}$message${COLOR_RESET}"$'\n'
[[ $max_age -gt 0 ]] && [[ $timestamp -lt $min_timestamp ]] &&
continue
result+="$formatted_line"
done <<< "$RESULT"
[[ -z $result ]] &&
result="$formatted_line" # take the last log line in any case
RESULT="${result%$'\n'}"
}
[[ $1 == -v ]] && VERBOSE=true
if ! call_jq "system/status" '.myID'; then
echo "Error from Syncthing API: $RESULT"
echo "You should probably check and change the variables SYNCTHING_API_KEY or SYNCTHING_CONFIG_FILE."
exit 1
elif [[ -z $RESULT ]]; then
echo "Empty response from Syncthing API."
echo "You should probably check and change the variables SYNCTHING_ADDRESS, SYNCTHING_API_KEY or SYNCTHING_CONFIG_FILE."
exit 1
fi
local_device_id="$RESULT"
call_jq "system/config" '.devices | map(select(.deviceID == "'"$local_device_id"'"))[] | .name'
local_device_name="$RESULT"
echo -n "Local device: $local_device_name"
[[ $VERBOSE ]] && echo -en " ${COLOR_GRAY}($local_device_id)${COLOR_RESET}"
echo $'\n'
echo "Devices:"
call_jq "system/config" '.devices[] | .deviceID'
for device_id in $RESULT; do
[[ $device_id == "$local_device_id" ]] && continue
call_jq "system/config" '.devices | map(select(.deviceID == "'"$device_id"'"))[]'
device_config="$RESULT"
device_name="$(jq_arg "$device_config" '.name')"
echo -n "$device_name: "
call_jq "system/connections" '.connections["'"$device_id"'"]'
device_status="$RESULT"
status="${COLOR_PURPLE}disconnected${COLOR_RESET}"
if [ "$(jq_arg "$device_status" '.paused')" == "true" ]; then
status="${COLOR_GRAY}paused${COLOR_RESET}"
elif [ "$(jq_arg "$device_status" '.connected')" == "true" ]; then
status="${COLOR_GREEN}$(jq_arg "$device_status" '.type')${COLOR_RESET}"
fi
echo -en "$status"
[[ $VERBOSE ]] && echo -en " ${COLOR_GRAY}($device_id)${COLOR_RESET}"
echo
done
echo -e "\nFolders:"
call_jq "system/config" '.folders[] | .id'
for folder_id in $RESULT; do
call_jq "system/config" '.folders | map(select(.id == "'"$folder_id"'"))[]'
folder_config="$RESULT"
folder_label="$(jq_arg "$folder_config" '.label')"
if [ "$folder_label" ]; then
[[ $VERBOSE ]] && folder_label+=" ${COLOR_GRAY}($folder_id)${COLOR_RESET}"
else
folder_label="$folder_id"
fi
echo -en "$folder_label: "
folder_status=
need_bytes=0
folder_paused="$(jq_arg "$folder_config" '.paused')"
[[ $folder_paused == true ]] && folder_status="paused"
if [[ -z $folder_status ]]; then
call_jq "db/status?folder=$folder_id" '.state'
folder_status="$RESULT"
call_jq "db/status?folder=$folder_id" '.needBytes'
need_bytes="$RESULT"
need_bytes_formatted=
[[ $need_bytes -gt 0 ]] &&
need_bytes_formatted="$(numfmt --to=iec-i --suffix=B "$need_bytes")"
fi
case "$folder_status" in
paused)
folder_status="${COLOR_GRAY}$folder_status${COLOR_RESET}"
;;
idle)
[[ $need_bytes -eq 0 ]] &&
folder_status="${COLOR_GREEN}up to date${COLOR_RESET}" ||
folder_status="${COLOR_RED}out of sync${COLOR_RESET}"
;;
scanning|syncing)
folder_status="${COLOR_BLUE}$folder_status${COLOR_RESET}"
;;
esac
[[ $need_bytes -gt 0 ]] && folder_status+=" ($need_bytes_formatted)"
echo -e "$folder_status"
done
echo -e "\nRecent changes:"
call_jq "events/disk?limit=$RECENT_CHANGES_LIMIT&timeout=1" '.[] | .id'
for event_id in $RESULT; do
call_jq "events/disk?limit=$RECENT_CHANGES_LIMIT&timeout=1" '. | map(select(.id == '"$event_id"'))[]'
event="$RESULT"
when="$(jq_arg "$event" '.time')"
path="$(jq_arg "$event" '.data.path')"
folder_id="$(jq_arg "$event" '.data.folderID')"
call_jq "system/config" '.folders | map(select(.id == "'"$folder_id"'"))[].label'
folder_label="${RESULT:-$folder_id}"
action="$(jq_arg "$event" '.data.action')"
action_color='?'
case "$action" in
added) action_color=${COLOR_GREEN}+ ;;
deleted) action_color=${COLOR_RED}- ;;
modified) action_color=${COLOR_BLUE}\# ;;
esac
device_id_prefix="$(jq_arg "$event" '.data.modifiedBy')"
call_jq "system/config" '.devices | map(select(.deviceID | startswith("'"$device_id_prefix"'")))[].name'
device_name="${RESULT:-$device_id_prefix}"
echo -e "$(format_time "$when") ${COLOR_GRAY}$device_name${COLOR_RESET} $folder_label ${action_color}$path${COLOR_RESET}"
done
if [[ $VERBOSE ]]; then
get_messages "system/log" '.messages[]?' '' "$LOG_MAX_AGE"
echo -e "\nLast log entries:"
echo -e "$RESULT"
fi
get_messages "system/error" '.errors[]?' "$COLOR_RED"
if [[ $RESULT ]]; then
echo -e "\nERRORS:"
echo -e "$RESULT"
fi
if [[ $DEBUG ]]; then
echo -e "\ncached responses:"
for k in "${!api_cache[@]}"; do
echo "$k"
done
fi

View File

@ -1,3 +0,0 @@
#!/bin/sh
xpkg -L

View File

@ -1,25 +0,0 @@
#!/bin/sh
# xp PKGS... - like xbps-pkgdb, but take sudo/su into account
which_sudo() {
if command -v sudo >/dev/null && sudo -l | grep -q -e ' ALL$' -e xbps-pkgdb; then
echo sudo
elif command -v doas >/dev/null && [ -f /etc/doas.conf ]; then
echo doas
elif [ "$(id -u)" != 0 ]; then
echo su
fi
}
do_pkgdb() {
if [ "$SUDO" = su ]; then
su root -c 'xbps-pkgdb "$@"' -- sh "$@"
else
$SUDO xbps-pkgdb "$@"
fi
}
SUDO=$(which_sudo)
do_remove "$@"
exit $?

View File

@ -1,31 +0,0 @@
#!/bin/sh
# xr PKGS... - like xbps-remove -o, but take sudo/su into account
which_sudo() {
if command -v sudo >/dev/null && sudo -l | grep -q -e ' ALL$' -e xbps-remove; then
echo sudo
elif command -v doas >/dev/null && [ -f /etc/doas.conf ]; then
echo doas
elif [ "$(id -u)" != 0 ]; then
echo su
fi
}
do_remove() {
if [ "$SUDO" = su ]; then
su root -c 'xbps-remove "$@"' -- sh "$@"
else
$SUDO xbps-remove "$@"
fi
}
SUDO=$(which_sudo)
do_remove -R "$@"
status=$?
if [ $status -eq 16 ]; then
do_install -u xbps &&
do_install -S "$@"
else
exit $status
fi

View File

@ -1,3 +0,0 @@
#!/bin/bash
xpkg -m | grep -v -f <(xpkg -L)

View File

@ -1 +0,0 @@
/home/hendrik/git/game-configs/csgo/autoexec.cfg

View File

@ -1 +0,0 @@
/home/hendrik/git/game-configs/csgo/practice.cfg

6
.ps1
View File

@ -10,10 +10,8 @@ SMILEY="${GREEN}:)${NC}"
FROWNY="${RED}:(${NC}"
SELECT="if [ \$? = 0 ]; then echo \"${SMILEY}\"; else echo \"${FROWNY}\"; fi"
export PROMPT_DIRTRIM=2
export PROMPT_DIRTRIM=2
GIT_BRANCH="$(__git_ps1 ' [%s]')"
# actually export PS1
PS1="${GREEN}\u@\h${NC}:${BLUE}\w${YELLOW}\$(__git_ps1 ' [%s]')${NC}\`${SELECT}\` \$ "
PS1="${GREEN}\u@\h${NC}:${BLUE}\w${YELLOW}\$(__git_ps1 ' [%s]')${NC} \`${SELECT}\` \$ "

59
.vimrc
View File

@ -1,59 +0,0 @@
" Numbers
set number
set relativenumber
" Indentation
set autoindent
" set filetype indent on
" Tab width
" set expandtab
set noexpandtab
set smarttab
set tabstop=4
set shiftwidth=4
set shiftround
" Search
set hlsearch
set ignorecase
set incsearch
set smartcase
" Performance
set complete-=i
set lazyredraw
" Rendering
set display+=lastline
set encoding=utf-8
set linebreak
set scrolloff=3
set sidescrolloff=5
set wrap
syntax on
" Interface
set laststatus=2
set wildmenu
set tabpagemax=50
set noerrorbells
" set visualbell
" set mouse=a
set title
" Folding
set foldmethod=indent
set foldnestmax=3
set nofoldenable
set autoread
set backspace=indent,eol,start
set confirm
set formatoptions+=j
set nomodeline
set noswapfile
set nrformats-=octal
set wildignore+=.pyc,.swp
autocmd FileType yaml setlocal ai ts=2 sw=2 et cuc nu

View File

@ -4,23 +4,21 @@
[[ -r ~/.alias ]] && . ~/.alias
# xbps-install
# use xtools instead
# alias xin="doas xbps-install -S"
alias xup="xi -Su"
alias xun="xi -S && xi -un | awk '{print \$2 \"\t- \" \$1}' | sed \"s/-\([^- ]*_.*\)/ -> \1/\""
complete -F _xbps_complete xi
alias xin="doas xbps-install -S"
alias xup="doas xbps-install -Su"
# xbps-query
alias xqr="xbps-query"
alias xs="xqr -Rs"
alias xqs="xqr -S"
alias xqm="xqr -m"
alias xql="xqr -l"
alias xq="xbps-query"
alias xs="xq -Rs"
alias xqs="xq -S"
alias xqm="xq -m"
alias xql="xq -l"
alias xqq="xql | grep ${1}"
alias xcln="xr -oO"
# Docker
alias dc=docker-compose
# xbps-remove
alias xr="doas xbps-remove -R"
alias xcln="xr -o"
# config edits
alias cb="vim $HOME/.config/bspwm/bspwmrc"
alias csx="vim $HOME/.config/sxhkd/sxhkdrc"

View File

@ -8,41 +8,20 @@
[[ $- != *i* ]] && return
#################################
# Mandatory source files
# - bash_aliases
# - bash-completion
# - bash-aliases
# - ps1 # replaced by starship, legacy
# always bash-completion first
[[ -r /usr/share/bash-completion/bash_completion ]] &&\
source /usr/share/bash-completion/bash_completion
[[ -r /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
# custom bash-completions
[[ -d ~/.config/completions ]] &&\
{ for i in ~/.config/completions/*; do source $i; done }
[[ -f /usr/share/git/git-prompt.sh ]] && . /usr/share/git/git-prompt.sh
# source distro and general purpose aliases
[[ -r ~/.bash_aliases ]] &&\
source ~/.bash_aliases
[[ -r ~/.bash_aliases ]] && . ~/.bash_aliases
# set PS1 from file
# USE ONLY AFTER GIT PROMPT
[[ -r ~/.ps1 ]] &&\
source ~/.ps1
#################################
# Optional source files
# BEGIN_KITTY_SHELL_INTEGRATION
[[ -n "$KITTY_INSTALLATION_DIR" ]] &&\
[[ -e "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash" ]] &&\
source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"
# END_KITTY_SHELL_INTEGRATION
# Google CLI
[[ -r ~/.googlerc ]] && source ~/.googlerc
[[ -r ~/.ps1 ]] && . ~/.ps1
#################################
# Debian Defaults
#
# don't put duplicate lines or lines starting with space in the history.
HISTCONTROL=ignoreboth
@ -50,8 +29,8 @@ HISTCONTROL=ignoreboth
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=50000
HISTFILESIZE=50000
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
@ -60,21 +39,4 @@ shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
#################################
# Hooks
# - direnv
# - starship
# - zoxide
command -v direnv &>/dev/null && eval "$(direnv hook bash)"
command -v starship &>/dev/null && eval "$(starship init bash)"
command -v zoxide &>/dev/null && eval "$(zoxide init --cmd cd bash)"
#################################
# Environment variables
export XBPS_DISTDIR="$HOME/git/void-packages"
export SVDIR="$HOME/sv"
export PASSWORD_STORE_ENABLE_EXTENSIONS=true
export PASSWORD_STORE_EXTENSION_COMMANDS="tessen otp"
complete -cf doas

View File

@ -1,143 +0,0 @@
ImageMagick
ModemManager
NetworkManager
amdvlk
amdvlk-32bit
ansible
arandr
aws-cli
base-system
bash-completion
bat
bind-utils
borg
bpytop
bsdtar
chrome-gnome-shell
chromium
chrony
cri-tools
cryptsetup
dino
direnv
docker
docker-compose
easyeffects
easyrsa
elixir
elogind
eog
extension-manager
eza
fff
ffmpeg
firefox
font-awesome5
font-fira-otf
fprintd
gdm
git
gnome
gnome-boxes
go
grub-x86_64-efi
gtk-engine-murrine
gvfs-smb
hplip
htop
hydrus
jq
k9s
keepassxc
kitty
krita
kubectl
kubernetes
kubernetes-helm
lapce
lesspipe
libcanberra-gtk
libcgroup-utils
libdrm-32bit
libidn
libreoffice
libreoffice-gnome
libu2f-host
lightdm
linux5.19
linux5.19-headers
lvm2
mesa-dri-32bit
mesa-vaapi
mesa-vdpau
mesa-vulkan-radeon
mgba-qt
mpd
nautilus
ncmpcpp
neofetch
neovim
nerd-fonts
net-tools
noto-fonts-cjk
noto-fonts-emoji
noto-fonts-ttf
noto-fonts-ttf-extra
nushell
openvpn
operator-sdk
papirus-folders
papirus-icon-theme
patch
pavucontrol
piper
pipewire
podman
powertop
pulseaudio-utils
python3
python3-ansible-lint
python3-pip
python3-psutil
python3-s-tui
rsync
sassc
socklog-void
squid
srain
starship
steam
strace
syncthing
syncthing-gtk
terraform
thefuck
thunderbird
tlp
tlp-rdw
tlpui
tmux
tuxedo-keyboard
unzip
v4l2loopback
vim
virt-manager
vlc
void-repo-multilib
void-repo-multilib-nonfree
void-repo-nonfree
vscode
vsv
vulkan-loader
wget
wireplumber
xclip
xdg-user-dirs
xdg-user-dirs-gtk
xmirror
xorg
xournalpp
xtools
yq
zoxide
zstd

View File

@ -1,2 +0,0 @@
discord
kubectx-bash

View File

@ -1,48 +0,0 @@
[ -n "$BASH_VERSION" ] && [ -f $HOME/.bashrc ] && . $HOME/.bashrc
for x in \
"$HOME/.local/share" \
"/usr/share" \
"/usr/local/share" \
; do
[ -d "$x" ] || continue
case ":${XDG_DATA_DIRS}:" in
*":${x}:"*) ;;
*) XDG_DATA_DIRS="${XDG_DATA_DIRS:+$XDG_DATA_DIRS:}${x}" ;;
esac
done
export XDG_DATA_DIRS
export XDG_CACHE_HOME=$HOME/.cache
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_HOME=$HOME/.data
export BROWSER=firefox
export EDITOR=vim
export PAGER=less
export VISUAL=vim
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
export MOZ_ENABLE_WAYLAND=1
fi
: ${SSH_AUTH_SOCK:=$XDG_RUNTIME_DIR/ssh-agent}
export SSH_AUTH_SOCK
for x in \
"$HOME/bin" \
"$HOME/.local/bin" \
"/usr/local/sbin" \
"/usr/local/bin" \
"/usr/sbin" \
"/usr/bin" \
"/sbin" \
"/bin" \
; do
[ -d "$x" ] || continue
case ":${PATH}:" in
*":${x}:"*) ;;
*) PATH="${x:+$x:}${PATH}" ;;
esac
done

View File

@ -1,31 +0,0 @@
acl-progs
base-system
bash-completion
bind-utils
chrony
ddclient
direnv
docker
docker-compose
exa
fail2ban
git
grub-x86_64-efi
hdparm
htop
intel-ucode
kitty-terminfo
logrotate
lvm2
net-tools
radicale
rsync
rsyslog
runit-iptables
samba
snooze
syncthing
vim
void-repo-nonfree
xtools
zfs

View File

@ -1,23 +0,0 @@
bash-completion
bat
bind-utils
curl
direnv
exa
git
gitui
hugo
jq
lesspipe
net-tools
sassc
python
python3-pip
ripgrep
starship
unzip
vim
wget
xtools
zellij
zoxide

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -1,8 +1,5 @@
# dotfiles
`mkdir -p git/.dotfiles && git init --bare git/.dotfiles`
`cd $HOME && git --git-dir=$HOME/git/.dotfiles --work-tree`
Contains .dotfiles for my debian and void distros.
Clone and `ln -s` the applicable files to the distro agnotic filenames. e.g.:

View File

@ -1,5 +0,0 @@
# My user services
I run a user-svdir in this directory and link services from my ~/.config/sv here.
The services will be enabled by my INSTALL script and point to `/home/<user>/sv`.

View File

@ -1,53 +0,0 @@
#!/bin/sh
: ${DOTFILES_HOME:=$HOME/git/dotfiles}
: ${XDG_CACHE_HOME:=$HOME/.cache}
: ${XDG_CONFIG_HOME:=$HOME/.config}
: ${XDG_DATA_HOME:=$HOME/.data}
: ${BIN_HOME:=$HOME/.local/bin}
: ${SV_HOME:=$HOME/.config/sv}
: ${SVDIR:=$HOME/sv}
cat <<! >&2
XDG_CACHE_HOME = ${XDG_CACHE_HOME}
XDG_CONFIG_HOME = ${XDG_CONFIG_HOME}
XDG_DATA_HOME = ${XDG_DATA_HOME}
BIN_HOME = ${BIN_HOME}
SV_HOME = ${SV_HOME}
SVDIR = ${SVDIR}
!
# symlink dirs
ln -sfn "${DOTFILES_HOME}"/.cache "${XDG_CACHE_HOME}"
ln -sfn "${DOTFILES_HOME}"/.config "${XDG_CONFIG_HOME}"
ln -sfn "${DOTFILES_HOME}"/.data "${XDG_DATA_HOME}"
ln -sfn "${DOTFILES_HOME}"/.bin "${BIN_HOME}"
ln -sfn "${DOTFILES_HOME}"/.config/sv "${SV_HOME}"
ln -sfn "${DOTFILES_HOME}"/sv "${SVDIR}"
# symlink files
_ln_home() {
[ -z "$2" ] && target="$HOME/$1" || target="$HOME/$2"
source="$PWD/$1"
ln -sfn "$source" "$target"
}
# environment
echo "${HOME}" >"${XDG_DATA_HOME}"/env/HOME
echo "${XDG_CACHE_HOME}" >"${XDG_DATA_HOME}"/env/XDG_CACHE_HOME
echo "${XDG_CONFIG_HOME}" >"${XDG_DATA_HOME}"/env/XDG_CONFIG_HOME
echo "${XDG_DATA_HOME}" >"${XDG_DATA_HOME}"/env/XDG_DATA_HOME
echo "${SVDIR}" >"${SVDIR}"/env/SVDIR
# gnome
for i in $(seq 1 9); do gsettings set org.gnome.shell.keybindings switch-to-application-$i []; done

View File

@ -1,23 +0,0 @@
#!/bin/sh
# install per-user-runsvdir in ~/sv
# drop available services in ~/.config/sv
# and link to ~/sv to enable them
zuser=
[ -z "$zuser" ] && echo "User is not set, please edit the script accordingly." && exit 1
install -d /etc/sv/runsvdir-$zuser
install -m755 sv/runsvdir/run /etc/sv/runsvdir-$zuser/run
sed -i -e "s/\@USER\@/$zuser/g" /etc/sv/runsvdir-$zuser/run
install -m755 sv/runsvdir/finish /etc/sv/runsvdir-$zuser/finish
sed -i -e "s/\@USER\@/$zuser/g" /etc/sv/runsvdir-$zuser/finish
ln -sf /run/runit/supervise.runsvdir-$zuser /etc/sv/runsvdir-$zuser/supervise
# force-enable Wayland on nvidia GPUs
ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
# Set ulimit and vm.max_map_count
echo "vm.max_map_count=262144" >> /etc/sysctl.conf
echo "$zuser hard nofile 524288" >> /etc/security/limits.conf
echo "$zuser soft nofile 524288" >> /etc/security/limits.conf

View File

@ -1,6 +0,0 @@
#!/bin/sh
ZUSER=@USER@
sv -w600 force-stop /home/$ZUSER/sv/*
sv exit /home/$ZUSER/sv/*

View File

@ -1,16 +0,0 @@
#!/bin/sh
ZUSER=@USER@
ID=$(id -u $ZUSER)
GROUPS=$(id -Gn "$ZUSER" | tr ' ' ':')
export HOME="/home/$ZUSER"
SVDIR="$HOME/sv"
export XDG_RUNTIME_DIR="/run/user/$ID"
[ ! -d /run/user/$ID ] && \
mkdir -p $XDG_RUNTIMEDIR && \
chown $ZUSER:$ZUSER $XDG_RUNTIME_DIR
exec chpst -u "$ZUSER:$GROUPS" sh -l -c "exec runsvdir $SVDIR $ZUSER '...'" $ZUSER