Add 'dots/' from commit 'f64b634dd8fbb2c8a2898c3b9d0acc9452e4d966'

git-subtree-dir: dots
git-subtree-mainline: 2ad98cde17
git-subtree-split: f64b634dd8
disko
Hektor Misplon 2025-10-04 18:28:04 +02:00
commit 626bdc79bf
232 changed files with 11175 additions and 0 deletions

56
dots/.bash_aliases/all Normal file
View File

@ -0,0 +1,56 @@
# shellcheck shell=bash
# vim: set ft=bash :
alias ..="cd .."
alias ls="ls --color=auto"
alias l="ls -1p"
alias ll="ls -lhp"
alias lt="ls -lhtp"
alias la="ls -lhap"
alias lta="ls -lhatp"
alias ldir="ls -dp" # list directories
alias grep="grep --color=auto"
alias rm="rm -I --preserve-root"
alias mv="mv -iv"
alias cp="cp -iv"
alias ln="ln -i"
alias mkdir="mkdir -pv"
alias chown="chown --preserve-root"
alias chmod="chmod --preserve-root"
alias chgrp="chgrp --preserve-root"
alias ip="ip --color"
alias ipa="ip -brief address"
alias ipl="ip -brief link"
alias ipr="ip route"
alias clip="xclip -sel clip"
alias df="df -kTh"
alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables
# Programs
alias o="xdg-open"
alias v="nvim"
alias g='git'
alias t=' task'
alias tsh='tasksh'
alias z='zathura --fork'
alias f='fzf'
alias fm='pcmanfm &>/dev/null &'
alias mm='micromamba'
# Languages
alias r5="plt-r5rs --no-prim"
alias hs="ghci"
alias pl="swipl"
alias py="python"
alias r="R"
alias azerty="setxkbmap be"
alias qwerty="setxkbmap us"
alias cole="setxkbmap us -variant colemak"

View File

@ -0,0 +1,16 @@
# shellcheck shell=bash
# vim: set ft=bash :
reboot-to-windows ()
{
# Check if grub is installed by checking if the command exists, if it does
# not, then assume that the system is using systemd-boot
if grub-install --version &>/dev/null; then
windows_title=$(grep -i windows /boot/grub/grub.cfg | cut -d "'" -f 2)
sudo grub-reboot "$windows_title"
echo "Grub set to reboot to Windows"
else
sudo bootctl set-oneshot windows.conf
echo "Systemd set to reboot to Windows"
fi
}

View File

@ -0,0 +1,7 @@
# shellcheck shell=bash
# vim: set ft=bash :
source "$HOME/.bash_aliases/dualboot"
alias lm='ddcutil setvcp 10'
alias cuda-available='python -c "import torch; print(\"CUDA enabled:\", torch.cuda.is_available());"'

View File

@ -0,0 +1,6 @@
# shellcheck shell=bash
# vim: set ft=bash :
source "$HOME/.bash_aliases/dualboot"
alias lm='xbacklight -set'

4
dots/.bash_aliases/jira Normal file
View File

@ -0,0 +1,4 @@
# shellcheck shell=bash
# vim: set ft=bash :
alias jira-me='jira issue list -a$(jira me)'

View File

@ -0,0 +1,35 @@
# shellcheck shell=bash
# vim: set ft=bash :
alias js="node"
alias ts="ts-node"
yarn() {
if [[ -f "package-lock.json" ]]; then
echo "WARNING: package-lock.json exists"
read -p "Are you sure you want to run yarn? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
command yarn "$@"
else
echo "Aborted"
fi
else
command yarn "$@"
fi
}
npm() {
if [[ -f "yarn.lock" ]]; then
echo "WARNING: yarn.lock exists"
read -p "Are you sure you want to run npm? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
command npm "$@"
else
echo "Aborted"
fi
else
command npm "$@"
fi
}

10
dots/.bash_profile Normal file
View File

@ -0,0 +1,10 @@
# shellcheck shell=bash
# shellcheck disable=SC1090
[[ -f ~/.bashrc ]] && . ~/.bashrc
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket"
export _JAVA_AWT_WM_NONREPARENTING=1
if [[ -z "${DISPLAY}" ]] && [[ "${XDG_VTNR}" -eq 1 ]]; then
exec startx "$HOME/.config/X11/xinitrc" >& ~/.xsession-errors
fi

127
dots/.bashrc Normal file
View File

