summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore530
-rw-r--r--.gitmodules3
-rw-r--r--Makefile65
-rw-r--r--README.md8
-rw-r--r--bash/.bash_logout2
-rw-r--r--bash/.bashrc24
-rw-r--r--doas.conf1
-rw-r--r--environment.d/cursor.conf2
-rw-r--r--firejail/mpv.profile2
-rw-r--r--firejail/neomutt.profile2
-rw-r--r--handlr/handlr.toml4
-rwxr-xr-xinstallers/vimplug_nvim.sh4
-rwxr-xr-xinstallers/wc6
-rwxr-xr-xlf/3q2
-rwxr-xr-xlf/cleaner4
-rwxr-xr-xlf/image7
-rw-r--r--lf/lfrc10
-rwxr-xr-xlf/preview91
-rwxr-xr-xlf/previewer36
-rw-r--r--mpd/mpd.conf17
-rw-r--r--nvim/after/ftplugin/rust.vim2
-rw-r--r--nvim/init.lua6
-rw-r--r--nvim/init.vim275
-rw-r--r--nvim/lua/colorscheme.lua8
-rw-r--r--nvim/lua/keymaps.lua97
-rw-r--r--nvim/lua/lsp.lua22
-rw-r--r--nvim/lua/options.lua86
-rw-r--r--nvim/lua/plugins.lua62
-rw-r--r--nvim/lua/term.lua51
-rw-r--r--python/pythonrc40
-rw-r--r--runit/conf/logind.conf54
-rw-r--r--runit/sv/dunst/conf9
-rwxr-xr-xrunit/sv/dunst/log/run12
-rwxr-xr-xrunit/sv/dunst/run5
-rw-r--r--runit/sv/mako/conf9
-rw-r--r--runit/sv/mako/down0
-rwxr-xr-xrunit/sv/mako/log/run12
-rwxr-xr-xrunit/sv/mako/run5
-rw-r--r--runit/sv/mpd-mpris/conf9
-rwxr-xr-xrunit/sv/mpd-mpris/log/run12
-rwxr-xr-xrunit/sv/mpd-mpris/run8
-rw-r--r--runit/sv/mpd-notification/conf9
-rwxr-xr-xrunit/sv/mpd-notification/log/run12
-rwxr-xr-xrunit/sv/mpd-notification/run9
-rw-r--r--runit/sv/mpd/conf9
-rwxr-xr-xrunit/sv/mpd/log/run12
-rwxr-xr-xrunit/sv/mpd/run8
-rw-r--r--runit/sv/pipewire-pulse/conf12
-rwxr-xr-xrunit/sv/pipewire-pulse/log/run12
-rwxr-xr-xrunit/sv/pipewire-pulse/run12
-rw-r--r--runit/sv/wireplumber/conf12
-rwxr-xr-xrunit/sv/wireplumber/log/run12
-rwxr-xr-xrunit/sv/wireplumber/run12
-rw-r--r--sh/aliases35
-rw-r--r--sh/profile151
-rw-r--r--tmux/tmux.conf6
-rw-r--r--user-dirs.dirs2
-rw-r--r--vim/vimrc301
-rw-r--r--xdg-desktop-portal/portals.conf4
-rw-r--r--yay/config.json29
-rw-r--r--zsh/.zlogout1
-rw-r--r--zsh/.zprofile6
-rw-r--r--zsh/.zshenv10
-rw-r--r--zsh/.zshrc158
64 files changed, 1646 insertions, 792 deletions
diff --git a/.gitignore b/.gitignore
index e40c5ab..cf80b9b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,234 +1,314 @@
-zsh/hist
-zsh/zcompdump
-zsh/.zsh_theme
-zsh/.zcompdump
-zoomus.conf
-zirless/
-zec-qt-wallet-org/
-yuzu/
-ytfzf/subscriptions
-yabridgectl/
-xmonad/.stack-work
-xmonad/stack.yaml.lock
-xmonad/xmonad-x86_64-linux
-xmonad/xmonad.o
-xmonad/xmonad.hi
-whoozle.github.io/
-weechat/
-waybar/config-Hyprland-*
-waybar/config-river-*
-waybar/config-dwl-*
-vlc/vlc-qt-interface.conf
-vdirsyncer/
-Valve Corporation/
-unity3d/
-ubports-installer/
-tremc/
-transmission-daemon/
-transmission/
-!transmission/settings.json
-touchegg/
-torbrowser/
-tmux/plugins
-systemd/
-syncthing/
-switcher/
-straw-viewer/
-spotify-tui/
-spotifyd/
-snownews/urls.opml
-sh/weather
-rtorrent/
-rncbc.org/
-retroarch/
-rclone/
-raveloxmidi/
-qutebrowser/jmatrix-rules
-qtile/__pycache__/
-!qt6ct/qt6ct.conf
-qt6ct/*
-!qt5ct/qt5ct.conf
-qt5ct/*
-qrcp/
-pupgui/
-pulse/
-protonvpn/
-protonmail/
-protonfixes/
-profanity/profrc
-print-manager/
-pop-system-updater/
-pop-shell/
-polychromatic/
-poezio/
-pmbootstrap.cfg
-pipewire/pipewire.conf.d/
-pipewire/media-session.d/
-PCSX2/
-pcmanfm-qt/
-pcmanfm/
-pavucontrol.ini
-openrazer/
-okularrc
-okularpartrc
-odysee-nativefier*/
-obs-studio/
-nvim/plugged/
-nwg-outputs/
-nssdb/
-npm/
-notmuch/
-nitrogen/bg-saved.cfg
-newsboat/urls
-newsboat/cache.db
-nextcloud/
-neofetch/
-ncmpcpp/error.log
-mutt/
-musnify-mpd/musnify-mpd.config
-msmtp/
-mpv/watch_later/
-mpv/download.log
+@companion-app/
+5DB5/
+5db5/
+abook/
+Applied Computer Music Technologies/
+AHM 5050 v3/
+AHM 5050 v3.settings
+aIR Impulse RackEX.settings
+Amp Locker/
+Amp Locker.settings
+amsynth/
+ardour*/
+audacity/
+Audio Assault/
+autostart/
+Binance/
+Blackmagic Design/
+Blacksun/
+Blacksun.settings
+blender/
+BraveSoftware/
+BULLDOG.settings
+Cadence/
+caffeine
+calcurse/*
+!calcurse/keys
+calibre/
+calibre/conversion
+carla/
+cava/
+CCL Cross-platform Framework/
+cef_user_data
+.charles.config
+chromium/
+clangd/
+cmus/
+cni/
+coc/extensions/db.json
+companion*/
+computerrc
+computerrc.sh
+configstore/
+cordless/config.json
+cosmic/
+dconf/
+dde-printer.ini
+DELTARUNE/
+dinit.d/
+dolphin-emu/
+droidcam
+ears.cfg
+easyeffects/
+Element/
+emacs/
+EmeraldWallet/
+enchant/
+enigma/
+Epic/
+Etherdyne/
+evolution/
+falkTX/
+filezilla/
+fontconfig/
+FreakQ305/
+FreakQ305.settings
+FreeTube/
+gaiasky/
+galculator/
+gamescope/
+ghb/
+GIMP/
+git/
+glib-2.0/
+glow/
+gnome-control-center/
+gnome-initial-setup-done
+gnome-session/
+go/
+goa-1.0/
+godot/
+gomuks/
+gtk-2.0/*
+!gtk-2.0/gtkrc
+gtk-3.0/*
+!gtk-3.0/settings.ini
+gtk-4.0/
+guitarix/
+Hellbeast v2/
+Hellbeast v2.settings
+htop/htoprc
+ibus/
+icedtea-web/
+inkscape/
+Iriun/
+irssi/
+isync/
+jack/
+jack_mixer/
+jamesdsp/
+java/
+@joplin/
+joplin/
+Joplin/
+joplin-desktop/
+kaidan/
+karboncalligraphyrc
+kdeconnect/
+kdeglobals
+kdenlive.*
+kdenlive-appimagerc
+kdenlive-layoutsrc
+kdenliverc
+kde.org/
+keepassxc/
+khal/
+kicad/
+kid3rc
+Kitware/
+kritadisplayrc
+kritarc
+ksh/history
+kwalletrc
+lab/
+lbry/
+LBRY/
+LBRY-GTK/
+lbry-viewer/
+libaccounts-glib/
+libfm/
+libreoffice/
+LibrePCB/
+light/
+linvst/
+lkjb/
+lsp-plugins/
+lutris/
+lxqt/
+MangoHud/
+menus/
+mgba/
+micro/buffers/
+mimeapps.list
+minigalaxy/
+mixbus9/
+mksh/history
+modprobed.db
+modprobed-db.conf
+monero-project/
mpd/database
mpd/log
mpd/pid
+mpd/playlists/
mpd/socket
mpd/state
mpd/sticker.sql
-mpd/playlists/
-monero-project/
-modprobed-db.conf
-modprobed.db
-mimeapps.list
-mksh/history
-minigalaxy/
-micro/buffers/
-mgba/
-menus/
-lutris/
-lsp-plugins/
-lkjb/
-linvst/
-light/
-libreoffice/
-libfm/
-lbry-viewer/
-LBRY-GTK/
-lbry/
-lab/
-ksh/history
-kritarc
-kritadisplayrc
-kicad/
-khal/
-keepassxc/
-kdenlive-layoutsrc
-kdenlive-appimagerc
-kdenlive.*
-kdenliverc
-kdeglobals
-kdeconnect/
-kaidan/
-joplin/
-joplin-desktop/
-java/
-jamesdsp/
-jack_mixer/
-jack/
-isync/
-irssi/
-inkscape/
-icedtea-web/
-ibus/
-htop/htoprc
-guitarix/
-gtk-2.0/
-gtk-3.0/
-gomuks/
-goa-1.0/
-gnome-session/
-gnome-initial-setup-done
-gnome-control-center/
-glib-2.0/
-ghb/
-gaiasky/
-fontconfig/
-falkTX/
-evolution/
-enchant/
-emacs/
-easyeffects/
-dolphin-emu/
-dde-printer.ini
-dconf/
-cordless/config.json
-configstore/
-computerrc.sh
-computerrc
-companion*/
-coc/extensions/db.json
-cni/
-clangd/
-chromium/
-cef_user_data
-carla/
-calibre/conversion
-calibre/
-calcurse/*
-!calcurse/keys
-caffeine
-blender/
-autostart/
-ardour*/
-amsynth/
-aIR Impulse RackEX.settings
-abook/
-VirtualBox/
-VeraCrypt/
-UNDERTALE*/
-The Crown EXEX.settings
-SUPERHOT/
-Shibalba EXEX.settings
-Session/
-Serenity/
-SchildiChat/
+mpv/download.log
+mpv/watch_later/
+msmtp/
+musnify-mpd/musnify-mpd.config
+mutt/
+ncmpcpp/error.log
+neofetch/
+newsboat/cache.db
+newsboat/urls
+nextcloud/
+Nextcloud/
+Nickvision Cavalier/
+nitrogen/bg-saved.cfg
+notmuch/
+npm/
+nssdb/
+NuGet/
+nvim/lazy-lock.json
+nwg-look/
+nwg-outputs/
+obs-studio/
+odysee-nativefier*/
+okularpartrc
+okularrc
+openrazer/
+package-lock.json
+parallel/
+pavucontrol.ini
+pcmanfm/
+pcmanfm-qt/
+PCSX2/
+pipewire/
+pipewire/media-session.d/
+pipewire/pipewire.conf.d/
+plasmarc
+pluginregistry.cfg
+pluginsettings.cfg
+pmbootstrap.cfg
+poezio/
+polychromatic/
+pop-shell/
+pop-system-updater/
+Portmaster/
+PreSonus/
+print-manager/
+profanity/profrc
+Proton/
+Proton AG/
+protonfixes/
+protonmail/
+protonvpn/
+pulse/
+pupgui/
+qobuz-dl/
+qrcp/
+qt5ct/*
+!qt5ct/qt5ct.conf
+qt6ct/*
+!qt6ct/qt6ct.conf
+qtile/__pycache__/
+QtProject/
+QtProject.conf
+qutebrowser/jmatrix-rules
+r2modman/
+r2modmanPlus-local/
+raveloxmidi/
+razergenie/
+rclone/
+ReAmp Studio R1/
+ReAmp Studio R1.settings
+REAPER/
+remmina/
+Resonant DSP/
+retroarch/
+rncbc.org/
+.rt64/
+rtorrent/
+runit/sv/*/supervise
+runit/sv/*/*/supervise
+runit/runsvdir/*
+RVXX EXEX.settings
RVXX v2/
RVXX v2.settings
-RVXX EXEX.settings
-Resonant DSP/
-REAPER/
-ReAmp Studio R1.settings
-ReAmp Studio R1/
-QtProject.conf
-QtProject/
-Proton AG/
-Portmaster/
-NuGet/
-Nextcloud/
-LibrePCB/
-LBRY/
-Kitware/
-Joplin/
-Iriun/
-Hellbeast v2/
-Hellbeast v2.settings
-GIMP/
-FreeTube/
-FreakQ305.settings
-FreakQ305/
-Epic/
-Etherdyne/
-EmeraldWallet/
-Element/
-DELTARUNE/
-Cadence/
-BULLDOG.settings
-BraveSoftware/
-Blacksun.settings
-Blacksun/
-Binance/
-AHM 5050 v3.settings
-AHM 5050 v3/
-@joplin/
+SchildiChat/
+scroll/config.d/user.conf
+Serenity/
+Session/
+Shibalba EXEX.settings
+sh/weather
+SNAPSHOT PLAYER/
+snownews/urls.opml
+solaar/
+sonobus/
+spicy/
+spotifyd/
+spotify-tui/
+straw-viewer/
+strawberry/
+subversion/
+SUPERHOT/
+suyu/
+switcher/
+syncthing/
+Synergy/
+synergy/
+systemd/
+systemsettingsrc
+tenacity.cfg
+The Crown EXEX.settings
+themes/
+tmux/plugins
+torbrowser/
+touchegg/
+transmission/
+transmission-daemon/
+!transmission/settings.json
+tremc/
+Trolltech.conf
.tsrc
-.charles.config
+tuxclocker.conf
+ubports-installer/
+ultravnc-viewer/
+UNDERTALE*/
+unity3d/
+Valve Corporation/
+vdirsyncer/
+vkBasalt/
+VeraCrypt/
+vim/*
+!vim/vimrc
+VirtualBox/
+vlc/vlc-qt-interface.conf
+waybar/config-dwl-*
+waybar/config-Hyprland-*
+waybar/config-river-*
+weechat/
+whoozle.github.io/
+wireshark/
+xmonad/.stack-work
+xmonad/stack.yaml.lock
+xmonad/xmonad.hi
+xmonad/xmonad.o
+xmonad/xmonad-x86_64-linux
+xsettingsd/
+yabridgectl/
+yarn/
+ytfzf/subscriptions
+yuzu/
+zec-qt-wallet-org/
+Zelda64Recompiled/
+zirless/
+zoomus.conf
+zoom.conf
+zsh/hist
+zsh/.zcompdump
+zsh/zcompdump
+zsh/zfunc
+zsh/.zkbd/
+zsh/.zsh_theme
diff --git a/.gitmodules b/.gitmodules
index cce1535..f477143 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,3 +4,6 @@
[submodule "xplr/dragon.xplr"]
path = xplr/dragon.xplr
url = https://github.com/sayanarijit/dragon.xplr
+[submodule "qutebrowser/jmatrix"]
+ path = qutebrowser/jmatrix
+ url = https://gitlab.com/jgkamat/jmatrix.git
diff --git a/Makefile b/Makefile
index dedeb57..f918e93 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,54 @@
VIM := $(shell command -v vim 2>/dev/null)
-NVIM := $(shell command -v nvim 2>/dev/null)
-ZCONFS := zsh/.zshenv
+BCONFS := bash/.bash_logout bash/.bashrc
+ZCONFS := zsh/zshenv zsh/zshrc
SCONFS := sh/profile
+DCONFS := doas.conf
all:
-install: install-zshconfigs install-shconfigs vimplug-vim vimplug-nvim
+install: install-zshconfigs install-shconfigs vimplug-vim wc
-install-zshconfigs: $(ZCONFS)
- @echo "Installing zsh conf files..."
- @echo ".zshenv..."
- @ln -sf `pwd`/zsh/.zshenv ~/.zshenv
+wc:
+ @echo "Installing wayland compositor stuff..."
+ @./installers/wc
+ @echo "Done."
+
+install-hyprplugins: install-hyprsplit install-hyprland-plugins
+
+install-hyprsplit:
+ @echo "Installing hyprsplit..."
+ @hyprpm add https://github.com/shezdy/hyprsplit || echo "Already installed!"
+ @echo "Enabling hyprsplit..."
+ @hyprpm enable hyprsplit
+ @echo "Done."
+
+install-hyprland-plugins:
+ @echo "Installing hyprland-plugins..."
+ @hyprpm add https://github.com/hyprwm/hyprland-plugins || echo "Already installed!"
+ @echo "Enabling hyprscrolling..."
+ @hyprpm enable hyprscrolling
+ @echo "Done."
+
+install-scrollconf: scroll/config.d/user.conf
+
+scroll/config.d/user.conf:
+ @echo "Generating user.conf..."
+ @mkdir -p scroll/config.d
+ @echo 'set $$home' $(shell echo $(HOME)) > scroll/config.d/user.conf
+ @echo "Done."
+
+install-bashconfigs: $(BCONFS) install-shconfigs
+ @echo "Installing bash conf files..."
+ @echo ".bashrc..."
+ @ln -sf `pwd`/bash/.bashrc ~/.bashrc
+ @echo ".bash_logout..."
+ @ln -sf `pwd`/bash/.bash_logout ~/.bash_logout
+ @echo "Done."
+
+install-zshconfigs: install-shconfigs
+ @echo "Settings up ZDOTDIR..."
+ @echo "Installing .zprofile..."
+ @ln -sf `pwd`/sh/profile ~/.zprofile
@echo "Done."
install-shconfigs: $(SCONFS)
@@ -28,11 +66,10 @@ else
@echo "vim not installed."
endif
-vimplug-nvim: installers/vimplug_nvim.sh
-ifdef NVIM
- @echo "Installing vim-plug for nvim..."
- @$(shell installers/vimplug_nvim.sh)
+doas-conf: $(DCONFS)
+ @echo "Installing doas config files..."
+ @echo "doas.conf..."
+ @sudo cp -n doas.conf /etc/doas.conf
@echo "Done."
-else
- @echo "nvim not installed."
-endif
+
+.PHONY: install-hyprplugins install-zshconfigs install-shconfigs vimplug-vim doas-conf install install-scrollconf install-bashconfigs
diff --git a/README.md b/README.md
index 2644588..9a783de 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ make install`
Note that the `make install` will only install the files that are required to be
in the home dir to their corresponding place as hard links and install vimplug
-for neovim, vim, or both (depending on which are installed). Make sure to save
-changes to these files before running `make install`! Additionally, if you only
-want my configs for specific programs, I would recommend cloning it into a
-separate directory and avoiding the `make install`.
+for vim if it is installed. Make sure to save changes to these files before
+running `make install`! Additionally, if you only want my configs for specific
+programs, I would recommend cloning it into a separate directory and avoiding
+the `make install`.
diff --git a/bash/.bash_logout b/bash/.bash_logout
new file mode 100644
index 0000000..9bccd62
--- /dev/null
+++ b/bash/.bash_logout
@@ -0,0 +1,2 @@
+clear
+reset
diff --git a/bash/.bashrc b/bash/.bashrc
new file mode 100644
index 0000000..600352a
--- /dev/null
+++ b/bash/.bashrc
@@ -0,0 +1,24 @@
+# Syntax Highlighting
+source /usr/share/blesh/ble.sh
+
+# Incorporate my SH agnostic stuff
+[ -f "$XDG_CONFIG_HOME/sh/aliases" ] && source "$XDG_CONFIG_HOME/sh/aliases"
+[ -f "$XDG_CONFIG_HOME/sh/functions" ] && source "$XDG_CONFIG_HOME/sh/functions"
+
+# History Search
+bind '"\e[A": history-search-backward'
+bind '"\e[B": history-search-forward'
+
+# History Cleaning
+export HISTCONTROL="erasedups:ignorespace"
+
+# Run-Help Ability
+run-help() { help "$READLINE_LINE" 2>/dev/null || man "$READLINE_LINE"; }
+bind -m vi-insert -x '"\eh": run-help'
+bind -m emacs -x '"\eh": run-help'
+
+# CD when typing directory name
+shopt -s autocd
+
+# Set my prompt
+export PS1='\e[42m[\u@\H]\e[46\w\e[42m\$\e(B\e[m '
diff --git a/doas.conf b/doas.conf
index 90ab328..d598fa1 100644
--- a/doas.conf
+++ b/doas.conf
@@ -12,6 +12,7 @@ permit nopass :wheel cmd pacman
permit nopass :wheel cmd cryptsetup
permit nopass :wheel cmd systemctl
permit setenv { EDITOR } :wheel cmd visudo args
+permit setenv { EDITOR } :wheel cmd vidoas args
permit setenv { EDITOR } :wheel cmd vimv
permit nopass keepenv zachir as zachir
diff --git a/environment.d/cursor.conf b/environment.d/cursor.conf
new file mode 100644
index 0000000..9b9ef2b
--- /dev/null
+++ b/environment.d/cursor.conf
@@ -0,0 +1,2 @@
+XCURSOR_THEME=BreezeX-Black
+XCURSOR_SIZE=32
diff --git a/firejail/mpv.profile b/firejail/mpv.profile
new file mode 100644
index 0000000..8ac7ccc
--- /dev/null
+++ b/firejail/mpv.profile
@@ -0,0 +1,2 @@
+whitelist ~/.cache
+include /etc/firejail/mpv.profile
diff --git a/firejail/neomutt.profile b/firejail/neomutt.profile
new file mode 100644
index 0000000..b8fa362
--- /dev/null
+++ b/firejail/neomutt.profile
@@ -0,0 +1,2 @@
+whitelist /usr/share/mutt-wizard
+include /etc/firejail/mpv.profile
diff --git a/handlr/handlr.toml b/handlr/handlr.toml
new file mode 100644
index 0000000..58e04ba
--- /dev/null
+++ b/handlr/handlr.toml
@@ -0,0 +1,4 @@
+enable_selector = false
+selector = "tofi -c ~/.conifg/tofi/cosmic --prompt-text 'Open With: '"
+term_exec_args = '-e'
+expand_wildcards = false
diff --git a/installers/vimplug_nvim.sh b/installers/vimplug_nvim.sh
deleted file mode 100755
index feddd03..0000000
--- a/installers/vimplug_nvim.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
- https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
diff --git a/installers/wc b/installers/wc
new file mode 100755
index 0000000..bfdb299
--- /dev/null
+++ b/installers/wc
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+pgrep -x Hyprland && make install-hyprplugins
+pgrep -x scroll && make install-scrollconf
+
+
diff --git a/lf/3q b/lf/3q
deleted file mode 100755
index 06ec272..0000000
--- a/lf/3q
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-chafa "$1"
diff --git a/lf/cleaner b/lf/cleaner
index a184d84..af197ee 100755
--- a/lf/cleaner
+++ b/lf/cleaner
@@ -1,4 +1,2 @@
#!/bin/sh
-if [ -n "$FIFO_UEBERZUG" ]; then
- printf '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG"
-fi
+exec kitten icat --clear --stdin no --transfer-mode memory </dev/null >/dev/tty
diff --git a/lf/image b/lf/image
index 77ddb5b..622aaf2 100755
--- a/lf/image
+++ b/lf/image
@@ -7,9 +7,10 @@ main() {
> "$FIFO_UEBERZUG"
;;
"draw")
- declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW" \
- [x]="$3" [y]="$4" [max_width]="$5" [max_height]="$6" \
- [path]="$2") > "$FIFO_UEBERZUG"
+ kitten icat --stdin no --transfer-mode memory --place"${5}x${6}@${3}x${4}" "$1" /dev/tty
+ #declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW" \
+ #[x]="$3" [y]="$4" [max_width]="$5" [max_height]="$6" \
+ #[path]="$2") > "$FIFO_UEBERZUG"
;;
"*") echo "Unknown command: '$1', '$2'" ;;
esac
diff --git a/lf/lfrc b/lf/lfrc
index df622de..32c9a10 100644
--- a/lf/lfrc
+++ b/lf/lfrc
@@ -1,7 +1,8 @@
set ratios 1:2:3
+set previewer ~/.config/lf/previewer
set cleaner ~/.config/lf/cleaner
-set previewer ~/.config/lf/preview
# Basic Settings
+set sixel true
set preview true
set drawbox false
set icons true
@@ -13,6 +14,9 @@ cmd open ${{
jnlp)
javaws "$f"
;;
+ mp3|flac|webm|ogg)
+ mpv "$f"
+ ;;
*)
case $(file --mime-type "$f" -bL) in
text/*|application/json) $EDITOR "$f" ;;
@@ -46,9 +50,9 @@ cmd chmod ${{
printf "Mode Bits: "
read ans
- for file in "$fx"
+ echo "$fx" | while read file
do
- chmod $ans $file
+ chmod "$ans" "$file"
done
}}
diff --git a/lf/preview b/lf/preview
deleted file mode 100755
index 6140cf7..0000000
--- a/lf/preview
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/sh
-
-image() {
- geometry="$(($2-2))x$3"
- chafa "$1" -f sixel -s "$geometry" --animate false | fold -w 65535
-}
-
-batorcat() {
- file="$1"
- shift
- if command -v bat > /dev/null 2>&1
- then
- bat --color=always --style=plain --pager=never "$file" "$@"
- else
- cat "$file"
- fi
-}
-
-glowormdcat() {
- file="$1"
- shift
- if command -v glow > /dev/null 2>&1
- then
- glow "$file"
- else
- mdcat "$file"
- fi
-}
-
-CACHE="$HOME/.cache/lf/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}'))"
-
-case "$(printf "%s\n" "$(readlink -f "$1")" | awk '{print tolower($0)}')" in
- *.tgz|*.tar.gz) tar tzf "$1" ;;
- *.tar.bz2|*.tbz2) tar tjf "$1" ;;
- *.tar.txz|*.txz) xz --list "$1" ;;
- *.tar) tar tf "$1" ;;
- *.zip|*.jar|*.war|*.ear|*.oxt) unzip -l "$1" ;;
- *.rar) unrar l "$1" ;;
- *.md)
- glowormdcat "$1";;
- *.7z) 7z l "$1" ;;
- *.[1-8]) man "$1" | col -b ;;
- *.o) nm "$1";;
- *.torrent) transmission-show "$1" ;;
- *.iso) iso-info --no-header -l "$1" ;;
- *.odt|*.ods|*.odp|*.sxw) odt2txt "$1" ;;
- *.doc) catdoc "$1" ;;
- *.docx) docx2txt "$1" ;;
- *.xml|*.html) w3m -dump "$1";;
- *.xls|*.xlsx)
- ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv
- ;;
- *.wav|*.mp3|*.flac|*.m4a|*.wma|*.ape|*.ac3|*.og[agx]|*.spx|*.opus|*.as[fx]|*.mka)
- exiftool "$1"
- ;;
- *.pdf)
- [ ! -f "${CACHE}.jpg" ] && \
- pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
- image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
- ;;
- *.epub)
- [ ! -f "$CACHE" ] && \
- epub-thumbnailer "$1" "$CACHE" 1024
- image "$CACHE" "$2" "$3" "$4" "$5"
- ;;
- *.cbz|*.cbr|*.cbt)
- [ ! -f "$CACHE" ] && \
- comicthumb "$1" "$CACHE" 1024
- image "$CACHE" "$2" "$3" "$4" "$5"
- ;;
- *.avi|*.mp4|*.wmv|*.dat|*.3gp|*.ogv|*.mkv|*.mpg|*.mpeg|*.vob|*.fl[icv]|*.m2v|*.mov|*.webm|*.ts|*.mts|*.m4v|*.r[am]|*.qt|*.divx)
- [ ! -f "${CACHE}.jpg" ] && \
- ffmpegthumbnailer -i "$1" -o "${CACHE}.jpg" -s 0 -q 5
- image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
- ;;
- *.bmp|*.jpg|*.jpeg|*.png|*.xpm|*.webp|*.tiff|*.gif|*.jfif|*.ico)
- image "$1" "$2" "$3" "$4" "$5"
- ;;
- *.svg)
- [ ! -f "${CACHE}.jpg" ] && \
- convert "$1" "${CACHE}.jpg"
- image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
- ;;
- *.ino)
- batorcat --language=cpp "$1"
- ;;
- *)
- batorcat "$1"
- ;;
-esac
-exit 0
diff --git a/lf/previewer b/lf/previewer
new file mode 100755
index 0000000..24db043
--- /dev/null
+++ b/lf/previewer
@@ -0,0 +1,36 @@
+#!/bin/sh
+draw() {
+ kitten icat --stdin no --transfer-mode memory --place "${w}x${h}@${x}x${y}" "$1" </dev/null >/dev/tty
+ exit 1
+}
+
+file="$1"
+w="$2"
+h="$3"
+x="$4"
+y="$5"
+
+case "$(file -Lb --mime-type "$file")" in
+ image/*)
+ draw "$file"
+ ;;
+ video/*)
+ # vidthumb is from here:
+ # https://raw.githubusercontent.com/duganchen/kitty-pistol-previewer/main/vidthumb
+ draw "$(vidthumb "$file")"
+ ;;
+ application/pdf)
+ CACHE=$(mktemp /tmp/thumbcache.XXXXX)
+ pdftoppm -png -f 1 -singlefile "$1" "$CACHE"
+ draw "$CACHE.png"
+ rm -f "$CACHE" "$CACHE.png"
+ ;;
+ application/epub+zip|application/epub)
+ CACHE=$(mktemp /tmp/thumbcache.XXXXX)
+ epub-thumbnailer "$1" "$CACHE" 1024
+ $HOME/.config/lf/image draw "$CACHE"
+ rm -f "$CACHE" "$CACHE.png"
+ ;;
+esac
+
+pistol "$file"
diff --git a/mpd/mpd.conf b/mpd/mpd.conf
index e26dbd1..6fdf1b0 100644
--- a/mpd/mpd.conf
+++ b/mpd/mpd.conf
@@ -79,7 +79,7 @@ sticker_file "~/.config/mpd/sticker.sql"
# systemd socket activiation is in use.
#
# For network
-# bind_to_address "127.0.0.1"
+bind_to_address "127.0.0.1"
#
# And for Unix Socket
bind_to_address "~/.config/mpd/socket"
@@ -275,11 +275,18 @@ input {
#
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
#
+#audio_output {
+# type "pulse"
+# name "My Pulse Output"
+## server "remote_server" # optional
+## sink "remote_server_sink" # optional
+#}
+#
+# Pipewire output
+#
audio_output {
- type "pulse"
- name "My Pulse Output"
-# server "remote_server" # optional
-# sink "remote_server_sink" # optional
+ type "pipewire"
+ name "Pipewire Sound Server"
}
audio_output {
diff --git a/nvim/after/ftplugin/rust.vim b/nvim/after/ftplugin/rust.vim
new file mode 100644
index 0000000..7a152a7
--- /dev/null
+++ b/nvim/after/ftplugin/rust.vim
@@ -0,0 +1,2 @@
+:set formatoptions+=t
+:set textwidth=80
diff --git a/nvim/init.lua b/nvim/init.lua
new file mode 100644
index 0000000..4b295d5
--- /dev/null
+++ b/nvim/init.lua
@@ -0,0 +1,6 @@
+require('options')
+require('keymaps')
+require('lsp')
+require('plugins')
+require('colorscheme')
+require('term')
diff --git a/nvim/init.vim b/nvim/init.vim
deleted file mode 100644
index 6df2934..0000000
--- a/nvim/init.vim
+++ /dev/null
@@ -1,275 +0,0 @@
-" vimplugs {{{
-call plug#begin('~/.config/nvim/plugged')
-" colorschemes {{{
-Plug 'tomasiser/vim-code-dark' " codedark color scheme
-Plug 'flazz/vim-colorschemes' " meta-color scheme package
-" }}}
-" language support {{{
-Plug 'axvr/org.vim' " basic org markup language implementation
-Plug 'ziglang/zig.vim' " zig programming language
-Plug 'jdonaldson/vaxe' " haxe programming language
-Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' } " latex live preview support
-Plug 'waycrate/swhkd-vim' " swhkd syntax highlighting
-Plug 'HiPhish/guile.vim' " guile syntax highlighting
-" }}}
-" utility {{{
-Plug 'preservim/nerdtree' " directory tree interface
-Plug 'Xuyuanp/nerdtree-git-plugin' " git status indicator for nerdtree
-Plug 'PhilRunninger/nerdtree-visual-selection' " allows visual selection mode in nerdtree
-Plug 'tpope/vim-fugitive' " git command interface
-Plug 'junegunn/goyo.vim' " simplify the user interface (distraction-free) [BROKEN]
-Plug 'junegunn/limelight.vim' " focus on single paragraph of text at a time
-Plug 'vim-airline/vim-airline' " powerline the vim bottom bar
-Plug 'nathanaelkane/vim-indent-guides' " indent guides for vim
-Plug 'mhinz/vim-signify' " use signs to show diffs
-Plug 'tpope/vim-endwise' " auto end functions/if statements
-Plug 'tpope/vim-surround' " auto close stuff
-Plug 'mattn/emmet-vim' " html css easy formating
-Plug 'godlygeek/tabular' " Needed for vim-markdown
-Plug 'plasticboy/vim-markdown' " Better markdown support
-Plug 'ryanoasis/vim-devicons' " dev icons for nerdtree
-" }}}
-call plug#end()
-
-" }}}
-" nvim options {{{
-
-"" nvimrc:
-"" General
-
-set showmatch " Highlight matching brace
-
-set number
-set relativenumber
-
-colorscheme BlackSea
-
-set hlsearch " Highlight all search results
-set smartcase " Enable smart-case search
-set incsearch " Searches for strings incrementally
-
-set expandtab " Use spaces instead of tabs
-set shiftwidth=2 " Number of auto-indent spaces
-set smartindent " Enable smart-indent
-set smarttab " Enable smart-tabs
-set softtabstop=2 " Number of spaces per Tab
-
-"" Advanced
-set ruler " Show row and column ruler information
-set undolevels=1000 " Number of undo levels
-set backspace=indent,eol,start " Backspace behaviour
-filetype plugin indent on
-
-"" GUI Config
-set guifont=mononoki\ Nerd\ Font\ Mono:h12
-
-hi Normal guibg=NONE ctermbg=NONE
-hi NonText guibg=NONE ctermbg=NONE
-set background=dark
-
-set foldmethod=marker
-
-set conceallevel=2
-
-" set leader key
-
-let mapleader="'"
-
-" emmet {{{
-let g:user_emmet_leader_key='<C-a>'
-" }}}
-
-" zig config {{{
-let g:zig_fmt_autosave = 1
-" }}}
-
-" latex live preview {{{
-let g:livepreview_previewer = 'zathura'
-let g:livepreview_use_biber = 1
-let g:livepreview_cursorhold_recompile = 0
-" }}}
-
-" vim-markdown {{{
-let g:vim_markdown_folding_disabled = 1
-let g:vim_markdown_folding_level = 3
-let g:vim_markdown_toc_autofit = 1
-let g:vim_markdown_emphasis_multiline = 0
-let g:tex_conceal = ""
-let g:vim_markdown_math = 1
-let g:vim_markdown_conceal_code_blocks = 1
-let g:vim_markdown_fenced_languages = ['c++=cpp', 'viml=vim', 'bash=sh', 'ini=dosini']
-let g:vim_markdown_follow_anchor = 1
-let g:vim_markdown_math = 1
-let g:vim_markdown_frontmatter = 1
-let g:vim_markdown_toml_frontmatter = 1
-let g:vim_markdown_strikethrough = 1
-let g:vim_markdown_no_extensions_in_markdown = 1
-let g:vim_markdown_autowrite = 1
-let g:vim_markdown_auto_insert_bullets = 0
-let g:vim_markdown_new_list_item_indent = 0
-let g:vim_markdown_edit_url_in = 'tab'
-" }}}
-
-" NERDTree config {{{
-let g:NERDTreeGitStatusUseNerdFonts = 1 " use nerd fonts
-let g:NERDTreeGitStatusShowClean = 1 " default: 0
-let g:NERDTreeDirArrowExpandable = '>'
-let g:NERDTreeDirArrowCollapsible = '<'
-let g:NERDTreeMapToggleHidden = 'z'
-" }}}
-
-" Goyo config {{{
-let g:goyo_width = '90%'
-let g:goyo_height = '100%'
-" }}}
-
-" limelight config {{{
-let g:limelight_conceal_ctermfg = 'gray'
-let g:limelight_conceal_guifg = 'gray'
-" }}}
-
-" devicon config {{{
-let g:airline_powerline_fonts = 1
-let g:webdevicons_enable_nerdtree = 1
-" }}}
-
-" vim-indent-guides config {{{
-let g:indent_guides_enable_on_vim_startup = 0
-" }}}
-
-" vim-signify config {{{
-set updatetime=100
-" }}}
-
-" }}}
-" Functions {{{
-" Goyo functions {{{
-function! s:goyo_enter()
- if executable('tmux') && strlen($TMUX)
- silent !tmux set status off
- silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z
- endif
- set noshowmode
- set noshowcmd
- set scrolloff=999
- Limelight
- NERDTreeClose
-endfunction
-function! s:goyo_leave()
- if executable('tmux') && strlen('$TMUX')
- silent !tmux set status on
- silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z
- endif
- set showmode
- set showcmd
- set scrolloff=5
- Limelight!
- NERDTree
-endfunction
-" }}}
-" }}}
-" Autocommands {{{
-" Goyo autocommands {{{
-autocmd! User GoyoEnter nested call <SID>goyo_enter()
-autocmd! User GoyoLeave nested call <SID>goyo_leave()
-" }}}
-" NERDTree autocmds {{{
-autocmd StdinReadPre * let s:std_in=1
-autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | wincmd p | endif
-autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') |
- \ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif
-autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
-autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
-"autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
- "\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer;.buf | endif
-autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
-" }}}
-" custom augroup {{{
-augroup custom
- autocmd!
- au BufEnter *.tex :LLPStartPreview
- au BufEnter *.md :set textwidth=80
- au BufEnter *.ms :set textwidth=80
- au BufWritePost init.vim :source %
- au BufWritePost *.tex :make
- au BufWritePost *sxhkdrc* :!pkill -USR1 -x sxhkd
- au BufWritePost .Xresources :!xrdb ~/.Xresources
- au BufWritePost .gitignore :!git add .gitignore
-augroup end
-" }}}
-" }}}
-" keybindings {{{
-
-inoremap <Down> <C-o>gj
-inoremap <Up> <C-o>gk
-inoremap <Home> <C-o>g<Home>
-inoremap <End> <C-o>g<End>
-vnoremap <Down> <C-o>gj
-vnoremap <Up> <C-o>gk
-vnoremap <Home> <C-o>g<Home>
-vnoremap <End> <C-o>g<End>
-noremap <Down> gj
-noremap <Up> gk
-
-" toggles
-noremap <leader>tn :set number!<CR>
-noremap <leader>tr :set relativenumber!<CR>
-noremap <leader>tt :NERDTreeToggle<CR>
-
-" tabs
-noremap <leader>th :tabprevious<CR>
-noremap <leader>tl :tabnext<CR>
-noremap <leader>tk :tabnew<CR>
-noremap <leader>tj :tabclose<CR>
-
-" splits
-noremap <leader>wh :vertical resize -1<CR>
-noremap <leader>wj :resize -1<CR>
-noremap <leader>wk :resize +1<CR>
-noremap <leader>wl :vertical resize +1<CR>
-
-" config
-noremap <leader>en :e ~/.config/nvim/init.vim<CR>
-noremap <leader>ec :source %<CR>
-
-" write as root
-noremap ZW :w !pkexec tee % >/dev/null
-
-" Goyo
-noremap <leader>G :Goyo<CR>
-
-" windows
-nnoremap <C-h> <C-w>h
-nnoremap <C-j> <C-w>j
-nnoremap <C-k> <C-w>k
-nnoremap <C-l> <C-w>l
-vnoremap <C-h> <C-w>h
-vnoremap <C-j> <C-w>j
-vnoremap <C-k> <C-w>k
-vnoremap <C-l> <C-w>l
-
-" files
-" these may go away soon
-noremap <leader>xx :q<CR>
-noremap <leader>x! :q!<CR>
-" these are the new standard
-noremap <leader>qq :q<CR>
-noremap <leader>q! :q!<CR>
-noremap <leader>wq :wq<CR>
-noremap <leader>ww :w<CR>
-noremap <leader>ee :e
-
-" escape for term windows
-tnoremap <Esc> <C-\><C-n>
-
-" vim-plug
-noremap <leader>pi :PlugInstall<CR>
-noremap <leader>pu :PlugUpdate<CR>
-noremap <leader>pU :PlugUpgrade<CR>
-noremap <leader>pc :PlugClean<CR>
-
-" fugitive
-noremap <leader>gp :G pull<CR>
-noremap <leader>gd :G diff %<CR>
-
-" }}}
diff --git a/nvim/lua/colorscheme.lua b/nvim/lua/colorscheme.lua
new file mode 100644
index 0000000..66516fa
--- /dev/null
+++ b/nvim/lua/colorscheme.lua
@@ -0,0 +1,8 @@
+-- define your colorscheme here
+local colorscheme = 'badwolf'
+
+local is_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
+if not is_ok then
+ vim.notify('colorscheme ' .. colorscheme .. ' not found!')
+ return
+end
diff --git a/nvim/lua/keymaps.lua b/nvim/lua/keymaps.lua
new file mode 100644
index 0000000..4f4a489
--- /dev/null
+++ b/nvim/lua/keymaps.lua
@@ -0,0 +1,97 @@
+-- define common options
+local opts = {
+ noremap = true, -- non-recursive
+ silent = true, -- do not show message
+}
+
+-- set leader key
+vim.g.mapleader = "'"
+
+-----------------
+-- Normal mode --
+-----------------
+
+-- Hint: see `:h vim.map.set()`
+-- Better window navigation
+vim.keymap.set('n', '<C-h>', '<C-w>h', opts)
+vim.keymap.set('n', '<C-j>', '<C-w>j', opts)
+vim.keymap.set('n', '<C-k>', '<C-w>k', opts)
+vim.keymap.set('n', '<C-l>', '<C-w>l', opts)
+
+-- Resize with arrows
+vim.keymap.set('n', '<C-Up>', ':resize -2<CR>', opts)
+vim.keymap.set('n', '<C-Down>', ':resize +2<CR>', opts)
+vim.keymap.set('n', '<C-Left>', ':vertical resize -2<CR>', opts)
+vim.keymap.set('n', '<C-Right>', ':vertical resize +2<CR>', opts)
+vim.keymap.set('n', '<leader>wh :vertical resize', '-1<CR>')
+vim.keymap.set('n', '<leader>wj :resize', '-1<CR>')
+vim.keymap.set('n', '<leader>wk :resize', '+1<CR>')
+vim.keymap.set('n', '<leader>wl :vertical resize', '+1<CR>')
+
+-- NerdTREE
+vim.keymap.set('n', '<leader>tt', ':NERDTreeToggle<CR>')
+
+-- files
+-- these may go away soon
+vim.keymap.set('n', '<leader>xx', ':q<CR>')
+vim.keymap.set('n', '<leader>x!', ':q!<CR>')
+
+-- Close with leader
+vim.keymap.set('n', '<leader>ww', ':w<CR>', opts)
+vim.keymap.set('n', '<leader>qq', ':q<CR>', opts)
+vim.keymap.set('n', '<leader>wq', ':wq<CR>', opts)
+vim.keymap.set('n', '<leader>q!', ':q!<CR>', opts)
+vim.keymap.set('n', '<leader>wq', ':wq<CR>')
+vim.keymap.set('n', '<leader>ee :e', '')
+
+-- Tabs with leader
+vim.keymap.set('n', '<leader>th', ':tabprevious<CR>', opts)
+vim.keymap.set('n', '<leader>tl', ':tabnext<CR>', opts)
+vim.keymap.set('n', '<leader>tk', ':tabnew<CR>', opts)
+vim.keymap.set('n', '<leader>tj', ':tabclose<CR>', opts)
+
+-- Write with sudo
+vim.keymap.set('n', 'ZW', ':w !pkexec tee % >/dev/null', opts)
+
+-- clear search highlights
+vim.keymap.set('n', '<leader>/', ':noh<CR>')
+
+-- toggles
+vim.keymap.set('n', '<leader>tn :set', 'number!<CR>')
+vim.keymap.set('n', '<leader>tr :set', 'relativenumber!<CR>')
+
+-- write as root
+vim.keymap.set('n', 'ZW', ':w !pkexec tee % >/dev/null')
+
+-- config
+vim.keymap.set('n', '<leader>en', ':e ~/.config/nvim/init.lua<CR>')
+vim.keymap.set('n', '<leader>ec', ':source %<CR>')
+vim.keymap.set('n', '<leader>er', ':source ~/.config/nvim/init.lua<CR>')
+
+-- Goyo
+vim.keymap.set('n', '<leader>G', ':Goyo<CR>')
+
+-- fugitive
+vim.keymap.set('n', '<leader>gp :G', 'pull<CR>')
+vim.keymap.set('n', '<leader>gd :G diff', '%<CR>')
+
+-----------------
+-- Visual mode --
+-----------------
+
+-- Hint: start visual mode with the same area as the previous area and the same mode
+--vim.keymap.set('v', '<', '<gv', opts)
+--vim.keymap.set('v', '>', '>gv', opts)
+
+-- windows
+vim.keymap.set('v', '<C-h>', '<C-w>h')
+vim.keymap.set('v', '<C-j>', '<C-w>j')
+vim.keymap.set('v', '<C-k>', '<C-w>k')
+vim.keymap.set('v', '<C-l>', '<C-w>l')
+
+--------------
+-- TERMINAL --
+--------------
+
+-- escape for term windows
+vim.keymap.set('t', '<Esc>', '<C-\\><C-n>')
diff --git a/nvim/lua/lsp.lua b/nvim/lua/lsp.lua
new file mode 100644
index 0000000..343c76b
--- /dev/null
+++ b/nvim/lua/lsp.lua
@@ -0,0 +1,22 @@
+-- Remove Global Default Key mapping
+vim.keymap.del("n", "grn")
+vim.keymap.del("n", "gra")
+vim.keymap.del("n", "grr")
+vim.keymap.del("n", "gri")
+vim.keymap.del("n", "gO")
+
+-- Create keymapping
+-- LspAttach: After an LSP Client performs "initialize" and attaches to a buffer.
+vim.api.nvim_create_autocmd("LspAttach", {
+ callback = function(args)
+ local keymap = vim.keymap
+ local lsp = vim.lsp
+ local bufopts = { noremap = true, silent = true }
+
+ keymap.set("n", "gr", lsp.buf.references, bufopts)
+ keymap.set("n", "gd", lsp.buf.definition, bufopts)
+ keymap.set("n", "<space>rn", lsp.buf.rename, bufopts)
+ keymap.set("n", "K", lsp.buf.hover, bufopts)
+ keymap.set("n", "<space>f", lsp.buf.format, bufopts)
+ end
+})
diff --git a/nvim/lua/options.lua b/nvim/lua/options.lua
new file mode 100644
index 0000000..ae802be
--- /dev/null
+++ b/nvim/lua/options.lua
@@ -0,0 +1,86 @@
+-- Hint: use `:h <option>` to figure out the meaning if needed
+vim.opt.clipboard = 'unnamedplus' -- use system clipboard
+vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
+vim.opt.mouse = 'a' -- allow the mouse to be used in nvim
+
+-- Tab
+vim.opt.tabstop = 2 -- number of visual spaces per TAB
+vim.opt.softtabstop = 2 -- number of spaces in tab when editing
+vim.opt.shiftwidth = 2 -- insert 2 spaces on a tab
+vim.opt.expandtab = true -- tabs are spaces
+vim.opt.smartindent = true
+vim.opt.smarttab = true
+
+-- UI config
+vim.opt.number = true -- show absolute number
+vim.opt.relativenumber = true -- show relative numbers
+vim.opt.cursorline = true -- highlight cursor line underneath cursor horizontally
+vim.opt.splitbelow = true -- open new vertical splits bottom
+vim.opt.splitright = true -- open new horizontal splits right
+-- vim.opt.termguicolors = true -- enable 24-bit RGB color in the TUI
+vim.opt.showmode = false -- show the "-- INSERT --" and other hints
+
+-- Searching
+vim.opt.incsearch = true -- search as characters are entered
+vim.opt.hlsearch = false -- do not highlight matches
+vim.opt.ignorecase = true -- ignore case in searches by default
+vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
+
+-- Etc
+vim.opt.ruler = true -- Show row and column ruler info
+vim.opt.undolevels = 1000 -- Number of undo levels
+vim.opt.backspace = { "indent", "eol", "start" } -- Backspace behavior
+vim.opt.foldmethod = "marker"
+vim.opt.conceallevel = 2
+
+-- Plugins
+-- emmet
+vim.g.user_emmet_leader_key = '<C-a>'
+
+-- zig
+vim.g.zig_fmt_autosave = 1
+
+-- markdown
+vim.g.vim_markdown_folding_disabled = 1
+vim.g.vim_markdown_folding_level = 3
+vim.g.vim_markdown_toc_autofit = 1
+vim.g.vim_markdown_emphasis_multiline = 0
+vim.g.tex_conceal = ""
+vim.g.vim_markdown_math = 1
+vim.g.vim_markdown_conceal_code_blocks = 1
+vim.g.vim_markdown_fenced_languages = { 'c++=cpp', 'viml=vim', 'bash=sh', 'ini=dosini' }
+vim.g.vim_markdown_follow_anchor = 1
+vim.g.vim_markdown_math = 1
+vim.g.vim_markdown_frontmatter = 1
+vim.g.vim_markdown_toml_frontmatter = 1
+vim.g.vim_markdown_strikethrough = 1
+vim.g.vim_markdown_no_extensions_in_markdown = 1
+vim.g.vim_markdown_autowrite = 1
+vim.g.vim_markdown_auto_insert_bullets = 0
+vim.g.vim_markdown_new_list_item_indent = 0
+vim.g.vim_markdown_edit_url_in = 'tab'
+
+-- NERDTree
+vim.g.NERDTreeGitStatusUseNerdFonts = 1
+vim.g.NERDTreeGitStatusShowClean = 1
+vim.g.NERDTreeDirArrowExpandable = '>'
+vim.g.NERDTreeDirArrowCollapsible = '<'
+vim.g.NERDTreeMapToggleHidden = 'z'
+
+-- goyo
+vim.g.goyo_width = '90%'
+vim.g.goyo_height = '100%'
+
+-- limelight
+vim.g.limelight_conceal_ctermfg = 'gray'
+vim.g.limelight_conceal_guifg = 'gray'
+
+-- devicon
+vim.g.airline_powerline_fonts = 1
+vim.g.webdevicons_enable_nerdtree = 1
+
+-- vim-indent-guides
+vim.g.indent_guides_enable_on_vim_startup = 0
+
+-- vim-signify
+vim.opt.updatetime = 100
diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua
new file mode 100644
index 0000000..f90b09c
--- /dev/null
+++ b/nvim/lua/plugins.lua
@@ -0,0 +1,62 @@
+local lazypath = vim.fn.stdpath("data") .. "lazy/lazy.nvim"
+if not (vim.uv or vim.loop).fs_stat(lazypath) then
+ vim.fn.system({
+ "git",
+ "clone",
+ "--filter=blob:none",
+ "https://github.com/folke/lazy.nvim.git",
+ "--branch=stable", -- latest stable release
+ lazypath,
+ })
+end
+vim.opt.rtp:prepend(lazypath)
+
+require("lazy").setup({
+ -- LSP manager
+ { "mason-org/mason.nvim", opts = {} },
+ {
+ "mason-org/mason-lspconfig.nvim",
+ dependencies = {
+ "mason-org/mason.nvim",
+ "neovim/nvim-lspconfig",
+ },
+ opts = {
+ ensure_installed = { "pylsp", "clangd", "rust_analyzer", "zls" },
+ },
+ },
+ {
+ "neovim/nvim-lspconfig",
+ config = function()
+ local lspconfig = require("lspconfig")
+
+ lspconfig.pylsp.setup({})
+ end,
+ },
+ "tanvirtin/monokai.nvim",
+ "lervag/vimtex",
+ 'tomasiser/vim-code-dark',
+ 'flazz/vim-colorschemes',
+ 'ZachIndigo/vim-preglow',
+ 'axvr/org.vim',
+ 'ziglang/zig.vim',
+ 'jdonaldson/vaxe',
+ 'xuhdev/vim-latex-live-preview',
+ 'waycrate/swhkd-vim',
+ 'HiPhish/guile.vim',
+ 'preservim/nerdtree',
+ 'Xuyuanp/nerdtree-git-plugin',
+ 'PhilRunninger/nerdtree-visual-selection',
+ 'tpope/vim-fugitive',
+ 'junegunn/goyo.vim',
+ 'junegunn/limelight.vim',
+ 'vim-airline/vim-airline',
+ 'nathanaelkane/vim-indent-guides',
+ 'mhinz/vim-signify',
+ 'tpope/vim-endwise',
+ 'tpope/vim-surround',
+ 'mattn/emmet-vim',
+ 'godlygeek/tabular',
+ 'plasticboy/vim-markdown',
+ 'ryanoasis/vim-devicons',
+ {'akinsho/toggleterm.nvim', version = "*", config = true},
+})
diff --git a/nvim/lua/term.lua b/nvim/lua/term.lua
new file mode 100644
index 0000000..e7aac4e
--- /dev/null
+++ b/nvim/lua/term.lua
@@ -0,0 +1,51 @@
+require("toggleterm").setup{
+ -- size can be a number or function which is passed the current terminal
+ size = function(term)
+ if term.direction == "horizontal" then
+ return 15
+ elseif term.direction == "vertical" then
+ return vim.o.columns * 0.4
+ end
+ end,
+ open_mapping = [[<leader>`]], -- or { [[<c-\>]], [[<c-¥>]] } if you also use a Japanese keyboard.
+ hide_numbers = true, -- hide the number column in toggleterm buffers
+ shade_filetypes = {},
+ autochdir = false, -- when neovim changes it current directory the terminal will change it's own when next it's opened
+ shade_terminals = true, -- NOTE: this option takes priority over highlights specified so if you specify Normal highlights you should set this to false
+ shading_factor = '-30', -- the percentage by which to lighten dark terminal background, default: -30
+ shading_ratio = '-3', -- the ratio of shading factor for light/dark terminal background, default: -3
+ start_in_insert = true,
+ insert_mappings = true, -- whether or not the open mapping applies in insert mode
+ terminal_mappings = true, -- whether or not the open mapping applies in the opened terminals
+ persist_size = true,
+ persist_mode = true, -- if set to true (default) the previous terminal mode will be remembered
+ direction = 'horizontal',
+ close_on_exit = true, -- close the terminal window when the process exits
+ clear_env = false, -- use only environmental variables from `env`, passed to jobstart()
+ -- Change the default shell. Can be a string or a function returning a string
+ shell = vim.o.shell,
+ auto_scroll = true, -- automatically scroll to the bottom on terminal output
+ -- This field is only relevant if direction is set to 'float'
+ float_opts = {
+ -- The border key is *almost* the same as 'nvim_open_win'
+ -- see :h nvim_open_win for details on borders however
+ -- the 'curved' border is a custom border type
+ -- not natively supported but implemented in this plugin.
+ border = 'single',
+ -- like `size`, width, height, row, and col can be a number or function which is passed the current terminal
+ winblend = 3,
+ title_pos = 'left'
+ },
+ winbar = {
+ enabled = false,
+ name_formatter = function(term) -- term: Terminal
+ return term.name
+ end
+ },
+ responsiveness = {
+ -- breakpoint in terms of `vim.o.columns` at which terminals will start to stack on top of each other
+ -- instead of next to each other
+ -- default = 0 which means the feature is turned off
+ horizontal_breakpoint = 135,
+ }
+}
diff --git a/python/pythonrc b/python/pythonrc
new file mode 100644
index 0000000..c7cf7d5
--- /dev/null
+++ b/python/pythonrc
@@ -0,0 +1,40 @@
+try:
+ import atexit
+ import os
+ import sys
+ from pathlib import Path
+ import readline
+except ImportError as e:
+ print(f"Couldn't load module. {e}")
+ sys.exit(1)
+
+
+################
+# TAB COMPLETION #
+##################
+
+try:
+ readline.parse_and_bind("tab: complete")
+except ImportError:
+ pass
+
+
+### XDG Compliant History File
+# See https://gist.github.com/viliampucik/8713b09ff7e4d984b29bfcd7804dc1f4?permalink_comment_id=4582040#gistcomment-4582040
+
+# Destroy default history file writing hook (and also tab completion, which is why we manually added it above)
+if hasattr(sys, '__interactivehook__'):
+ del sys.__interactivehook__
+
+
+histfile = Path(os.getenv("XDG_CACHE_HOME", Path.home() / ".cache")) / "python_history"
+try:
+ histfile.touch(exist_ok=True)
+except FileNotFoundError: # Probably the parent directory doesn't exist
+ histfile.parent.mkdir(parents=True, exist_ok=True)
+
+readline.read_history_file(histfile)
+# Don't store an obscene amount of history
+readline.set_history_length(5000)
+# Write to history file on exit
+atexit.register(readline.write_history_file, histfile)
diff --git a/runit/conf/logind.conf b/runit/conf/logind.conf
new file mode 100644
index 0000000..c31f33a
--- /dev/null
+++ b/runit/conf/logind.conf
@@ -0,0 +1,54 @@
+# This file is part of elogind.
+#
+# elogind is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# Entries in this file show the compile time defaults.
+# You can change settings by editing this file.
+# Defaults can be restored by simply deleting this file.
+#
+# See logind.conf(5) for details.
+
+[Login]
+KillUserProcesses=yes
+#KillOnlyUsers=
+#KillExcludeUsers=root
+#InhibitDelayMaxSec=5
+#HandlePowerKey=poweroff
+#HandleSuspendKey=suspend
+#HandleHibernateKey=hibernate
+#HandleLidSwitch=suspend
+#HandleLidSwitchExternalPower=suspend
+#HandleLidSwitchDocked=ignore
+#PowerKeyIgnoreInhibited=no
+#SuspendKeyIgnoreInhibited=no
+#HibernateKeyIgnoreInhibited=no
+#LidSwitchIgnoreInhibited=yes
+#HoldoffTimeoutSec=30s
+#IdleAction=ignore
+#IdleActionSec=30min
+#RuntimeDirectorySize=10%
+#RuntimeDirectoryInodes=400k
+#RemoveIPC=yes
+#InhibitorsMax=8192
+#SessionsMax=8192
+
+[Sleep]
+#AllowSuspend=yes
+#AllowHibernation=yes
+#AllowSuspendThenHibernate=yes
+#AllowHybridSleep=yes
+#AllowPowerOffInterrupts=no
+#BroadcastPowerOffInterrupts=yes
+#AllowSuspendInterrupts=no
+#BroadcastSuspendInterrupts=yes
+#HandleNvidiaSleep=no
+#SuspendState=mem standby freeze
+#SuspendMode=
+#HibernateState=disk
+#HibernateMode=platform shutdown
+#HybridSleepState=disk
+#HybridSleepMode=suspend platform shutdown
+#HibernateDelaySec=10800
diff --git a/runit/sv/dunst/conf b/runit/sv/dunst/conf
new file mode 100644
index 0000000..88353ef
--- /dev/null
+++ b/runit/sv/dunst/conf
@@ -0,0 +1,9 @@
+# -*- mode: sh; -*-
+
+# Additional command line arguments for pipewire(1).
+OPTS=''
+
+# Setting this to 1 enables logging, any other value - disables.
+LOGGING_ENABLE=1
+# The directory will be created for you, if logging is enabled.
+LOG_DIR="$HOME/.local/var/log/dunst"
diff --git a/runit/sv/dunst/log/run b/runit/sv/dunst/log/run
new file mode 100755
index 0000000..09818ce
--- /dev/null
+++ b/runit/sv/dunst/log/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ -r ../conf ] && . ../conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" ]; then
+ # Create the log directory if not exists.
+ [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}"
+
+ exec svlogd -tt "${LOG_DIR:-}"
+else
+ exec chpst -b mpd-log-null cat >/dev/null
+fi
diff --git a/runit/sv/dunst/run b/runit/sv/dunst/run
new file mode 100755
index 0000000..1c0aa88
--- /dev/null
+++ b/runit/sv/dunst/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+exec dunst ${OPTS:-} 2>&1
diff --git a/runit/sv/mako/conf b/runit/sv/mako/conf
new file mode 100644
index 0000000..6bb79d1
--- /dev/null
+++ b/runit/sv/mako/conf
@@ -0,0 +1,9 @@
+# -*- mode: sh; -*-
+
+# Additional command line arguments for pipewire(1).
+OPTS=''
+
+# Setting this to 1 enables logging, any other value - disables.
+LOGGING_ENABLE=1
+# The directory will be created for you, if logging is enabled.
+LOG_DIR="$HOME/.local/var/log/mako"
diff --git a/runit/sv/mako/down b/runit/sv/mako/down
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/runit/sv/mako/down
diff --git a/runit/sv/mako/log/run b/runit/sv/mako/log/run
new file mode 100755
index 0000000..09818ce
--- /dev/null
+++ b/runit/sv/mako/log/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ -r ../conf ] && . ../conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" ]; then
+ # Create the log directory if not exists.
+ [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}"
+
+ exec svlogd -tt "${LOG_DIR:-}"
+else
+ exec chpst -b mpd-log-null cat >/dev/null
+fi
diff --git a/runit/sv/mako/run b/runit/sv/mako/run
new file mode 100755
index 0000000..266f521
--- /dev/null
+++ b/runit/sv/mako/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+exec mako ${OPTS:-} 2>&1
diff --git a/runit/sv/mpd-mpris/conf b/runit/sv/mpd-mpris/conf
new file mode 100644
index 0000000..7b43455
--- /dev/null
+++ b/runit/sv/mpd-mpris/conf
@@ -0,0 +1,9 @@
+# -*- mode: sh; -*-
+
+# Additional command line arguments for pipewire(1).
+OPTS='-network unix'
+
+# Setting this to 1 enables logging, any other value - disables.
+LOGGING_ENABLE=0
+# The directory will be created for you, if logging is enabled.
+LOG_DIR="$HOME/.local/var/log/mpd-mpris"
diff --git a/runit/sv/mpd-mpris/log/run b/runit/sv/mpd-mpris/log/run
new file mode 100755
index 0000000..09818ce
--- /dev/null
+++ b/runit/sv/mpd-mpris/log/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ -r ../conf ] && . ../conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" ]; then
+ # Create the log directory if not exists.
+ [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}"
+
+ exec svlogd -tt "${LOG_DIR:-}"
+else
+ exec chpst -b mpd-log-null cat >/dev/null
+fi
diff --git a/runit/sv/mpd-mpris/run b/runit/sv/mpd-mpris/run
new file mode 100755
index 0000000..3883e70
--- /dev/null
+++ b/runit/sv/mpd-mpris/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Wait for the PipeWire Pulse daemon to start.
+sv check "$HOME/.config/runit/sv/mpd" >/dev/null || exit 1
+
+[ -r ./conf ] && . ./conf
+
+exec mpd-mpris ${OPTS:--network unix} 2>&1
diff --git a/runit/sv/mpd-notification/conf b/runit/sv/mpd-notification/conf
new file mode 100644
index 0000000..e0b9aa3
--- /dev/null
+++ b/runit/sv/mpd-notification/conf
@@ -0,0 +1,9 @@
+# -*- mode: sh; -*-
+
+# Additional command line arguments for pipewire(1).
+OPTS=''
+
+# Setting this to 1 enables logging, any other value - disables.
+LOGGING_ENABLE=0
+# The directory will be created for you, if logging is enabled.
+LOG_DIR="$HOME/.local/var/log/mpd-notification"
diff --git a/runit/sv/mpd-notification/log/run b/runit/sv/mpd-notification/log/run
new file mode 100755
index 0000000..09818ce
--- /dev/null
+++ b/runit/sv/mpd-notification/log/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ -r ../conf ] && . ../conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" ]; then
+ # Create the log directory if not exists.
+ [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}"
+
+ exec svlogd -tt "${LOG_DIR:-}"
+else
+ exec chpst -b mpd-log-null cat >/dev/null
+fi
diff --git a/runit/sv/mpd-notification/run b/runit/sv/mpd-notification/run
new file mode 100755
index 0000000..a643d56
--- /dev/null
+++ b/runit/sv/mpd-notification/run
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Wait for the PipeWire Pulse daemon to start.
+sv check "$HOME/.config/runit/sv/mpd" >/dev/null || exit 1
+sv check "$HOME/.config/runit/sv/mako" >/dev/null || exit 1
+
+[ -r ./conf ] && . ./conf
+
+exec mpd-notification ${OPTS:-} 2>&1
diff --git a/runit/sv/mpd/conf b/runit/sv/mpd/conf
new file mode 100644
index 0000000..ca3a82f
--- /dev/null
+++ b/runit/sv/mpd/conf
@@ -0,0 +1,9 @@
+# -*- mode: sh; -*-
+
+# Additional command line arguments for pipewire(1).
+OPTS=''
+
+# Setting this to 1 enables logging, any other value - disables.
+LOGGING_ENABLE=0
+# The directory will be created for you, if logging is enabled.
+LOG_DIR="$HOME/.local/var/log/mpd"
diff --git a/runit/sv/mpd/log/run b/runit/sv/mpd/log/run
new file mode 100755
index 0000000..09818ce
--- /dev/null
+++ b/runit/sv/mpd/log/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ -r ../conf ] && . ../conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" ]; then
+ # Create the log directory if not exists.
+ [ -d "${LOG_DIR:-}" ] || mkdir -p "${LOG_DIR:-}"
+
+ exec svlogd -tt "${LOG_DIR:-}"
+else
+ exec chpst -b mpd-log-null cat >/dev/null
+fi
diff --git a/runit/sv/mpd/run b/runit/sv/mpd/run
new file mode 100755
index 0000000..b57d5ac
--- /dev/null
+++ b/runit/sv/mpd/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Wait for the PipeWire Pulse daemon to start.
+sv check "$HOME/.config/runit/sv/pipewire-pulse" >/dev/null || exit 1
+
+[ -r ./conf ] && . ./conf
+
+exec mpd --no-daemon --stderr ${OPTS:-} 2>&1
diff --git a/runit/sv/pipewire-pulse/conf b/runit/sv/pipewire-pulse/conf
new file mode 100644
index 0000000..606eac5
--- /dev/null
+++ b/runit/sv/pipewire-pulse/conf
@@ -0,0 +1,12 @@
+# -*- mode: sh; -*-
+
+# Additional command line arguments for pipewire-pulse.
+OPTS=''
+
+# Setting this to 1 enables logging, any other value - disables.
+LOGGING_ENABLE=0
+# Set the pipewire log level.
+# See: https://docs.pipewire.org/page_daemon.html#sec_logging
+LOG_LEVEL=1
+# The directory will be created for you, if logging is enabled.
+LOG_DIR="$HOME/.local/var/log/pipewire-pulse"
diff --git a/runit/sv/pipewire-pulse/log/run b/runit/sv/pipewire-pulse/log/run
new file mode 100755
index 0000000..ba8236e
--- /dev/null
+++ b/runit/sv/pipewire-pulse/log/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ -r ../conf ] && . ../conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" ]; then
+ # Create the log directory if not exists.
+ [ -d "${LOG_DIR}" ] || mkdir -p "${LOG_DIR}"
+
+ exec svlogd -tt "${LOG_DIR}"
+else
+ exec chpst -b pipewire-pulse-log-null cat >/dev/null
+fi
diff --git a/runit/sv/pipewire-pulse/run b/runit/sv/pipewire-pulse/run
new file mode 100755
index 0000000..0e43d6f
--- /dev/null
+++ b/runit/sv/pipewire-pulse/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Wait for the PipeWire Media Session daemon to start.
+sv check "$HOME/.config/runit/sv/wireplumber" >/dev/null || exit 1
+
+[ -r ./conf ] && . ./conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" -a -n "${LOG_LEVEL}" ]; then
+ export PIPEWIRE_DEBUG="${LOG_LEVEL}"
+fi
+
+exec pipewire-pulse ${OPTS:-} 2>&1
diff --git a/runit/sv/wireplumber/conf b/runit/sv/wireplumber/conf
new file mode 100644
index 0000000..d712f03
--- /dev/null
+++ b/runit/sv/wireplumber/conf
@@ -0,0 +1,12 @@
+# -*- mode: sh; -*-
+
+# Additional command line arguments for wireplumber.
+OPTS=''
+
+# Setting this to 1 enables logging, any other value - disables.
+LOGGING_ENABLE=0
+# Set the wireplumber log level.
+# See: https://pipewire.pages.freedesktop.org/wireplumber/daemon-logging.html
+LOG_LEVEL=2
+# The directory will be created for you, if logging is enabled.
+LOG_DIR="$HOME/.local/var/log/wireplumber"
diff --git a/runit/sv/wireplumber/log/run b/runit/sv/wireplumber/log/run
new file mode 100755
index 0000000..aa89d14
--- /dev/null
+++ b/runit/sv/wireplumber/log/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ -r ../conf ] && . ../conf
+
+if [ "${LOGGING_ENABLE}x" == "1x" ]; then
+ # Create the log directory if not exists.
+ [ -d "${LOG_DIR}" ] || mkdir -p "${LOG_DIR}"
+
+ exec svlogd -tt "${LOG_DIR}"
+else
+ exec chpst -b wireplumber-log-null cat >/dev/null
+fi
diff --git a/runit/sv/wireplumber/run b/runit/sv/wireplumber/run
new file mode 100755
index 0000000..5fb9edc
--- /dev/null
+++ b/runit/sv/wireplumber/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Wait for the PipeWire daemon to start.
+sv check "$HOME/.config/runit/sv/pipewire" >/dev/null || exit 1
+
+[ -r ./conf ] && . ./conf
+
+if [ "${LOGGING_ENABLE}x" = "1x" -a -n "${LOG_LEVEL}" ]; then
+ export WIREPLUMBER_DEBUG="${LOG_LEVEL}"
+fi
+
+exec wireplumber ${OPTS:-} 2>&1
diff --git a/sh/aliases b/sh/aliases
index e33c3a9..93784e7 100644
--- a/sh/aliases
+++ b/sh/aliases
@@ -18,22 +18,35 @@ case `uname -s` in
alias ls="ls -h"
;;
"Linux")
- alias ls="ls -h $COLOR_FLAGS_GNU"
+ #alias ls="ls -h $COLOR_FLAGS_GNU"
+ alias ls="eza"
+ ;;
+ "Darwin")
+ alias ls="eza --color"
;;
esac
alias ll='ls -l'
-alias la='ls -A'
-alias lla='ls -lA'
+alias lt='ls -l --total-size'
+alias lts='ls -l --total-size --sort size --reverse'
+alias la='ls -a'
+alias lla='ls -la'
+alias lb='lsblk'
alias md='mkdir -p'
alias ch='cd $HOME'
#alias nvim='vim'
alias nv='nvim'
alias v='nvim'
-#alias lf='lfrun'
## Change utils
-alias rm='rm -i'
+case `uname -s` in
+ "OpenBSD" | "Darwin")
+ alias rm='rm -i'
+ ;;
+ "Linux")
+ alias rm='trash-put'
+ ;;
+esac
alias cp='cp -i'
alias srsync='rsync -KPUcrtvyz'
@@ -44,7 +57,7 @@ alias ga='git add -A'
alias gd='git diff'
## Single Chars
-alias r='cd ~ && clear && exec $SHELL'
+alias r='cd ~ && reset && exec $SHELL'
alias q='exit'
alias c='clear'
alias m='make'
@@ -71,5 +84,15 @@ case `uname -s` in
;;
esac
+## Systemctl
+alias us='systemctl --user'
+alias s='sudo systemctl'
+
## Runit
#alias ursm='env SVDIR="$HOME/.local/sv/" rsm'
+
+# XDG dirs fix
+alias svn="svn --config-dir $XDG_CONFIG_HOME/subversion"
+alias adb="HOME="$XDG_DATA_HOME"/android adb"
+alias wget="wget --hsts-file=\"$XDG_DATA_HOME/wget-hsts\""
+alias yarn="yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config"
diff --git a/sh/profile b/sh/profile
index 3aa7fd7..068b6f1 100644
--- a/sh/profile
+++ b/sh/profile
@@ -1,12 +1,16 @@
-# Import ENV from system
-. /etc/profile
-[ -f /etc/profile.d/nix-daemon.sh ] && . /etc/profile.d/nix-daemon.sh
-
-# Other XDG paths
+# XDG paths
export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"}
export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"}
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"}
-[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs"
+. "$HOME/.config/user-dirs.dirs"
+export XDG_CURRENT_DESKTOP="Hyprland"
+export XDG_DOCUMENTS_DIR=${HOME}/Documents
+export XDG_DOWNLOAD_DIR=${HOME}/Downloads
+export XDG_DESKTOP_DIR=${HOME}/Desktop
+export XDG_STATE_HOME="${HOME}/.local/state"
+export XDG_VIDEOS_DIR=${HOME}/Videos
+
+export XDG_DATA_DIRS="${XDG_DATA_DIRS}:$HOME/.nix-profile/share"
# Doesn't seem to work
export ANDROID_SDK_HOME="$XDG_CONFIG_HOME"/android
@@ -18,6 +22,10 @@ export ADB_VENDOR_KEY="$XDG_CONFIG_HOME"/android
export LESSHISTFILE=-
# Fixing Paths
+export RENPY_PATH_TO_SAVES="$XDG_DATA_HOME"
+export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel
+export ZPLUG_HOME="$XDG_DATA_HOME/zplug"
+export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet
export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc
export ATOM_HOME="$XDG_DATA_HOME"/atom
export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
@@ -32,98 +40,111 @@ export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages
export RXVT_SOCKET="$XDG_RUNTIME_DIR"/urxvtd
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
+export ZDOTDIR=$HOME/.config/zsh
export CARGO_HOME="$XDG_DATA_HOME"/cargo
+export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat
export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/notmuchrc
export NMBGIT="$XDG_DATA_HOME"/notmuch/nmbug
export WINEROOT="$XDG_DATA_HOME"/wineprefixes
export WINEPREFIX="$WINEROOT"/default
-
-export MPD_HOST="$XDG_CONFIG_HOME/mpd/socket"
+export MPD_HOST="127.0.0.1"
+export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
+export RENPY_PATH_TO_SAVES="$XDG_DATA_HOME"
+export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
+export XAUTHORITY="$XDG_RUNTIME_DIR"/X11/Xauthority
+#export VIMINIT="set nocp | source ${XDG_CONFIG_HOME:-$HOME.config}/vim/vimrc"
+export ANDROID_USER_HOME="$XDG_DATA_HOME"/android
+export XCURSOR_PATH="/usr/share/icons:$XDG_DATA_HOME/icons"
+export PYTHONSTARTUP="$XDG_CONFIG_HOME"/python/pythonrc
# Scaling
-export QT_AUTO_SCREEN_SCALE_FACTOR=0
-export QT_SCALE_FACTOR=1
-export QT_SCREEN_SCALE_FACTORS="1;1;1"
+#export QT_AUTO_SCREEN_SCALE_FACTOR=0
+#export QT_SCALE_FACTOR=1
+#export QT_SCREEN_SCALE_FACTORS="1;1;1"
export GDK_SCALE=1
export GDK_DPI_SCALE=1
# Theming
-export QT_QPA_PLATFORMTHEME=qt5ct
-
-# Configure apps
-export BEMENU_OPTS="-H 36 --fn \"mononoki Nerd Font Mono 24\" --nb \"#000000\" --nf \"#c5c8c6\" --hb \"#39c1ed\" --hf \"#000000\" --cb \"#000000\" --cf \"#000000\" --tf \"#000000\" --tb \"#39c1ed\" --fb \"#000000\" --ff \"#c5c8c6\" --fbb \"#39c1ed\" --fbf \"#198844\""
+export QT_QPA_PLATFORMTHEME=qt6ct
# Fix wayland stuff
export MOZ_ENABLE_WAYLAND=1
export XKB_DEFAULT_OPTIONS=caps:escape
-export XDG_CURRENT_DESKTOP=Unity
# Default Apps
export EDITOR="nvim"
export READER="zathura"
export VISUAL="nvim"
-export TERMINAL="alacritty"
+export TERMINAL="st"
export BROWSER="browser"
export VIDEO="mpv"
export IMAGE="sxiv"
export OPENER="xdg-open"
export PAGER="less"
-# DIRS
-export SRCDIR="$HOME/.local/src"
+# ZVM
+export ZVM_INSTALL="$HOME/.zvm/self"
+export ZVMPATH="$HOME/.zvm/bin"
-# MKSH
-#export ENV="$XDG_CONFIG_HOME/mksh/mkshrc"
+# Modern SDK
+export N64_LIBGCCDIR="/opt/crashsdk/lib/gcc/mips64-elf/12.2.0"
+export ROOT=/etc/n64
+export BLENDER_3_0="/usr/bin/blender"
-# OKSH
-export ENV="$XDG_CONFIG_HOME/kshrc"
+# DIRS
+export SRCDIR="$HOME/.local/src"
# OLD PATH
-export SYSPATH="$PATH"
+export PATHS="$(echo "$PATH" | sed 's/:/\n/g')"
+USERPATH=""
+
+addtopath () {
+ local USERPATHS="$(echo "$USERPATH" | sed 's/:/\n/g')"
+ if [ -d "$1" ]; then
+ echo "$PATHS" | /usr/bin/grep -qE "^$1$" && return
+ echo "$USERPATHS" | /usr/bin/grep -qE "^$1$" && return
+ [ -n "$USERPATH" ] && USERPATH="${USERPATH}:"
+ USERPATH="${USERPATH}$1"
+ fi
+}
# NEW PATH
-unset PATH
-if [ -d "$HOME/.local/bin/testing" ]; then
- PATH="$HOME/.local/bin/testing"
-fi
-if [ -d "$HOME/.local/bin/shortcmds" ]; then
- PATH="$PATH:$HOME/.local/bin/shortcmds"
-fi
-if [ -d "$HOME/.local/bin/generics" ]; then
- PATH="$PATH:$HOME/.local/bin/generics"
-fi
-if [ -d "$HOME/.local/bin/scripts" ]; then
- PATH="$PATH:$HOME/.local/bin/scripts"
-fi
-if [ -d "$HOME/.local/bin/sp" ]; then
- PATH="$PATH:$HOME/.local/bin/sp"
-fi
-if [ -d "$HOME/.local/bin/blocks" ]; then
- PATH="$PATH:$HOME/.local/bin/blocks"
-fi
-if [ -d "$HOME/.local/bin/ignore" ]; then
- PATH="$PATH:$HOME/.local/bin/ignore"
-fi
-if [ -d "$HOME/.local/bin" ]; then
- PATH="$PATH:$HOME/.local/bin"
-fi
-if [ -d "$HOME/.local/bin/flatpak-sc" ]; then
- PATH="$PATH:$HOME/.local/bin/flatpak-sc"
-fi
-if [ -d "$HOME/.local/bin/flatpak/exports/bin" ]; then
- PATH="$PATH:$HOME/.local/share/flatpak/exports/bin/"
-fi
-if [ -d "$CARGO_HOME/bin" ]; then
- PATH="$PATH:$CARGO_HOME/bin"
-fi
-if [ -d "$GOPATH/bin" ]; then
- PATH="$PATH:$GOPATH/bin"
-fi
+addtopath "$HOME/.local/bin/testing"
+addtopath "$HOME/.local/bin/shortcmds"
+addtopath "$HOME/.local/bin/generics"
+addtopath "$HOME/.local/bin/scripts"
+addtopath "$HOME/.local/bin/sp"
+addtopath "$HOME/.local/bin/blocks"
+addtopath "$HOME/.local/bin/ignore"
+addtopath "$HOME/.local/bin/volsv"
+addtopath "$HOME/.local/bin"
+addtopath "$HOME/.local/bin/flatpak-sc"
+addtopath "$HOME/.local/share/flatpak/exports/bin/"
+addtopath "$CARGO_HOME/bin"
+addtopath "$GOPATH/bin"
+addtopath "$ZVMPATH"
+addtopath "$ZVM_INSTALL"
+addtopath "/var/lib/flatpak/exports/bin"
# MERGE PATHS
-export PATH="$PATH:$SYSPATH"
-
-# CLEANUP
-unset SYSPATH
+[ -n "$USERPATH" ] && export PATH="$USERPATH:$PATH"
+
+unset -f addtopath
+unset USERPATH
+unset PATHS
+
+command_not_found_handle() {
+# don't run if not in a container
+ if [ ! -e /run/.containerenv ] && [ ! -e /.dockerenv ]; then
+ exit 127
+ fi
+
+ distrobox-host-exec "${@}"
+}
+if [ -n "${ZSH_VERSION-}" ]; then
+ command_not_found_handler() {
+ command_not_found_handle "$@"
+ }
+fi
diff --git a/tmux/tmux.conf b/tmux/tmux.conf
index d421349..8b23a90 100644
--- a/tmux/tmux.conf
+++ b/tmux/tmux.conf
@@ -6,8 +6,8 @@ set -g status-bg "#000000"
set -g status-fg "#c5c6c4"
# remove administrative debris (session-name, hostname, time) in status bar
-set -g status-left ''
-set -g status-right '#{battery_status_bg} Batt: #{battery_icon} #{battery_percentage} #{battery_remain}'
+set -g status-left '%H:%M| '
+set -g status-right '%a %Y-%m-%d'
# act live dvtm
unbind C-b
@@ -27,4 +27,4 @@ set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'https://git.linux-help.org/psi-jack/tmux-indicators'
set -g @plugin 'tmux-plugins/tmux-battery'
-run '/usr/share/tmux-plugin-manager/tpm'
+run '~/.config/tmux/plugins/tpm/tpm'
diff --git a/user-dirs.dirs b/user-dirs.dirs
index 7f9a959..02d53bb 100644
--- a/user-dirs.dirs
+++ b/user-dirs.dirs
@@ -8,7 +8,7 @@
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
-XDG_PUBLICSHARE_DIR="$HOME/Public"
+XDG_PUBLICSHARE_DIR="$HOME/Shared"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
diff --git a/vim/vimrc b/vim/vimrc
new file mode 100644
index 0000000..01156b5
--- /dev/null
+++ b/vim/vimrc
@@ -0,0 +1,301 @@
+set runtimepath^=$XDG_CONFIG_HOME/vim
+set runtimepath+=$XDG_DATA_HOME/vim
+set runtimepath+=$XDG_CONFIG_HOME/vim/after
+
+set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim
+set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after
+
+let g:netrw_home = $XDG_DATA_HOME."/vim"
+call mkdir($XDG_DATA_HOME."/vim/spell", 'p')
+
+set backupdir=$XDG_STATE_HOME/vim/backup | call mkdir(&backupdir, 'p')
+set directory=$XDG_STATE_HOME/vim/swap | call mkdir(&directory, 'p')
+set undodir=$XDG_STATE_HOME/vim/undo | call mkdir(&undodir, 'p')
+set viewdir=$XDG_STATE_HOME/vim/view | call mkdir(&viewdir, 'p')
+
+" vimplugs {{{
+call plug#begin('~/.config/vim/plugged')
+" colorschemes {{{
+Plug 'tomasiser/vim-code-dark' " codedark color scheme
+Plug 'flazz/vim-colorschemes' " meta-color scheme package
+Plug 'tomasiser/vim-code-dark' " codedark color scheme
+Plug 'flazz/vim-colorschemes' " meta-color scheme package
+Plug 'ZachIndigo/vim-preglow' " my old color scheme
+" }}}
+" language support {{{
+Plug 'axvr/org.vim' " basic org markup language implementation
+Plug 'ziglang/zig.vim' " zig programming language
+Plug 'jdonaldson/vaxe' " haxe programming language
+Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' } " latex live preview support
+Plug 'waycrate/swhkd-vim' " swhkd syntax highlighting
+Plug 'HiPhish/guile.vim' " guile syntax highlighting
+" }}}
+" utility {{{
+Plug 'preservim/nerdtree' " directory tree interface
+Plug 'Xuyuanp/nerdtree-git-plugin' " git status indicator for nerdtree
+Plug 'PhilRunninger/nerdtree-visual-selection' " allows visual selection mode in nerdtree
+Plug 'tpope/vim-fugitive' " git command interface
+Plug 'junegunn/goyo.vim' " simplify the user interface (distraction-free) [BROKEN]
+Plug 'junegunn/limelight.vim' " focus on single paragraph of text at a time
+Plug 'vim-airline/vim-airline' " powerline the vim bottom bar
+Plug 'nathanaelkane/vim-indent-guides' " indent guides for vim
+Plug 'mhinz/vim-signify' " use signs to show diffs
+Plug 'tpope/vim-endwise' " auto end functions/if statements
+Plug 'tpope/vim-surround' " auto close stuff
+Plug 'mattn/emmet-vim' " html css easy formating
+Plug 'godlygeek/tabular' " Needed for vim-markdown
+Plug 'plasticboy/vim-markdown' " Better markdown support
+Plug 'ryanoasis/vim-devicons' " dev icons for nerdtree
+" }}}
+call plug#end()
+
+" }}}
+" vim options {{{
+
+"" vimrc:
+"" General
+
+set showmatch " Highlight matching brace
+
+set number
+set relativenumber
+
+colorscheme Dark2
+
+set hlsearch " Highlight all search results
+set smartcase " Enable smart-case search
+set incsearch " Searches for strings incrementally
+
+set expandtab " Use spaces instead of tabs
+set shiftwidth=2 " Number of auto-indent spaces
+set smartindent " Enable smart-indent
+set smarttab " Enable smart-tabs
+set softtabstop=2 " Number of spaces per Tab
+
+"" Advanced
+set ruler " Show row and column ruler information
+set undolevels=1000 " Number of undo levels
+set backspace=indent,eol,start " Backspace behaviour
+filetype plugin indent on
+
+"hi Normal guibg=NONE ctermbg=NONE
+"hi NonText guibg=NONE ctermbg=NONE
+"set background=dark
+
+set foldmethod=marker
+
+set conceallevel=2
+
+" set leader key
+
+let mapleader="'"
+
+" emmet {{{
+let g:user_emmet_leader_key='<C-a>'
+" }}}
+
+" zig config {{{
+let g:zig_fmt_autosave = 1
+" }}}
+
+" latex live preview {{{
+let g:livepreview_previewer = 'zathura'
+let g:livepreview_use_biber = 1
+let g:livepreview_cursorhold_recompile = 0
+" }}}
+
+" vim-markdown {{{
+let g:vim_markdown_folding_disabled = 1
+let g:vim_markdown_folding_level = 3
+let g:vim_markdown_toc_autofit = 1
+let g:vim_markdown_emphasis_multiline = 0
+let g:tex_conceal = ""
+let g:vim_markdown_math = 1
+let g:vim_markdown_conceal_code_blocks = 1
+let g:vim_markdown_fenced_languages = ['c++=cpp', 'viml=vim', 'bash=sh', 'ini=dosini']
+let g:vim_markdown_follow_anchor = 1
+let g:vim_markdown_math = 1
+let g:vim_markdown_frontmatter = 1
+let g:vim_markdown_toml_frontmatter = 1
+let g:vim_markdown_strikethrough = 1
+let g:vim_markdown_no_extensions_in_markdown = 1
+let g:vim_markdown_autowrite = 1
+let g:vim_markdown_auto_insert_bullets = 0
+let g:vim_markdown_new_list_item_indent = 0
+let g:vim_markdown_edit_url_in = 'tab'
+" }}}
+
+" NERDTree config {{{
+let g:NERDTreeGitStatusUseNerdFonts = 1 " use nerd fonts
+let g:NERDTreeGitStatusShowClean = 1 " default: 0
+let g:NERDTreeDirArrowExpandable = '>'
+let g:NERDTreeDirArrowCollapsible = '<'
+let g:NERDTreeMapToggleHidden = 'z'
+" }}}
+
+" Goyo config {{{
+let g:goyo_width = '90%'
+let g:goyo_height = '100%'
+" }}}
+
+" limelight config {{{
+let g:limelight_conceal_ctermfg = 'gray'
+let g:limelight_conceal_guifg = 'gray'
+" }}}
+
+" devicon config {{{
+let g:airline_powerline_fonts = 1
+let g:webdevicons_enable_nerdtree = 1
+" }}}
+
+" vim-indent-guides config {{{
+let g:indent_guides_enable_on_vim_startup = 0
+" }}}
+
+" vim-signify config {{{
+set updatetime=100
+" }}}
+
+" }}}
+" Functions {{{
+" Goyo functions {{{
+function! s:goyo_enter()
+ if executable('tmux') && strlen($TMUX)
+ silent !tmux set status off
+ silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z
+ endif
+ set noshowmode
+ set noshowcmd
+ set scrolloff=999
+ Limelight
+ NERDTreeClose
+endfunction
+function! s:goyo_leave()
+ if executable('tmux') && strlen('$TMUX')
+ silent !tmux set status on
+ silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z
+ endif
+ set showmode
+ set showcmd
+ set scrolloff=5
+ Limelight!
+ NERDTree
+endfunction
+" }}}
+" }}}
+" Autocommands {{{
+" Goyo autocommands {{{
+autocmd! User GoyoEnter nested call <SID>goyo_enter()
+autocmd! User GoyoLeave nested call <SID>goyo_leave()
+" }}}
+" NERDTree autocmds {{{
+autocmd StdinReadPre * let s:std_in=1
+autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | wincmd p | endif
+autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') |
+ \ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif
+autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
+autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
+"autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
+ "\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer;.buf | endif
+autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
+" }}}
+" custom augroup {{{
+augroup custom
+ autocmd!
+ "au BufEnter *.tex :LLPStartPreview
+ au BufEnter *.md :set textwidth=80
+ au BufEnter *.ms :set textwidth=80
+ "au BufEnter *.c :colo DevC++
+ "au BufEnter *.h :colo DevC++
+ "au BufEnter *.cc :colo DevC++
+ "au BufEnter *.hh :colo DevC++
+ "au BufEnter *.cpp :colo DevC++
+ "au BufEnter *.hpp :colo DevC++
+ au BufWritePost init.vim :source %
+ "au BufWritePost *.tex :make
+ au BufWritePost *sxhkdrc* :!pkill -USR1 -x sxhkd
+ au BufWritePost .Xresources :!xrdb ~/.Xresources
+ au BufWritePost .gitignore :!git add .gitignore
+augroup end
+" }}}
+" }}}
+" keybindings {{{
+
+" direction keys
+
+inoremap <Down> <C-o>gj
+inoremap <Up> <C-o>gk
+inoremap <Home> <C-o>g<Home>
+inoremap <End> <C-o>g<End>
+vnoremap <Down> <C-o>gj
+vnoremap <Up> <C-o>gk
+vnoremap <Home> <C-o>g<Home>
+vnoremap <End> <C-o>g<End>
+nnoremap <Down> gj
+nnoremap <Up> gk
+
+" clear search highlights
+nnoremap <leader>/ :noh<CR>
+
+" toggles
+nnoremap <leader>tn :set number!<CR>
+nnoremap <leader>tr :set relativenumber!<CR>
+nnoremap <leader>tt :NERDTreeToggle<CR>
+
+" tabs
+nnoremap <leader>th :tabprevious<CR>
+nnoremap <leader>tl :tabnext<CR>
+nnoremap <leader>tk :tabnew<CR>
+nnoremap <leader>tj :tabclose<CR>
+
+" splits
+nnoremap <leader>wh :vertical resize -1<CR>
+nnoremap <leader>wj :resize -1<CR>
+nnoremap <leader>wk :resize +1<CR>
+nnoremap <leader>wl :vertical resize +1<CR>
+
+" config
+nnoremap <leader>en :e ~/.config/vim/vimrc<CR>
+nnoremap <leader>ec :source %<CR>
+
+" write as root
+nnoremap ZW :w !pkexec tee % >/dev/null
+
+" Goyo
+nnoremap <leader>G :Goyo<CR>
+
+" windows
+nnoremap <C-h> <C-w>h
+nnoremap <C-j> <C-w>j
+nnoremap <C-k> <C-w>k
+nnoremap <C-l> <C-w>l
+vnoremap <C-h> <C-w>h
+vnoremap <C-j> <C-w>j
+vnoremap <C-k> <C-w>k
+vnoremap <C-l> <C-w>l
+
+" files
+" these may go away soon
+nnoremap <leader>xx :q<CR>
+nnoremap <leader>x! :q!<CR>
+" these are the new standard
+nnoremap <leader>qq :q<CR>
+nnoremap <leader>q! :q!<CR>
+nnoremap <leader>wq :wq<CR>
+nnoremap <leader>ww :w<CR>
+nnoremap <leader>ee :e
+
+" escape for term windows
+tnoremap <Esc> <C-\><C-n>
+
+" vim-plug
+nnoremap <leader>pi :PlugInstall<CR>
+nnoremap <leader>pu :PlugUpdate<CR>
+nnoremap <leader>pU :PlugUpgrade<CR>
+nnoremap <leader>pc :PlugClean<CR>
+
+" fugitive
+nnoremap <leader>gp :G pull<CR>
+nnoremap <leader>gd :G diff %<CR>
+
+" }}
diff --git a/xdg-desktop-portal/portals.conf b/xdg-desktop-portal/portals.conf
new file mode 100644
index 0000000..b1a274e
--- /dev/null
+++ b/xdg-desktop-portal/portals.conf
@@ -0,0 +1,4 @@
+[preferred]
+default=hyprland
+org.freedesktop.impl.portal.FileChooser=gtk
+org.freedesktop.impl.portal.Settings=darkman
diff --git a/yay/config.json b/yay/config.json
index 21bab87..61f2d02 100644
--- a/yay/config.json
+++ b/yay/config.json
@@ -1,7 +1,7 @@
{
"aururl": "https://aur.archlinux.org",
- "buildDir": "$HOME/.cache/yay",
- "absdir": "$HOME/.cache/yay/abs",
+ "aurrpcurl": "https://aur.archlinux.org/rpc?",
+ "buildDir": "/home/zachir/.cache/yay",
"editor": "nvim",
"editorflags": "",
"makepkgbin": "makepkg",
@@ -9,9 +9,8 @@
"pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf",
"redownload": "no",
- "rebuild": "no",
- "answerclean": "",
- "answerdiff": "",
+ "answerclean": "All",
+ "answerdiff": "All",
"answeredit": "",
"answerupgrade": "",
"gitbin": "git",
@@ -21,23 +20,31 @@
"sortby": "votes",
"searchby": "name-desc",
"gitflags": "",
- "removemake": "ask",
+ "removemake": "yes",
"sudobin": "doas",
"sudoflags": "",
+ "version": "12.4.2",
"requestsplitn": 150,
- "sortmode": 0,
"completionrefreshtime": 7,
+ "maxconcurrentdownloads": 1,
+ "bottomup": true,
"sudoloop": false,
"timeupdate": false,
"devel": false,
- "cleanAfter": false,
+ "cleanAfter": true,
+ "keepSrc": false,
"provides": true,
"pgpfetch": true,
- "upgrademenu": true,
"cleanmenu": true,
"diffmenu": true,
- "editmenu": true,
+ "editmenu": false,
"combinedupgrade": false,
"useask": false,
- "batchinstall": false
+ "batchinstall": false,
+ "singlelineresults": false,
+ "separatesources": true,
+ "debug": false,
+ "rpc": true,
+ "doubleconfirm": true,
+ "rebuild": "no"
}
diff --git a/zsh/.zlogout b/zsh/.zlogout
deleted file mode 100644
index 33666be..0000000
--- a/zsh/.zlogout
+++ /dev/null
@@ -1 +0,0 @@
-rm -rf /tmp/xorg-awake
diff --git a/zsh/.zprofile b/zsh/.zprofile
deleted file mode 100644
index 1eae5e7..0000000
--- a/zsh/.zprofile
+++ /dev/null
@@ -1,6 +0,0 @@
-#export GDK_DPI_SCALE=0.7
-
-#gnome_schema=org.gnome.desktop.interface
-#
-#gsettings set $gnome_schema gtk-theme 'Plata-Noir-Compact'
-#gsettings set $gnome_schema icon-theme 'Papirus-Dark'
diff --git a/zsh/.zshenv b/zsh/.zshenv
index 5278ada..3719ef4 100644
--- a/zsh/.zshenv
+++ b/zsh/.zshenv
@@ -1,5 +1,7 @@
+# ZSH SPECIFIC CONFIGS
unset HISTFILE
-
-unset HISTFILE
-export ZDOTDIR=$HOME/.config/zsh
-#export HISTFILE="$XDG_DATA_HOME"/zsh/history
+export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
+export skip_global_compinit=1
+fpath=($XDG_CONFIG_HOME/functions $fpath)
+[ -f /etc/profile ] && . /etc/profile
+[ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile"
diff --git a/zsh/.zshrc b/zsh/.zshrc
index 70b5fef..d284d1d 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -1,4 +1,6 @@
-HISTFILE="$ZDOTDIR"/hist
+#zmodload zsh/zprof
+[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config"
+HISTFILE="$XDG_CONFIG_HOME/zsh/hist"
SAVEHIST=1000
HISTSIZE=1000
setopt APPEND_HISTORY
@@ -8,6 +10,8 @@ setopt HIST_VERIFY
setopt HIST_IGNORE_DUPS
setopt INC_APPEND_HISTORY
setopt HIST_REDUCE_BLANKS
+setopt COMPLETE_ALIASES
+setopt AUTO_CD
_SH="zsh"
@@ -15,88 +19,110 @@ fpath=("$XDG_CONFIG_HOME"/zsh/functions(:A) $fpath)
autoload -Uz anonsh
if [ -f "$XDG_CONFIG_HOME"/sh/aliases ]; then
- source "$XDG_CONFIG_HOME"/sh/aliases
+ source "$XDG_CONFIG_HOME"/sh/aliases
fi
if [ -f "$XDG_CONFIG_HOME"/sh/functions ]; then
- source "$XDG_CONFIG_HOME"/sh/functions
+ source "$XDG_CONFIG_HOME"/sh/functions
fi
-if [ -n "$ZDOTDIR"/.zshrc -a -f "$ZDOTDIR"/.zshrc ]; then
- alias e='source "$ZDOTDIR"/.zshrc'
+if [ -f "$XDG_CONFIG_HOME/zsh/zshrc" ]; then
+ alias e='source "$XDG_CONFIG_HOME/zsh/zshrc"'
+elif [ -f "$XDG_CONFIG_HOME/zshrc" ]; then
+ alias e='source "$XDG_CONFIG_HOME/zshrc"'
elif [ -f "$HOME"/.zshrc ]; then
alias e='source ~/.zshrc'
fi
-bindkey "^?" backward-delete-char
+source ~/.config/zsh/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE}
+
+#autoload zkbd; zkbd
+bindkey -v
+bindkey "${key[Backspace]}" backward-delete-char
+bindkey "${key[Delete]}" delete-char
+bindkey "${key[Home]}" beginning-of-line
+bindkey "${key[End]}" end-of-line
+bindkey "${key[PageUp]}" history-substring-search-up
+bindkey "${key[PageDown]}" history-substring-search-down
+
+if (env | grep -Fq 'DISTROBOX'); then
+ MYPROMPT=$'%F{000}%K{004}[%n@%m]%F{013}\UE0B2%K{013}%F{000}%~%F{013}%K{004}\UE0B0%F{000}%#%F{004}%k\UE0B0%f '
+else
+ MYPROMPT=$'%F{000}%K{002}[%n@%m]%F{006}\UE0B2%K{006}%F{000}%~%F{006}%K{002}\UE0B0%F{000}%#%F{002}%k\UE0B0%f '
+fi
+function zle-line-init zle-keymap-select {
+ VIM_PROMPT=$'%F{000}%K{012}[%n@%m]%F{006}\UE0B2%K{006}%F{000}%~%F{006}%K{012}\UE0B0%F{000}%#%F{012}%k\UE0B0%f '
+ PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}"
+ zle reset-prompt
+}
-# bindkey -v
+zle -N zle-line-init
+zle -N zle-keymap-select
+export KEYTIMEOUT=1
-if [ "$TERM" = "st-256color" ] || [ "$TERM" = "xterm-256color" ]; then
- function zle-line-init () { echoti smkx }
- function zle-line-finish () { echoti rmkx }
+fpath+="$XDG_CONFIG_HOME/zsh/functions"
- zle -N zle-line-init
- zle -N zle-line-finish
-fi
+autoload -Uz anonsh
-unset COLOR1
-ZSHTHEMERC="${ZDOTDIR:-$HOME}/.zsh_theme"
-[ -f "$ZSHTHEMERC" ] && . "$ZSHTHEMERC"
-
-if [ -z "$COLOR1" ]; then
- case "$(whoami)" in
- zachir) COLOR1="014" ;;
- git) COLOR1="013" ;;
- subsonic) COLOR1="012" ;;
- *) COLOR1="015" ;;
- esac
+autoload -Uz compinit
+if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
+ compinit
+else
+ compinit -C
fi
-MYPROMPT='%B%S%F{'"$COLOR1"'}[%n@%m]:%f%s%F{015}%~%f%S%F{'"$COLOR1"'}%#%f%s%b '
-function zle-line-init zle-keymap-select {
- VIM_PROMPT="%B%F{012}[%n@%m]:%f%F{015}%~%f%F{012}%#%f%b "
- PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}"
- #PS1="$PROMPT $KEYMAP"
- zle reset-prompt
-}
+zshcache_time="$(date +%s%N)"
-unset COLOR1
+autoload -Uz add-zsh-hook
-zle -N zle-line-init
-zle -N zle-keymap-select
-export KEYTIMEOUT=1
+rehash_precmd() {
+ if [[ -a /var/cache/zsh/pacman ]]; then
+ local paccache_time="$(date -r /var/cache/zsh/pacman +%s%N)"
+ if (( zshcache_time < paccache_time )); then
+ rehash
+ zshcache_time="$paccache_time"
+ fi
+ fi
+}
-autoload -Uz compinit promptinit
-compinit -d $CONFIG/zcompdump
-promptinit
-autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
-zle -N up-line-or-beginning-search
-zle -N down-line-or-beginning-search
+add-zsh-hook -Uz precmd rehash_precmd
-zstyle ':completion:*' menu select
-zstyle ':completion::complete:*' gain-privileges 1
-zstyle ':completion:*' rehash true
+zstyle ':completion:*' hosts off
-setopt COMPLETE_ALIASES
-setopt AUTO_CD
+### Added by Zinit's installer
+if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
+ print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
+ command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
+ command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
+ print -P "%F{33} %F{34}Installation successful.%f%b" || \
+ print -P "%F{160} The clone has failed.%f%b"
+fi
-typeset -g -A key
-
-key[Up]="${terminfo[kcuu1]}"
-key[Down]="${terminfo[kcud1]}"
-key[Left]="${terminfo[kcub1]}"
-key[Right]="${terminfo[kcuf1]}"
-key[Shift-Tab]="${terminfo[kcbt]}"
-key[Delete]="${terminfo[kdch1]}"
-
-[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search
-bindkey -- '^[[A' up-line-or-beginning-search
-bindkey -- '^[[B' down-line-or-beginning-search
-[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search
-[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char
-[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char
-[[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete
-[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char
-
-#eval "$(starship init zsh)"
-type portmaster-start 2>&1 >/dev/null && eval "$(portmaster-start --data=/opt/safing/portmaster completion zsh)"
+source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
+autoload -Uz _zinit
+(( ${+_comps} )) && _comps[zinit]=_zinit
+
+# Load a few important annexes, without Turbo
+# (this is currently required for annexes)
+zinit light-mode for \
+ zdharma-continuum/zinit-annex-as-monitor \
+ zdharma-continuum/zinit-annex-bin-gem-node \
+ zdharma-continuum/zinit-annex-patch-dl \
+ zdharma-continuum/zinit-annex-rust
+
+### End of Zinit's installer chunk
+zinit snippet OMZ::plugins/git/git.plugin.zsh
+
+zinit load 'zsh-users/zsh-history-substring-search'
+zinit ice wait atload'_history_substring_search_config'
+
+bindkey "${key[Up]}" history-substring-search-up
+bindkey "${key[Down]}" history-substring-search-down
+bindkey -M vicmd "${key[Up]}" history-substring-search-up
+bindkey -M vicmd "${key[Down]}" history-substring-search-down
+bindkey -M vicmd "k" history-substring-search-up
+bindkey -M vicmd "j" history-substring-search-down
+
+#source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+zinit light 'zsh-users/zsh-syntax-highlighting'
+zinit ice wait atload'_history_substring_search_config'
+#zprof