From 5a41da5881a11ba3fdc3890c342aa3b7eb53e0cf Mon Sep 17 00:00:00 2001 From: Mohammad Reza Karimi Date: Tue, 16 Dec 2025 13:27:11 -0500 Subject: add initial version (incomplete) --- alacritty/dot-config/alacritty/alacritty.toml | 48 + bash/.stow-local-ignore | 1 + bash/README.md | 64 + bash/dot-bash_completion | 1 + bash/dot-bash_profile | 7 + bash/dot-bashrc | 69 + bash/dot-config/bash/complete_alias | 1062 +++ bash/dot-config/bash/functions.bash | 48 + bash/dot-config/bash/gentoo-color.bash | 83 + bash/dot-config/bash/vardump.bash | 215 + bash/dot-inputrc | 37 + bash/dot-profile | 44 + fonts/.stow-local-ignore | 1 + fonts/README.md | 6 + .../fontconfig/conf.d/52-default-fonts.conf | 36 + .../fontconfig/conf.d/53-font-features.conf | 18 + fonts/dot-config/fontconfig/conf.d/66-emoji.conf | 46 + .../dot-config/fontconfig/conf.d/66-vazirmatn.conf | 20 + .../fonts/IosevkaInput/IosevkaInput-Heavy.ttf | Bin 0 -> 7254864 bytes .../IosevkaInput/IosevkaInput-HeavyOblique.ttf | Bin 0 -> 7538712 bytes .../share/fonts/IosevkaInput/IosevkaInput-W360.ttf | Bin 0 -> 7239104 bytes .../IosevkaInput/IosevkaInput-W360Oblique.ttf | Bin 0 -> 7478388 bytes .../IosevkaInput/IosevkaInput-build-plans.toml | 208 + .../share/fonts/comic-code/ComicCode-Bold.otf | Bin 0 -> 92264 bytes .../fonts/comic-code/ComicCode-BoldItalic.otf | Bin 0 -> 92432 bytes .../share/fonts/comic-code/ComicCode-Italic.otf | Bin 0 -> 95352 bytes .../share/fonts/comic-code/ComicCode-Medium.otf | Bin 0 -> 94304 bytes .../fonts/comic-code/ComicCode-MediumItalic.otf | Bin 0 -> 95472 bytes .../share/fonts/comic-code/ComicCode-Regular.otf | Bin 0 -> 93228 bytes .../fonts/comic-code/ComicCodeLigatures-Bold.otf | Bin 0 -> 92480 bytes .../comic-code/ComicCodeLigatures-BoldItalic.otf | Bin 0 -> 92652 bytes .../fonts/comic-code/ComicCodeLigatures-Italic.otf | Bin 0 -> 95584 bytes .../fonts/comic-code/ComicCodeLigatures-Medium.otf | Bin 0 -> 94520 bytes .../comic-code/ComicCodeLigatures-MediumItalic.otf | Bin 0 -> 95720 bytes .../comic-code/ComicCodeLigatures-Regular.otf | Bin 0 -> 93468 bytes .../share/fonts/sf-pro/SF-Pro-Display-Black.otf | Bin 0 -> 319584 bytes .../fonts/sf-pro/SF-Pro-Display-BlackItalic.otf | Bin 0 -> 146416 bytes .../share/fonts/sf-pro/SF-Pro-Display-Bold.otf | Bin 0 -> 334728 bytes .../fonts/sf-pro/SF-Pro-Display-BoldItalic.otf | Bin 0 -> 159668 bytes .../share/fonts/sf-pro/SF-Pro-Display-Heavy.otf | Bin 0 -> 335840 bytes .../fonts/sf-pro/SF-Pro-Display-HeavyItalic.otf | Bin 0 -> 159628 bytes .../share/fonts/sf-pro/SF-Pro-Display-Light.otf | Bin 0 -> 318908 bytes .../fonts/sf-pro/SF-Pro-Display-LightItalic.otf | Bin 0 -> 158892 bytes .../share/fonts/sf-pro/SF-Pro-Display-Medium.otf | Bin 0 -> 335512 bytes .../fonts/sf-pro/SF-Pro-Display-MediumItalic.otf | Bin 0 -> 160004 bytes .../share/fonts/sf-pro/SF-Pro-Display-Regular.otf | Bin 0 -> 298944 bytes .../fonts/sf-pro/SF-Pro-Display-RegularItalic.otf | Bin 0 -> 148740 bytes .../share/fonts/sf-pro/SF-Pro-Display-Semibold.otf | Bin 0 -> 335964 bytes .../fonts/sf-pro/SF-Pro-Display-SemiboldItalic.otf | Bin 0 -> 159876 bytes .../share/fonts/sf-pro/SF-Pro-Display-Thin.otf | Bin 0 -> 317736 bytes .../fonts/sf-pro/SF-Pro-Display-ThinItalic.otf | Bin 0 -> 157916 bytes .../fonts/sf-pro/SF-Pro-Display-Ultralight.otf | Bin 0 -> 316624 bytes .../sf-pro/SF-Pro-Display-UltralightItalic.otf | Bin 0 -> 156760 bytes .../share/fonts/sf-pro/SF-Pro-Text-Bold.otf | Bin 0 -> 341844 bytes .../share/fonts/sf-pro/SF-Pro-Text-BoldItalic.otf | Bin 0 -> 178788 bytes .../share/fonts/sf-pro/SF-Pro-Text-Heavy.otf | Bin 0 -> 341828 bytes .../share/fonts/sf-pro/SF-Pro-Text-HeavyItalic.otf | Bin 0 -> 178644 bytes .../share/fonts/sf-pro/SF-Pro-Text-Light.otf | Bin 0 -> 329540 bytes .../share/fonts/sf-pro/SF-Pro-Text-LightItalic.otf | Bin 0 -> 178060 bytes .../share/fonts/sf-pro/SF-Pro-Text-Medium.otf | Bin 0 -> 342732 bytes .../fonts/sf-pro/SF-Pro-Text-MediumItalic.otf | Bin 0 -> 180124 bytes .../share/fonts/sf-pro/SF-Pro-Text-Regular.otf | Bin 0 -> 310148 bytes .../fonts/sf-pro/SF-Pro-Text-RegularItalic.otf | Bin 0 -> 168992 bytes .../share/fonts/sf-pro/SF-Pro-Text-Semibold.otf | Bin 0 -> 342656 bytes .../fonts/sf-pro/SF-Pro-Text-SemiboldItalic.otf | Bin 0 -> 179760 bytes git/dot-config/git/config | 17 + gpg-setup.bash | 8 + gpg/.stow-local-ignore | 1 + gpg/dot-config/pam-gnupg | 2 + gpg/dot-gnupg/gpg-agent.conf | 6 + gpg/pambase_system-login.diff | 15 + hyprland/dot-config/hypr/hypridle.conf | 27 + hyprland/dot-config/hypr/hyprland.conf | 202 + hyprland/dot-config/hypr/hyprlock.conf | 76 + .../systemd/user/hypridle.service.d/override.conf | 2 + .../user/hyprpolkitagent.service.d/override.conf | 3 + .../override.conf | 2 + hyprland/dot-config/uwsm/env | 17 + hyprland/dot-config/uwsm/env-hyprland | 3 + .../Kvantum/KvLibadwaita/KvLibadwaita.kvconfig | 570 ++ .../Kvantum/KvLibadwaita/KvLibadwaita.svg | 6628 +++++++++++++++++++ .../Kvantum/KvLibadwaita/KvLibadwaitaDark.kvconfig | 568 ++ .../Kvantum/KvLibadwaita/KvLibadwaitaDark.svg | 6804 ++++++++++++++++++++ kvantum/dot-config/Kvantum/kvantum.kvconfig | 2 + lf/dot-config/lf/icons | 77 + lf/dot-config/lf/lfrc | 84 + qute/dot-config/qutebrowser/config.py | 67 + stow-all.bash | 53 + wayland-basics/dot-config/kanshi/config | 21 + wayland-basics/dot-config/kanshi/reload.sh | 6 + wayland-basics/dot-config/mako/config | 38 + wayland-basics/dot-config/mimeapps.list | 53 + wayland-basics/dot-config/mpv/mpv.conf | 1 + .../dot-config/systemd/user/kanshi.service | 15 + .../dot-config/systemd/user/swaybg.service | 15 + .../dot-config/systemd/user/swayosd-server.service | 14 + .../systemd/user/wl-clip-persist.service | 14 + wayland-basics/dot-config/zathura/zathurarc | 22 + .../dot-local/share/applications/browser.desktop | 1 + .../dot-local/share/applications/file.desktop | 4 + .../dot-local/share/applications/img.desktop | 1 + .../dot-local/share/applications/imv.desktop | 7 + .../dot-local/share/applications/mail.desktop | 4 + .../dot-local/share/applications/mimeinfo.cache | 28 + .../dot-local/share/applications/mpv.desktop | 10 + .../dot-local/share/applications/nvim.desktop | 12 + .../dot-local/share/applications/pdf.desktop | 4 + .../dot-local/share/applications/text.desktop | 1 + .../dot-local/share/applications/video.desktop | 1 + 109 files changed, 17520 insertions(+) create mode 100644 alacritty/dot-config/alacritty/alacritty.toml create mode 100644 bash/.stow-local-ignore create mode 100644 bash/README.md create mode 100644 bash/dot-bash_completion create mode 100644 bash/dot-bash_profile create mode 100644 bash/dot-bashrc create mode 100644 bash/dot-config/bash/complete_alias create mode 100644 bash/dot-config/bash/functions.bash create mode 100644 bash/dot-config/bash/gentoo-color.bash create mode 100644 bash/dot-config/bash/vardump.bash create mode 100644 bash/dot-inputrc create mode 100644 bash/dot-profile create mode 100644 fonts/.stow-local-ignore create mode 100644 fonts/README.md create mode 100644 fonts/dot-config/fontconfig/conf.d/52-default-fonts.conf create mode 100644 fonts/dot-config/fontconfig/conf.d/53-font-features.conf create mode 100644 fonts/dot-config/fontconfig/conf.d/66-emoji.conf create mode 100644 fonts/dot-config/fontconfig/conf.d/66-vazirmatn.conf create mode 100644 fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-Heavy.ttf create mode 100644 fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-HeavyOblique.ttf create mode 100644 fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-W360.ttf create mode 100644 fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-W360Oblique.ttf create mode 100644 fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-build-plans.toml create mode 100644 fonts/dot-local/share/fonts/comic-code/ComicCode-Bold.otf create mode 100644 fonts/dot-local/share/fonts/comic-code/ComicCode-BoldItalic.otf create mode 100644 fonts/dot-local/share/fonts/comic-code/ComicCode-Italic.otf create mode 100644 fonts/dot-local/share/fonts/comic-code/ComicCode-Medium.otf create mode 100644 fonts/dot-local/share/fonts/comic-code/ComicCode-MediumItalic.otf create mode 100644 fonts/dot-local/share/fonts/comic-code/ComicCode-Regular.otf create mode 100644 fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Bold.otf create mode 100644 fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-BoldItalic.otf create mode 100644 fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Italic.otf create mode 100644 fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Medium.otf create mode 100644 fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-MediumItalic.otf create mode 100644 fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Regular.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Black.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-BlackItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Bold.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-BoldItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Heavy.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-HeavyItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Light.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-LightItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Medium.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-MediumItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Regular.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-RegularItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Semibold.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-SemiboldItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Thin.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-ThinItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Ultralight.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-UltralightItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Bold.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-BoldItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Heavy.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-HeavyItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Light.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-LightItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Medium.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-MediumItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Regular.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-RegularItalic.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Semibold.otf create mode 100644 fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-SemiboldItalic.otf create mode 100644 git/dot-config/git/config create mode 100755 gpg-setup.bash create mode 100644 gpg/.stow-local-ignore create mode 100644 gpg/dot-config/pam-gnupg create mode 100644 gpg/dot-gnupg/gpg-agent.conf create mode 100644 gpg/pambase_system-login.diff create mode 100644 hyprland/dot-config/hypr/hypridle.conf create mode 100644 hyprland/dot-config/hypr/hyprland.conf create mode 100644 hyprland/dot-config/hypr/hyprlock.conf create mode 100644 hyprland/dot-config/systemd/user/hypridle.service.d/override.conf create mode 100644 hyprland/dot-config/systemd/user/hyprpolkitagent.service.d/override.conf create mode 100644 hyprland/dot-config/systemd/user/xdg-desktop-portal-hyprland.service.d/override.conf create mode 100644 hyprland/dot-config/uwsm/env create mode 100644 hyprland/dot-config/uwsm/env-hyprland create mode 100644 kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaita.kvconfig create mode 100644 kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaita.svg create mode 100644 kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaitaDark.kvconfig create mode 100644 kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaitaDark.svg create mode 100644 kvantum/dot-config/Kvantum/kvantum.kvconfig create mode 100644 lf/dot-config/lf/icons create mode 100644 lf/dot-config/lf/lfrc create mode 100644 qute/dot-config/qutebrowser/config.py create mode 100755 stow-all.bash create mode 100644 wayland-basics/dot-config/kanshi/config create mode 100755 wayland-basics/dot-config/kanshi/reload.sh create mode 100644 wayland-basics/dot-config/mako/config create mode 100644 wayland-basics/dot-config/mimeapps.list create mode 100644 wayland-basics/dot-config/mpv/mpv.conf create mode 100644 wayland-basics/dot-config/systemd/user/kanshi.service create mode 100644 wayland-basics/dot-config/systemd/user/swaybg.service create mode 100644 wayland-basics/dot-config/systemd/user/swayosd-server.service create mode 100644 wayland-basics/dot-config/systemd/user/wl-clip-persist.service create mode 100644 wayland-basics/dot-config/zathura/zathurarc create mode 120000 wayland-basics/dot-local/share/applications/browser.desktop create mode 100755 wayland-basics/dot-local/share/applications/file.desktop create mode 120000 wayland-basics/dot-local/share/applications/img.desktop create mode 100755 wayland-basics/dot-local/share/applications/imv.desktop create mode 100755 wayland-basics/dot-local/share/applications/mail.desktop create mode 100644 wayland-basics/dot-local/share/applications/mimeinfo.cache create mode 100755 wayland-basics/dot-local/share/applications/mpv.desktop create mode 100755 wayland-basics/dot-local/share/applications/nvim.desktop create mode 100755 wayland-basics/dot-local/share/applications/pdf.desktop create mode 120000 wayland-basics/dot-local/share/applications/text.desktop create mode 120000 wayland-basics/dot-local/share/applications/video.desktop diff --git a/alacritty/dot-config/alacritty/alacritty.toml b/alacritty/dot-config/alacritty/alacritty.toml new file mode 100644 index 0000000..6e906f5 --- /dev/null +++ b/alacritty/dot-config/alacritty/alacritty.toml @@ -0,0 +1,48 @@ +[general] +live_config_reload = true + +[window] +opacity = 0.95 +padding = { x = 3, y = 3 } +dynamic_title = true + +[font] +normal = { family = "Comic Code" } +# normal = { family = "IosevkaInput" } +# italic = { family = "IosevkaInput", style = "W360 Oblique" } +size = 11 + +[scrolling] +history = 5000 +multiplier = 3 + +[selection] +save_to_clipboard = false + +[cursor] +unfocused_hollow = true + +[mouse] +hide_when_typing = true + +[keyboard] +bindings = [ + { key = "C", mods = "Alt", mode = "~Vi", action = "Copy" }, + { key = "V", mods = "Alt", mode = "~Vi", action = "Paste" }, + { key = "J", mods = "Alt|Shift", mode = "~Vi", action = "DecreaseFontSize" }, + { key = "K", mods = "Alt|Shift", mode = "~Vi", action = "IncreaseFontSize" }, + { key = "J", mods = "Alt", mode = "~Vi", action = "ScrollLineDown" }, + { key = "K", mods = "Alt", mode = "~Vi", action = "ScrollLineUp" }, + { key = "F11", action = "ToggleFullscreen" }, + { key = "F5", command = { program = "alacritty", args = [ + "msg", + "config", + "font.size=25", + ] } }, + { key = "F5", mods = "Shift", command = { program = "alacritty", args = [ + "msg", + "config", + "--reset", + ] } }, + { key = "N", mods = "Control|Shift", mode = "~Vi", action = "CreateNewWindow" }, +] diff --git a/bash/.stow-local-ignore b/bash/.stow-local-ignore new file mode 100644 index 0000000..b43bf86 --- /dev/null +++ b/bash/.stow-local-ignore @@ -0,0 +1 @@ +README.md diff --git a/bash/README.md b/bash/README.md new file mode 100644 index 0000000..7262dbf --- /dev/null +++ b/bash/README.md @@ -0,0 +1,64 @@ +# Notes for using bash as root + +You can copy the gentoo color script to the root user: + +```sh +sudo cp ~/dotfiles/bash/dot-config/bash/gentoo-color.bash /root/.gentoo-color.bash +sudo cp /etc/skel/.bash_profile /root/ +``` + +and set its `bashrc` as follows: + +```bash +# +# /root/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +source "$HOME"/.gentoo-color.bash + +ls() +{ + if ((gentoo_color > 0)); then + command ls --color=auto "$@" + else + command ls "$@" + fi +} + +# coreutils +alias cp='cp -riv' +alias la='ls -la' +alias ll='ls -lah' +alias l='ls -l' +alias ls='ls -p -hN --group-directories-first' +alias mkdir='mkdir -pv' +alias mv='mv -iv' +alias rm='rm -iv' +alias ..='echo "cd .."; cd ..' +alias ...='echo "cd ../.."; cd ../..' + +alias SS='systemctl' +alias p='pacman' +alias v='nvim' + +lf() +{ + export LF_CD_FILE=/tmp/.lfcd-root-$$ + command lf "$@" + if [ -s "$LF_CD_FILE" ]; then + local DIR + DIR="$(realpath "$(cat "$LF_CD_FILE")")" + if [ "$DIR" != "$PWD" ]; then + echo "cd to $DIR" + cd "$DIR" || exit + fi + command rm "$LF_CD_FILE" + fi + unset LF_CD_FILE +} + +bind '"\C-o":"\C-ulf\C-m"' +``` diff --git a/bash/dot-bash_completion b/bash/dot-bash_completion new file mode 100644 index 0000000..7637c12 --- /dev/null +++ b/bash/dot-bash_completion @@ -0,0 +1 @@ +. $HOME/.config/bash/complete_alias diff --git a/bash/dot-bash_profile b/bash/dot-bash_profile new file mode 100644 index 0000000..f91cff9 --- /dev/null +++ b/bash/dot-bash_profile @@ -0,0 +1,7 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc + +[[ -f ~/.profile ]] && . ~/.profile diff --git a/bash/dot-bashrc b/bash/dot-bashrc new file mode 100644 index 0000000..678235f --- /dev/null +++ b/bash/dot-bashrc @@ -0,0 +1,69 @@ +# ~/.bashrc +# vim: ft=bash + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +export HISTCONTROL='ignoredups' +export HISTIGNORE='ls *':'history':'cd':'sudo -i':'yay':'lf':'cd ..':'nvim':'v':'cvim' +export HISTFILESIZE=100000 +export HISTSIZE=10000 + +shopt -s autocd +shopt -s checkwinsize + +source "${XDG_CONFIG_HOME:-$HOME/.config}"/bash/gentoo-color.bash + +ls() +{ + if ((gentoo_color > 0)); then + command ls --color=auto "$@" + else + command ls "$@" + fi +} + +# coreutils +alias cp='cp -riv' +alias la='ls -la' +alias ll='ls -lah' +alias l='ls -l' +alias ls='ls -p -hN --group-directories-first' +alias mkdir='mkdir -pv' +alias mv='mv -iv' +alias rm='rm -iv' +alias ..='echo "cd .."; cd ..' +alias ...='echo "cd ../.."; cd ../..' + +# program aliases +alias m='neomutt' +alias p='sudo pacman' +alias SS='sudo systemctl' +alias Su='systemctl --user' +alias v='nvim' +alias z='setsid runapp -- zathura' + +# source: https://wiki.archlinux.org/title/GnuPG#Configure_pinentry_to_use_the_correct_TTY +GPG_TTY="$(tty)" +export GPG_TTY +gpg-connect-agent updatestartuptty /bye >/dev/null + +# cp and mv but with rsync +# source: https://wiki.archlinux.org/title/Rsync#As_cp/mv_alternative +cpr() { + rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 "$@" +} + +mvr() { + rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files "$@" +} + +source "${XDG_CONFIG_HOME:-$HOME/.config}"/bash/functions.bash + +bind '"\C-o":"\C-ulf\C-m"' + +export FZF_DEFAULT_COMMAND='fd --type f --strip-cwd-prefix --hidden --follow --exclude .git' +export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" +eval "$(fzf --bash)" + +stty -ixon diff --git a/bash/dot-config/bash/complete_alias b/bash/dot-config/bash/complete_alias new file mode 100644 index 0000000..a7bf661 --- /dev/null +++ b/bash/dot-config/bash/complete_alias @@ -0,0 +1,1062 @@ +#!/bin/bash + +## :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +## automagical shell alias completion; +## :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +## ============================================================================ +## Copyright (C) 2016-2021 Cyker Way +## +## This program is free software: you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by the Free +## Software Foundation, either version 3 of the License, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +## more details. +## +## You should have received a copy of the GNU General Public License along with +## this program. If not, see . +## ============================================================================ + +## ============================================================================ +## # environment variables +## +## these are envars read by this script; users are advised to set these envars +## before sourcing this script to customize its behavior, even though some may +## still work if set after sourcing this script; these envar names must follow +## this naming convention: all letters uppercase, no leading underscore, words +## separated by one underscore; +## ============================================================================ + +## bool: true iff auto unmask alias commands; set it to false if auto unmask +## feels too slow, or custom unmask is necessary to make an unusual behavior; +COMPAL_AUTO_UNMASK="${COMPAL_AUTO_UNMASK:-0}" + +## ============================================================================ +## # variables +## ============================================================================ + +## register for keeping function return value; +__compal__retval= + +## refcnt for alias expansion; expand aliases iff `_refcnt == 0`; +__compal__refcnt=0 + +## an associative array of vanilla completions, keyed by command names; +## +## when we say this array stores "parsed" cspecs, we actually mean the cspecs +## have been parsed and indexed by command names in this array; cspec strings +## themselves have no difference between this array and `_raw_vanilla_cspecs`; +## +## example: +## +## _vanilla_cspecs["tee"]="complete -F _longopt tee" +## _vanilla_cspecs["type"]="complete -c type" +## _vanilla_cspecs["unalias"]="complete -a unalias" +## ... +## +declare -A __compal__vanilla_cspecs + +## a set of raw vanilla completions, keyed by cspec; these raw cspecs will be +## parsed and loaded into `_vanilla_cspecs` on use; we need this lazy loading +## because parsing all cspecs on sourcing incurs a large performance overhead; +## +## vanilla completions are alias-free and fetched before `_complete_alias` is +## set as the completion function for alias commands; the way we enforce this +## partial order is to init this array on source; the sourcing happens before +## `complete -F _complete_alias ...` for obvious reasons; +## +## this is made a set, not an array, to avoid duplication when this script is +## sourced repeatedly; each sourcing overwrites previous ones on duplication; +## +## example: +## +## _raw_vanilla_cspecs["complete -F _longopt tee"]="" +## _raw_vanilla_cspecs["complete -c type"]="" +## _raw_vanilla_cspecs["complete -a unalias"]="" +## ... +## +declare -A __compal__raw_vanilla_cspecs + +## ============================================================================ +## # functions +## ============================================================================ + +## debug bash programmable completion variables; +__compal__debug() { + echo + echo "#COMP_WORDS=${#COMP_WORDS[@]}" + echo "COMP_WORDS=(" + for x in "${COMP_WORDS[@]}"; do + echo "'$x'" + done + echo ")" + echo "COMP_CWORD=${COMP_CWORD}" + echo "COMP_LINE='${COMP_LINE}'" + echo "COMP_POINT=${COMP_POINT}" + echo +} + +## debug vanilla cspecs; +## +## $1 +## : if "key" dump keys, else dump values; +__compal__debug_vanilla_cspecs() { + if [[ "$1" == "key" ]]; then + for x in "${!__compal__vanilla_cspecs[@]}"; do + echo "$x" + done + else + for x in "${__compal__vanilla_cspecs[@]}"; do + echo "$x" + done + fi +} + +## debug raw vanilla cspecs; +__compal__debug_raw_vanilla_cspecs() { + for x in "${!__compal__raw_vanilla_cspecs[@]}"; do + echo "$x" + done +} + +## debug `_split_cmd_line`; +## +## this function is very easy to use; just call it with a string argument in an +## interactive shell and look at the result; some interesting string arguments: +## +## - (fail) `&> /dev/null ping` +## - (fail) `2> /dev/null ping` +## - (fail) `2>&1 > /dev/null ping` +## - (fail) `> /dev/null ping` +## - (work) `&>/dev/null ping` +## - (work) `2>&1 >/dev/null ping` +## - (work) `2>&1 ping` +## - (work) `2>/dev/null ping` +## - (work) `>/dev/null ping` +## - (work) `FOO=foo true && BAR=bar ping` +## - (work) `echo & echo & ping` +## - (work) `echo ; echo ; ping` +## - (work) `echo | echo | ping` +## - (work) `ping &> /dev/null` +## - (work) `ping &>/dev/null` +## - (work) `ping 2> /dev/null` +## - (work) `ping 2>&1 > /dev/null` +## - (work) `ping 2>&1 >/dev/null` +## - (work) `ping 2>&1` +## - (work) `ping 2>/dev/null` +## - (work) `ping > /dev/null` +## - (work) `ping >/dev/null` +## +## these failed examples are not an emergency because you can easily find their +## equivalents in those working ones; and we will check for emergency on failed +## examples added in the future; +## +## $1 +## : command line string; +__compal__debug_split_cmd_line() { + ## command line string; + local str="$1" + + __compal__split_cmd_line "$str" + + for x in "${__compal__retval[@]}"; do + echo "'$x'" + done +} + +## print an error message; +## +## $1 +## : error message; +__compal__error() { + printf "error: %s\n" "$1" >&2 +} + +## test whether an element is in array; +## +## $@ +## : ( elem arr[0] arr[1] ... ) +__compal__inarr() { + for e in "${@:2}"; do + [[ "$e" == "$1" ]] && return 0 + done + return 1 +} + +## get alias body from alias name; +## +## this is made a separate function so that users can override this function to +## provide alternate alias body for specific aliases; such aliases would run as +## one thing but complete as another; this could be weird and confusing so this +## is not formally documented; +## +## $1 +## : alias name; +## $? +## : alias body; +__compal__get_alias_body() { + local cmd; cmd="$1" + + local body; body="$(alias "$cmd")" + echo "${body#*=}" | command xargs +} + +## split command line into words; +## +## the `bash` reference implementation shows how bash splits command line into +## word list `COMP_WORDS`: +## +## - git repo ; +## - commit `ce23728687ce9e584333367075c9deef413553fa`; +## - function `bashline.c:attempt_shell_completion`; +## - function `bashline.c:find_cmd_end`; +## - function `bashline.c:find_cmd_start`; +## - function `pcomplete.c:command_line_to_word_list`; +## - function `pcomplete.c:programmable_completions`; +## - function `subst.c:skip_to_delim`; +## - function `subst.c:split_at_delims`; +## +## this function shall give similar result as `bash` reference implementation +## for common use cases, but will not strive for full compatibility, which is +## too complicated when written in bash; we will support additional use cases +## as they show up and prove worthy; +## +## another reason we not pursue full compatibility is, even bash itself fails +## on some use cases, such as `ping 2>&1` and `ping &>/dev/null`; ironically, +## if we define an alias and complete using `_complete_alias`, then it works: +## +## $ alias ping='ping 2>&1' +## $ complete -F _complete_alias ping +## $ ping +## {ip} +## {ip} +## {ip} +## +## backslash: a non-quoted backslash (`\`) preserves the literal value of the +## next character that follows with the exception of ``; a backslash +## enclosed in single quotes loses such special meaning; a backslash enclosed +## in double quotes retains such special meaning only when followed by one of +## the following (5) characters: +## +## $ ` " \ +## +## we do not allow `` in alias body; this simplifies our argument: a +## non-quoted backslash always preserves next character; a backslash enclosed +## in double quotes only preserves the above 4 characters (minus ``); +## +## when a command substitution is enclosed in double quotes, backslash within +## the command substitution may retain such special meaning, despite whatever +## bash manual says; compare: +## +## "`\"`" +## "$(\")" +## +## in the first form the backslash is not literal even though not followed by +## characters mentioned in section command substitution, bash manual; we will +## not handle backquote correctly in this case; as an advice, avoid backquote; +## +## warn: the output of this function is *not* a faithful split of the input; +## this function drops redirections and assignments, and only keeps the last +## command in the last pipeline; +## +## warn: this function is made for alias body expansion; as such it does not +## support commmand substitutions, etc.; if you run its output as argv, then +## you run at your own risk; quotes and escapes may also disturb the result; +## +## $1 +## : command line string; +__compal__split_cmd_line() { + ## command line string; + local str="$1" + + ## an array that will contain words after split; + local words=() + + ## alloc a temp stack to track open and close chars when splitting; + local sta=() + + ## we adopt some bool flags to handle redirections and assignments at the + ## beginning of the command line, if any; we can simply drop redirections + ## and assignments for sake of alias completion; for detail, read `SIMPLE + ## COMMAND EXPANSION` in `man bash`; + + ## bool: check (outmost) redirection or assignment; + local check_redass=1 + + ## bool: found (outmost) redirection or assignment in current word; + local found_redass=0 + + ## examine each char of `str`; test branches are ordered; this order has + ## two importances: first is to respect substring relationship (eg: `&&` + ## must be tested before `&`); second is to test in optimistic order for + ## speeding up the testing; the first importance is compulsory and takes + ## precedence; + local i=0 j=0 + for (( ; j < ${#str}; j++ )); do + if (( ${#sta[@]} == 0 )); then + if [[ "${str:j:1}" =~ [_a-zA-Z0-9] ]]; then + : + elif [[ $' \t\n' == *"${str:j:1}"* ]]; then + if (( i < j )); then + if (( $found_redass == 1 )); then + if (( $check_redass == 0 )); then + words+=( "${str:i:j-i}" ) + fi + found_redass=0 + else + ## no redass in current word; stop checking; + check_redass=0 + words+=( "${str:i:j-i}" ) + fi + fi + (( i = j + 1 )) + elif [[ ":" == *"${str:j:1}"* ]]; then + if (( i < j )); then + if (( $found_redass == 1 )); then + if (( $check_redass == 0 )); then + words+=( "${str:i:j-i}" ) + fi + found_redass=0 + else + ## no redass in current word; stop checking; + check_redass=0 + words+=( "${str:i:j-i}" ) + fi + fi + words+=( "${str:j:1}" ) + (( i = j + 1 )) + elif [[ '$(' == "${str:j:2}" ]]; then + sta+=( ')' ) + (( j++ )) + elif [[ '`' == "${str:j:1}" ]]; then + sta+=( '`' ) + elif [[ '(' == "${str:j:1}" ]]; then + sta+=( ')' ) + elif [[ '{' == "${str:j:1}" ]]; then + sta+=( '}' ) + elif [[ '"' == "${str:j:1}" ]]; then + sta+=( '"' ) + elif [[ "'" == "${str:j:1}" ]]; then + sta+=( "'" ) + elif [[ '\' == "${str:j:1}" ]]; then + (( j++ )) + elif [[ '&>' == "${str:j:2}" ]]; then + found_redass=1 + (( j++ )) + elif [[ '>&' == "${str:j:2}" ]]; then + found_redass=1 + (( j++ )) + elif [[ "><=" == *"${str:j:1}"* ]]; then + found_redass=1 + elif [[ '&&' == "${str:j:2}" ]]; then + words=() + check_redass=1 + (( i = j + 2 )) + elif [[ '||' == "${str:j:2}" ]]; then + words=() + check_redass=1 + (( i = j + 2 )) + elif [[ '&' == "${str:j:1}" ]]; then + words=() + check_redass=1 + (( i = j + 1 )) + elif [[ '|' == "${str:j:1}" ]]; then + words=() + check_redass=1 + (( i = j + 1 )) + elif [[ ';' == "${str:j:1}" ]]; then + words=() + check_redass=1 + (( i = j + 1 )) + fi + elif [[ "${sta[-1]}" == ')' ]]; then + if [[ ')' == "${str:j:1}" ]]; then + unset sta[-1] + elif [[ '$(' == "${str:j:2}" ]]; then + sta+=( ')' ) + (( j++ )) + elif [[ '`' == "${str:j:1}" ]]; then + sta+=( '`' ) + elif [[ '(' == "${str:j:1}" ]]; then + sta+=( ')' ) + elif [[ '{' == "${str:j:1}" ]]; then + sta+=( '}' ) + elif [[ '"' == "${str:j:1}" ]]; then + sta+=( '"' ) + elif [[ "'" == "${str:j:1}" ]]; then + sta+=( "'" ) + elif [[ '\' == "${str:j:1}" ]]; then + (( j++ )) + fi + elif [[ "${sta[-1]}" == '}' ]]; then + if [[ '}' == "${str:j:1}" ]]; then + unset sta[-1] + elif [[ '$(' == "${str:j:2}" ]]; then + sta+=( ')' ) + (( j++ )) + elif [[ '`' == "${str:j:1}" ]]; then + sta+=( '`' ) + elif [[ '(' == "${str:j:1}" ]]; then + sta+=( ')' ) + elif [[ '{' == "${str:j:1}" ]]; then + sta+=( '}' ) + elif [[ '"' == "${str:j:1}" ]]; then + sta+=( '"' ) + elif [[ "'" == "${str:j:1}" ]]; then + sta+=( "'" ) + elif [[ '\' == "${str:j:1}" ]]; then + (( j++ )) + fi + elif [[ "${sta[-1]}" == '`' ]]; then + if [[ '`' == "${str:j:1}" ]]; then + unset sta[-1] + elif [[ '$(' == "${str:j:2}" ]]; then + sta+=( ')' ) + (( j++ )) + elif [[ '(' == "${str:j:1}" ]]; then + sta+=( ')' ) + elif [[ '{' == "${str:j:1}" ]]; then + sta+=( '}' ) + elif [[ '"' == "${str:j:1}" ]]; then + sta+=( '"' ) + elif [[ "'" == "${str:j:1}" ]]; then + sta+=( "'" ) + elif [[ '\' == "${str:j:1}" ]]; then + (( j++ )) + fi + elif [[ "${sta[-1]}" == "'" ]]; then + if [[ "'" == "${str:j:1}" ]]; then + unset sta[-1] + fi + elif [[ "${sta[-1]}" == '"' ]]; then + if [[ '"' == "${str:j:1}" ]]; then + unset sta[-1] + elif [[ '$(' == "${str:j:2}" ]]; then + sta+=( ')' ) + (( j++ )) + elif [[ '`' == "${str:j:1}" ]]; then + sta+=( '`' ) + elif [[ '\$' == "${str:j:2}" ]]; then + (( j++ )) + elif [[ '\`' == "${str:j:2}" ]]; then + (( j++ )) + elif [[ '\"' == "${str:j:2}" ]]; then + (( j++ )) + elif [[ '\\' == "${str:j:2}" ]]; then + (( j++ )) + fi + fi + done + + ## append the last word; + if (( i < j )); then + if (( $found_redass == 1 )); then + if (( $check_redass == 0 )); then + words+=( "${str:i:j-i}" ) + fi + found_redass=0 + else + ## no redass in current word; stop checking; + check_redass=0 + words+=( "${str:i:j-i}" ) + fi + fi + + ## unset the temp stack; + unset sta + + ## return value; + __compal__retval=( "${words[@]}" ) +} + +## expand aliases in command line; +## +## $1 +## : beg word index; +## $2 +## : end word index; +## $3 +## : ignored word index (can be null); +## $4 +## : number of used aliases; +## ${@:4} +## : used aliases; +## $? +## : difference of `${#COMP_WORDS}` before and after expansion; +__compal__expand_alias() { + local beg="$1" end="$2" ignore="$3" n_used="$4"; shift 4 + local used=( "${@:1:$n_used}" ); shift "$n_used" + + if (( $beg == $end )) ; then + ## case 1: range is empty; + __compal__retval=0 + elif [[ -n "$ignore" ]] && (( $beg == $ignore )); then + ## case 2: beg index is ignored; pass it; + __compal__expand_alias \ + "$(( $beg + 1 ))" \ + "$end" \ + "$ignore" \ + "${#used[@]}" \ + "${used[@]}" + elif ! alias "${COMP_WORDS[$beg]}" &>/dev/null; then + ## case 3: command is not an alias; + __compal__retval=0 + elif ( __compal__inarr "${COMP_WORDS[$beg]}" "${used[@]}" ); then + ## case 4: command is an used alias; + __compal__retval=0 + else + ## case 5: command is an unused alias; + + ## get alias name; + local cmd="${COMP_WORDS[$beg]}" + + ## get alias body; + local str0; str0="$(__compal__get_alias_body "$cmd")" + + ## split alias body into words; + __compal__split_cmd_line "$str0" + local words0=( "${__compal__retval[@]}" ) + + ## rebuild alias body; we need this because function `_split_cmd_line` + ## drops redirections and assignments, and only keeps the last command + ## in the last pipeline, in `words0`; therefore `str0` is not a simple + ## concat of `words0`; we rebuild this simple concat as `nstr0`; maybe + ## it is easier to view `str0` as raw and `nstr0` as genuine; + local nstr0="${words0[*]}" + + ## find index range of word `$COMP_WORDS[$beg]` in string `$COMP_LINE`; + local i=0 j=0 + for (( i = 0; i <= $beg; i++ )); do + for (( ; j <= ${#COMP_LINE}; j++ )); do + [[ "${COMP_LINE:j}" == "${COMP_WORDS[i]}"* ]] && break + done + (( i == $beg )) && break + (( j += ${#COMP_WORDS[i]} )) + done + + ## now `j` is at the beginning of word `$COMP_WORDS[$beg]`; and we know + ## the index range is `[j, j+${#cmd})`; + + ## update `$COMP_LINE` and `$COMP_POINT`; + COMP_LINE="${COMP_LINE:0:j}${nstr0}${COMP_LINE:j+${#cmd}}" + if (( $COMP_POINT < j )); then + : + elif (( $COMP_POINT < j + ${#cmd} )); then + ## set current cursor position to the end of replacement string; + (( COMP_POINT = j + ${#nstr0} )) + else + (( COMP_POINT += ${#nstr0} - ${#cmd} )) + fi + + ## update `$COMP_WORDS` and `$COMP_CWORD`; + COMP_WORDS=( + "${COMP_WORDS[@]:0:beg}" + "${words0[@]}" + "${COMP_WORDS[@]:beg+1}" + ) + if (( $COMP_CWORD < $beg )); then + : + elif (( $COMP_CWORD < $beg + 1 )); then + ## set current word index to the last of replacement words; + (( COMP_CWORD = $beg + ${#words0[@]} - 1 )) + else + (( COMP_CWORD += ${#words0[@]} - 1 )) + fi + + ## update `$ignore` if it is not empty; if so, we know `$ignore` is not + ## equal to `$beg` because we checked that in case 2; we need to update + ## `$ignore` only when `$ignore > $beg`; save this condition in a local + ## var `$ignore_gt_beg` because we need it later; + if [[ -n "$ignore" ]]; then + local ignore_gt_beg=0 + if (( $ignore > $beg )); then + ignore_gt_beg=1 + (( ignore += ${#words0[@]} - 1 )) + fi + fi + + ## recursively expand part 0; + local used0=( "${used[@]}" "$cmd" ) + __compal__expand_alias \ + "$beg" \ + "$(( $beg + ${#words0[@]} ))" \ + "$ignore" \ + "${#used0[@]}" \ + "${used0[@]}" + local diff0="$__compal__retval" + + ## update `$ignore` if it is not empty and `$ignore_gt_beg` is true; + if [[ -n "$ignore" ]] && (( $ignore_gt_beg == 1 )); then + (( ignore += $diff0 )) + fi + + ## recursively expand part 1; must check `str0` not `nstr0`; + if [[ -n "$str0" ]] && [[ "${str0: -1}" == ' ' ]]; then + local used1=( "${used[@]}" ) + __compal__expand_alias \ + "$(( $beg + ${#words0[@]} + $diff0 ))" \ + "$(( $end + ${#words0[@]} - 1 + $diff0 ))" \ + "$ignore" \ + "${#used1[@]}" \ + "${used1[@]}" + local diff1="$__compal__retval" + else + local diff1=0 + fi + + ## return value; + __compal__retval=$(( ${#words0[@]} - 1 + diff0 + diff1 )) + fi +} + +## run a cspec using its args in argv fashion; +## +## despite as described in `man bash`, `complete -p` does not always print an +## existing completion in a way that can be reused as input; what complicates +## the matter here are quotes and escapes; +## +## as an example, when `complete -p` prints: +## +## $ complete -p +## complete -F _known_hosts "/tmp/aaa bbb" +## +## copy-paste running the above output gives wrong result: +## +## $ complete -F _known_hosts "/tmp/aaa bbb" +## $ complete -p +## complete -F _known_hosts /tmp/aaa bbb +## +## the correct command to give the same `complete -p` result is: +## +## $ complete -F _known_hosts '"/tmp/aaa bbb"' +## $ complete -p +## complete -F _known_hosts "/tmp/aaa bbb" +## +## to see another issue, this command gives a different result: +## +## $ complete -F _known_hosts '/tmp/aaa\ \ \ bbb' +## $ complete -p +## complete -F _known_hosts /tmp/aaa\ \ \ bbb +## +## note that these two `complete -p` results are *not* the same: +## +## complete -F _known_hosts "/tmp/aaa bbb" +## complete -F _known_hosts /tmp/aaa\ \ \ bbb +## +## despite this is true: +## +## [[ "/tmp/aaa bbb" == /tmp/aaa\ \ \ bbb ]] +## +## so we must parse the `complete -p` result and run parsed result; +## +## using `_split_cmd_line` to parse a cspec should be ok, because a cspec has +## only one command without redirections or assignments, also without command +## substitutions, etc.; we can then rerun this cspec in an argv fashion using +## this function; +## +## $@ +## : cspec args; +__compal__run_cspec_args() { + local cspec_args=( "$@" ) + + ## ensure this is indeed a cspec; + if [[ "${cspec_args[0]}" == "complete" ]]; then + ## run parsed completion command; + "${cspec_args[@]}" + else + __compal__error "not a complete command: ${cspec_args[*]}" + fi +} + +## the "auto" implementation of `_unmask_alias`; +## +## this function is called only when using auto unmask; +## +## $1 +## : alias command; +__compal__unmask_alias_auto() { + local cmd="$1" + + ## load vanilla completion of this command; + local cspec="${__compal__vanilla_cspecs[$cmd]}" + + if [[ -n "$cspec" ]]; then + ## a vanilla cspec for this command is found; due to some issues with + ## `complete -p` we cannot eval this cspec directly; instead, we need + ## to parse and run it in argv fashion; see `_run_cspec_args` comment; + __compal__split_cmd_line "$cspec" + local cspec_args=( "${__compal__retval[@]}" ) + __compal__run_cspec_args "${cspec_args[@]}" + else + ## a (parsed) vanilla cspec for this command is not found; search raw + ## vanilla cspecs for this command; if a matched raw vanilla cspec is + ## found, then parse, save and run it; search is a loop because these + ## raw cspecs are not parsed yet; + for _cspec in "${!__compal__raw_vanilla_cspecs[@]}"; do + if [[ "$_cspec" == *" $cmd" ]]; then + __compal__split_cmd_line "$_cspec" + local _cspec_args=( "${__compal__retval[@]}" ) + + ## ensure this cspec has the correct command; + local _cspec_cmd="${_cspec_args[-1]}" + if [[ "$_cspec_cmd" == "$cmd" ]]; then + __compal__vanilla_cspecs["$_cspec_cmd"]="$_cspec" + unset __compal__raw_vanilla_cspecs["$_cspec"] + __compal__run_cspec_args "${_cspec_args[@]}" + return + fi + fi + done + + ## no vanilla cspec for this command is found; we remove the current + ## cspec for this command (which should be `_complete_alias`), which + ## effectively uses the default cspec (ie: `complete -D`) to process + ## this command; we do not fallback to `_completion_loader`, because + ## the default cspec could be something else, and here we want to be + ## consistent; + complete -r "$cmd" + fi +} + +## the "manual" implementation of `_unmask_alias`; +## +## this function is called only when using manual unmask; +## +## users may edit this function to customize vanilla command completions; +## +## $1 +## : alias command; +__compal__unmask_alias_manual() { + local cmd="$1" + + case "$cmd" in + bind) + complete -A binding "$cmd" + ;; + help) + complete -A helptopic "$cmd" + ;; + set) + complete -A setopt "$cmd" + ;; + shopt) + complete -A shopt "$cmd" + ;; + bg) + complete -A stopped -P '"%' -S '"' "$cmd" + ;; + service) + complete -F _service "$cmd" + ;; + unalias) + complete -a "$cmd" + ;; + builtin) + complete -b "$cmd" + ;; + command|type|which) + complete -c "$cmd" + ;; + fg|jobs|disown) + complete -j -P '"%' -S '"' "$cmd" + ;; + groups|slay|w|sux) + complete -u "$cmd" + ;; + readonly|unset) + complete -v "$cmd" + ;; + traceroute|traceroute6|tracepath|tracepath6|fping|fping6|telnet|rsh|\ + rlogin|ftp|dig|mtr|ssh-installkeys|showmount) + complete -F _known_hosts "$cmd" + ;; + aoss|command|do|else|eval|exec|ltrace|nice|nohup|padsp|then|time|\ + tsocks|vsound|xargs) + complete -F _command "$cmd" + ;; + fakeroot|gksu|gksudo|kdesudo|really) + complete -F _root_command "$cmd" + ;; + a2ps|awk|base64|bash|bc|bison|cat|chroot|colordiff|cp|csplit|cut|date|\ + df|diff|dir|du|enscript|env|expand|fmt|fold|gperf|grep|grub|head|\ + irb|ld|ldd|less|ln|ls|m4|md5sum|mkdir|mkfifo|mknod|mv|netstat|nl|\ + nm|objcopy|objdump|od|paste|pr|ptx|readelf|rm|rmdir|sed|seq|\ + sha{,1,224,256,384,512}sum|shar|sort|split|strip|sum|tac|tail|tee|\ + texindex|touch|tr|uname|unexpand|uniq|units|vdir|wc|who) + complete -F _longopt "$cmd" + ;; + *) + _completion_loader "$cmd" + ;; + esac +} + +## set completion function of an alias command to the vanilla one; +## +## $1 +## : alias command; +__compal__unmask_alias() { + local cmd="$1" + + ## ensure current completion function of this command is `_complete_alias`; + if [[ "$(complete -p "$cmd")" != *"-F _complete_alias"* ]]; then + __compal__error "cannot unmask alias command: $cmd" + return + fi + + ## decide which unmask function to call; + if (( "$COMPAL_AUTO_UNMASK" == 1 )); then + __compal__unmask_alias_auto "$@" + else + __compal__unmask_alias_manual "$@" + fi +} + +## set completion function of an alias command to `_complete_alias`; doing so +## overwrites the original completion function for this command, if any; this +## makes `_complete_alias` look like a "mask" on the alias command; then, why +## is this function called a "remask"? because this function is always called +## in pair with (and after) a corresponding "unmask" function; the 1st "mask" +## happens when user directly runs `complete -F _complete_alias ...`; +## +## $1 +## : alias command; +__compal__remask_alias() { + local cmd="$1" + + complete -F _complete_alias "$cmd" +} + +## delegate completion to `bash-completion`; +__compal__delegate() { + ## `_command_offset` is a meta-command completion function provided by + ## `bash-completion`; the documentation does not say it will work with + ## argument `0`, but looking at its code (version 2.11) it should; + _command_offset 0 +} + +## delegate completion to `bash-completion`, within a transient context in +## which the input alias command is unmasked; +## +## this function expects current completion function of this command to be +## `_complete_alias`; +## +## $1 +## : alias command to be unmasked; +__compal__delegate_in_context() { + local cmd="$1" + + ## unmask alias: + __compal__unmask_alias "$cmd" + + ## do actual completion; + __compal__delegate + + ## remask alias: + __compal__remask_alias "$cmd" +} + +## save vanilla completions; run this function when this script is sourced; +## this ensures vanilla completions of alias commands are fetched and saved +## before they are overwritten by `complete -F _complete_alias`; +## +## this function saves raw cspecs and does not parse them; for other useful +## comments about parsing and running cspecs see function `_run_cspec_args`; +## +## running this function on source is mandatory only when using auto unmask; +## when using manual unmask, it is safe to skip this function on source; +__compal__save_vanilla_cspecs() { + ## get default cspec; + local def_cspec; def_cspec="$(complete -p -D 2>/dev/null)" + + ## `complete -p` prints cspec for one command per line; so we can loop; + while IFS= read -r cspec; do + + ## skip default cspec; + [[ "$cspec" != "$def_cspec" ]] || continue + + ## skip `-F _complete_alias` cspecs; + [[ "$cspec" != *"-F _complete_alias"* ]] || continue + + ## now we have a vanilla cspec; save it in `_raw_vanilla_cspecs`; + __compal__raw_vanilla_cspecs["$cspec"]="" + + done < <(complete -p 2>/dev/null) +} + +## completion function for non-alias commands; normally, the mere invocation of +## this function indicates an error of command completion configuration because +## we are invoking `_complete_alias` on a non-alias command; but there can be a +## special case: `_command_offset` will try with command basename when there is +## no completion for the command itself; an example is `sudo /bin/ls` when both +## `sudo` and `ls` are aliases; this function takes care of this special case; +## +## $1 +## : the name of the command whose arguments are being completed; +## $2 +## : the word being completed; +## $3 +## : the word preceding the word being completed on the current command line; +__compal__complete_non_alias() { + ## get command name; must be non-alias; + local cmd="${COMP_WORDS[0]}" + + ## get command basename; + local compcmd="${cmd##*/}" + + if alias "$compcmd" &>/dev/null; then + ## if command basename is an alias, delegate completion; + __compal__delegate_in_context "$compcmd" + else + ## else, this indicates an error; + __compal__error "command is not an alias: $cmd" + fi +} + +## completion function for alias commands; +## +## $1 +## : the name of the command whose arguments are being completed; +## $2 +## : the word being completed; +## $3 +## : the word preceding the word being completed on the current command line; +__compal__complete_alias() { + ## get command name; must be alias; + local cmd="${COMP_WORDS[0]}" + + ## we expand aliases only for the original command line (ie: the command + ## line on which user pressed ``); unfortunately, we may not have a + ## chance to see the original command line, and we have no way to ensure + ## that; we take an approximation: we expand aliases only in the outmost + ## call of this function, which implies only on the first occasion of an + ## alias command; we can ensure this condition using a refcnt and expand + ## aliases iff the refcnt is equal to 0; this approximation always works + ## correctly when the 1st word on the original command line is an alias; + ## + ## this approximation may fail when the 1st word on the original command + ## line is not an alias; an example that expects files but gets ip addrs: + ## + ## $ unalias sudo + ## $ complete -r sudo + ## $ alias ls='ping' + ## $ complete -F _complete_alias ls + ## $ sudo ls + ## {ip} + ## {ip} + ## {ip} + ## ... + ## + if (( __compal__refcnt == 0 )); then + + ## find index range of word `$COMP_WORDS[$COMP_CWORD]` in string + ## `$COMP_LINE`; dont expand this word if `$COMP_POINT` (cursor + ## position) lies in this range because the word may be incomplete; + local i=0 j=0 + for (( ; i <= $COMP_CWORD; i++ )); do + for (( ; j <= ${#COMP_LINE}; j++ )); do + [[ "${COMP_LINE:j}" == "${COMP_WORDS[i]}"* ]] && break + done + (( i == $COMP_CWORD )) && break + (( j += ${#COMP_WORDS[i]} )) + done + + ## now `j` is at the beginning of word `$COMP_WORDS[$COMP_CWORD]`; and + ## we know the index range is `[j, j+${#COMP_WORDS[$COMP_CWORD]}]`; we + ## include the right endpoint to cover the case where cursor is at the + ## exact end of the word; compare the index range with `$COMP_POINT`; + if (( j <= $COMP_POINT )) && \ + (( $COMP_POINT <= j + ${#COMP_WORDS[$COMP_CWORD]} )); then + local ignore="$COMP_CWORD" + else + local ignore="" + fi + + ## expand aliases; + __compal__expand_alias 0 "${#COMP_WORDS[@]}" "$ignore" 0 + fi + + ## increase refcnt; + (( __compal__refcnt++ )) + + ## delegate completion in context; this actually contains several steps: + ## + ## - unmask alias: + ## + ## since aliases have been fully expanded, no need to consider aliases + ## in the resulting command line; therefore, we now set the completion + ## function for this alias to the vanilla, alias-free one; this avoids + ## infinite recursion when using self-aliases (eg: `alias ls='ls -a'`); + ## + ## - do actual completion: + ## + ## `_command_offset` is a meta-command completion function provided by + ## `bash-completion`; the documentation does not say it will work with + ## argument `0`, but looking at its code (version 2.11) it should; + ## + ## - remask alias: + ## + ## reset this command completion function to `_complete_alias`; + ## + ## these steps are put into one function `_delegate_in_context`; + __compal__delegate_in_context "$cmd" + + ## decrease refcnt; + (( __compal__refcnt-- )) +} + +## this is the function to be set with `complete -F`; this function expects +## alias commands, but can also handle non-alias commands in rare occasions; +## +## as a standard completion function, this function can take 3 arguments as +## described in `man bash`; they are currently not being used, though; +## +## $1 +## : the name of the command whose arguments are being completed; +## $2 +## : the word being completed; +## $3 +## : the word preceding the word being completed on the current command line; +_complete_alias() { + ## get command; + local cmd="${COMP_WORDS[0]}" + + ## complete command; + if ! alias "$cmd" &>/dev/null; then + __compal__complete_non_alias "$@" + else + __compal__complete_alias "$@" + fi +} + +## main function; +__compal__main() { + if (( "$COMPAL_AUTO_UNMASK" == 1 )); then + ## save vanilla completions; + __compal__save_vanilla_cspecs + fi +} + +## ============================================================================ +## # script +## ============================================================================ + +## run main function; +__compal__main + +## ============================================================================ +## # complete user-defined aliases +## ============================================================================ + +## to complete specific aliases, uncomment and edit these lines; +complete -F _complete_alias p "sudo pacman" +complete -F _complete_alias Su +complete -F _complete_alias SS + +## to complete all aliases, run this line after all aliases have been defined; +# complete -F _complete_alias "${!BASH_ALIASES[@]}" + diff --git a/bash/dot-config/bash/functions.bash b/bash/dot-config/bash/functions.bash new file mode 100644 index 0000000..a2a96ba --- /dev/null +++ b/bash/dot-config/bash/functions.bash @@ -0,0 +1,48 @@ +# from: https://github.com/bahamas10/bash-vardump/blob/main/vardump.bash +source "${XDG_CONFIG_HOME:-$HOME/.config}"/bash/vardump.bash + +colors() +{ + local i + for i in {0..255}; do + printf "\x1b[38;5;${i}mcolor %d\n" "$i" + done + tput sgr0 +} + +nman() +{ + nvim -c "Man $*" -c "wincmd o" -c "nmap q :q" +} + +lf() +{ + export LF_CD_FILE=/tmp/.lfcd-$$ + command lf "$@" + if [ -s "$LF_CD_FILE" ]; then + local DIR + DIR="$(realpath "$(cat "$LF_CD_FILE")")" + if [ "$DIR" != "$PWD" ]; then + echo "cd to $DIR" + cd "$DIR" || exit + fi + command rm "$LF_CD_FILE" + fi + unset LF_CD_FILE +} + +se() +{ + choice="$(fd . ~/.local/bin -d1 -tx -tl --format '{/}' | fzf)" + [ -f "$HOME/.local/bin/$choice" ] && $EDITOR "$HOME/.local/bin/$choice" +} + +pS() +{ + pacman -Slq | fzf --multi --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S +} + +yayS() +{ + yay -Slq | fzf --multi --preview 'yay -Si {1}' | xargs -ro yay -S +} diff --git a/bash/dot-config/bash/gentoo-color.bash b/bash/dot-config/bash/gentoo-color.bash new file mode 100644 index 0000000..f2a168d --- /dev/null +++ b/bash/dot-config/bash/gentoo-color.bash @@ -0,0 +1,83 @@ +# Gentoo color +# +# source: https://gitweb.gentoo.org/repo/gentoo.git/plain/app-shells/bash/files/bashrc.d/10-gentoo-color-r2.bash +# changes: +# - remove ls from the list of aliases (will configure it myself in bashrc) +# - comment dircolor stuff at the end (don't like too many colors) +# - comment the unset gentoo_color, since I use it later for ls +# +# NOTE: copy this file for the root user and source it in its bashrc as well: +# root # cp /home/moreka/.config/bash/gentoo-color.bash ~/.gentoo-color.bash +# root # cp /etc/skel/.bash_profile ~/ +# root # cp /etc/skel/.bashrc ~/ +# +# in bashrc: source "$HOME"/.gentoo-color.bash + +if [[ ${NO_COLOR} ]]; then + # Respect the user's wish not to use color. See https://no-color.org/. + gentoo_color=0 +elif [[ ${COLORTERM@a} == *x* && ${COLORTERM} == @(24bit|truecolor) ]]; then + # The COLORTERM environment variable can reasonably be trusted here. + # See https://github.com/termstandard/colors for further information. + gentoo_color=1 +else + # Check TERM against a whitelist covering a majority of popular + # terminal emulators and virtual console implementations known to + # support color. If no matching entry is found, try to use tput(1) to + # determine whether color is supported. + case ${TERM} in + *color* |\ + *direct* |\ + *ghostty |\ + [Ekx]term* |\ + alacritty |\ + aterm |\ + contour |\ + dtterm |\ + foot* |\ + jfbterm |\ + linux |\ + mlterm |\ + rxvt* |\ + screen* |\ + tmux* |\ + wsvt25* ) gentoo_color=1 ;; + * ) gentoo_color=$(tput colors 2>/dev/null) + esac +fi + +# For direxpand to be missing indicates that bash is lacking readline support. +if (( gentoo_color <= 0 )) || ( ! shopt -u direxpand 2>/dev/null ); then + # Define a prompt without color. + PS1='\u@\h \w \$ ' +elif (( EUID == 0 )); then + # If root, omit the username and print the hostname in red. + PS1='\[\e[01;31m\]\h\[\e[01;34m\] \w \$\[\e[00m\] ' +else + # Otherwise, print the username and hostname in green. + PS1='\[\e[01;32m\]\u@\h\[\e[01;34m\] \w \$\[\e[00m\] ' +fi + +if (( gentoo_color > 0 )); then + # Colorize the output of diff(1), grep(1) and a few coreutils utilities. + # However, do so only where no alias/function by the given name exists. + for _ in diff dir grep vdir; do + if [[ $(type -t "$_") == file ]]; then + alias "$_=$_ --color=auto" + fi + done + + # Enable colors for ls(1) and some other utilities that respect the + # LS_COLORS variable. Prefer ~/.dir_colors, per bug #64489. + # if hash dircolors 2>/dev/null; then + # if [[ -f ~/.dir_colors ]]; then + # eval "$(COLORTERM=1 dircolors -b -- ~/.dir_colors)" + # elif [[ -f /etc/DIR_COLORS ]]; then + # eval "$(COLORTERM=1 dircolors -b /etc/DIR_COLORS)" + # else + # eval "$(COLORTERM=1 dircolors -b)" + # fi + # fi +fi + +# unset -v gentoo_color diff --git a/bash/dot-config/bash/vardump.bash b/bash/dot-config/bash/vardump.bash new file mode 100644 index 0000000..b57216f --- /dev/null +++ b/bash/dot-config/bash/vardump.bash @@ -0,0 +1,215 @@ +#!/usr/bin/env bash +# +# Bash library for pretty-printing a variable given by name. +# +# This was inspired by `util.inspect` in Node.js, `p` in or `pp` in ruby, +# `var_dump` in php, etc. This is intended for developers to use for debugging +# - this should not be parsed by a machine nor should the output format be +# considered stable. +# +# Author: Dave Eddy +# Date: December 18, 2024 +# License: MIT + +# vardump +# +# Dump the given variable (by name) information and value to stdout. +# +# Usage: vardump [-v] +# +# Example: +# +# ``` bash +# $ declare -A assoc=([foo]=1 [bar]=2) +# $ vardump assoc +# ( +# ['foo']='1' +# ['bar']='2' +# ) +# $ vardump -v assoc +# -------------------------- +# vardump: assoc +# attributes: (A)associative array +# length: 2 +# ( +# ['foo']='1' +# ['bar']='2' +# ) +# -------------------------- +# ``` +# +# Arguments: +# -v verbose output +# -C [always|auto|never] when to colorize output, defaults to auto +# +vardump() { + # read arguments + local verbose=false + local whencolor='auto' + local OPTIND OPTARG opt + while getopts 'C:v' opt; do + case "$opt" in + C) whencolor=$OPTARG;; + v) verbose=true;; + *) return 1;; + esac + done + shift "$((OPTIND - 1))" + + # read variable name + local name=$1 + + if [[ -z $name ]]; then + echo 'vardump: name required as first argument' >&2 + return 1 + fi + + # optionally load colors + if [[ $whencolor == always ]] || [[ $whencolor == auto && -t 1 ]]; then + local color_green=$'\e[32m' + local color_magenta=$'\e[35m' + local color_rst=$'\e[0m' + local color_dim=$'\e[2m' + else + local color_green='' + local color_magenta='' + local color_rst='' + local color_dim='' + fi + local color_value=$color_green + local color_key=$color_magenta + local color_length=$color_magenta + + # optionally print header + if $verbose; then + echo "${color_dim}--------------------------${color_rst}" + echo "${color_dim}vardump: ${color_rst}$name" + fi + + # ensure the variable is defined + if ! declare -p "$name" &>/dev/null; then + echo "variable ${name@Q} not defined" >&2 + return 1 + fi + + # get the variable attributes - this will tell us what kind of variable + # it is. + # + # XXX dave says - is this ideal? when the variable is a nameref (using + # `declare -n` or `local -n`) it seems like this method follows the + # nameref, whereas parsing the output of `declare -p ` seems to + # correctly give `-n` as the set of arguments used. Perhaps just parse + # the output of `declare -p` from above here instead? + local attrs + IFS='' read -ra attrs <<< "${!name@a}" + + # parse the variable attributes and construct a human-readable string + local attributes=() + local attr + local typ='' + for attr in "${attrs[@]}"; do + local s='' + case "$attr" in + a) s='indexed array'; typ='a';; + A) s='associative array'; typ='A';; + r) s='read-only';; + i) s='integer';; + g) s='global';; + x) s='exported';; + *) s="unknown";; + esac + attributes+=("($attr)$s") + done + + # optionally print the attributes to the user + if $verbose; then + echo -n "${color_dim}attributes: ${color_rst}" + if [[ -n ${attributes[0]} ]]; then + # separate the list of attributes by a `/` character + ( + IFS=/ + echo -n "${attributes[*]}" + ) + else + echo -n '(none)' + fi + echo + fi + + # print the variable itself! we use $typ defined above to format it + # appropriately. + # + # we *pray* the user doesn't use this variable name in their own code or + # we'll hit a circular reference error (THAT WE CAN'T CATCH OURSELVES IN + # CODE - lame) + local -n __vardump_name="$name" + + if [[ $typ == 'a' || $typ == 'A' ]]; then + # print this as an array - indexed, sparse, associative, + # whatever + local key value + + # optionally print length + if $verbose; then + local length=${#__vardump_name[@]} + printf '%s %s\n' \ + "${color_dim}length:${color_rst}" \ + "${color_length}$length${color_rst}" + fi + + # loop keys and print the data itself + echo '(' + for key in "${!__vardump_name[@]}"; do + value=${__vardump_name[$key]} + + # safely quote the key name if it's an associative array + # (the user controls the key names in this case so we + # can't trust them to be safe) + if [[ $typ == 'A' ]]; then + key=${key@Q} + fi + + # always safely quote the value + value=${value@Q} + + printf '\t[%s]=%s\n' \ + "${color_key}$key${color_rst}" \ + "${color_value}$value${color_rst}" + done + echo ')' + else + # we are just a simple scalar value - print this as a regular, + # safely-quoted, value. + echo "${color_value}${__vardump_name@Q}${color_rst}" + fi + + # optionally print the trailer + if $verbose; then + echo "${color_dim}--------------------------${color_rst}" + fi + + return 0 + +} + +# if we are run directly (not-sourced) then run through some examples +if ! (return &>/dev/null); then + declare s='some string' + declare -r READ_ONLY='this cant be changed' + declare -i int_value=5 + + declare -a simple_array=(foo bar baz "$(tput setaf 1)red$(tput sgr0)") + declare -a sparse_array=([0]=hi [5]=bye [7]=ok) + declare -A assoc_array=([foo]=1 [bar]=2) + + echo 'simple vardump' + for var in s READ_ONLY int_value simple_array sparse_array assoc_array; do + vardump "$var" + done + + echo 'verbose vardump' + for var in s READ_ONLY int_value simple_array sparse_array assoc_array; do + vardump -v "$var" + echo + done +fi diff --git a/bash/dot-inputrc b/bash/dot-inputrc new file mode 100644 index 0000000..f34320a --- /dev/null +++ b/bash/dot-inputrc @@ -0,0 +1,37 @@ +$include /etc/inputrc + +$if Bash + $if mode=emacs + # edit the path + "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f" + # prepare to type a quoted word -- + # insert open and close double quotes + # and move to just after the open quote + "\C-x\"": "\"\"\C-e\C-b" + # Quote the current or previous word + "\C-xq": "\eb\"\ef\"" + # Add a binding to refresh the line, which is unbound + "\C-xr": redraw-current-line + # Add a binding to edit the line in vim + "\C-xe": edit-and-execute-command + $endif +$endif + +set bell-style none + +set completion-ignore-case on +set completion-query-items 150 + +set mark-symlinked-directories on +set match-hidden-files off +set page-completions off + +set visible-stats on +set colored-stats on + +# Be more intelligent when autocompleting by also looking at the text after +# the cursor. For example, when the current line is "cd ~/src/mozil", and +# the cursor is on the "z", pressing Tab will not autocomplete it to "cd +# ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the +# Readline used by Bash 4.) +set skip-completed-text on diff --git a/bash/dot-profile b/bash/dot-profile new file mode 100644 index 0000000..f726fcc --- /dev/null +++ b/bash/dot-profile @@ -0,0 +1,44 @@ +#!/bin/sh + +export PATH="$PATH:$HOME/.local/bin" + +export EDITOR=nvim +export SUDO_EDITOR=$EDITOR +export BAT_THEME=ansi + +export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'" + +export XDG_CONFIG_HOME="$HOME"/.config +export XDG_CACHE_HOME="$HOME"/.cache +export XDG_DATA_HOME="$HOME"/.local/share +export XDG_STATE_HOME="$HOME"/.local/state +export XDG_BIN_HOME="$HOME"/.local/bin + +export LESSHISTFILE="$XDG_CACHE_HOME"/lesshst +export CARGO_HOME="$XDG_DATA_HOME"/cargo +export TEXMFHOME="$XDG_DATA_HOME"/texmf +export TEXMFVAR="$XDG_CACHE_HOME"/texlive/texmf-var +export TEXMFCONFIG="$XDG_CONFIG_HOME"/texlive/texmf-config +export GOPATH="$XDG_DATA_HOME"/go +export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc-2.0 +export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass +export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/default/config + +# [ -d "$HOME/.nix-profile" ] && export XDG_DATA_DIRS="$HOME"/.nix-profile/share:"$XDG_DATA_DIRS" +# [ -d "$HOME/.nix-profile" ] && . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" + +unset SSH_AGENT_PID +if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + export SSH_AUTH_SOCK +fi + +# disable accessibility +export NO_AT_BRIDGE=1 +export GTK_A11Y=none + +if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ] ; then + if uwsm check may-start; then + exec systemd-cat -t uwsm_start uwsm start hyprland.desktop + fi +fi diff --git a/fonts/.stow-local-ignore b/fonts/.stow-local-ignore new file mode 100644 index 0000000..b43bf86 --- /dev/null +++ b/fonts/.stow-local-ignore @@ -0,0 +1 @@ +README.md diff --git a/fonts/README.md b/fonts/README.md new file mode 100644 index 0000000..1a64997 --- /dev/null +++ b/fonts/README.md @@ -0,0 +1,6 @@ +# Needed packages + +```sh +sudo pacman -S otf-libertinus noto-fonts-emoji ttf-nerd-fonts-symbols ttf-opensans ttf-hack +yay -S vazirmatn-fonts +``` diff --git a/fonts/dot-config/fontconfig/conf.d/52-default-fonts.conf b/fonts/dot-config/fontconfig/conf.d/52-default-fonts.conf new file mode 100644 index 0000000..625f63d --- /dev/null +++ b/fonts/dot-config/fontconfig/conf.d/52-default-fonts.conf @@ -0,0 +1,36 @@ + + + + + serif + + Libertinus Serif + Noto Color Emoji + Symbols Nerd Font + + + + sans-serif + + Open Sans + Noto Color Emoji + Symbols Nerd Font + + + + sans + + Open Sans + Noto Color Emoji + Symbols Nerd Font + + + + monospace + + Hack + Noto Color Emoji + Symbols Nerd Font + + + diff --git a/fonts/dot-config/fontconfig/conf.d/53-font-features.conf b/fonts/dot-config/fontconfig/conf.d/53-font-features.conf new file mode 100644 index 0000000..d883d97 --- /dev/null +++ b/fonts/dot-config/fontconfig/conf.d/53-font-features.conf @@ -0,0 +1,18 @@ + + + + + + Hack + + + Comic Code + + + IosevkaInput + + + hintfull + + + diff --git a/fonts/dot-config/fontconfig/conf.d/66-emoji.conf b/fonts/dot-config/fontconfig/conf.d/66-emoji.conf new file mode 100644 index 0000000..139d78a --- /dev/null +++ b/fonts/dot-config/fontconfig/conf.d/66-emoji.conf @@ -0,0 +1,46 @@ + + + + + + emoji + Noto Color Emoji + + + + + Hack + + + Comic Code + + + IosevkaInput + + + Dejavu Sans Mono + + + + charset + + + 0x2763 + 0x2764 + + + 0x1f600 + 0x1f640 + + + + + + + diff --git a/fonts/dot-config/fontconfig/conf.d/66-vazirmatn.conf b/fonts/dot-config/fontconfig/conf.d/66-vazirmatn.conf new file mode 100644 index 0000000..75a5b63 --- /dev/null +++ b/fonts/dot-config/fontconfig/conf.d/66-vazirmatn.conf @@ -0,0 +1,20 @@ + + + + + + fa + + + Vazirmatn RD UI NL + + + + + ar + + + Vazirmatn RD UI NL + + + diff --git a/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-Heavy.ttf b/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-Heavy.ttf new file mode 100644 index 0000000..60f7c1f Binary files /dev/null and b/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-Heavy.ttf differ diff --git a/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-HeavyOblique.ttf b/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-HeavyOblique.ttf new file mode 100644 index 0000000..2a2a36c Binary files /dev/null and b/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-HeavyOblique.ttf differ diff --git a/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-W360.ttf b/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-W360.ttf new file mode 100644 index 0000000..e5ad0e5 Binary files /dev/null and b/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-W360.ttf differ diff --git a/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-W360Oblique.ttf b/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-W360Oblique.ttf new file mode 100644 index 0000000..3c0f160 Binary files /dev/null and b/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-W360Oblique.ttf differ diff --git a/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-build-plans.toml b/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-build-plans.toml new file mode 100644 index 0000000..c273c74 --- /dev/null +++ b/fonts/dot-local/share/fonts/IosevkaInput/IosevkaInput-build-plans.toml @@ -0,0 +1,208 @@ +# Custom build with intention to have similar proportions and most symbols as +# Input Mono (line height 1, Light+Bold). +# +# Build instructions: +# - `git clone --depth=1 https://github.com/be5invis/Iosevka` +# This build plan is tested for v33.2.1 version. +# - `cd Iosevka` +# - `npm install` +# - Copy this file into project's root as 'private-build-plans.toml'. +# - `npm run build -- --jCmd=4 ttf::IosevkaInput`. +# !!! This will probably take a lot of time (at least 4 minutes) with 100% +# CPU usage on 4 cores and significant amount of RAM used !!! +# - Move files from 'dist/IosevkaInput/TTF' to 'fonts' dotfiles directory and +# follow its README. + +[buildPlans.IosevkaInput] +family = "IosevkaInput" +spacing = "fixed" +serifs = "sans" +exportGlyphNames = false +noLigation = true + +# Define all available major characters for completeness. +# Overall approach for choosing a character is to *usually* prefer: +# "serifless", "straight", "toothless", "earless", "corner", "flat-top", +# "flat-hook". With some exceptions for readability: +# - Serifed `Iij`. +# - Serifed or curly captial letter if similar to lowercase. Like `CSVXYZ`. +[buildPlans.IosevkaInput.variants.design] +one = "base" +two = "curly-neck-serifless" +three = "flat-top-serifless" +four = "closed-serifless" +five = "upright-flat-serifless" +six = "closed-contour" +seven = "straight-serifless" +eight = "two-circles" +nine = "closed-contour" +zero = "oval-long-dotted" +capital-a = "straight-serifless" +capital-b = "standard-serifless" +capital-c = "bilateral-inward-serifed" +capital-d = "standard-serifless" +capital-e = "serifless" +capital-f = "serifless" +capital-g = "toothless-corner-serifless-hooked" +capital-h = "serifless" +capital-i = "serifed" +capital-j = "serifless" +capital-k = "symmetric-connected-serifless" +capital-l = "serifless" +capital-m = "hanging-serifless" +capital-n = "standard-serifless" +capital-p = "closed-serifless" +capital-q = "crossing-curly-tailed" +capital-r = "straight-serifless" +capital-s = "bilateral-inward-serifed" +capital-t = "serifless" +capital-u = "toothless-rounded-serifless" +capital-v = "curly-serifless" +capital-w = "straight-vertical-sides-serifless" +capital-x = "curly-serifless" +capital-y = "curly-serifless" +capital-z = "straight-serifed" +a = "double-storey-toothless-corner" +b = "toothless-corner-serifless" +c = "serifless" +d = "toothless-corner-serifless" +e = "flat-crossbar" +f = "flat-hook-serifless-crossbar-at-x-height" +g = "double-storey" +h = "straight-serifless" +i = "zshaped" +j = "flat-hook-serifed" +k = "straight-serifless" +l = "zshaped" +m = "earless-rounded-double-arch-short-leg-serifless" +n = "earless-corner-straight-serifless" +p = "earless-corner-serifless" +q = "earless-corner-straight-serifless" +r = "earless-corner-serifless" +s = "serifless" +t = "flat-hook" +u = "toothless-corner-serifless" +v = "straight-serifless" +w = "rounded-vertical-sides-serifless" +x = "straight-serifless" +y = "straight-turn-serifless" +z = "straight-serifless" +capital-eszet = "corner-serifless" +long-s = "bent-hook-serifless" +eszet = "sulzbacher-serifless" +lower-eth = "straight-bar" +capital-thorn = "serifless" +lower-thorn = "serifless" +lower-alpha = "crossing" +lower-beta = "standard" +capital-gamma = "serifless" +lower-gamma = "casual" +capital-delta = "straight" +lower-delta = "flat-top" +lower-eta = "earless-corner-serifless" +lower-theta = "capsule" +lower-iota = "serifed-semi-tailed" +lower-kappa = "straight-serifless" +capital-lambda = "straight-serifless" +lower-lambda = "straight" +lower-mu = "toothless-corner-serifless" +lower-nu = "casual" +lower-xi = "flat-top" +lower-pi = "tailless" +lower-tau = "semi-tailed" +lower-upsilon = "casual-serifless" +lower-phi = "cursive" +lower-chi = "semi-chancery-straight-serifless" +lower-psi = "flat-top-serifless" +partial-derivative = "straight-bar" +cyrl-a = "single-storey-earless-corner-tailed" +cyrl-ve = "standard-serifless" +cyrl-capital-zhe = "symmetric-connected" +cyrl-zhe = "symmetric-connected" +cyrl-capital-ze = "bilateral-inward-serifed" +cyrl-ze = "serifless" +cyrl-capital-ka = "symmetric-connected-bottom-right-serifed" +cyrl-ka = "symmetric-connected-serifless" +cyrl-el = "straight" +cyrl-em = "flat-bottom-serifless" +cyrl-capital-en = "serifed" +cyrl-en = "serifless" +cyrl-capital-er = "closed-serifed" +cyrl-er = "eared-serifed" +cyrl-capital-u = "cursive-serifless" +cyrl-u = "cursive-serifless" +cyrl-ef = "serifless" +cyrl-che = "standard" +cyrl-yeri = "corner" +cyrl-yery = "corner" +cyrl-capital-e = "bilateral-inward-serifed" +cyrl-e = "serifless" +cyrl-capital-ya = "standing-serifless" +cyrl-ya = "standing-serifless" +tittle = "round" +diacritic-dot = "round" +punctuation-dot = "round" +braille-dot = "square" +tilde = "low" +asterisk = "hex-low" +underscore = "above-baseline" +caret = "medium" +ascii-grave = "straight" +ascii-single-quote = "straight" +paren = "normal" +brace = "curly-flat-boundary" +guillemet = "straight" +number-sign = "upright" +ampersand = "closed" +at = "fourfold" +dollar = "through" +cent = "through" +percent = "rings-continuous-slash" +bar = "force-upright" +question = "corner" +pilcrow = "high" +micro-sign = "tailed-serifless" +decorative-angle-brackets = "middle" + +# Use two weights with more visible bolds +[buildPlans.IosevkaInput.weights.W360] +shape = 360 +menu = 360 +css = 360 + +[buildPlans.IosevkaInput.weights.Heavy] +shape = 900 +menu = 900 +css = 900 + +# Make upright upright and obligue with maximum angle for visibility +[buildPlans.IosevkaInput.slopes.Upright] +angle = 0 +shape = "upright" +menu = "upright" +css = "normal" + +[buildPlans.IosevkaInput.slopes.Oblique] +angle = 15 +shape = "oblique" +menu = "oblique" +css = "oblique" + +# Make font more square-ish with about 1:2 ratio +# Notes: +# - Adjusting sidebearings (`sb`) seems to lead to slightly worse results. +# Instead opt-in for adjusting overall dimensions, increasing various glyph +# height (capital, ascending, x), and using smaller size. +[buildPlans.IosevkaInput.widths.Normal] +shape = 575 +menu = 5 +css = "normal" + +[buildPlans.IosevkaInput.metricOverride] +leading = 1100 # Overall "cell" height +parenSize = 950 # Height of parenthesis +cap = 800 # Height of capital (`H`) +ascender = 800 # Height of ascending (`b`) +xHeight = 600 # Height of lowercase (`x`) +dotSize = "blend(weight, [100, 50], [360, 140], [900, 190])" # Size of dots in diacritic marks (!?ij) +periodSize = "blend(weight, [100, 55], [360, 160], [900, 215])" # Size of dots in period (.,;:) diff --git a/fonts/dot-local/share/fonts/comic-code/ComicCode-Bold.otf b/fonts/dot-local/share/fonts/comic-code/ComicCode-Bold.otf new file mode 100644 index 0000000..5bb8433 Binary files /dev/null and b/fonts/dot-local/share/fonts/comic-code/ComicCode-Bold.otf differ diff --git a/fonts/dot-local/share/fonts/comic-code/ComicCode-BoldItalic.otf b/fonts/dot-local/share/fonts/comic-code/ComicCode-BoldItalic.otf new file mode 100644 index 0000000..d100d89 Binary files /dev/null and b/fonts/dot-local/share/fonts/comic-code/ComicCode-BoldItalic.otf differ diff --git a/fonts/dot-local/share/fonts/comic-code/ComicCode-Italic.otf b/fonts/dot-local/share/fonts/comic-code/ComicCode-Italic.otf new file mode 100644 index 0000000..a6a1ed1 Binary files /dev/null and b/fonts/dot-local/share/fonts/comic-code/ComicCode-Italic.otf differ diff --git a/fonts/dot-local/share/fonts/comic-code/ComicCode-Medium.otf b/fonts/dot-local/share/fonts/comic-code/ComicCode-Medium.otf new file mode 100644 index 0000000..18ace50 Binary files /dev/null and b/fonts/dot-local/share/fonts/comic-code/ComicCode-Medium.otf differ diff --git a/fonts/dot-local/share/fonts/comic-code/ComicCode-MediumItalic.otf b/fonts/dot-local/share/fonts/comic-code/ComicCode-MediumItalic.otf new file mode 100644 index 0000000..e143027 Binary files /dev/null and b/fonts/dot-local/share/fonts/comic-code/ComicCode-MediumItalic.otf differ diff --git a/fonts/dot-local/share/fonts/comic-code/ComicCode-Regular.otf b/fonts/dot-local/share/fonts/comic-code/ComicCode-Regular.otf new file mode 100644 index 0000000..23443de Binary files /dev/null and b/fonts/dot-local/share/fonts/comic-code/ComicCode-Regular.otf differ diff --git a/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Bold.otf b/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Bold.otf new file mode 100644 index 0000000..56992d8 Binary files /dev/null and b/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Bold.otf differ diff --git a/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-BoldItalic.otf b/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-BoldItalic.otf new file mode 100644 index 0000000..17ccb3a Binary files /dev/null and b/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-BoldItalic.otf differ diff --git a/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Italic.otf b/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Italic.otf new file mode 100644 index 0000000..74caafb Binary files /dev/null and b/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Italic.otf differ diff --git a/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Medium.otf b/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Medium.otf new file mode 100644 index 0000000..805afe5 Binary files /dev/null and b/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Medium.otf differ diff --git a/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-MediumItalic.otf b/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-MediumItalic.otf new file mode 100644 index 0000000..ae9b1b5 Binary files /dev/null and b/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-MediumItalic.otf differ diff --git a/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Regular.otf b/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Regular.otf new file mode 100644 index 0000000..bbcc76c Binary files /dev/null and b/fonts/dot-local/share/fonts/comic-code/ComicCodeLigatures-Regular.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Black.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Black.otf new file mode 100644 index 0000000..e621e1b Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Black.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-BlackItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-BlackItalic.otf new file mode 100644 index 0000000..b862613 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-BlackItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Bold.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Bold.otf new file mode 100644 index 0000000..025b25c Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Bold.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-BoldItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-BoldItalic.otf new file mode 100644 index 0000000..77ee0c2 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-BoldItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Heavy.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Heavy.otf new file mode 100644 index 0000000..8285164 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Heavy.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-HeavyItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-HeavyItalic.otf new file mode 100644 index 0000000..c44f865 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-HeavyItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Light.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Light.otf new file mode 100644 index 0000000..b25e3dc Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Light.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-LightItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-LightItalic.otf new file mode 100644 index 0000000..74b5e8b Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-LightItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Medium.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Medium.otf new file mode 100644 index 0000000..b2f7dac Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Medium.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-MediumItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-MediumItalic.otf new file mode 100644 index 0000000..918709e Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-MediumItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Regular.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Regular.otf new file mode 100644 index 0000000..09aaca9 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Regular.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-RegularItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-RegularItalic.otf new file mode 100644 index 0000000..99e34f0 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-RegularItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Semibold.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Semibold.otf new file mode 100644 index 0000000..b1e38ad Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Semibold.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-SemiboldItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-SemiboldItalic.otf new file mode 100644 index 0000000..7b65b53 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-SemiboldItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Thin.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Thin.otf new file mode 100644 index 0000000..e4ddd7f Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Thin.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-ThinItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-ThinItalic.otf new file mode 100644 index 0000000..0fb2d44 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-ThinItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Ultralight.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Ultralight.otf new file mode 100644 index 0000000..528c9fd Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-Ultralight.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-UltralightItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-UltralightItalic.otf new file mode 100644 index 0000000..37d146c Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Display-UltralightItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Bold.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Bold.otf new file mode 100644 index 0000000..840d810 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Bold.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-BoldItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-BoldItalic.otf new file mode 100644 index 0000000..3cddfc4 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-BoldItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Heavy.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Heavy.otf new file mode 100644 index 0000000..7d3b413 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Heavy.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-HeavyItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-HeavyItalic.otf new file mode 100644 index 0000000..a03d003 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-HeavyItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Light.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Light.otf new file mode 100644 index 0000000..1e16968 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Light.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-LightItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-LightItalic.otf new file mode 100644 index 0000000..5bee181 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-LightItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Medium.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Medium.otf new file mode 100644 index 0000000..4982cb5 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Medium.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-MediumItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-MediumItalic.otf new file mode 100644 index 0000000..c876a0e Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-MediumItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Regular.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Regular.otf new file mode 100644 index 0000000..65f9ea5 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Regular.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-RegularItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-RegularItalic.otf new file mode 100644 index 0000000..af984d5 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-RegularItalic.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Semibold.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Semibold.otf new file mode 100644 index 0000000..a20e7a0 Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-Semibold.otf differ diff --git a/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-SemiboldItalic.otf b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-SemiboldItalic.otf new file mode 100644 index 0000000..08ee24d Binary files /dev/null and b/fonts/dot-local/share/fonts/sf-pro/SF-Pro-Text-SemiboldItalic.otf differ diff --git a/git/dot-config/git/config b/git/dot-config/git/config new file mode 100644 index 0000000..8df961c --- /dev/null +++ b/git/dot-config/git/config @@ -0,0 +1,17 @@ +[alias] + co = checkout + br = branch + ci = commit + s = status -sb + l = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%ai%C(reset) - %C(bold white)%an%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n %C(white)%s%C(reset)' +[pull] + rebase = true +[init] + defaultBranch = main +[user] + name = Mohammad Reza Karimi + email = m.r.karimi.j@gmail.com +[commit] + verbose = true +[credential "https://git.overleaf.com"] + helper = !pass git/overleaf@mit diff --git a/gpg-setup.bash b/gpg-setup.bash new file mode 100755 index 0000000..c3f6674 --- /dev/null +++ b/gpg-setup.bash @@ -0,0 +1,8 @@ +#!/bin/bash + +# first, make sure that your GPG keys are all imported, or make a new key +# also stow the gpg package + +# gpg-connect-agent reloadagent /bye +# ssh-add ~/.ssh/id_ed25519 +sudo patch /etc/pam.d/system-login ./gpg/pambase_system-login.diff diff --git a/gpg/.stow-local-ignore b/gpg/.stow-local-ignore new file mode 100644 index 0000000..fc31db4 --- /dev/null +++ b/gpg/.stow-local-ignore @@ -0,0 +1 @@ +pambase_system-login.diff diff --git a/gpg/dot-config/pam-gnupg b/gpg/dot-config/pam-gnupg new file mode 100644 index 0000000..364d89b --- /dev/null +++ b/gpg/dot-config/pam-gnupg @@ -0,0 +1,2 @@ +8F55CFC45CAC18892A739C1F2B8BA796C07BFF8C +F029032D6539C360008FE088112ED8AF2D23F502 diff --git a/gpg/dot-gnupg/gpg-agent.conf b/gpg/dot-gnupg/gpg-agent.conf new file mode 100644 index 0000000..87f944f --- /dev/null +++ b/gpg/dot-gnupg/gpg-agent.conf @@ -0,0 +1,6 @@ +allow-preset-passphrase +enable-ssh-support +default-cache-ttl 60480000 +max-cache-ttl 60480000 +default-cache-ttl-ssh 60480000 +max-cache-ttl-ssh 60480000 diff --git a/gpg/pambase_system-login.diff b/gpg/pambase_system-login.diff new file mode 100644 index 0000000..10749bb --- /dev/null +++ b/gpg/pambase_system-login.diff @@ -0,0 +1,15 @@ +--- - 2025-11-25 13:45:42.634133151 -0500 ++++ /etc/pam.d/system-login 2025-11-25 13:37:28.156022632 -0500 +@@ -3,6 +3,7 @@ + auth required pam_shells.so + auth requisite pam_nologin.so + auth include system-auth ++auth optional pam_gnupg.so store-only + + account required pam_access.so + account required pam_nologin.so +@@ -19,3 +20,4 @@ + session optional pam_umask.so + -session optional pam_systemd.so + session required pam_env.so ++session optional pam_gnupg.so diff --git a/hyprland/dot-config/hypr/hypridle.conf b/hyprland/dot-config/hypr/hypridle.conf new file mode 100644 index 0000000..a3fb5f1 --- /dev/null +++ b/hyprland/dot-config/hypr/hypridle.conf @@ -0,0 +1,27 @@ +general { + lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances. + before_sleep_cmd = loginctl lock-session # lock before suspend. + after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. +} + +listener { + timeout = 150 # 2.5min. + on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor. + on-resume = brightnessctl -r # monitor backlight restore. +} + +listener { + timeout = 300 # 5min. + on-timeout = loginctl lock-session # lock screen when timeout has passed. +} + +listener { + timeout = 330 # 5.5min. + on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed. + on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. +} + +listener { + timeout = 1800 # 30min. + on-timeout = systemctl suspend # suspend pc. +} diff --git a/hyprland/dot-config/hypr/hyprland.conf b/hyprland/dot-config/hypr/hyprland.conf new file mode 100644 index 0000000..731e4b6 --- /dev/null +++ b/hyprland/dot-config/hypr/hyprland.conf @@ -0,0 +1,202 @@ +monitor=,preferred,auto,auto + +$terminal = app2unit -- alacritty +$menu = fuzzel --launch-prefix="app2unit --" +$browser = app2unit -- qutebrowser +$exit = loginctl terminate-user "" +$lock = app2unit -- hyprlock --no-fade-in + +$activeBorderColor = rgb(005577) # rgba(71CEADee) +$inactiveBorderColor = rgb(444444) + +general { + gaps_in = 5 + gaps_out = 15 + border_size = 2 + + col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + # col.active_border = $activeBorderColor + col.inactive_border = $inactiveBorderColor + + resize_on_border = false + allow_tearing = false + layout = master +} + +decoration { + rounding = 10 + rounding_power = 2 + + active_opacity = 1.0 + inactive_opacity = 1.0 + + shadow { + enabled = false + } + blur { + enabled = false + } +} + +animations { + enabled = yes + + # Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves + # NAME, X0, Y0, X1, Y1 + bezier = easeOutQuint, 0.23, 1, 0.32, 1 + bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1 + bezier = linear, 0, 0, 1, 1 + bezier = almostLinear, 0.5, 0.5, 0.75, 1 + bezier = quick, 0.15, 0, 0.1, 1 + + # Default animations, see https://wiki.hypr.land/Configuring/Animations/ + # NAME, ONOFF, SPEED, CURVE, [STYLE] + animation = global, 1, 10, default + animation = border, 1, 5.39, easeOutQuint + animation = windows, 1, 4.79, easeOutQuint + animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% + animation = windowsOut, 1, 1.49, linear, popin 87% + animation = fadeIn, 1, 1.73, almostLinear + animation = fadeOut, 1, 1.46, almostLinear + animation = fade, 1, 3.03, quick + animation = layers, 1, 3.81, easeOutQuint + animation = layersIn, 1, 4, easeOutQuint, fade + animation = layersOut, 1, 1.5, linear, fade + animation = fadeLayersIn, 1, 1.79, almostLinear + animation = fadeLayersOut, 1, 1.39, almostLinear + animation = workspaces, 1, 1.94, almostLinear, fade + animation = workspacesIn, 1, 1.21, almostLinear, fade + animation = workspacesOut, 1, 1.94, almostLinear, fade + animation = zoomFactor, 1, 7, quick +} + +# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/ +# "Smart gaps" / "No gaps when only" +# uncomment all if you wish to use that. +# workspace = w[tv1], gapsout:0, gapsin:0 +# workspace = f[1], gapsout:0, gapsin:0 +# windowrule = bordersize 0, floating:0, onworkspace:w[tv1] +# windowrule = bordersize 0, floating:0, onworkspace:f[1] + +# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more +dwindle { + pseudotile = true + preserve_split = true +} + +# See https://wiki.hypr.land/Configuring/Master-Layout/ for more +master { + new_status = inherit + mfact = 0.50 +} + +misc { + force_default_wallpaper = 0 + disable_hyprland_logo = true +} + +input { + kb_layout = us,ir + kb_variant = ,pes_keypad + kb_options = grp:shifts_toggle + + repeat_rate = 50 + repeat_delay = 300 + + follow_mouse = 1 + + sensitivity = 0 + + touchpad { + natural_scroll = false + } +} + +# See https://wiki.hypr.land/Configuring/Gestures +# gesture = 3, horizontal, workspace + +$osdclient = swayosd-client --monitor "$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')" + +# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more +bind = SUPER, return, exec, $terminal +bind = SUPER SHIFT, C, killactive, +bind = SUPER SHIFT, E, exec, $exit + +bind = SUPER SHIFT, space, togglefloating, +bind = SUPER, V, togglesplit, # dwindle +bind = SUPER, F, fullscreen, toggle +bind = SUPER SHIFT, return, layoutmsg, swapwithmaster master ignoremaster +bind = SUPER, space, exec, $(hyprctl activewindow -j | jq -e '.floating') && hyprctl dispatch cyclenext tiled || hyprctl dispatch cyclenext floating + +bind = SUPER, comma, focusmonitor, +1 +bind = SUPER SHIFT, comma, movewindow, mon:+1 silent + +bind = SUPER, P, exec, $menu +bind = SUPER, B, exec, $browser +bind = SUPER, X, exec, $lock +# bind = SUPER, E, exec, rofi -show emoji +# bind = SUPER, M, exec, app2unit -- emacsclient -c + +# Move focus with mainMod + arrow keys +bind = SUPER, H, movefocus, l +bind = SUPER, J, movefocus, d +bind = SUPER, K, movefocus, u +bind = SUPER, L, movefocus, r + +# Move window +bind = SUPER SHIFT, H, movewindow, l +bind = SUPER SHIFT, J, movewindow, d +bind = SUPER SHIFT, K, movewindow, u +bind = SUPER SHIFT, L, movewindow, r +bind = SUPER, C, centerwindow + +# Switch workspaces with mainMod + [0-9] +bind = SUPER, 1, workspace, 1 +bind = SUPER, 2, workspace, 2 +bind = SUPER, 3, workspace, 3 +bind = SUPER, 4, workspace, 4 +bind = SUPER, 5, workspace, 5 +bind = SUPER, 6, workspace, 6 +bind = SUPER, 7, workspace, 7 +bind = SUPER, 8, workspace, 8 +bind = SUPER, 9, workspace, 9 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = SUPER SHIFT, 1, movetoworkspacesilent, 1 +bind = SUPER SHIFT, 2, movetoworkspacesilent, 2 +bind = SUPER SHIFT, 3, movetoworkspacesilent, 3 +bind = SUPER SHIFT, 4, movetoworkspacesilent, 4 +bind = SUPER SHIFT, 5, movetoworkspacesilent, 5 +bind = SUPER SHIFT, 6, movetoworkspacesilent, 6 +bind = SUPER SHIFT, 7, movetoworkspacesilent, 7 +bind = SUPER SHIFT, 8, movetoworkspacesilent, 8 +bind = SUPER SHIFT, 9, movetoworkspacesilent, 9 + +# Example special workspace (scratchpad) +bind = SUPER, S, togglespecialworkspace, magic +bind = SUPER SHIFT, S, movetoworkspace, special:magic + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = SUPER, mouse:272, movewindow +bindm = SUPER, mouse:273, resizewindow + + +# Laptop multimedia keys for volume and LCD brightness +bindel = ,XF86AudioRaiseVolume, exec, $osdclient --output-volume raise --max-volume 100 +bindel = ,XF86AudioLowerVolume, exec, $osdclient --output-volume lower +bindel = ,XF86AudioMute, exec, $osdclient --output-volume mute-toggle && update-led-mute sink +bindel = ,XF86AudioMicMute, exec, $osdclient --input-volume mute-toggle && update-led-mute source +bindel = ,XF86MonBrightnessUp, exec, $osdclient --brightness raise +bindel = ,XF86MonBrightnessDown, exec, $osdclient --brightness lower + +# Screenshot +bindd = , PRINT, Screenshot with editing, exec, screenshot-hypr +bindd = SHIFT, PRINT, Screenshot to clipboard, exec, screenshot-hypr smart +bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a + + +# Ignore maximize requests from apps. You'll probably like this. +windowrule = suppressevent maximize, class:.* + +# Fix some dragging issues with XWayland +windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 diff --git a/hyprland/dot-config/hypr/hyprlock.conf b/hyprland/dot-config/hypr/hyprlock.conf new file mode 100644 index 0000000..9df3e67 --- /dev/null +++ b/hyprland/dot-config/hypr/hyprlock.conf @@ -0,0 +1,76 @@ +$font = Hack + +general { + hide_cursor = true +} + +auth { + fingerprint:enabled = true +} + +animations { + enabled = false +} + +background { + color = rgba(0, 0, 0, 1.0) +} + +input-field { + size = 500, 90 + outline_thickness = 3 + inner_color = rgba(0, 0, 0, 0.0) + + outer_color = rgba(33ccffee) rgba(00ff99ee) 45deg + check_color = rgba(00ff99ee) rgba(ff6633ee) 120deg + fail_color = rgba(ff6633ee) rgba(ff0066ee) 40deg + + font_color = rgb(143, 143, 143) + fade_on_empty = false + rounding = 15 + + font_family = $font + placeholder_text = Enter Password 󰈷 + fail_text = $PAMFAIL + + dots_spacing = 0.3 + + position = 0, -20 + halign = center + valign = center +} + +# TIME +label { + monitor = + text = $TIME # ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#variable-substitution + font_size = 90 + font_family = $font + + position = -30, 0 + halign = right + valign = top +} + +# DATE +label { + monitor = + text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds + font_size = 25 + font_family = $font + + position = -30, -150 + halign = right + valign = top +} + +label { + monitor = + text = $LAYOUT[en,ir] + font_size = 24 + onclick = hyprctl switchxkblayout all next + + position = 300, -20 + halign = center + valign = center +} diff --git a/hyprland/dot-config/systemd/user/hypridle.service.d/override.conf b/hyprland/dot-config/systemd/user/hypridle.service.d/override.conf new file mode 100644 index 0000000..2b17997 --- /dev/null +++ b/hyprland/dot-config/systemd/user/hypridle.service.d/override.conf @@ -0,0 +1,2 @@ +[Service] +ExecCondition=/lib/systemd/systemd-xdg-autostart-condition "Hyprland" "" diff --git a/hyprland/dot-config/systemd/user/hyprpolkitagent.service.d/override.conf b/hyprland/dot-config/systemd/user/hyprpolkitagent.service.d/override.conf new file mode 100644 index 0000000..0f6e052 --- /dev/null +++ b/hyprland/dot-config/systemd/user/hyprpolkitagent.service.d/override.conf @@ -0,0 +1,3 @@ +[Service] +ExecCondition=/lib/systemd/systemd-xdg-autostart-condition "Hyprland" "" +Slice=session-graphical.slice diff --git a/hyprland/dot-config/systemd/user/xdg-desktop-portal-hyprland.service.d/override.conf b/hyprland/dot-config/systemd/user/xdg-desktop-portal-hyprland.service.d/override.conf new file mode 100644 index 0000000..2b17997 --- /dev/null +++ b/hyprland/dot-config/systemd/user/xdg-desktop-portal-hyprland.service.d/override.conf @@ -0,0 +1,2 @@ +[Service] +ExecCondition=/lib/systemd/systemd-xdg-autostart-condition "Hyprland" "" diff --git a/hyprland/dot-config/uwsm/env b/hyprland/dot-config/uwsm/env new file mode 100644 index 0000000..a2bd337 --- /dev/null +++ b/hyprland/dot-config/uwsm/env @@ -0,0 +1,17 @@ +# vim: ft=bash + +export XCURSOR_SIZE=24 + +# graphical apps +export BROWSER=qutebrowser +export TERMINAL=alacritty + +# Wayland configuration +export GDK_BACKEND='wayland,x11,*' +export QT_QPA_PLATFORM='wayland;xcb' +export QT_STYLE_OVERRIDE=kvantum +export SDL_VIDEODRIVER=wayland +export OZONE_PLATFORM=wayland +export ELECTRON_OZONE_PLATFORM_HINT=wayland + +export APP2UNIT_SLICES='a=app-graphical.slice b=background-graphical.slice s=session-graphical.slice' diff --git a/hyprland/dot-config/uwsm/env-hyprland b/hyprland/dot-config/uwsm/env-hyprland new file mode 100644 index 0000000..dc050ff --- /dev/null +++ b/hyprland/dot-config/uwsm/env-hyprland @@ -0,0 +1,3 @@ +# vim: ft=bash + +export HYPRCURSOR_SIZE=24 diff --git a/kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaita.kvconfig b/kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaita.kvconfig new file mode 100644 index 0000000..4ccde2f --- /dev/null +++ b/kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaita.kvconfig @@ -0,0 +1,570 @@ +[%General] +author=Vince Liuice, based on KvAdapta by Tsu Jan +comment=An uncomplicated theme inspired by the Materia GTK theme +x11drag=menubar_and_primary_toolbar +alt_mnemonic=true +left_tabs=false +attach_active_tab=false +mirror_doc_tabs=false +group_toolbar_buttons=true +toolbar_item_spacing=0 +toolbar_interior_spacing=2 +spread_progressbar=true +composite=true +menu_shadow_depth=16 +spread_menuitems=true +tooltip_shadow_depth=7 +splitter_width=1 +scroll_width=9 +scroll_arrows=false +scroll_min_extent=60 +slider_width=2 +slider_handle_width=23 +slider_handle_length=22 +tickless_slider_handle_size=22 +center_toolbar_handle=true +check_size=24 +textless_progressbar=false +progressbar_thickness=2 +menubar_mouse_tracking=true +toolbutton_style=1 +double_click=false +translucent_windows=false +blurring=false +popup_blurring=false +vertical_spin_indicators=false +spin_button_width=24 +fill_rubberband=false +merge_menubar_with_toolbar=true +small_icon_size=16 +large_icon_size=32 +button_icon_size=16 +toolbar_icon_size=16 +combo_as_lineedit=true +animate_states=true +button_contents_shift=false +combo_menu=true +hide_combo_checkboxes=true +combo_focus_rect=false +groupbox_top_label=true +inline_spin_indicators=true +joined_inactive_tabs=false +layout_spacing=6 +layout_margin=9 +scrollbar_in_view=true +transient_scrollbar=true +transient_groove=true +submenu_overlap=0 +tooltip_delay=0 +tree_branch_line=true +no_window_pattern=false +opaque=kaffeine,kmplayer,subtitlecomposer,kdenlive,vlc,smplayer,smplayer2,avidemux,avidemux2_qt4,avidemux3_qt4,avidemux3_qt5,kamoso,QtCreator,VirtualBox,trojita,dragon,digikam +reduce_window_opacity=0 +respect_DE=true +scrollable_menu=false +submenu_delay=150 +no_inactiveness=false +reduce_menu_opacity=0 +click_behavior=0 +contrast=1.00 +dialog_button_layout=0 +intensity=1.00 +saturation=1.00 +shadowless_popup=false +drag_from_buttons=false +menu_blur_radius=0 +tooltip_blur_radius=0 + +[GeneralColors] +window.color=#F5F5F5 +base.color=#ffffff +alt.base.color=#f8f8f8 +button.color=#f2f2f4 +light.color=#ffffff +mid.light.color=#f0f0f0 +dark.color=#c8c8c8 +mid.color=#e1e1e196 +highlight.color=#3c84f7 +inactive.highlight.color=#3c84f7 +text.color=#444444 +window.text.color=#444444 +button.text.color=#444444 +disabled.text.color=#44444474 +tooltip.text.color=#efefef +highlight.text.color=#333333 +link.color=#0057AE +link.visited.color=#E040FB +progress.indicator.text.color=#444444 + +[Hacks] +transparent_ktitle_label=true +transparent_dolphin_view=true +transparent_pcmanfm_sidepane=true +blur_translucent=false +transparent_menutitle=true +respect_darkness=true +kcapacitybar_as_progressbar=true +force_size_grip=true +iconless_pushbutton=false +iconless_menu=false +disabled_icon_opacity=100 +lxqtmainmenu_iconsize=16 +normal_default_pushbutton=true +single_top_toolbar=true +tint_on_mouseover=0 +transparent_pcmanfm_view=true +no_selection_tint=true +transparent_arrow_button=true +middle_click_scroll=false +opaque_colors=false +kinetic_scrolling=false +scroll_jump_workaround=true +centered_forms=false +noninteger_translucency=false +style_vertical_toolbars=false +blur_only_active_window=true + +[PanelButtonCommand] +frame=true +frame.element=button +frame.top=6 +frame.bottom=6 +frame.left=6 +frame.right=6 +interior=true +interior.element=button +indicator.size=8 +text.normal.color=#444444 +text.focus.color=#444444 +text.press.color=#333333 +text.toggle.color=white +highlight.text.color=white +text.shadow=0 +text.margin=4 +text.iconspacing=4 +indicator.element=arrow +frame.expansion=0 + +[PanelButtonTool] +inherits=PanelButtonCommand +text.normal.color=#444444 +text.focus.color=#444444 +text.press.color=#333333 +text.toggle.color=white +text.disabled.color=#44444474 +text.bold=false +indicator.element=arrow +indicator.size=0 +frame.expansion=0 + +[ToolbarButton] +frame=true +frame.element=tbutton +interior.element=tbutton +frame.top=14 +frame.bottom=14 +frame.left=14 +frame.right=14 +indicator.element=tarrow +text.normal.color=#444444 +text.focus.color=#444444 +text.press.color=#333333 +text.toggle.color=#333333 +text.disabled.color=#44444474 +text.bold=false +frame.expansion=28 + +[Dock] +inherits=PanelButtonCommand +interior.element=dock +frame.element=dock +frame.top=1 +frame.bottom=1 +frame.left=1 +frame.right=1 +text.normal.color=#444444 + +[DockTitle] +inherits=PanelButtonCommand +frame=false +interior=false +text.normal.color=#444444 +text.focus.color=#444444 +text.bold=false + +[IndicatorSpinBox] +inherits=PanelButtonCommand +frame=true +interior=true +frame.top=2 +frame.bottom=2 +frame.left=2 +frame.right=2 +indicator.element=spin +indicator.size=8 +text.normal.color=#444444 +text.margin.top=2 +text.margin.bottom=2 +text.margin.left=2 +text.margin.right=2 + +[RadioButton] +inherits=PanelButtonCommand +frame=false +interior.element=radio +text.normal.color=#444444 +text.focus.color=#444444 +min_width=+0.3font +min_height=+0.3font + +[CheckBox] +inherits=PanelButtonCommand +frame=false +interior.element=checkbox +text.normal.color=#444444 +text.focus.color=#444444 +min_width=+0.3font +min_height=+0.3font + +[Focus] +inherits=PanelButtonCommand +frame=true +frame.element=focus +frame.top=2 +frame.bottom=2 +frame.left=2 +frame.right=2 +frame.patternsize=14 + +[GenericFrame] +inherits=PanelButtonCommand +frame=true +interior=false +frame.element=common +interior.element=common +frame.top=1 +frame.bottom=1 +frame.left=1 +frame.right=1 + +[LineEdit] +inherits=PanelButtonCommand +frame.element=lineedit +interior.element=lineedit +frame.top=6 +frame.bottom=6 +frame.left=6 +frame.right=6 +text.margin.top=2 +text.margin.bottom=2 +text.margin.left=2 +text.margin.right=2 + +[ToolbarLineEdit] +frame.element=lineedit +interior.element=lineedit + +[DropDownButton] +inherits=PanelButtonCommand +indicator.element=arrow-down + +[IndicatorArrow] +indicator.element=arrow +indicator.size=8 + +[ToolboxTab] +inherits=PanelButtonCommand +text.normal.color=#444444 +text.press.color=#333333 +text.focus.color=#444444 + +[Tab] +inherits=PanelButtonCommand +focusFrame=true +interior.element=tab +text.margin.left=8 +text.margin.right=8 +text.margin.top=0 +text.margin.bottom=0 +frame.element=tab +indicator.element=tab +indicator.size=22 +frame.top=8 +frame.bottom=8 +frame.left=8 +frame.right=8 +text.normal.color=#444444 +text.focus.color=#444444 +text.press.color=#333333 +text.toggle.color=#333333 +frame.expansion=0 +text.bold=false + +[TabFrame] +inherits=PanelButtonCommand +frame.element=tabframe +interior.element=tabframe +frame.top=24 +frame.bottom=24 +frame.left=24 +frame.right=24 + +[TreeExpander] +inherits=PanelButtonCommand +indicator.size=8 +indicator.element=tree + +[HeaderSection] +inherits=PanelButtonCommand +interior.element=header +frame.element=header +frame.top=0 +frame.bottom=1 +frame.left=1 +frame.right=1 +text.normal.color=#444444 +text.focus.color=#444444 +text.press.color=#333333 +text.toggle.color=#333333 +frame.expansion=0 + +[SizeGrip] +indicator.element=resize-grip + +[Toolbar] +inherits=PanelButtonCommand +indicator.element=toolbar +indicator.size=5 +text.margin=0 +interior.element=menubar +frame.element=menubar +text.normal.color=#444444 +text.focus.color=#444444 +text.press.color=#333333 +text.toggle.color=#333333 +frame.left=6 +frame.right=6 +frame.top=0 +frame.bottom=1 +frame.expansion=0 + +[Slider] +inherits=PanelButtonCommand +frame.element=slider +focusFrame=true +interior.element=slider +frame.top=3 +frame.bottom=3 +frame.left=3 +frame.right=3 + +[SliderCursor] +inherits=PanelButtonCommand +frame=false +interior.element=slidercursor + +[Progressbar] +inherits=PanelButtonCommand +frame.element=progress +interior.element=progress +text.margin=0 +text.normal.color=#444444 +text.focus.color=#444444 +text.press.color=#333333 +text.toggle.color=#333333 +text.bold=false +frame.expansion=8 + +[ProgressbarContents] +inherits=PanelButtonCommand +frame=true +frame.element=progress-pattern +interior.element=progress-pattern + +[ItemView] +inherits=PanelButtonCommand +text.margin=0 +frame.element=itemview +interior.element=itemview +frame.top=4 +frame.bottom=4 +frame.left=4 +frame.right=4 +text.margin.top=0 +text.margin.bottom=0 +text.margin.left=8 +text.margin.right=8 +text.normal.color=#444444 +text.focus.color=#444444 +text.press.color=#333333 +text.toggle.color=#333333 +min_width=+0.3font +min_height=+0.3font +frame.expansion=0 + +[Splitter] +interior.element=splitter +frame=false +indicator.size=0 + +[Scrollbar] +inherits=PanelButtonCommand +indicator.element=arrow +indicator.size=12 + +[ScrollbarSlider] +inherits=PanelButtonCommand +frame.element=scrollbarslider +interior=false +frame.left=5 +frame.right=5 +frame.top=5 +frame.bottom=5 +indicator.element=grip +indicator.size=12 + +[ScrollbarGroove] +inherits=PanelButtonCommand +interior=false +frame=false + +[Menu] +inherits=PanelButtonCommand +frame.top=8 +frame.bottom=8 +frame.left=8 +frame.right=8 +frame.element=menu +interior.element=menu +text.normal.color=#444444 +text.shadow=false +text.bold=false + +[MenuItem] +inherits=PanelButtonCommand +frame=true +frame.element=menuitem +interior.element=menuitem +indicator.element=menuitem +text.normal.color=#444444 +text.focus.color=#333333 +text.margin.top=0 +text.margin.bottom=0 +text.margin.left=6 +text.margin.right=6 +frame.top=4 +frame.bottom=4 +frame.left=12 +frame.right=12 +text.bold=false +frame.expansion=0 + +[MenuBar] +inherits=PanelButtonCommand +frame.element=menubar +interior.element=menubar +frame.bottom=0 +text.normal.color=#444444 +text.focus.color=#444444 +text.press.color=#333333 +text.toggle.color=#333333 +frame.expansion=0 +text.bold=false + +[MenuBarItem] +inherits=PanelButtonCommand +interior=true +interior.element=menubaritem +frame.element=menubaritem +frame.top=2 +frame.bottom=2 +frame.left=2 +frame.right=2 +text.margin.left=4 +text.margin.right=4 +text.margin.top=0 +text.margin.bottom=0 +text.normal.color=#444444 +text.focus.color=#444444 +text.press.color=#333333 +text.toggle.color=#333333 +text.bold=false +min_width=+0.3font +min_height=+0.3font +frame.expansion=0 + +[TitleBar] +inherits=PanelButtonCommand +frame=false +text.margin.top=2 +text.margin.bottom=2 +text.margin.left=2 +text.margin.right=2 +interior.element=titlebar +indicator.size=16 +indicator.element=mdi +text.normal.color=#444444 +text.focus.color=#444444 +text.bold=false +text.italic=true +frame.expansion=0 + +[ComboBox] +inherits=PanelButtonCommand +frame.element=combo +interior.element=combo +frame.top=6 +frame.bottom=6 +frame.left=6 +frame.right=6 +text.margin.top=2 +text.margin.bottom=2 +text.margin.left=2 +text.margin.right=2 +text.normal.color=#444444 +text.focus.color=#424242 +text.press.color=#424242 +text.toggle.color=#424242 + +[GroupBox] +inherits=GenericFrame +frame=false +text.shadow=0 +text.margin=0 +text.normal.color=#444444 +text.focus.color=#333333 +text.bold=false +frame.expansion=0 + +[TabBarFrame] +inherits=GenericFrame +frame=false +interior=false + +[ToolTip] +inherits=GenericFrame +frame.top=6 +frame.bottom=6 +frame.left=6 +frame.right=6 +interior=true +text.shadow=0 +text.margin=6 +interior.element=tooltip +frame.element=tooltip +text.normal.color=#efefef +text.focus.color=#efefef +frame.expansion=6 + +[StatusBar] +inherits=GenericFrame +frame=false +interior=false + +[Window] +interior=true +interior.element=window +frame=true +frame.element=window +frame.bottom=10 +frame.top=10 diff --git a/kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaita.svg b/kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaita.svg new file mode 100644 index 0000000..47649c5 --- /dev/null +++ b/kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaita.svg @@ -0,0 +1,6628 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaitaDark.kvconfig b/kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaitaDark.kvconfig new file mode 100644 index 0000000..2b950e7 --- /dev/null +++ b/kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaitaDark.kvconfig @@ -0,0 +1,568 @@ +[%General] +author=Vince Liuice, based on KvAdapta by Tsu Jan +comment=An uncomplicated theme inspired by the Materia GTK theme +x11drag=menubar_and_primary_toolbar +alt_mnemonic=true +left_tabs=false +attach_active_tab=false +mirror_doc_tabs=false +group_toolbar_buttons=true +toolbar_item_spacing=0 +toolbar_interior_spacing=2 +spread_progressbar=true +composite=true +menu_shadow_depth=16 +spread_menuitems=true +tooltip_shadow_depth=7 +splitter_width=1 +scroll_width=9 +scroll_arrows=false +scroll_min_extent=60 +slider_width=2 +slider_handle_width=23 +slider_handle_length=22 +tickless_slider_handle_size=22 +center_toolbar_handle=true +check_size=24 +textless_progressbar=false +progressbar_thickness=2 +menubar_mouse_tracking=true +toolbutton_style=1 +double_click=false +translucent_windows=false +blurring=false +popup_blurring=false +vertical_spin_indicators=false +spin_button_width=24 +fill_rubberband=false +merge_menubar_with_toolbar=true +small_icon_size=16 +large_icon_size=32 +button_icon_size=16 +toolbar_icon_size=16 +combo_as_lineedit=true +animate_states=true +button_contents_shift=false +combo_menu=true +hide_combo_checkboxes=true +combo_focus_rect=false +groupbox_top_label=true +inline_spin_indicators=true +joined_inactive_tabs=false +layout_spacing=6 +layout_margin=9 +scrollbar_in_view=true +transient_scrollbar=true +transient_groove=true +submenu_overlap=0 +tooltip_delay=0 +tree_branch_line=true +no_window_pattern=false +opaque=kaffeine,kmplayer,subtitlecomposer,kdenlive,vlc,smplayer,smplayer2,avidemux,avidemux2_qt4,avidemux3_qt4,avidemux3_qt5,kamoso,QtCreator,VirtualBox,trojita,dragon,digikam +reduce_window_opacity=0 +respect_DE=true +scrollable_menu=false +submenu_delay=150 +no_inactiveness=false +reduce_menu_opacity=0 +click_behavior=0 +contrast=1.00 +dialog_button_layout=0 +intensity=1.00 +saturation=1.00 +shadowless_popup=false +drag_from_buttons=false +menu_blur_radius=0 +tooltip_blur_radius=0 + +[GeneralColors] +window.color=#2c2c2c +base.color=#2c2c2c +alt.base.color=#2e2e2e +button.color=#4d4d4d +light.color=#535353 +mid.light.color=#474747 +dark.color=#282828 +mid.color=#323232 +highlight.color=#3584e4 +inactive.highlight.color=#3584e4 +text.color=#dfdfdf +window.text.color=#dfdfdf +button.text.color=#dfdfdf +disabled.text.color=#696969 +tooltip.text.color=#efefef +highlight.text.color=#ffffff +link.color=#0057AE +link.visited.color=#E040FB +progress.indicator.text.color=#dfdfdf + +[Hacks] +transparent_ktitle_label=true +transparent_dolphin_view=true +transparent_pcmanfm_sidepane=true +blur_translucent=false +transparent_menutitle=true +respect_darkness=true +kcapacitybar_as_progressbar=true +force_size_grip=true +iconless_pushbutton=true +iconless_menu=false +disabled_icon_opacity=100 +lxqtmainmenu_iconsize=16 +normal_default_pushbutton=true +single_top_toolbar=true +tint_on_mouseover=0 +transparent_pcmanfm_view=true +no_selection_tint=true +transparent_arrow_button=true +middle_click_scroll=false +opaque_colors=false +kinetic_scrolling=false +scroll_jump_workaround=true +centered_forms=false +noninteger_translucency=false +style_vertical_toolbars=false +blur_only_active_window=true + +[PanelButtonCommand] +frame=true +frame.element=button +frame.top=6 +frame.bottom=6 +frame.left=6 +frame.right=6 +interior=true +interior.element=button +indicator.size=8 +text.normal.color=#dfdfdf +text.focus.color=white +text.press.color=white +text.toggle.color=#ffffff +text.shadow=0 +text.margin=4 +text.iconspacing=4 +indicator.element=arrow +frame.expansion=0 + +[PanelButtonTool] +inherits=PanelButtonCommand +text.normal.color=#dfdfdf +text.focus.color=white +text.press.color=white +text.toggle.color=#ffffff +text.bold=false +indicator.element=arrow +indicator.size=0 +frame.expansion=0 + +[ToolbarButton] +frame=true +frame.element=tbutton +interior.element=tbutton +frame.top=16 +frame.bottom=16 +frame.left=16 +frame.right=16 +indicator.element=tarrow +text.normal.color=#dfdfdf +text.focus.color=white +text.press.color=white +text.toggle.color=white +text.bold=false +frame.expansion=32 + +[Dock] +inherits=PanelButtonCommand +interior.element=dock +frame.element=dock +frame.top=1 +frame.bottom=1 +frame.left=1 +frame.right=1 +text.normal.color=#dfdfdf + +[DockTitle] +inherits=PanelButtonCommand +frame=false +interior=false +text.normal.color=#dfdfdf +text.focus.color=white +text.bold=false + +[IndicatorSpinBox] +inherits=PanelButtonCommand +frame=true +interior=true +frame.top=2 +frame.bottom=2 +frame.left=2 +frame.right=2 +indicator.element=spin +indicator.size=8 +text.normal.color=#dfdfdf +text.margin.top=2 +text.margin.bottom=2 +text.margin.left=2 +text.margin.right=2 + +[RadioButton] +inherits=PanelButtonCommand +frame=false +interior.element=radio +text.normal.color=#dfdfdf +text.focus.color=white +min_width=+0.3font +min_height=+0.3font + +[CheckBox] +inherits=PanelButtonCommand +frame=false +interior.element=checkbox +text.normal.color=#dfdfdf +text.focus.color=white +min_width=+0.3font +min_height=+0.3font + +[Focus] +inherits=PanelButtonCommand +frame=true +frame.element=focus +frame.top=2 +frame.bottom=2 +frame.left=2 +frame.right=2 +frame.patternsize=14 + +[GenericFrame] +inherits=PanelButtonCommand +frame=true +interior=false +frame.element=common +interior.element=common +frame.top=1 +frame.bottom=1 +frame.left=1 +frame.right=1 + +[LineEdit] +inherits=PanelButtonCommand +frame.element=lineedit +interior.element=lineedit +frame.top=6 +frame.bottom=6 +frame.left=6 +frame.right=6 +text.margin.top=2 +text.margin.bottom=2 +text.margin.left=2 +text.margin.right=2 + +[ToolbarLineEdit] +frame.element=lineedit +interior.element=lineedit + +[DropDownButton] +inherits=PanelButtonCommand +indicator.element=arrow-down + +[IndicatorArrow] +indicator.element=arrow +indicator.size=8 + +[ToolboxTab] +inherits=PanelButtonCommand +text.normal.color=#dfdfdf +text.press.color=#dfdfdf +text.focus.color=white + +[Tab] +inherits=PanelButtonCommand +interior.element=tab +text.margin.left=8 +text.margin.right=8 +text.margin.top=0 +text.margin.bottom=0 +frame.element=tab +indicator.element=tab +indicator.size=22 +frame.top=8 +frame.bottom=8 +frame.left=8 +frame.right=8 +text.normal.color=#dfdfdf +text.focus.color=#dfdfdf +text.press.color=white +text.toggle.color=white +frame.expansion=0 +text.bold=false + +[TabFrame] +inherits=PanelButtonCommand +frame.element=tabframe +interior.element=tabframe +frame.top=24 +frame.bottom=24 +frame.left=24 +frame.right=24 + +[TreeExpander] +inherits=PanelButtonCommand +indicator.size=8 +indicator.element=tree + +[HeaderSection] +inherits=PanelButtonCommand +interior.element=header +frame.element=header +frame.top=0 +frame.bottom=1 +frame.left=1 +frame.right=1 +text.normal.color=#dfdfdf +text.focus.color=white +text.press.color=white +text.toggle.color=white +frame.expansion=0 + +[SizeGrip] +indicator.element=resize-grip + +[Toolbar] +inherits=PanelButtonCommand +indicator.element=toolbar +indicator.size=5 +text.margin=0 +interior.element=menubar +frame.element=menubar +text.normal.color=#dfdfdf +text.focus.color=white +text.press.color=#dfdfdf +text.toggle.color=white +frame.left=6 +frame.right=6 +frame.top=0 +frame.bottom=1 +frame.expansion=0 + +[Slider] +inherits=PanelButtonCommand +frame.element=slider +focusFrame=true +interior.element=slider +frame.top=3 +frame.bottom=3 +frame.left=3 +frame.right=3 + +[SliderCursor] +inherits=PanelButtonCommand +frame=false +interior.element=slidercursor + +[Progressbar] +inherits=PanelButtonCommand +frame.element=progress +interior.element=progress +text.margin=0 +text.normal.color=#dfdfdf +text.focus.color=#dfdfdf +text.press.color=#dfdfdf +text.toggle.color=#dfdfdf +text.bold=false +frame.expansion=8 + +[ProgressbarContents] +inherits=PanelButtonCommand +frame=true +frame.element=progress-pattern +interior.element=progress-pattern + +[ItemView] +inherits=PanelButtonCommand +text.margin=0 +frame.element=itemview +interior.element=itemview +frame.top=4 +frame.bottom=4 +frame.left=4 +frame.right=4 +text.margin.top=0 +text.margin.bottom=0 +text.margin.left=8 +text.margin.right=8 +text.normal.color=#dfdfdf +text.focus.color=#dfdfdf +text.press.color=#ffffff +text.toggle.color=#ffffff +min_width=+0.3font +min_height=+0.3font +frame.expansion=0 + +[Splitter] +interior.element=splitter +frame=false +indicator.size=0 + +[Scrollbar] +inherits=PanelButtonCommand +indicator.element=arrow +indicator.size=12 + +[ScrollbarSlider] +inherits=PanelButtonCommand +frame.element=scrollbarslider +interior=false +frame.left=5 +frame.right=5 +frame.top=5 +frame.bottom=5 +indicator.element=grip +indicator.size=12 + +[ScrollbarGroove] +inherits=PanelButtonCommand +interior=false +frame=false + +[Menu] +inherits=PanelButtonCommand +frame.top=8 +frame.bottom=8 +frame.left=8 +frame.right=8 +frame.element=menu +interior.element=menu +text.normal.color=#dedede +text.shadow=false +text.bold=false + +[MenuItem] +inherits=PanelButtonCommand +frame=true +frame.element=menuitem +interior.element=menuitem +indicator.element=menuitem +text.normal.color=#dedede +text.focus.color=#dedede +text.margin.top=0 +text.margin.bottom=0 +text.margin.left=6 +text.margin.right=6 +frame.top=4 +frame.bottom=4 +frame.left=12 +frame.right=12 +text.bold=false +frame.expansion=0 + +[MenuBar] +inherits=PanelButtonCommand +frame.element=menubar +interior.element=menubar +frame.bottom=0 +text.normal.color=#dfdfdf +text.focus.color=#ffffff +text.press.color=#ffffff +text.toggle.color=#ffffff +frame.expansion=0 +text.bold=false + +[MenuBarItem] +inherits=PanelButtonCommand +interior=true +interior.element=menubaritem +frame.element=menubaritem +frame.top=2 +frame.bottom=2 +frame.left=2 +frame.right=2 +text.margin.left=4 +text.margin.right=4 +text.margin.top=0 +text.margin.bottom=0 +text.normal.color=#dfdfdf +text.focus.color=#ffffff +text.press.color=#ffffff +text.toggle.color=#ffffff +text.bold=false +min_width=+0.3font +min_height=+0.3font +frame.expansion=0 + +[TitleBar] +inherits=PanelButtonCommand +frame=false +text.margin.top=2 +text.margin.bottom=2 +text.margin.left=2 +text.margin.right=2 +interior.element=titlebar +indicator.size=16 +indicator.element=mdi +text.normal.color=#787878 +text.focus.color=#dfdfdf +text.bold=false +text.italic=true +frame.expansion=0 + +[ComboBox] +inherits=PanelButtonCommand +frame.element=combo +interior.element=combo +frame.top=6 +frame.bottom=6 +frame.left=6 +frame.right=6 +text.margin.top=2 +text.margin.bottom=2 +text.margin.left=2 +text.margin.right=2 +text.focus.color=white +text.press.color=#dfdfdf +text.toggle.color=white + +[GroupBox] +inherits=GenericFrame +frame=false +text.shadow=0 +text.margin=0 +text.normal.color=#dfdfdf +text.focus.color=white +text.bold=false +frame.expansion=0 + +[TabBarFrame] +inherits=GenericFrame +frame=false +frame.element=tabBarFrame +interior=false +frame.top=0 +frame.bottom=0 +frame.left=0 +frame.right=0 + +[ToolTip] +inherits=GenericFrame +frame.top=6 +frame.bottom=6 +frame.left=6 +frame.right=6 +interior=true +text.shadow=0 +text.margin=6 +interior.element=tooltip +frame.element=tooltip +frame.expansion=6 + +[StatusBar] +inherits=GenericFrame +frame=false +interior=false + +[Window] +interior=true +interior.element=window +frame=true +frame.element=window +frame.bottom=10 +frame.top=10 diff --git a/kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaitaDark.svg b/kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaitaDark.svg new file mode 100644 index 0000000..2d17c81 --- /dev/null +++ b/kvantum/dot-config/Kvantum/KvLibadwaita/KvLibadwaitaDark.svg @@ -0,0 +1,6804 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kvantum/dot-config/Kvantum/kvantum.kvconfig b/kvantum/dot-config/Kvantum/kvantum.kvconfig new file mode 100644 index 0000000..c34b96a --- /dev/null +++ b/kvantum/dot-config/Kvantum/kvantum.kvconfig @@ -0,0 +1,2 @@ +[General] +theme=KvLibadwaitaDark diff --git a/lf/dot-config/lf/icons b/lf/dot-config/lf/icons new file mode 100644 index 0000000..aad068c --- /dev/null +++ b/lf/dot-config/lf/icons @@ -0,0 +1,77 @@ +di 📁 +fi 📃 +tw 🤝 +ow 📂 +ln ⛓ +or ❌ +ex 🎯 +*.txt ✍ +*.mom ✍ +*.me ✍ +*.ms ✍ +*.avif 🖼 +*.png 🖼 +*.webp 🖼 +*.ico 🖼 +*.jpg 📸 +*.jpe 📸 +*.jpeg 📸 +*.gif 🖼 +*.svg 🗺 +*.tif 🖼 +*.tiff 🖼 +*.xcf 🖌 +*.html 🌎 +*.xml 📰 +*.gpg 🔒 +*.css 🎨 +*.pdf 📚 +*.djvu 📚 +*.epub 📚 +*.csv 📓 +*.xlsx 📓 +*.tex 📜 +*.md 📘 +*.r 📊 +*.R 📊 +*.rmd 📊 +*.Rmd 📊 +*.m 📊 +*.mp3 🎵 +*.opus 🎵 +*.ogg 🎵 +*.m4a 🎵 +*.flac 🎼 +*.wav 🎼 +*.mkv 🎥 +*.mp4 🎥 +*.webm 🎥 +*.mpeg 🎥 +*.avi 🎥 +*.mov 🎥 +*.mpg 🎥 +*.wmv 🎥 +*.m4b 🎥 +*.flv 🎥 +*.zip 📦 +*.rar 📦 +*.7z 📦 +*.tar 📦 +*.z64 🎮 +*.v64 🎮 +*.n64 🎮 +*.gba 🎮 +*.nes 🎮 +*.gdi 🎮 +*.1 ℹ +*.nfo ℹ +*.info ℹ +*.log 📙 +*.iso 📀 +*.img 📀 +*.bib 🎓 +*.ged 👪 +*.part 💔 +*.torrent 🔽 +*.jar ♨ +*.java ♨ diff --git a/lf/dot-config/lf/lfrc b/lf/dot-config/lf/lfrc new file mode 100644 index 0000000..226e1aa --- /dev/null +++ b/lf/dot-config/lf/lfrc @@ -0,0 +1,84 @@ +# vim: ft=lf + +set shellopts '-eu' +set ifs "\n" +set autoquit true +set icons +set scrolloff 10 +set period 1 +set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml" + +cmd open ${{ + case $(file --mime-type "$(readlink -f "$f")" -b) in + text/* | application/json | inode/x-empty | application/x-subrip) $EDITOR "$fx" ;; + image/*) setsid -f app2unit -- imv -d $(rotdir "$f" | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|avif\|tif\|ico\)\(_large\)*$") 2>/dev/null | while read -r file; do + [ -z "$file" ] && continue + lf -remote "send select \"$file\"" + done & ;; + audio/* | video/x-ms-asf) setsid -f app2unit -- mpv --audio-display=no "$f" ;; + video/*) setsid -f app2unit -- mpv "$f" -quiet >/dev/null 2>&1 ;; + application/pgp-encrypted) $EDITOR "$fx" ;; + *) for f in $fx; do setsid -f app2unit-open "$f" >/dev/null 2>&1; done ;; + esac +}} + +cmd mkdir $mkdir -p "$@" + +cmd extract ${{ + clear; tput cup $(($(tput lines)/3)); tput bold + set -f + printf "%s\n\t" "$fx" + printf "extract?[y/N]" + read ans + [ $ans = "y" ] && { + case $fx in + *.tar.bz2) tar xjf $fx ;; + *.tar.gz) tar xzf $fx ;; + *.bz2) bunzip2 $fx ;; + *.rar) unrar e $fx ;; + *.gz) gunzip $fx ;; + *.tar) tar xf $fx ;; + *.tbz2) tar xjf $fx ;; + *.tgz) tar xzf $fx ;; + *.zip) unzip $fx ;; + *.Z) uncompress $fx ;; + *.7z) 7z x $fx ;; + *.tar.xz) tar xf $fx ;; + esac + } +}} + +cmd quit-and-cd &{{ + pwd > $LF_CD_FILE + lf -remote "send $id quit" +}} + +cmd fzf_jump ${{ + res="$(fd . | fzf --reverse --header='Jump to location')" + if [ -n "$res" ]; then + if [ -d "$res" ]; then + cmd="cd" + else + cmd="select" + fi + res="$(printf '%s' "$res" | sed 's/\\/\\\\/g;s/"/\\"/g')" + lf -remote "send $id $cmd \"$res\"" + fi +}} + +cmd dragon ${{ + IFS="$(printf '\n\t')"; dragon-drop $fx +}} + +map Y $printf "%s" "$fx" | wl-copy +map push :mkdir"" +map D delete +map Q quit-and-cd +map E :extract; reload +map :fzf_jump +map o &mimeopen "$f" +map O &mimeopen --ask "$f" +map dragon +map W $setsid -f $TERMINAL >/dev/null 2>&1 +map redraw +map unselect diff --git a/qute/dot-config/qutebrowser/config.py b/qute/dot-config/qutebrowser/config.py new file mode 100644 index 0000000..1a5c3ee --- /dev/null +++ b/qute/dot-config/qutebrowser/config.py @@ -0,0 +1,67 @@ +c = c +config = config + +c.url.searchengines = { + "DEFAULT": "https://duckduckgo.com/?q={}", + "!aw": "https://wiki.archlinux.org/?search={}", + "!apkg": "https://archlinux.org/packages/?sort=&q={}&maintainer=&flagged=", + "!aur": "https://aur.archlinux.org/packages?O=0&SeB=nd&K={}&outdated=&SB=p&SO=d&PP=50&submit=Go", + "!gh": "https://github.com/search?o=desc&q={}&s=stars", + "!yt": "https://www.youtube.com/results?search_query={}", +} + +c.completion.open_categories = [ + "searchengines", + "quickmarks", + "bookmarks", + "history", + "filesystem", +] + +config.load_autoconfig() # load settings done via the gui + +config.bind( + "zl", + "spawn --userscript qute-pass --username-pattern='login: (.*)' --username-target=secret", +) +config.bind( + "zul", + "spawn --userscript qute-pass --username-only --username-pattern='login: (.*)' --username-target=secret", +) +config.bind( + "zpl", + "spawn --userscript qute-pass --password-only --username-pattern='login: (.*)' --username-target=secret", +) +config.bind( + "zol", + "spawn --userscript qute-pass --otp-only --username-pattern='login: (.*)' --username-target=secret", +) + +c.editor.command = ["alacritty", "-e", "nvim", "{file}", "-c", "normal {line}G{column}"] + +# NOTE: to make Slack sign-in work: +# c.content.unknown_url_scheme_policy = "allow-all" + +c.content.blocking.enabled = True +c.content.blocking.method = "adblock" + +# c.content.blocking.adblock.lists = [ +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/legacy.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/filters.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/filters-2020.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/filters-2021.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/filters-2022.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/filters-2023.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/filters-2024.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/filters-2025.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/badware.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/privacy.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/badlists.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/annoyances.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/annoyances-cookies.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/annoyances-others.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/badlists.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/quick-fixes.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/resource-abuse.txt", +# "https://github.com/uBlockOrigin/uAssets/raw/master/filters/unbreak.txt", +# ] diff --git a/stow-all.bash b/stow-all.bash new file mode 100755 index 0000000..5601d99 --- /dev/null +++ b/stow-all.bash @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +ANSI_clear_line="\e[0K" +ANSI_color_R="\e[1;31m" +ANSI_color_G="\e[1;32m" +ANSI_color_Y="\e[1;33m" +ANSI_color_B="\e[1;34m" +ANSI_color_M="\e[1;35m" +ANSI_color_C="\e[1;36m" +ANSI_color_W="\e[1;39m" +ANSI_reset="\e[0m" + +function Log() +{ + printf "${ANSI_clear_line}${ANSI_color_W}%s ${ANSI_color_B}%s${ANSI_reset}\n" "$1" "$2" 1>&2 +} + +function ProcessStowOutput() +{ + while IFS= read -r line; do + if [[ $line =~ ^LINK:[[:space:]]+ ]]; then + # LINK operations in green + printf " - ${ANSI_clear_line}${ANSI_color_G}${line}${ANSI_reset}\n" 1>&2 + elif [[ $line =~ ^UNLINK:[[:space:]]+ ]]; then + # UNLINK operations in red + printf " - ${ANSI_clear_line}${ANSI_color_R}${line}${ANSI_reset}\n" 1>&2 + elif [[ $line =~ ^SKIP:[[:space:]]+ ]]; then + # SKIP operations in yellow + printf " - ${ANSI_clear_line}${ANSI_color_Y}${line}${ANSI_reset}\n" 1>&2 + else + # Other lines in cyan + printf " - ${ANSI_clear_line}${ANSI_color_C}${line}${ANSI_reset}\n" 1>&2 + fi + done +} + +function Stow() +{ + Log "Stowing" "$1" + stow --dotfiles -v "$1" 2>&1 | ProcessStowOutput + Log "Done with" "$1" +} + +Stow alacritty +Stow bash +Stow fonts +Stow git +Stow gpg +Stow hyprland +Stow kvantum +Stow lf +Stow qute +Stow wayland-basics diff --git a/wayland-basics/dot-config/kanshi/config b/wayland-basics/dot-config/kanshi/config new file mode 100644 index 0000000..8ca67a1 --- /dev/null +++ b/wayland-basics/dot-config/kanshi/config @@ -0,0 +1,21 @@ +# vim: ft=scfg + +output eDP-1 alias $laptop +output "Dell Inc. DELL P2723D FNHTH14" alias $workmon +output "Lenovo Group Limited M15 V30ANMLM" alias $lenmon + +profile work { + output $laptop disable + output $workmon mode 2560x1440 position 0,0 + exec ~/.config/kanshi/reload.sh +} + +profile home_double { + output $lenmon mode 1920x1080@60 position 0,0 + output $laptop enable mode 2880x1800@120 position 1920,0 scale 2 +} + +profile home { + output $laptop enable mode 2880x1800@120 position 0,0 scale 2 + exec ~/.config/kanshi/reload.sh +} diff --git a/wayland-basics/dot-config/kanshi/reload.sh b/wayland-basics/dot-config/kanshi/reload.sh new file mode 100755 index 0000000..ce74a3f --- /dev/null +++ b/wayland-basics/dot-config/kanshi/reload.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ -n "$HYPRLAND_INSTANCE_SIGNATURE" ]; then + hyprctl reload + hyprctl dispatch workspace 1 +fi diff --git a/wayland-basics/dot-config/mako/config b/wayland-basics/dot-config/mako/config new file mode 100644 index 0000000..9339e49 --- /dev/null +++ b/wayland-basics/dot-config/mako/config @@ -0,0 +1,38 @@ +# vim: ft=dosini + +text-color=#bbbbbb +border-color=#005577 +background-color=#222222 +padding=10 +border-size=2 +max-icon-size=32 +outer-margin=20 + +font=monospace 11 + +width=420 +height=110 +anchor=top-right +default-timeout=5000 +max-history=10 +icon-path=/usr/share/icons/Adwaita + +[actionable=true] +on-button-right=exec makoctl menu -n "${id}" wmenu + +[app-name=Spotify] +invisible=1 + +[mode=do-not-disturb] +invisible=true + +[mode=do-not-disturb app-name=notify-send] +invisible=false + +[app-name=NeoMutt] +default-timeout=20000 +on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga +# on-button-left=exec setsid app2unit-term -e neomutt_wrapper + +[urgency=critical] +default-timeout=0 diff --git a/wayland-basics/dot-config/mimeapps.list b/wayland-basics/dot-config/mimeapps.list new file mode 100644 index 0000000..f1a1568 --- /dev/null +++ b/wayland-basics/dot-config/mimeapps.list @@ -0,0 +1,53 @@ +[Default Applications] +x-scheme-handler/mailto=mail.desktop; +message/rfc822=mail.desktop; +x-scheme-handler/mid=mail.desktop; + +text/x-shellscript=text.desktop; +text/plain=text.desktop; +text/x-tex=text.desktop; +text/x-bibtex=text.desktop; + +application/postscript=pdf.desktop; +application/pdf=pdf.desktop; + +image/png=img.desktop; +image/jpeg=img.desktop; +image/gif=img.desktop; +image/heif=img.desktop; +image/svg+xml=img.desktop; +image/svg=img.desktop; + +video/x-matroska=video.desktop; +video/mp4=video.desktop; +video/webm=video.desktop; +video/mp4=video.desktop; +video/x-msvideo=video.desktop; +video/x-matroska=video.desktop; +video/x-flv=video.desktop; +video/x-ms-wmv=video.desktop; +video/mpeg=video.desktop; +video/ogg=video.desktop; +video/webm=video.desktop; +video/quicktime=video.desktop; +video/3gpp=video.desktop; +video/3gpp2=video.desktop; +video/x-ms-asf=video.desktop; +video/x-ogm+ogg=video.desktop; +video/x-theora+ogg=video.desktop; +application/ogg=video.desktop; + +inode/directory=file.desktop; + +x-scheme-handler/http=browser.desktop; +x-scheme-handler/https=browser.desktop; +x-scheme-handler/chrome=browser.desktop; +text/html=browser.desktop; +application/x-extension-htm=browser.desktop; +application/x-extension-html=browser.desktop; +application/x-extension-shtml=browser.desktop; +application/xhtml+xml=browser.desktop; +application/x-extension-xhtml=browser.desktop; +application/x-extension-xht=browser.desktop; +x-scheme-handler/about=browser.desktop; +x-scheme-handler/unknown=browser.desktop; diff --git a/wayland-basics/dot-config/mpv/mpv.conf b/wayland-basics/dot-config/mpv/mpv.conf new file mode 100644 index 0000000..ebfb505 --- /dev/null +++ b/wayland-basics/dot-config/mpv/mpv.conf @@ -0,0 +1 @@ +vo=gpu diff --git a/wayland-basics/dot-config/systemd/user/kanshi.service b/wayland-basics/dot-config/systemd/user/kanshi.service new file mode 100644 index 0000000..dd6227c --- /dev/null +++ b/wayland-basics/dot-config/systemd/user/kanshi.service @@ -0,0 +1,15 @@ +[Unit] +PartOf=graphical-session.target +Description=Kanshi Wayland output manager +After=graphical-session.target +Requisite=graphical-session.target + +[Service] +Type=exec +ExecStart=/usr/bin/kanshi +ExecReload=kill -SIGHUP $MAINPID +Restart=on-failure +Slice=background-graphical.slice + +[Install] +WantedBy=graphical-session.target diff --git a/wayland-basics/dot-config/systemd/user/swaybg.service b/wayland-basics/dot-config/systemd/user/swaybg.service new file mode 100644 index 0000000..719900d --- /dev/null +++ b/wayland-basics/dot-config/systemd/user/swaybg.service @@ -0,0 +1,15 @@ +[Unit] +PartOf=graphical-session.target +Description=Swaybg wallpaper utility +After=graphical-session.target +Requisite=graphical-session.target + +[Service] +Type=exec +# ExecStart=/usr/bin/swaybg -m fill -i /home/moreka/Pictures/ethereal.jpg +ExecStart=/usr/bin/swaybg -c '#002B36' +Restart=on-failure +Slice=background-graphical.slice + +[Install] +WantedBy=graphical-session.target diff --git a/wayland-basics/dot-config/systemd/user/swayosd-server.service b/wayland-basics/dot-config/systemd/user/swayosd-server.service new file mode 100644 index 0000000..21934eb --- /dev/null +++ b/wayland-basics/dot-config/systemd/user/swayosd-server.service @@ -0,0 +1,14 @@ +[Unit] +PartOf=graphical-session.target +Description=SwayOSD server +After=graphical-session.target +Requisite=graphical-session.target + +[Service] +Type=exec +ExecStart=/usr/bin/swayosd-server +Restart=on-failure +Slice=background-graphical.slice + +[Install] +WantedBy=graphical-session.target diff --git a/wayland-basics/dot-config/systemd/user/wl-clip-persist.service b/wayland-basics/dot-config/systemd/user/wl-clip-persist.service new file mode 100644 index 0000000..f0f55a6 --- /dev/null +++ b/wayland-basics/dot-config/systemd/user/wl-clip-persist.service @@ -0,0 +1,14 @@ +[Unit] +PartOf=graphical-session.target +Description=Clipboard history manager for wayland +After=graphical-session.target +Requisite=graphical-session.target + +[Service] +Type=exec +ExecStart=/usr/bin/wl-clip-persist --clipboard regular --disable-timestamps +Restart=on-failure +Slice=background-graphical.slice + +[Install] +WantedBy=graphical-session.target diff --git a/wayland-basics/dot-config/zathura/zathurarc b/wayland-basics/dot-config/zathura/zathurarc new file mode 100644 index 0000000..8322b0e --- /dev/null +++ b/wayland-basics/dot-config/zathura/zathurarc @@ -0,0 +1,22 @@ +set statusbar-h-padding 0 +set statusbar-v-padding 0 +set selection-clipboard clipboard +set database sqlite +set synctex true +# set synctex-editor-command "nvim -v --not-a-term -T dumb -c \"VimtexInverseSearch %{line}:%{column} '%{input}'\"" +set font "monospace 9" + +map u scroll half-up +map d scroll half-down +map D toggle_page_mode +map r reload +map R rotate +map K zoom in +map J zoom out +map i recolor +map p print +map g goto top + +set render-loading true + +# vim: ft=zathurarc diff --git a/wayland-basics/dot-local/share/applications/browser.desktop b/wayland-basics/dot-local/share/applications/browser.desktop new file mode 120000 index 0000000..38ab478 --- /dev/null +++ b/wayland-basics/dot-local/share/applications/browser.desktop @@ -0,0 +1 @@ +/usr/share/applications/org.qutebrowser.qutebrowser.desktop \ No newline at end of file diff --git a/wayland-basics/dot-local/share/applications/file.desktop b/wayland-basics/dot-local/share/applications/file.desktop new file mode 100755 index 0000000..a7e84c3 --- /dev/null +++ b/wayland-basics/dot-local/share/applications/file.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=File Manager +Exec=alacritty -e lf %u diff --git a/wayland-basics/dot-local/share/applications/img.desktop b/wayland-basics/dot-local/share/applications/img.desktop new file mode 120000 index 0000000..6dacb85 --- /dev/null +++ b/wayland-basics/dot-local/share/applications/img.desktop @@ -0,0 +1 @@ +imv.desktop \ No newline at end of file diff --git a/wayland-basics/dot-local/share/applications/imv.desktop b/wayland-basics/dot-local/share/applications/imv.desktop new file mode 100755 index 0000000..d41f33d --- /dev/null +++ b/wayland-basics/dot-local/share/applications/imv.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=IMV Image viewer +Icon=imv +Exec=/usr/bin/imv %f +Terminal=false +Categories=Graphics;Viewer; diff --git a/wayland-basics/dot-local/share/applications/mail.desktop b/wayland-basics/dot-local/share/applications/mail.desktop new file mode 100755 index 0000000..f36fa88 --- /dev/null +++ b/wayland-basics/dot-local/share/applications/mail.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=Mail +Exec=alacritty -e neomutt %u diff --git a/wayland-basics/dot-local/share/applications/mimeinfo.cache b/wayland-basics/dot-local/share/applications/mimeinfo.cache new file mode 100644 index 0000000..4c6a9fa --- /dev/null +++ b/wayland-basics/dot-local/share/applications/mimeinfo.cache @@ -0,0 +1,28 @@ +[MIME Cache] +application/rdf+xml=browser.desktop; +application/x-shellscript=nvim.desktop;text.desktop; +application/xhtml+xml=browser.desktop; +application/xml=browser.desktop; +image/gif=browser.desktop; +image/jpeg=browser.desktop; +image/png=browser.desktop; +image/webp=browser.desktop; +text/english=nvim.desktop;text.desktop; +text/html=browser.desktop; +text/plain=nvim.desktop;text.desktop; +text/x-c=nvim.desktop;text.desktop; +text/x-c++=nvim.desktop;text.desktop; +text/x-c++hdr=nvim.desktop;text.desktop; +text/x-c++src=nvim.desktop;text.desktop; +text/x-chdr=nvim.desktop;text.desktop; +text/x-csrc=nvim.desktop;text.desktop; +text/x-java=nvim.desktop;text.desktop; +text/x-makefile=nvim.desktop;text.desktop; +text/x-moc=nvim.desktop;text.desktop; +text/x-pascal=nvim.desktop;text.desktop; +text/x-tcl=nvim.desktop;text.desktop; +text/x-tex=nvim.desktop;text.desktop; +text/xml=browser.desktop; +x-scheme-handler/http=browser.desktop; +x-scheme-handler/https=browser.desktop; +x-scheme-handler/qute=browser.desktop; diff --git a/wayland-basics/dot-local/share/applications/mpv.desktop b/wayland-basics/dot-local/share/applications/mpv.desktop new file mode 100755 index 0000000..282ae48 --- /dev/null +++ b/wayland-basics/dot-local/share/applications/mpv.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=MPV Media Player +Icon=mpv +TryExec=/usr/bin/mpv +Exec=/usr/bin/mpv --player-operation-mode=pseudo-gui -- %U +Terminal=false +Categories=AudioVideo;Audio;Video;Player;TV; +StartupWMClass=mpv +Keywords=mpv;media;player;video;audio;tv; diff --git a/wayland-basics/dot-local/share/applications/nvim.desktop b/wayland-basics/dot-local/share/applications/nvim.desktop new file mode 100755 index 0000000..27fadab --- /dev/null +++ b/wayland-basics/dot-local/share/applications/nvim.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=Neovim +GenericName=Text Editor +Comment=Edit text files +Exec=sh -c "alacritty --class=nvim --title=nvim -- nvim %F" +Terminal=false +Type=Application +Keywords=Text;editor; +Icon=nvim +Categories=Utility;TextEditor; +StartupNotify=false +MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; diff --git a/wayland-basics/dot-local/share/applications/pdf.desktop b/wayland-basics/dot-local/share/applications/pdf.desktop new file mode 100755 index 0000000..8c38677 --- /dev/null +++ b/wayland-basics/dot-local/share/applications/pdf.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=PDF reader +Exec=/usr/bin/zathura %u diff --git a/wayland-basics/dot-local/share/applications/text.desktop b/wayland-basics/dot-local/share/applications/text.desktop new file mode 120000 index 0000000..15e1f2a --- /dev/null +++ b/wayland-basics/dot-local/share/applications/text.desktop @@ -0,0 +1 @@ +nvim.desktop \ No newline at end of file diff --git a/wayland-basics/dot-local/share/applications/video.desktop b/wayland-basics/dot-local/share/applications/video.desktop new file mode 120000 index 0000000..0da0c22 --- /dev/null +++ b/wayland-basics/dot-local/share/applications/video.desktop @@ -0,0 +1 @@ +mpv.desktop \ No newline at end of file -- cgit v1.2.3-71-gdd5e