@ -0,0 +1,127 @@
# shellcheck shell=bash
# shellcheck disable=SC1091,SC1090
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
. /etc/os-release
# Editor & prompt configuration
[ -f "$HOME/.bashrc.d/editor" ] && . "$HOME/.bashrc.d/editor"
[ -f "$HOME/.bashrc.d/prompt" ] && . "$HOME/.bashrc.d/prompt"
# Aliases {{{
# Load aliases dynamically
[ -f "$HOME/.bash_aliases/all" ] && . "$HOME/.bash_aliases/all"
[ -f "$HOME/.bash_aliases/hosts/$HOSTNAME" ] && . "$HOME/.bash_aliases/hosts/$HOSTNAME"
[ -f "$HOME/.bash_aliases/private" ] && . "$HOME/.bash_aliases/private"
[ -f "$HOME/.bash_aliases/lang-js" ] && . "$HOME/.bash_aliases/lang-js"
command -v jira >/dev/null && [ -f "$HOME/.bash_aliases/jira" ] && . "$HOME/.bash_aliases/jira"
# Completions {{{
[ -d "$HOME/.bash_completions" ] && for file in "$HOME/.bash_completions"/*; do
[ -f "$file" ] && . "$file"
done
# }}}
# Host-specific and private configurations
[ -f "$HOME/.bashrc.d/hosts/$HOSTNAME" ] && . "$HOME/.bashrc.d/hosts/$HOSTNAME"
[ -f "$HOME/.bashrc.d/private" ] && . "$HOME/.bashrc.d/private"
# }}}
# Prompt {{{
[ -f "$HOME/.bashrc.d/prompt" ] && . "$HOME/.bashrc.d/prompt"
# }}}
# Path {{{
# Add ~/.bin to PATH
export PATH=~/.bin:$PATH
# }}}
# History {{{
export HISTSIZE=999999
export HISTFILESIZE= # Unlimited
export HISTCONTROL=ignoreboth:erasedups
export HISTIGNORE=" *:clear:l:ls:cd" # Omit commands from history (e.g. those prepended with space)
# }}}
# Man pages {{{
# See `:h :Man` in NeoVim
export MANWIDTH=80
export PAGER=nvimpager
# }}}
# X11 {{{
export XDG_SESSION_TYPE=X11
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_HOME=$HOME/.local/share
# }}}
# FZF {{{
# Check if fzf is installed
if [ -f "/usr/bin/fzf" ]; then
# Fuzzy finder setup
export FZF_COMPLETION_TRIGGER='**'
export FZF_DEFAULT_COMMAND='ag -g ""'
export FZF_DEFAULT_OPTS="
--pointer='❭'
--height 10%
--color=fg:-1,bg:-1"
export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}"
export FZF_CTRL_T_OPTS="--preview='bat {} | head -500'"
if [[ $ID == "raspbian" ]]; then
. /usr/share/doc/fzf/examples/completion.bash
. /usr/share/doc/fzf/examples/key-bindings.bash
elif [[ $ID == "arch" ]]; then
. /usr/share/fzf/completion.bash
. /usr/share/fzf/key-bindings.bash
fi
_fzf_setup_completion path vim zathura xournalpp nvim mpv
else
echo "fzf not installed"
fi
# }}}
# Go {{{
export GOPATH="${XDG_DATA_HOME}/go"
# }}}
# Jupyter {{{
export JUPYTERLAB_DIR=$HOME/.local/share/jupyter/lab
# }}}
# Conda {{{
[ -f /opt/miniconda3/etc/profile.d/conda.sh ] && . /opt/miniconda3/etc/profile.d/conda.sh
# }}}
# Zettelkasten {{{
export ZK_PATH="$HOME/.zk"
# SSH Agent {{{
if [[ -z "${SSH_CONNECTION}" ]]; then
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
fi
# }}}
# pnpm
export PNPM_HOME="/home/h/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
# Codi
# Usage: codi [filetype] [filename]
codi() {
local syntax="${1:-python}"
shift
nvim -c \
"let g:startify_disable_at_vimenter = 1 |\
set bt=nofile ls=0 noru nonu nornu |\
hi ColorColumn ctermbg=NONE |\
hi VertSplit ctermbg=NONE |\
hi NonText ctermfg=0 |\
Codi $syntax" "$@"
}

19
dots/.bashrc.d/editor Normal file
View File

@ -0,0 +1,19 @@
# shellcheck shell=bash
# vim: set ft=bash :
# Set NeoVim as default editor
export EDITOR=nvim
export SUDO_EDITOR="$EDITOR"
declare -A -r EDITOR_CONFIGS=(
["nvim"]="$HOME/.config/nvim/init.lua"
["vim"]="$HOME/.vimrc"
)
edit_editor_config() {
for editor in "${!EDITOR_CONFIGS[@]}"; do
if [ "$EDITOR" = "$editor" ]; then
$EDITOR "${EDITOR_CONFIGS[$editor]}"
fi
done
}

View File

@ -0,0 +1 @@
# Desktop configuration

View File

@ -0,0 +1,19 @@
# shellcheck shell=bash
# vim: set ft=bash :
# >>> mamba initialize >>>
# !! Contents within this block are managed by 'mamba init' !!
export MAMBA_EXE="/usr/bin/micromamba";
export MAMBA_ROOT_PREFIX="/home/h/.local/share/micromamba";
__mamba_setup="$("$MAMBA_EXE" shell hook --shell bash --prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
else
if [ -f "/home/h/.local/share/micromamba/etc/profile.d/micromamba.sh" ]; then
. "/home/h/.local/share/micromamba/etc/profile.d/micromamba.sh"
else
export PATH="/home/h/.local/share/micromamba/bin:$PATH" # extra space after export prevents interference from conda init
fi
fi
unset __mamba_setup
# <<< mamba initialize <<<

22
dots/.bashrc.d/prompt Normal file
View File

@ -0,0 +1,22 @@
# shellcheck shell=bash
# vim: set ft=bash :
get_branch_name() {
git symbolic-ref --quiet --short HEAD 2>/dev/null \
|| git rev-parse --short HEAD 2>/dev/null \
|| echo 'some branch'
}
get_git_info() {
git rev-parse --is-inside-work-tree &>/dev/null || return
echo -e "($(get_branch_name))"
}
if [[ $SSH_CONNECTION ]]; then
PS1='\[\033[01;31m\]\u@\h\[\033[00m\] $(get_git_info)\W❭\[$(tput sgr0)\] '
else
PS1='\u $(get_git_info)\W❭\[$(tput sgr0)\] '
fi
# Ellipsis when deep in directory
export PROMPT_DIRTRIM=2
export PS1

26
dots/.bin/README.md Normal file
View File

@ -0,0 +1,26 @@
# Scripts
Mostly tiny helper scripts & experiments, some more useful than others.
## Setup
Make sure the scripts are in your `$PATH` and executable.
To add the complete directory of scripts to your `$PATH`:
```bash
export PATH=~/.bin:$PATH
```
To make a any script `<script>` executable:
```bash
chmod +x <script>
```
## Notes
Statusbar scripts are prefixed with `sb` under the assumption you're using
`polybar` (scripts my need changes to be used with different statusbars).
Some scripts have dependencies (e.g. `fzf`, `jq`, `xclip`, ...), make sure you
have them installed.

6
dots/.bin/aurpac Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# Tiny AUR clone helper
# aurpac <package-name>
git clone "https://aur.archlinux.org/$1.git"

3
dots/.bin/calc Executable file
View File

@ -0,0 +1,3 @@
#!/usr/env/bin bash
ipython -i /home/h/.bin/calc.py

5
dots/.bin/cam Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Open webcam window
ffplay -f v4l2 -x 640 -y 480 -i /dev/video0 >/dev/null 2>&1 & disown

View File

@ -0,0 +1,7 @@
#!/usr/bin/env node
const fs = require('fs')
const objLength = obj => Object.keys(obj).length
fs.readFile(process.argv[2], (err, data) => (err ? console.error(err) : console.log(objLength(JSON.parse(data)))))

3
dots/.bin/devdocs Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
xdg-open https://devdocs.io/offline

10
dots/.bin/dmenu-bluetooth Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
options="Mouse\nHeadphones"
selected="$(echo -e "$options" | dmenu -i)"
case "$selected" in
"Mouse") toggle-bt-device E4:19:21:56:C8:70;;
"Headphones") toggle-bt-device 38:18:4C:D4:74:42;;
esac

13
dots/.bin/dmenu-read Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Open pdf by title
# Note: does not handle incorrect metadata
dir=/home/h/doc/books
ag -g ".pdf$" $dir \
| xargs -n1 -d '\n' pdfinfo 2> /dev/null \
| grep "Title: " \
| awk '{for (i=2; i<NF; i++) printf $i " "; printf $NF; printf "\n"}' \
| grep -v "Title:"\
| dmenu -i -p "Read:"

12
dots/.bin/dmenu-spot Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
options="Play\nPause\nNext\nPrevious"
selected=$(echo -e "$options" | dmenu -i)
case "$selected" in
"Play") playerctl --player=ncspot play;;
"Pause") playerctl --player=ncspot pause;;
"Next") playerctl --player=ncspot next;;
"Previous") playerctl --player=ncspot previous;;
esac

10
dots/.bin/fzf-bluetooth Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
options="Mouse\nHeadphones"
selected="$(echo -e "$options" | fzf)"
case "$selected" in
"Mouse") toggle-bt-device E4:19:21:56:C8:70;;
"Headphones") toggle-bt-device 38:18:4C:D4:74:42;;
esac

30
dots/.bin/fzf-book Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Generate menu of book filenames and save paths
# Preview window contains metadata
function get_book_paths {
find /home/h/doc/books/ -regex '.*\.\(pdf\|epub\|djvu\)' -type f | sort
}
function select_file {
get_book_paths | fzf --delimiter=/ --with-nth=-1
}
function open {
if [ -n "$1" ]; then
echo "Opening \"$1\""
zathura "$1" --fork
else
echo "No file selected"
exit 1
fi
}
case "$1" in
--open) open "$(select_file)" ;;
--help) printf "open \n" >&2 ;;
*) open "$(select_file)" ;;
esac
[[ -n "$selected" ]] && xdg-open "$selected" &> /dev/null & disown

30
dots/.bin/fzf-fontnames Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
fn="/tmp/fontnames.txt"
contains_dash() {
[[ "$1" =~ - ]]
}
update() {
echo "" > "$fn"
font_list=$(fc-list -f "%{fullname}\n")
echo "$font_list" | while read line ; do
first="$(echo "$line" | cut -d',' -f1)"
last="$(echo "$line" | cut -d',' -f2)"
if $(contains_dash "$first"); then
echo "$last" >> "$fn"
else
echo "$first" >> "$fn"
fi
done
}
case "$1" in
--update) update;;
*) cat "$fn" | sort | uniq | awk 'NF' | fzf;;
esac

3
dots/.bin/fzf-ssh Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
ssh "$(ssh-hosts | fzf)"

3
dots/.bin/get-anki-decks Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
curl 127.0.0.1:8765 -X POST -d '{"action": "deckNames", "version": 6}' | jq '.result[]' -r

View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Get Anki review status from exit code
num_reviews="$(cat /tmp/anki-reviews)"
if [ "$num_reviews" -ge "400" ]
then
exit 0
else
exit 1
fi

90
dots/.bin/git-cb Executable file
View File

@ -0,0 +1,90 @@
#!/usr/bin/env bash
types=(
"feature For new features"
"bugfix For bug fixes"
"hotfix For urgent fixes"
"release For preparing releases"
"chore For non-code tasks"
)
selected=$(printf '%s\n' "${types[@]}" | fzf --prompt="Select branch type: ") || exit 1
type=${selected%% *}
echo "Fetching Jira tickets..."
jira_data=$(jira issue list --assignee=hektor.misplon@rightcrowd.com --order-by=priority --plain --no-headers 2>/dev/null)
if [[ $? -ne 0 || -z "$jira_data" ]]; then
echo "Warning: Could not fetch Jira tickets or no tickets found."
echo "Proceeding without ticket ID..."
ticket_id=""
else
# Create formatted list for fzf: "TICKET-123 - Issue description"
formatted_tickets=$(echo "$jira_data" | awk '{
ticket_id = $2
$1 = $2 = ""
description = $0
gsub(/^[ \t]+/, "", description)
if (length(description) > 60) {
description = substr(description, 1, 57) "..."
}
print ticket_id " - " description
}')
if [[ -z "$formatted_tickets" ]]; then
echo "No tickets found. Proceeding without ticket ID..."
ticket_id=""
else
# Let user select a ticket or skip
echo ""
selected_ticket=$(echo -e "SKIP - Create branch without ticket ID\n$formatted_tickets" | \
fzf --prompt="Select Jira ticket (or skip): " --height=40%) || exit 1
if [[ "$selected_ticket" == "SKIP"* ]]; then
ticket_id=""
else
ticket_id=${selected_ticket%% -*}
fi
fi
fi
editor="${EDITOR:-vi}"
tmpfile=$(mktemp)
if [[ -n "$ticket_id" ]]; then
cat > "$tmpfile" << EOF
# Selected ticket: $ticket_id
# Enter your branch description below in kebab case (e.g. \`my-description\`):
# The ticket ID will be automatically included in the branch name.
EOF
else
cat > "$tmpfile" << 'EOF'
# Enter your branch description below in kebab case (e.g. `my-description`):
EOF
fi
"$editor" "$tmpfile"
desc=$(grep -v '^#' "$tmpfile" | tr -d '\n' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
rm "$tmpfile"
if [[ -z "$desc" ]]; then
echo "No description provided."
exit 1
fi
if [[ ! "$desc" =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]]; then
echo "Invalid branch description format."
echo "Use lowercase letters, numbers, and hyphens only."
echo "No trailing or consecutive hyphens allowed."
exit 1
fi
if [[ -n "$ticket_id" ]]; then
branch="$type/$ticket_id-$desc"
else
branch="$type/$desc"
fi
echo "Creating branch: $branch"
git checkout -b "$branch"

2
dots/.bin/jack-to-bt Executable file
View File

@ -0,0 +1,2 @@
pactl load-module module-jack-source connect=0
pactl load-module module-loopback source=jack_in

5
dots/.bin/json-to-yaml Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env python
import yaml, json, sys
print(yaml.dump(json.load(open(sys.argv[1])), allow_unicode=True), end='')

8
dots/.bin/notify Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Pipe into notify-send
#
# e.g. `echo "Hello world" | notify`
read -r msg
notify-send "$msg" "$@"

View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
sudo pacman -Qtdq | sudo pacman -Rns -

3
dots/.bin/pdftitle Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
pdfinfo "$1" | head -n 1 | awk '{for (i=2; i<NF; i++) printf $i " "; print $NF}'

82
dots/.bin/pomo Executable file
View File

@ -0,0 +1,82 @@
#!/usr/bin/env python3
# vim: set filetype=python:
"""
Pomodoro timer
- Writes pomodoro timer to temporary file so statusbar can read it
- Notification on session finish
- Notification on break finish
"""
import os
import atexit
from argparse import ArgumentParser
from time import sleep
from plyer import notification
@atexit.register
def clear():
if os.path.exists('/home/h/.local/share/pomo'):
os.remove('/home/h/.local/share/pomo')
def format_mins_secs(mins, secs):
return f"{mins:02d}:{secs:02d}"
def make_countdown():
def countdown(duration):
while duration != 0:
mins = duration // 60
secs = duration % 60
time_str = format_mins_secs(mins, secs)
os.system(f'echo -n "{time_str}" > /home/h/.local/share/pomo')
sleep(1)
duration -= 1
return countdown
def main(args):
prep_duration = args.prep_duration * 60
work_duration = args.work_duration * 60
break_duration = args.break_duration * 60
repeats = args.repeats
prep_countdown = make_countdown()
work_countdown = make_countdown()
break_countdown = make_countdown()
prep_countdown(prep_duration)
while repeats != 0:
notification.notify(title="Get started")
work_countdown(work_duration)
if break_duration != 0:
notification.notify(title="Time for a break")
break_countdown(break_duration)
notification.notify(title="Break is over, back to work")
repeats -= 1
def handle_signal(signal, frame):
# Wait for clear to finish
clear()
print('Exiting')
exit(0)
if __name__ == '__main__':
parser = ArgumentParser()
parser.add_argument('-w', '--work-duration', type=int,
help='Session duration', default=25)
parser.add_argument('-b', '--break-duration', type=int,
help='Break duration', default=5)
parser.add_argument('-r', '--repeats', type=int,
help='Numer of sessions', default=1)
parser.add_argument('-c', '--clear', action='store_true',
help='Clear timer')
args = parser.parse_args()
main(args)

9
dots/.bin/r5rs Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
session="r5rs"
tmux attach-session -t $session || tmux new-session -s $session \; \
split-window -h -t $session \; \
send-keys -t 0 "vim" C-m \; \
send-keys -t 1 "plt-r5rs --no-prim" C-m \; \
select-pane -t 0

View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
sed -i -r 's/\[*\]\(\.\/([A-z-]*.md)/\]\(\1/g' *.md

19
dots/.bin/restore-passwddb Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Backup existing password databases and
# database keys (using date in filename date -u
# +%Y-%m-%d_%H-%M-%S)
RCLONE_REMOTE="proton-drive"
for f in "$HOME/doc"/*.{kdbx,kdbx.key}; do
[ -e "$f" ] || continue
echo "Backing up $f to $f-$(date -u +%Y-%m-%d_%H-%M-%S)"
cp "$f" "$f-$(date -u +%Y-%m-%d_%H-%M-%S)"
done
echo "Restoring KeePassXC databases and database keys"
rclone copyto \
"$RCLONE_REMOTE:doc"/ "$HOME/doc/" \
--progress \
--include "/*.{kdbx,kdbx.key}"

View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
function start() {
adb start-server
nohup gnirehtet autorun &> /dev/null &
printf "Started reverse tethering \n"
}
function stop() {
adb kill-server
gnirehtet stop
pkill gnirehtet
printf "Stopped reverse tethering \n"
}
case "$1" in
start) start ;;
stop) stop ;;
restart) stop; start ;;
*) printf "start | stop | restart \n" >&2
exit 1
;;
esac

13
dots/.bin/rofi-trans Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
options="nl:en\nen:nl\nnl:fr\nfr:nl\nen:fr\nfr:en\nnl:de\nde:nl"
selected=$(echo -en "$options" | rofi -dmenu -p "source?:target?" -i)
# notify-send --app-name= -t 3000 "$(trans "$selected" -b "$(rofi -dmenu -p "$selected" &)" \
# | tr -d '\n' \
# | xclip -sel clip -f)"
translation="$(trans "$selected" -b "$(rofi -dmenu -p "$selected" &)" | tr -d '\n')"
echo -e "Copy" | rofi -p "translation" -dmenu -i -mesg "$translation" | xargs -I{} echo -n "$translation" | xclip -selection clipboard

25
dots/.bin/save-home Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Back up my $HOME folder to OneDrive using `restic`.
#
# Adds extra flags needed for using `rclone` with sharepoint WebDav I.e. add
# `--ignore-size --ignore-checksum --update` to the default `rclone.args`.
#
# Select directory in repo using -r rclone:<repo>:<directory>
#
# Runs `backup` command on $HOME and ignore what is listed in `.resticexclude`
#
# ```/etc/restic-env
# export B2_ACCOUNT_ID=
# export B2_ACCOUNT_KEY=
# ```
#
# `restic -r b2:desktop-arch init`
source /etc/restic-env
restic -r "$RESTIC_REPOSITORY:$HOSTNAME" backup \
--tag "hektor" \
--one-file-system \
--files-from="$HOME/.resticinclude" \
--exclude-file="$HOME/.resticexclude" \
--verbose=3

75
dots/.bin/save-passwddb Executable file
View File

@ -0,0 +1,75 @@
#!/usr/bin/env bash
# Save (encrypted) password database to cloud storage
#
# Usage:
# save-passwddb - Save databases to cloud
# save-passwddb init - Restore databases from cloud (with single backup archive)
RCLONE_REMOTE="proton"
SOURCE_DIR="$HOME/doc"
TARGET_DIR="$RCLONE_REMOTE:doc"
BACKUP_DIR="$HOME/doc/bak"
function save_databases() {
if [ 0 -lt "$(ls $SOURCE_DIR/*.kdbx 2>/dev/null | wc -w)" ]; then
echo "[save] Saving KeePassXC databases and database keys"
rclone copy "$SOURCE_DIR" "$TARGET_DIR" \
--include "/*.{kdbx,kdbx.key}" \
--progress
echo "[save] Done"
else
echo "[save] No password database found, restore with:"
echo ""
echo " $0 init"
exit 1
fi
}
function backup_existing() {
mkdir -p "$BACKUP_DIR"
local timestamp=$(date +%Y%m%d-%H%M%S)
local backup_file="$BACKUP_DIR/passwddb_backup_${timestamp}.tar.gz"
echo "[backup] Creating backup archive: ${backup_file}"
tar -czf "$backup_file" -C "$SOURCE_DIR" $(find "$SOURCE_DIR" -maxdepth 1 -type f \( -name "*.kdbx" -o -name "*.kdbx.key" \) -printf "%f ")
echo "[backup] Backup complete"
}
function restore_databases() {
echo "[init] Checking for existing files..."
local existing_files=$(find "$SOURCE_DIR" -maxdepth 1 -type f \( -name "*.kdbx" -o -name "*.kdbx.key" \) -print)
if [ -n "$existing_files" ]; then
echo "[init] Found existing database files:"
echo "$existing_files" | while read -r file; do
echo " - $file"
done
read -p "[init] Create backup archive of existing files? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
backup_existing
fi
fi
echo "[init] Restoring KeePassXC databases and database keys"
mkdir -p "$SOURCE_DIR"
rclone copy "$TARGET_DIR" "$SOURCE_DIR" \
--include "*.{kdbx,kdbx.key}" \
--progress
echo "[init] Done"
}
case "$1" in
""|save)
save_databases
;;
init)
restore_databases
;;
*)
echo "Usage: $0 [init|save]"
exit 1
;;
esac

12
dots/.bin/save-ssh-host Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
selected_hosts="$(ssh-hosts | fzf -m)"
for host in $selected_hosts; do
echo "Saving $host"
directories="$(ssh "$host" ls | fzf -m)"
for directory in $directories; do
echo "Saving $host:$directory"
ssh "$host" "(tar cvzf - ~/$directory)" > "${host}_${directory}.tar.gz"
done
done

4
dots/.bin/save-zk Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
cd "$ZK_PATH" || echo "No zettelkasten directory found"
git a . && git commit -m "Update" && git push

22
dots/.bin/sb-anki Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Anki review percentage for statusbar
num_to_review=200
# Get current card count from Anki
count=$(curl -s 127.0.0.1:8765 -X POST -d '{"action": "getNumCardsReviewedToday", "version": 6}' | jq '.result')
if [ -z "$count" ]
then
if [ -s /tmp/anki-reviews ]; then
true
else
echo "-1" > /tmp/anki-reviews
fi
else
echo "$count" > /tmp/anki-reviews
fi
num_reviews=$(cat /tmp/anki-reviews)
echo -n -e " Reviews: $(python3 -c "print('{:.2%}'.format($num_reviews/$num_to_review))") "

13
dots/.bin/sb-battery Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
cap="$(cat /sys/class/power_supply/BAT0/capacity)"
if [ "$cap" -ge 33 ];then
color="\x01"
elif [ "$cap" -ge 10 ]; then
color="\x03"
else
color="\x04"
fi
echo -n -e "$color $cap% \x01"

3
dots/.bin/sb-date Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo -n -e "Week $(date '+%V') $(date '+%a %d %b %H:%M') "

7
dots/.bin/sb-internet Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
if grep -xq 'up' /sys/class/net/w*/operstate 2>/dev/null ; then
wifiicon="$(awk '/^\s*w/ { print "WiFi", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
fi
printf " %s%s%s" "$wifiicon" "$(sed "s/down//;s/up/Ethernet/" /sys/class/net/e*/operstate 2>/dev/null)"

3
dots/.bin/sb-pomo Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
[ -f "/tmp/pomo" ] && cat /tmp/pomo || echo ""

4
dots/.bin/sb-project Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Render contents of $HOME/.project if present
[ -f "$HOME/.project" ] && cat "$HOME/.project" || echo ""

7
dots/.bin/sb-tasks Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
num_done="$(task end.after:today status:completed count)"
num_pending="$(($(task count status:pending) + $num_done))"
num_waiting="$(($(task count status:waiting)))"
echo -e "Tasks: $num_done/$num_pending+$num_waiting"

12
dots/.bin/sb-wg Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env sh
# Reference: https://github.com/mil-ad/polybar-wireguard
connected_interfaces=$(networkctl | grep -P "\d+ .* wireguard routable" -o | cut -d" " -f2)
if [ -n "$connected_interfaces" ];
then
for interface in $connected_interfaces; do echo "$interface"; done
else
exit 1
fi

51
dots/.bin/screen-temperature Executable file
View File

@ -0,0 +1,51 @@
#!/usr/bin/env python
import sys
import subprocess
DEFAULT_TEMPERATURE = 3500
try:
with open('/tmp/temperature', 'r') as temp_file:
current_temperature = int(temp_file.read())
except FileNotFoundError:
current_temperature = DEFAULT_TEMPERATURE
# If no argument is given print the current temperature
if len(sys.argv) == 1:
print(current_temperature)
sys.exit(0)
elif len(sys.argv) != 2:
print("""
Usage:
screen-temperature
print current temperature
screen-temperature <temperature>
set screen temperature to <temperature>
screen-temperature <+|-><temperature>
increase or decrease screen temperature by <temperature>
""")
sys.exit(1)
temperature_change = sys.argv[1]
if temperature_change.startswith("+"):
new_temperature = current_temperature + int(temperature_change[1:])
elif temperature_change.startswith("-"):
new_temperature = current_temperature - int(temperature_change[1:])
else:
new_temperature = int(temperature_change)
try:
subprocess.run(["redshift", "-O", str(new_temperature), "-P"], check=True)
with open('/tmp/temperature', 'w') as temp_file:
temp_file.write(str(new_temperature) + '\n')
# Send notification
subprocess.run(
["notify-send", str(new_temperature) + "K"])
except subprocess.CalledProcessError:
print("Error: could not set screen temperature.")
sys.exit(1)

25
dots/.bin/script Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Script to create script
if [ -z "$1" ]; then
echo "Usage: script <scriptname>"
exit
fi
path="$HOME/.bin/$1"
# Prevent overwriting existing script
set -o noclobber
# Create script
cat > "$path" << EOF
#!/usr/bin/env bash
EOF
chmod +x "$path"
# Open script in editor on line 3
"$EDITOR" +3 "$path"

208
dots/.bin/setup Executable file
View File

@ -0,0 +1,208 @@
#!/bin/bash
pac_list=(
at
automake
autopep8
base
base-devel
bash-completion
bash-language-server
bc
brightnessctl
chromium
dmidecode
entr
eslint_d
feh
firefox-developer-edition
firefox-tridactyl
firefox-tridactyl-native
firefox-tridactyl-native-debug
fzf
gcc
git
haskell-language-server
haskell-ormolu
hsetroot
htop
httpie
jq
keepassxc
kitty
lua-language-server
make
man-db
man-pages
neovim
nmap
nodejs-lts-jod
pacman-contrib
pandoc-cli
pandoc-crossref
parallel
pass
pkgbuild-language-server
pnpm
ripgrep
sshfs
stylelint
svelte-language-server
tailwindcss-language-server
task
tldr
tmux
tmuxp
tree
tree-sitter-cli
ts-node
typescript-language-server
unzip
vim-language-server
wget
xclip
yaml-language-server
)
aurpac_list=(
hadolint-bin
nvm
nvimpager
paru
tmux-bash-completion-git
ttf-iosevka-term-ss08
vim-plug
vtsls
xbanish
)
install() {
local package="$1"
if pacman -Qi "$package" &> /dev/null; then
echo "$package is already installed"
else
echo "Installing " "$package"
sudo pacman -S --noconfirm --needed "$package"
fi
}
aurpac() {
git clone "https://aur.archlinux.org/$1.git" "$HOME/.build/$1"
}
install_packages() {
announce "Installing packages"
local count
for pac in "${pac_list[@]}" ; do
count=$((count+1))
install "$pac";
done
echo "$count packages installed"
}
install_dotfiles() {
announce "Installing dotfiles"
origin="https://git.hektormisplon.xyz/hektor/dots"
git clone "$origin" "$HOME/dots"
cp -r "$HOME/dots/.git" "$HOME/.git"
git --git-dir="$HOME/.git" config --local status.showUntrackedFiles no
git --git-dir="$HOME/.git" stash -m "[dots]"
git --git-dir="$HOME/.git" stash apply
git --git-dir="$HOME/.git" restore "$HOME"
}
install_aur_packages() {
announce "Installing AUR packages"
local count
for package in "${aurpac_list[@]}" ; do
if pacman -Qi "$1" &> /dev/null; then
echo "$1 is already installed"
else
count=$((count+1))
aurpac "$package" && makepkg -si -D "$HOME/.build/$package"
fi
done
echo "$count AUR packages installed"
}
setup_neovim() {
announce "Setting up NeoVim"
git clone --depth=1 https://github.com/savq/paq-nvim.git \
"${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/pack/paqs/start/paq-nvim
}
setup_keyboard() {
announce "Setting up keyboard"
install "interception-tools"
install "interception-caps2esc"
udevmon_config_contents="\
- JOB: intercept -g \$DEVNODE | caps2esc -m 1 | uinput -d \$DEVNODE
DEVICE:
EVENTS:
EV_KEY: [KEY_CAPSLOCK]"
if [ -f /etc/interception/udevmon.yaml ] && diff -q <(echo "$udevmon_config_contents") /etc/interception/udevmon.yaml; then
echo "udevmon config already exists"
echo "$udevmon_config_contents"
elif [ -f /etc/interception/udevmon.yaml ]; then
echo "interception udevmon.yaml already exists"
cat /etc/interception/udevmon.yaml
echo "verify if this config matches the one below"
echo "$udevmon_config_contents"
else
echo "interception udevmon.yaml does not exist, creating one"
sudo bash -c "echo '$udevmon_config_contents' > /etc/interception/udevmon.yaml"
fi
sudo systemctl enable --now udevmon.service
if pgrep -x caps2esc > /dev/null; then
echo "caps2esc is already running"
else
caps2esc -m 1
fi
}
configure_gnome() {
announce "Configuring Gnome"; setup-gnome
}
setup_firewall() {
announce "Configuring firewalld"
install firewalld
sudo systemctl enable --now firewalld
}
setup_docker() {
announce "Setting up Docker"
install docker
install docker-compose
sudo systemctl enable --now docker.socket
sudo usermod -aG docker "$USER"
echo "User added to docker group, please restart your session"
}
announce() {
local message="$1"
echo " "
echo "[dots] $message"
echo " "
}
confirm() {
local question="$1"
read -r -p "[dots] $question? [y/N]" -n 1
case "$REPLY" in y|Y ) "$2";; * ) echo "Skipping"; esac
}
printf '%s\n' "${pac_list[@]}"
confirm "Install these packages? " install_packages
printf '%s\n' "${aurpac_list[@]}"
confirm "Install these AUR packages? " install_aur_packages
confirm "Setup NeoVim? " setup_neovim
confirm "Install dotfiles? " install_dotfiles
confirm "Setup keyboard? " setup_keyboard
if pacman -Qi "gdm" &> /dev/null; then
confirm "Configure Gnome? " configure_gnome
fi
confirm "Setup firewall? " setup_firewall
confirm "Setup Docker? " setup_docker

37
dots/.bin/setup-gnome Executable file
View File

@ -0,0 +1,37 @@
#!/usr/bin/env bash
gsettings set org.gnome.desktop.background primary-color "#555555"
gsettings set org.gnome.desktop.wm.preferences workspace-names "['sh', 'www', 'dev', 'info', 'etc']"
gsettings set org.gnome.desktop.wm.keybindings close "['<Shift><Super>Delete']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>j']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Super>k']"
gsettings set org.gnome.shell.keybindings toggle-application-view "['<Super>p']"
gsettings set org.gnome.mutter center-new-windows true
gsettings set org.gnome.shell.keybindings toggle-quick-settings []
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>a']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "['<Super>s']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3 "['<Super>d']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-4 "['<Super>f']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-5 "['<Super>g']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1 "['<Super><Shift>a']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2 "['<Super><Shift>s']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3 "['<Super><Shift>d']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4 "['<Super><Shift>f']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-5 "['<Super><Shift>g']"
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ name "Kitty"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ command "kitty"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ binding "<Shift><Super>Return"
gsettings set org.gnome.shell.keybindings screenshot "['Print']"
gsettings set org.gnome.desktop.wm.preferences num-workspaces "5"
gsettings set org.gnome.mutter dynamic-workspaces "false"
gsettings set org.gnome.shell.extensions.window-list display-all-workspaces "true"
gsettings set org.gnome.shell.app-switcher current-workspace-only "true"
gsettings set org.gnome.login-screen logo ''
gsettings set org.gnome.shell favorite-apps "['firefox-developer-edition.desktop']"

20
dots/.bin/setup-zk Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
if [ ! -d ~/.zk ]; then
echo "[zk] Setting up zettelkasten"
gh repo clone zk ~/.zk
else
echo "[zk] Zettelkasten already set up."
fi
read -p "Would you like open your zettelkasten? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
if [ -x "$(command -v zk)" ]; then
zk
else
echo "Error: 'zk' command not found or not executable"
exit 1
fi
fi

5
dots/.bin/ssh-hosts Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
ssh_hosts="$(grep -E 'Host [a-z0-9\-]*$' ~/.ssh/config | awk '{print $2}')"
echo "$ssh_hosts"

144
dots/.bin/taskdeps Executable file
View File

@ -0,0 +1,144 @@
#!/usr/bin/python
import argparse
import json
import subprocess
from collections import defaultdict
def get_task_data():
command = (
"task +PENDING or +WAITING -COMPLETED -DELETED export | "
"jq '[.[] | {uuid: .uuid, id, depends: .depends, description: .description, status: .status }]'"
)
output = subprocess.check_output(command, shell=True)
return json.loads(output)
def parse_task_data(data):
dependency_graph = defaultdict(list)
task_details = {}
dependent_tasks = set()
for task in data:
task_id = task["uuid"]
task_details[task_id] = {
"id": task.get("id", "?"),
"description": task.get("description", "No description"),
"status": task.get("status", "Unknown status"),
}
if task["depends"]:
for dependency in task["depends"]:
dependency_graph[dependency].append(task_id)
dependent_tasks.add(task_id)
root_tasks = set(task_details.keys()) - dependent_tasks
return task_details, dependency_graph, root_tasks
def get_all_parents(task_id, dependency_graph):
return [
parent for parent, children in dependency_graph.items() if task_id in children
]
def build_ascii_dag(
task_id,
task_details,
dependency_graph,
prefix="",
is_last=True,
show_id=True,
visited=None,
):
if visited is None:
visited = set()
if task_id in visited:
return [f"{prefix}{'└── ' if is_last else '├── '}... (cycle detected)"]
visited.add(task_id)
task_info = task_details[task_id]
task_line = f"{prefix}{'└── ' if is_last else '├── '}{task_info['id'] + ': ' if show_id else ''}{task_info['description']} ({task_info['status']})"
lines = [task_line]
children = dependency_graph.get(task_id, [])
for idx, child in enumerate(children):
child_is_last = idx == len(children) - 1
child_prefix = prefix + (" " if is_last else "│ ")
lines.extend(
build_ascii_dag(
child,
task_details,
dependency_graph,
child_prefix,
child_is_last,
show_id,
visited.copy(),
)
)
return lines
def render_dependency_dag(task_details, dependency_graph, root_tasks, show_id):
dag_lines = []
global_visited = set()
def dfs(task_id, prefix="", is_last=True, visited=None):
if visited is None:
visited = set()
if task_id in visited:
return
visited.add(task_id)
global_visited.add(task_id)
task_info = task_details[task_id]
task_line = f"{prefix}{'└── ' if is_last else '├── '}{str(task_info['id']) + ': ' if show_id else ''}{task_info['description']} ({task_info['status']})"
dag_lines.append(task_line)
children = dependency_graph.get(task_id, [])
for idx, child in enumerate(children):
child_is_last = idx == len(children) - 1
child_prefix = prefix + (" " if is_last else "│ ")
dfs(child, child_prefix, child_is_last, visited.copy())
root_tasks_with_children = [
root for root in root_tasks if dependency_graph.get(root, [])
]
for root in sorted(
root_tasks_with_children,
key=lambda x: len(dependency_graph.get(x, [])),
reverse=True,
):
if root not in global_visited:
dfs(root)
dag_lines.append("")
return "\n".join(dag_lines).rstrip()
def main(args):
data = get_task_data()
task_details, dependency_graph, root_tasks = parse_task_data(data)
ascii_dag = render_dependency_dag(
task_details, dependency_graph, root_tasks, show_id=args.show_id
)
print(ascii_dag)
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Generates a task dependency DAG for Taskwarrior tasks."
)
parser.add_argument(
"--show-id",
action="store_true",
default=False,
help="Include task IDs in the output.",
)
args = parser.parse_args()
main(args)

26
dots/.bin/tidalcycles Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euf -o pipefail
VIM=${VIM:-"vim"}
TMUX=${TMUX:-"tmux"}
FILE=${FILE:-"$(date +%F).tidal"}
SESSION=${SESSION:-"tidal"}
TIDAL_BOOT_PATH=${TIDAL_BOOT_PATH:-""}
GHCI=${GHCI:-""}
args=${*:-$FILE}
# attach if session else create
$TMUX attach-session -t "$SESSION" || $TMUX new-session -s "$SESSION" \; \
split-window -h -t "$SESSION" \; \
send-keys -t 0 "$VIM $args" C-m \; \
send-keys -t 1 "TIDAL_BOOT_PATH=$TIDAL_BOOT_PATH GHCI=$GHCI tidal" C-m \; \
new-window -t "$SESSION":2 -n SuperDirt \; \
send-keys -t 0 "jack_control start && sclang ~/dev/live/scripts/start.scd" C-m \; \
select-window -t 1 \; \
resize-pane -t 1 -x 100 \; \
resize-pane -t 0 -x 125 \; \
select-pane -t 0

13
dots/.bin/tmux-workspace Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
session="main"
tmux attach-session -t $session || tmux new-session -s $session \; \
rename-window task \; \
send-keys -t 1 "task" C-m \; \
new-window -n zk \; \
send-keys -t 2 "nvim $ZK_PATH/index.md" C-m \; \
new-window -n term \; \
new-window -n music \; \
send-keys -t 4 "echo 'TODO: open music player'" C-m \; \
select-window -t 1 \;

11
dots/.bin/toggle-bt-device Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
status="$(bluetoothctl info "$1" | grep Connected | cut -f 2 -d ':' | cut -f 2 -d ' ')"
if [ "$status" == "yes" ]
then
bluetoothctl disconnect "$1"
else
trust "$1"
bluetoothctl connect "$1"
fi

3
dots/.bin/update Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
sudo pacman -Syu

5
dots/.bin/update-vim Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Tiny Vim update helper
nvim +PlugUpgrade +PlugUpdate +CocUpdate

33
dots/.bin/zk Executable file
View File

@ -0,0 +1,33 @@
#!/usr/bin/env bash
if [ "$TERM_PROGRAM" = tmux ]; then
cd ~/.zk && $EDITOR "$(cat ~/.zk/current-zettel.txt)"
else
echo 'Not in tmux'
echo 'Choose an option:'
echo '1. Open in tmux'
echo '2. Open in current terminal'
read -r -p 'Enter your choice: ' choice
case $choice in
1)
# Check if a tmux session is running with a window named zk
if tmux list-windows -F '#{window_name}' | grep -q zk; then
# Attach to the session containing the 'zk' window
session="$(tmux list-windows -F '#{window_name} #{session_name}' | grep zk | head -n 1 | awk '{ print $2 }')"
tmux attach -t "$session"
else
# Create session with a window named 'zk' and start nvim
tmux new-session -s zk -n zk -d
tmux send-keys -t zk:zk "cd ~/.zk && $EDITOR \"\$(cat ~/.zk/current-zettel.txt)\"" Enter
tmux attach -t zk
fi
;;
2)
cd ~/.zk && $EDITOR "$(cat ~/.zk/current-zettel.txt)"
;;
*)
echo 'Not opening Zettelkasten'
exit 1
;;
esac
fi

0
dots/.build/.gitkeep Normal file
View File

View File

@ -0,0 +1 @@
[{ "key": "ctrl+b", "command": "workbench.action.toggleSidebarVisibility" }]

View File

@ -0,0 +1,114 @@
{
/* view */
"workbench.statusBar.visible": true,
"workbench.activityBar.visible": false,
"breadcrumbs.enabled": false,
"editor.minimap.enabled": false,
"window.menuBarVisibility": "hidden",
"workbench.editor.showTabs": false,
"workbench.editor.showIcons": false,
/* font */
"editor.fontSize": 20,
"editor.fontLigatures": true,
"editor.fontFamily": "Iosevka",
"terminal.integrated.fontSize": 20,
/* editor */
"editor.lineNumbers": "relative",
"editor.glyphMargin": false,
"terminal.integrated.allowMnemonics": false,
"workbench.colorCustomizations": {
"editorGroup.emptyBackground": "#0c0c0c",
"scrollbar.shadow": "#000",
"widget.shadow": "#000",
"editorWidget.background": "#0c0c0c",
"editor.background": "#0c0c0c",
"sideBar.background": "#0c0c0c",
"editorGroupHeader.noTabsBackground": "#0c0c0c",
"scrollbarSlider.background": "#222",
"scrollbarSlider.activeBackground": "#222",
"scrollbarSlider.hoverBackground": "#333",
"statusBar.noFolderBackground": "#0c0c0c",
"statusBar.border": "#0c0c0c",
"statusBar.background": "#0c0c0c",
"statusBar.foreground": "#555"
},
"editor.tokenColorCustomizations": {
"comments": "#555",
"functions": "#aaa",
"numbers": "#fff",
"strings": "#fff",
"types": "#aaa",
"variables": "#aaa",
"keywords": "#aaa"
},
/* vim keybindings */
"vim.incsearch": true,
"vim.hlsearch": true,
"vim.leader": "<space>",
"vim.normalModeKeyBindingsNonRecursive": [
/* quick quit */
{
"before": ["<leader>", "q"],
"commands": [":q"]
},
{
"before": ["<leader>", "w"],
"commands": [":w"]
},
{
"before": ["<leader>", "Q"],
"commands": [":q!"]
},
{
"before": ["<leader>", "W"],
"commands": [":w!"]
},
/* split */
{
"before": ["<leader>", "s", "s"],
"commands": [":sp"]
},
{
"before": ["<leader>", "s", "v"],
"commands": [":vs"]
},
/* clear search highlight */
{
"before": ["<leader>", "<leader>"],
"commands": [":nohl"]
}
],
"vim.insertModeKeyBindings": [
/* quick exit insert */
{
"before": ["j", "j"],
"after": ["<Esc>"]
}
],
"vim.handleKeys": {
"<C-a>": false,
"<C-f>": false
},
/* eslint & prettier */
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"workbench.colorTheme": "Absolute Black",
"window.zoomLevel": 1,
"javascript.updateImportsOnFileMove.enabled": "always"
}

View File

@ -0,0 +1 @@
Xcursor.size: 16

57
dots/.config/X11/xinitrc Normal file
View File

@ -0,0 +1,57 @@
#!/bin/sh
userresources=$HOME/.config/X11/Xresources
usermodmap=$HOME/.config/X11/Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
if [ -f $sysresources ]; then xrdb -merge $sysresources; fi
if [ -f $sysmodmap ]; then xmodmap $sysmodmap; fi
if [ -f "$userresources" ]; then xrdb -merge "$userresources"; fi
if [ -f "$usermodmap" ]; then xmodmap "$usermodmap"; fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# ______________________________
xset -b # disable bell
xset r rate 200 30 # adjust typematic delay & rate
# Shared
xbindkeys -f "$HOME"/.config/xbindkeys/config
xbanish &
redshift -o -O "$(cat /tmp/temperature)" & # Run redshift in one shot mode
# DWM
# dwmblocks &
# udiskie &
# # No compositor
# # xsetroot -solid "#0a0a0a"
# # With compositor
# # hsetroot -solid "#0a0a0a"
# # picom &
# # execute dwm in a loop
# while true; do
# dwm 2> ~/.dwm.log
# done
# Openbox
# # udiskie --tray &
# # plank &
# # picom &
# # hsetroot -solid "#555555"
# # openbox
# Xmonad
xsetroot -solid "#0a0a0a"
xsetroot -cursor_name left_ptr
picom &
trayer --edge top --align right --SetDockType true --SetPartialStrut true \
--expand true --width 10 --transparent true --tint 0x111111 --height 25 &
exec xmonad

View File

@ -0,0 +1,34 @@
[global]
geometry="0-0+24"
monitor=0
follow=keyboard
indicate_hidden=yes
notification_height=0
padding=8
horizontal_padding=8
frame_width=1
frame_color="#333"
separator_height=1
idle_threshold=120
font=Iosevka Term SS08 12
markup=full
format="%s\n%b"
dmenu=/usr/bin/dmenu -p dunst:
browser=/usr/bin/brave -new-tab
verbosity=info
[urgency_low]
background="#111"
foreground="#aaa"
timeout=10
[urgency_normal]
background="#111"
foreground="#aaa"
timeout=10
[urgency_critical]
background="#111"
foreground="#fff"
frame_color="#f00"
timeout=0

12
dots/.config/feh/keys Normal file
View File

@ -0,0 +1,12 @@
prev_img h
next_img l
scroll_left L
scroll_right H
scroll_up J
scroll_down K
zoom_in j
zoom_out k
zoom_fit z
zoom_default =
mirror bar
close q Q

3
dots/.config/feh/themes Normal file
View File

@ -0,0 +1,3 @@
feh \
-B black \
--auto-zoom

5
dots/.config/firefox/setup Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
for i in ~/.mozilla/firefox/*.*default*
do ln -s "$XDG_CONFIG_HOME"/firefox/user.js "$i/user.js"
done

View File

@ -0,0 +1,15 @@
/*
* Note: has to be symlinked to profile directories for your
* firefox release
*
* E.g.
*
* ```sh
* ln -s user.js ~/.mozilla/firefox/*.default-release/user.js
* ```
* Or check out the `setup` script
*
*/
// Set default download directory
user_pref("browser.download.dir", "/home/h/dl");

View File

@ -0,0 +1,36 @@
[General]
checkForUpdates=false
disabledTrayIcon=true
uiColor=#cccccc
fontFamily=Inter
drawColor=#ffffff
savePath=/home/h/doc/clips
copyPathAfterSave=true
saveLastRegion=true
saveAsFileExtension=png
userColors=picker, #800000, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ffffff, #000000
[Shortcuts]
TYPE_ARROW=a
TYPE_CIRCLE=o
TYPE_CIRCLECOUNT=Shift+o
TYPE_COMMIT_CURRENT_TOOL=Ctrl+Return
TYPE_COPY=y
TYPE_DELETE_CURRENT_TOOL=
TYPE_DRAWER=l
TYPE_EXIT=q
TYPE_IMAGEUPLOADER=
TYPE_MARKER=m
TYPE_MOVESELECTION=Ctrl+M
TYPE_MOVE_DOWN=j
TYPE_MOVE_LEFT=h
TYPE_MOVE_RIGHT=l
TYPE_MOVE_UP=k
TYPE_OPEN_APP=o
TYPE_PENCIL=d
TYPE_PIN=Enter
TYPE_PIXELATE=p
TYPE_RECTANGLE=r
TYPE_REDO=Ctrl+r
TYPE_RESIZE_DOWN=Shift+j
TYPE_RESIZE_LEFT=Shift+h

View File

@ -0,0 +1,16 @@
git_protocol: ssh
prompt: enabled
aliases:
co: pr checkout
c: repo clone
f: repo fork
rc: repo create
rv: repo view
re: repo edit
rm: repo remove
rn: repo rename
lr: repo list
li: issue list
al: alias
al-: alias delete
version: "1"

View File

@ -0,0 +1,5 @@
[Settings]
gtk-font-name=Inter 12
gtk-application-prefer-dark-theme=true
gtk-icon-theme-name=Adwaita
gtk-theme-name=Adwaita

View File

@ -0,0 +1,48 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1756991914,
"narHash": "sha256-4ve/3ah5H/SpL2m3qmZ9GU+VinQYp2MN1G7GamimTds=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "b08f8737776f10920c330657bee8b95834b7a70f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1756787288,
"narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@ -0,0 +1,30 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixgl.url = "github:nix-community/nixGL";
};
outputs = { nixpkgs, home-manager, nixgl, ... }:
let
lib = nixpkgs.lib;
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [ nixgl.overlay ];
config.allowUnfree = true;
};
in {
homeConfigurations = {
work = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit nixgl;
};
modules = [ ./hosts/work ];
};
};
};
}

View File

@ -0,0 +1,17 @@
{ pkgs, config, nixgl, ... }:
{
nixGL = {
packages = nixgl.packages;
defaultWrapper = "mesa";
};
home.username = "hektor";
home.homeDirectory = "/home/hektor";
home.stateVersion = "25.05";
home.packages = import ./packages.nix {
inherit pkgs;
inherit config;
};
}

View File

@ -0,0 +1,3 @@
{ pkgs, config, ... }:
with pkgs; [ ]

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
[General]
ConfigVersion=2
[Browser]
CustomProxyLocation=
Enabled=true
[GUI]
ApplicationTheme=dark
CompactMode=false
HidePreviewPanel=false
HideToolbar=false
MinimizeOnClose=true
MinimizeToTray=true
ShowTrayIcon=true
TrayIconAppearance=colorful
[KeeShare]
Active="<?xml version=\"1.0\"?><KeeShare><Active/></KeeShare>\n"
Foreign="<?xml version=\"1.0\"?>\n<KeeShare xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <Foreign/>\n</KeeShare>\n"
Own="<?xml version=\"1.0\"?><KeeShare><PrivateKey>MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC9Ji74dnjo0qzbUFKEoNnMHsdX7mBXuJcu8zsl7vfkKLiAGIQiP9BQc/JnFr28W92fQz8uXVtm7NgnKJQkT7wzFyBdspmNDzosS58EIQVKe5p+uMaaGZ5z6j1DtLCFo7PLCnhasBluC0W1+37s7NtRD6bFo1r6QHupY63mBsSvJhAcmS+6bM7xS7PcK0WTVTsK1MWYZLOkYMWQ0AW/t4PZfqeKvalqheiR8oUIDeY7+7fqvQr5SAhL0yinbtaqWmPqcd5QWyPqVkbKclw4Uecw+JW+yR9uEOP9butP74r36LUUfsTJHE2/sB2KJFRN/aUm2ZEYhzexMYSfgnrq0KCLAgMBAAECggEACV8N7rN39BkUBV2qaPXLNKjFuZ6O2WnE28ejQ5LeZ0h5M6eDTGsa+BF2jhL7XYyzo0NiqvpnH+dWIkKJbG8i5OkdamcB4pJBkJZCj6LPL0yGcAbZmCLyzc1qMaOPJ1/f9YxUQDH/YItgbc7DEBwAFbkPyzT3ufRd7BuLLx1gu0iypHhBok9kXA4WgkUihLNXXVvSIGcVy+q9wpgOiw5jLC79qwqIp39Tlt6PKryODulqWIeoeSIgAu5tgUy4O3He6AZwqBprIfJSiJOwfdBd8FchQJQDgl0fyDR10VIUNbjgm+kxWssq4oNJ7+2n14Gdfwpy2K7oO9DYeqjBrv2p4QKBgQDqY8/5ufsJ9hKhQRX3vju+FEDLKvjjKH7/6puDwcvC1GgvshQSvCo9ZVIajwSmEoWq2LTDiPlUPFINKnALQiHCbRfNeS1Tws4cK4AAZnR+CGKkox9J5MWCDVzI2/82R9/9ZX4OO+As5+Od503Grmy+Zi0Redm+r4aK04gm3LfqGwKBgQDOlpOXFyYbb473TFkf9ZfyETZGkjlCzf4uPwPuJ3njWZfwPE2Gb+quZDLSmYp9JhzIFoapnQrjSFCVyzBYIIuz3jipb5MbQxc6FPSjw0pPowWdPkEL1CT5mpZFojop+I/TnEEG+Lv039O3cGlL2zagiBHRw0ediD6z0vnoOBeKUQKBgQDjlJBuKC9gp6XFHp4G05XMZHvZCNtqLHrLX28qSjPe80BJ9z1YR4032bYThYP9AAT7MripFskICh2dHPR3afm/fw9aeWsSZhab8XyyZsh7SwcEVkJeDBvdv720ZS9y8+y/bBkuFuL+lxVBz0GMRPXfFPRzgH10kZcwGl2bZjnIuwKBgQCVabQu95AZEbM9yps/ERom+ineGo2Ncnyep/bIvQZb1wWbu5F6ZOE/5boYNPJDl1gDor8cVzdzsG6QGBfL9SX1HgivCsJDWl+nI1bYRjsto8NAubDDxFhFqnd6v1z/1AT50C37w9P0xBlUt9mAAnjc2+y/YFQgbFSlLDaQrFjiMQKBgFJrLF21Uk6ALZa4R0eOyLKhuagw3uxmNvccNG8VL5DwYVCUS7/8SkPhO5yvbcA87Y1VnM20tUr047K4U83uFNxBnPMmxlhMsxtqjw+VV6Us6uh2ASaLZ9iP9iwkn5e37WLWX+XsewoGrW/YsONwIT0dnZDPRbxhPdJn8azSJqQr</PrivateKey><PublicKey><Signer>h</Signer><Key>MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC9Ji74dnjo0qzbUFKEoNnMHsdX7mBXuJcu8zsl7vfkKLiAGIQiP9BQc/JnFr28W92fQz8uXVtm7NgnKJQkT7wzFyBdspmNDzosS58EIQVKe5p+uMaaGZ5z6j1DtLCFo7PLCnhasBluC0W1+37s7NtRD6bFo1r6QHupY63mBsSvJhAcmS+6bM7xS7PcK0WTVTsK1MWYZLOkYMWQ0AW/t4PZfqeKvalqheiR8oUIDeY7+7fqvQr5SAhL0yinbtaqWmPqcd5QWyPqVkbKclw4Uecw+JW+yR9uEOP9butP74r36LUUfsTJHE2/sB2KJFRN/aUm2ZEYhzexMYSfgnrq0KCLAgMBAAECggEACV8N7rN39BkUBV2qaPXLNKjFuZ6O2WnE28ejQ5LeZ0h5M6eDTGsa+BF2jhL7XYyzo0NiqvpnH+dWIkKJbG8i5OkdamcB4pJBkJZCj6LPL0yGcAbZmCLyzc1qMaOPJ1/f9YxUQDH/YItgbc7DEBwAFbkPyzT3ufRd7BuLLx1gu0iypHhBok9kXA4WgkUihLNXXVvSIGcVy+q9wpgOiw5jLC79qwqIp39Tlt6PKryODulqWIeoeSIgAu5tgUy4O3He6AZwqBprIfJSiJOwfdBd8FchQJQDgl0fyDR10VIUNbjgm+kxWssq4oNJ7+2n14Gdfwpy2K7oO9DYeqjBrv2p4QKBgQDqY8/5ufsJ9hKhQRX3vju+FEDLKvjjKH7/6puDwcvC1GgvshQSvCo9ZVIajwSmEoWq2LTDiPlUPFINKnALQiHCbRfNeS1Tws4cK4AAZnR+CGKkox9J5MWCDVzI2/82R9/9ZX4OO+As5+Od503Grmy+Zi0Redm+r4aK04gm3LfqGwKBgQDOlpOXFyYbb473TFkf9ZfyETZGkjlCzf4uPwPuJ3njWZfwPE2Gb+quZDLSmYp9JhzIFoapnQrjSFCVyzBYIIuz3jipb5MbQxc6FPSjw0pPowWdPkEL1CT5mpZFojop+I/TnEEG+Lv039O3cGlL2zagiBHRw0ediD6z0vnoOBeKUQKBgQDjlJBuKC9gp6XFHp4G05XMZHvZCNtqLHrLX28qSjPe80BJ9z1YR4032bYThYP9AAT7MripFskICh2dHPR3afm/fw9aeWsSZhab8XyyZsh7SwcEVkJeDBvdv720ZS9y8+y/bBkuFuL+lxVBz0GMRPXfFPRzgH10kZcwGl2bZjnIuwKBgQCVabQu95AZEbM9yps/ERom+ineGo2Ncnyep/bIvQZb1wWbu5F6ZOE/5boYNPJDl1gDor8cVzdzsG6QGBfL9SX1HgivCsJDWl+nI1bYRjsto8NAubDDxFhFqnd6v1z/1AT50C37w9P0xBlUt9mAAnjc2+y/YFQgbFSlLDaQrFjiMQKBgFJrLF21Uk6ALZa4R0eOyLKhuagw3uxmNvccNG8VL5DwYVCUS7/8SkPhO5yvbcA87Y1VnM20tUr047K4U83uFNxBnPMmxlhMsxtqjw+VV6Us6uh2ASaLZ9iP9iwkn5e37WLWX+XsewoGrW/YsONwIT0dnZDPRbxhPdJn8azSJqQr</Key></PublicKey></KeeShare>\n"
QuietSuccess=true
[PasswordGenerator]
AdditionalChars=
ExcludedChars=
Length=40
Logograms=true
WordCount=9
[SSHAgent]
Enabled=true

View File

@ -0,0 +1,27 @@
# Fonts
font_family Iosevka Term SS08
font_size 24.0
# Cursor
cursor_shape block
cursor_blink_interval 0
shell_integration no-cursor
# Performance tuning
repaint_delay 8
# Transparency
# dynamic_background_opacity yes
# background_opacity 0.0
enable_audio_bell no
# Scrollback
scrollback_lines 16384
scrollback_pager nvimpager
include ./themes/zenwritten_light.conf

View File

@ -0,0 +1,49 @@
# This file is auto-generated by shipwright.nvim
# vim:ft=kitty
## name: zenwritten_dark
## author: Michael Chris Lopez
## license: MIT
## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_dark.conf
## blurb: A zenbones variant with zero hue and saturation.
foreground #BBBBBB
background #191919
selection_foreground #BBBBBB
selection_background #404040
# Cursor colors
cursor #C9C9C9
cursor_text_color #191919
# URL underline color when hovering with mouse
# kitty window border colors
# OS Window titlebar colors
# Tab bar colors
active_tab_foreground #BBBBBB
active_tab_background #65435E
inactive_tab_foreground #BBBBBB
inactive_tab_background #303030
# Colors for marks (marked text in the terminal)
# The basic 16 colors
# black
color0 #191919
color8 #3D3839
# red
color1 #DE6E7C
color9 #E8838F
# green
color2 #819B69
color10 #8BAE68
# yellow
color3 #B77E64
color11 #D68C67
# blue
color4 #6099C0
color12 #61ABDA
# magenta
color5 #B279A7
color13 #CF86C1
# cyan
color6 #66A5AD
color14 #65B8C1
# white
color7 #BBBBBB
color15 #8E8E8E
# You can set the remaining 240 colors as color16 to color255.

View File

@ -0,0 +1,49 @@
# This file is auto-generated by shipwright.nvim
# vim:ft=kitty
## name: zenwritten_light
## author: Michael Chris Lopez
## license: MIT
## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_light.conf
## blurb: A zenbones variant with zero hue and saturation.
foreground #353535
background #EEEEEE
selection_foreground #353535
selection_background #D7D7D7
# Cursor colors
cursor #353535
cursor_text_color #EEEEEE
# URL underline color when hovering with mouse
# kitty window border colors
# OS Window titlebar colors
# Tab bar colors
active_tab_foreground #353535
active_tab_background #DEB9D6
inactive_tab_foreground #353535
inactive_tab_background #CFCFCF
# Colors for marks (marked text in the terminal)
# The basic 16 colors
# black
color0 #EEEEEE
color8 #C6C3C3
# red
color1 #A8334C
color9 #94253E
# green
color2 #4F6C31
color10 #3F5A22
# yellow
color3 #944927
color11 #803D1C
# blue
color4 #286486
color12 #1D5573
# magenta
color5 #88507D
color13 #7B3B70
# cyan
color6 #3B8992
color14 #2B747C
# white
color7 #353535
color15 #5C5C5C
# You can set the remaining 240 colors as color16 to color255.

View File

@ -0,0 +1,20 @@
[Default Applications]
inode/x-empty=nvim.desktop
inode/directory=nvim.desktop
text/plain=nvim.desktop
text/html=firefoxdeveloperedition.desktop
image/gif=feh.desktop
image/jpeg=feh.desktop
image/png=feh.desktop
video/mp4=mpv.desktop
video/webm=mpv.desktop
model/stl=com.ultimaker.cura.desktop
application/pdf=org.pwmt.zathura.desktop
x-scheme-handler/msteams=teams-for-linux.desktop
x-scheme-handler/web+stremio=firefox.desktop
x-scheme-handler/http=firefoxdeveloperedition.desktop
x-scheme-handler/https=firefoxdeveloperedition.desktop
x-scheme-handler/chrome=firefoxdeveloperedition.desktop
x-scheme-handler/sidequest=SideQuest.desktop
x-scheme-handler/mailto=firefox.desktop
x-scheme-handler/webcal=firefox.desktop

Binary file not shown.

View File

@ -0,0 +1,15 @@
l seek +5
h seek -5
k seek +30
j seek -30
+ add video-zoom 0.1
- add video-zoom -0.1
= set video-zoom 0; set video-pan-x 0; set video-pan-y 0
H add video-pan-x 0.01
L add video-pan-x -0.01
K add video-pan-y 0.01
J add video-pan-y -0.01
m cycle mute

16
dots/.config/mpv/mpv.conf Normal file
View File

@ -0,0 +1,16 @@
vo=gpu
profile=gpu-hq
hwdec=auto
msg-color=yes
cursor-autohide=300
cursor-autohide-fs-only=yes
save-position-on-quit=yes
keep-open=yes
# Custom osc
osc=no
cursor-autohide=3500
osd-bar=no
osc-vidscale=no

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,66 @@
default_keybindings = false
flip_status_indicators = true
[keybindings]
"Enter" = "play"
" " = "playpause"
"S" = "stop"
"<" = "seek -10000"
">" = "seek +10000"
"H" = "previous"
"L" = "next"
"r" = "repeat"
"z" = "shuffle"
"d" = "delete"
"s" = "save"
"O" = "open current"
"o" = "open selected"
"Backspace" = "back"
"A" = "goto artist"
"a" = "goto album"
"q" = "queue"
"J" = "shift down 1"
"K" = "shift up 1"
"c" = "clear"
"=" = "volup 1"
"-" = "voldown 1"
"/" = "focus search"
"Q" = "focus queue"
"L" = "focus library"
"1" = "focus queue"
"2" = "focus library"
"h" = "move left 1"
"j" = "move down 1"
"k" = "move up 1"
"l" = "move right 1"
"g" = "move top"
"G" = "move bottom"
"t" = "sort added d"
"T" = "sort title a"
"y" = "share current"
"Y" = "share selected"
"U" = "update"
[theme]
primary="#aaaaaa"
secondary="#555555"
background="1a1a1a"
title="#cccccc"
title_secondary="#aaaaaa"
playing="#ffffff"
playing_bg="1a1a1a"
playing_selected="#ffffff"
highlight="#cccccc"
highlight_bg="#333333"
error="#ffffff"
error_bg="#333333"
statusbar="#cccccc"
statusbar_bg="#1a1a1a"
statusbar_progress="#cccccc"
statusbar_progress_bg="#1a1a1a"
cmdline="#cccccc"
cmdline_bg="#1a1a1a"
search_match="#ffffff"
backend="pipe"
notify="false"

View File

@ -0,0 +1,3 @@
username = 'hektor.misplon@gmail.com'
auth_type = 0
auth_data = 'KDEzMzc9PXRydTMpPzo='

View File

@ -0,0 +1,39 @@
auto-reload yes
reload-threads 100
# color background color240 black
# color listnormal color238 black
# color listfocus white black
# color listnormal_unread color240 black bold
# color listfocus_unread default black bold
# color info default black
# color article default black
bind-key h quit articlelist
bind-key h quit article
bind-key h quit tagselection
bind-key h quit feedlist
bind-key j down feedlist
bind-key j down tagselection
bind-key j next articlelist
bind-key j down article
bind-key J next-feed articlelist
bind-key k up feedlist
bind-key k prev articlelist
bind-key k up tagselection
bind-key K prev-feed articlelist
bind-key k up article
bind-key l open articlelist
bind-key l open feedlist
bind-key l open tagselection
bind-key G end
bind-key g home
text-width 80
browser "brave"
macro m set browser "mpv %u"; open-in-browser ; set browser "brave"
show-title-bar false
show-keymap-hint false

View File

@ -0,0 +1 @@
experimental-features = nix-command flakes

View File

@ -0,0 +1,16 @@
require("codecompanion").setup({
extensions = {
mcphub = {
callback = "mcphub.extensions.codecompanion",
opts = {
make_vars = true,
make_slash_commands = true,
show_result_in_chat = true
}
}
},
strategies = {
chat = { adapter = "openai" },
inline = { adapter = "openai" },
},
})

View File

@ -0,0 +1,28 @@
require("conform").setup({
format_on_save = {
lsp_fallback = true,
async = false,
timeout_ms = 500,
},
formatters_by_ft = {
awk = { "awk" },
bash = { "shellcheck" },
c = { "clang-format" },
cpp = { "clang-format" },
css = { "prettierd", "prettier", stop_after_first = true },
gdscript = { "gdformat" },
haskell = { "ormolu" },
html = { "prettierd", "prettier", stop_after_first = true },
lua = { "stylua" }, -- configured in stylua.toml
markdown = { "prettierd", "prettier", stop_after_first = true },
javascript = { "prettierd", "prettier", stop_after_first = true },
javascriptreact = { "prettierd", "prettier", stop_after_first = true },
json = { "prettierd", "prettier", stop_after_first = true },
jsonc = { "prettierd", "prettier", stop_after_first = true },
python = { "isort", "black" },
svelte = { "prettierd", "prettier", stop_after_first = true },
typescript = { "prettierd", "prettier", stop_after_first = true },
typescriptreact = { "prettierd", "prettier", stop_after_first = true },
yaml = { "prettierd", "prettier", stop_after_first = true },
},
})

View File

@ -0,0 +1 @@
require("copilot_cmp").setup()

View File

@ -0,0 +1 @@
require("copilot").setup({})

View File

@ -0,0 +1,7 @@
require("eyeliner").setup({
highlight_on_key = true,
dim = true,
})
vim.api.nvim_set_hl(0, "EyelinerPrimary", { bold = true, underline = true })
vim.api.nvim_set_hl(0, "EyelinerSecondary", { underline = true })

Some files were not shown because too many files have changed in this diff Show More