├── .stowrc ├── zsh ├── .zprofile ├── .zlogout ├── zshrc │ ├── colors.zsh │ ├── options.zsh │ └── completions.zsh ├── .profile └── .zshrc ├── bash ├── .bash_logout ├── .bashrc └── .bash_profile ├── youtube-dl └── .config │ ├── yt-dlp │ └── config │ └── youtube-dl │ └── config ├── gtk ├── .gtkrc-2.0.mine ├── .config │ └── gtk-3.0 │ │ └── settings.ini └── .gtkrc-2.0 ├── bin └── bin │ ├── xclipargs │ ├── beet2mpv │ ├── text2unix_test │ ├── aunpack-all │ ├── text2unix │ ├── inotifyrun │ ├── watchdo │ ├── rofi-yesno │ ├── extract_links │ ├── rtouch │ ├── beet2mpd │ ├── foobar │ ├── aur-remove │ ├── aur-remove-sync │ ├── toggle-dark-mode │ ├── lowercase │ ├── share │ ├── mons-primary │ ├── aur-gc │ ├── rmove │ ├── share_clip │ ├── video-to-gif │ ├── btrfs-subvolumify │ ├── ytdl-music │ ├── arch-news │ ├── mpris_now_playing │ ├── follow_clip │ ├── recently_used │ └── i3lock-shot ├── mpv └── .config │ └── mpv │ ├── script-opts │ ├── convert_script.conf │ ├── sponsorblock.conf │ ├── osc.conf │ ├── playlistmanager.conf │ ├── thumbfast.conf │ ├── quality-menu.conf │ └── uosc.conf │ ├── _get_default-input.sh │ ├── _commit.sh │ ├── .gitignore │ ├── shaders │ └── kyoani_fog.glsl │ └── _update.sh ├── hexchat └── .config │ └── hexchat │ ├── urlhandlers.conf │ ├── ctcpreply.conf │ ├── colors.conf │ ├── commands.conf │ └── keybindings.conf ├── fcitx └── .config │ └── fcitx │ ├── data │ ├── layout_override │ └── QuickPhrase.mb │ └── conf │ ├── fcitx-quickphrase.config │ ├── fcitx-keyboard.config │ └── fcitx-classic-ui.config ├── xdg-desktop-portal └── .config │ ├── xdg-desktop-portal │ └── portals.conf │ └── systemd │ └── user │ └── xdg-desktop-portal.service.d │ └── override.conf ├── xinit ├── .xserverrc ├── .xprofile └── .xinitrc ├── gpg └── .gnupg │ ├── gpa.conf │ └── gpg.conf ├── mpd └── .config │ └── systemd │ └── user │ ├── mpDris2.service.d │ └── override.conf │ └── mpd.service.d │ └── override.conf ├── pulse └── .config │ └── pulse │ ├── daemon.conf │ └── default.pa ├── sublime-text ├── .config │ └── sublime-text │ │ └── Packages │ │ ├── User │ │ ├── Diff.sublime-settings │ │ ├── Console Input Widget.sublime-settings │ │ ├── Plain text.sublime-settings │ │ ├── Shell-Unix-Generic.sublime-settings │ │ ├── insert_date.sublime-settings │ │ ├── PackageResourceViewer.sublime-settings │ │ ├── Markdown.sublime-settings │ │ ├── Terminal.sublime-settings │ │ ├── Regex Replace Widget.sublime-settings │ │ ├── sublime_jedi.sublime-settings │ │ ├── Snippets │ │ │ ├── LaTeX │ │ │ │ ├── latex_item.sane-snippet │ │ │ │ ├── latex_enum.sane-snippet │ │ │ │ ├── latex_item.sane.sublime-snippet │ │ │ │ └── latex_enum.sane.sublime-snippet │ │ │ ├── url-file.sane-snippet │ │ │ ├── ReST Headers │ │ │ │ ├── h2.sane-snippet │ │ │ │ ├── h4.sane-snippet │ │ │ │ ├── h3.sane-snippet │ │ │ │ ├── h1.sane-snippet │ │ │ │ ├── h2.sane.sublime-snippet │ │ │ │ ├── h3.sane.sublime-snippet │ │ │ │ ├── h4.sane.sublime-snippet │ │ │ │ └── h1.sane.sublime-snippet │ │ │ ├── url-file.sane.sublime-snippet │ │ │ └── Rust │ │ │ │ └── pln.sublime-snippet │ │ ├── LSP-basedpyright.sublime-settings │ │ ├── Python │ │ │ ├── Snippets │ │ │ │ ├── self_setattr.sane-snippet │ │ │ │ ├── docstring.sane-snippet │ │ │ │ ├── pdb.sane-snippet │ │ │ │ ├── shebang.sane-snippet │ │ │ │ ├── self_setattr.sane.sublime-snippet │ │ │ │ ├── docstring.sane.sublime-snippet │ │ │ │ ├── pdb.sane.sublime-snippet │ │ │ │ └── shebang.sane.sublime-snippet │ │ │ ├── Python Windows Launcher.sublime-build │ │ │ ├── Pylint.sublime-build │ │ │ ├── Application Snippets │ │ │ │ ├── hexchat_callback.sane-snippet │ │ │ │ ├── sublime_text_event_listener.sane-snippet │ │ │ │ ├── sublime_text_text_command.sane-snippet │ │ │ │ ├── sublime_text_window_command.sane-snippet │ │ │ │ ├── hexchat_callback.sane.sublime-snippet │ │ │ │ ├── sublime_text_event_listener.sane.sublime-snippet │ │ │ │ ├── sublime_text_text_command.sane.sublime-snippet │ │ │ │ └── sublime_text_window_command.sane.sublime-snippet │ │ │ ├── Python Virtualenv.sublime-build │ │ │ ├── Flake8.sublime-build │ │ │ └── pytest.sublime-build │ │ ├── Delete Right and Move Right.sublime-macro │ │ ├── INI.sublime-settings │ │ ├── Default.sublime-commands │ │ ├── dependencies.json │ │ ├── GitGutter.sublime-settings │ │ ├── Delete Left Right Twice.sublime-macro │ │ ├── LSP-yaml.sublime-settings │ │ ├── FichteMarkDown.sublime-settings │ │ ├── scope_hunter.sublime-settings │ │ ├── BracketGuard.sublime-settings │ │ ├── LaTeX.sublime-settings │ │ ├── MarkdownPreview.sublime-settings │ │ ├── cycle_groups.py │ │ ├── FileHistory.sublime-settings │ │ ├── Zeal.sublime-settings │ │ ├── AdvancedNewFile.sublime-settings │ │ ├── PlainTasks.sublime-settings │ │ ├── GitSavvy.sublime-settings │ │ ├── LSP-ruff.sublime-settings │ │ ├── LSP-typescript.sublime-settings │ │ ├── Tubnil_mod.sublime-color-scheme │ │ ├── LaTeXTools.sublime-settings │ │ ├── TodoReview.sublime-settings │ │ ├── relink_resource_file.py │ │ ├── LSP-rust-analyzer.sublime-settings │ │ ├── LSP.sublime-settings │ │ ├── open_locate.py │ │ ├── Fmt.sublime-settings │ │ ├── python_print.py │ │ ├── LSP-vue.sublime-settings │ │ ├── Package Control.sublime-settings │ │ ├── open_api.py │ │ ├── ApplySyntax.sublime-settings │ │ └── bh_core.sublime-settings │ │ ├── Theme - Nil │ │ ├── Regex Widget - Nil.sublime-settings │ │ └── Widget - Nil.sublime-settings │ │ ├── FileIcons │ │ └── theme │ │ │ └── Nil.sublime-theme │ │ └── Default │ │ └── Syntax Tests.sublime-syntax └── bin │ └── sublp ├── feh └── .config │ └── feh │ ├── themes │ └── keys ├── picom └── .config │ └── picom.conf ├── sublime-merge └── .config │ └── sublime-merge │ └── Packages │ └── User │ ├── Tubnil_mod.sublime-color-scheme │ ├── Commit Message (Read Only).sublime-settings │ ├── Commit Message.sublime-settings │ ├── Diff - Merge Dark.sublime-settings │ ├── File Mode - Merge Dark.sublime-settings │ ├── Commit Message - Merge Dark.sublime-settings │ ├── Tag.sublime-menu │ ├── Main.sublime-menu │ ├── Diff Context.sublime-menu │ ├── Preferences.sublime-settings │ ├── Commit.sublime-menu │ ├── Default.sublime-commands │ └── Default (Linux).sublime-keymap ├── rofi └── .config │ └── rofi │ └── config.rasi ├── BetterDiscord └── .config │ └── BetterDiscord │ ├── _commit.sh │ ├── data │ └── stable │ │ └── custom.css │ ├── themes │ └── Nox_tempfixes.theme.css │ └── _update.sh ├── helix └── .config │ └── helix │ ├── languages.toml │ └── config.toml ├── ranger └── .config │ └── ranger │ ├── pygments-style-tubnil │ ├── install │ ├── setup.py │ └── tubnil.py │ └── rc.conf ├── dunst └── .config │ ├── systemd │ └── user │ │ └── dunst.service │ └── dunst │ └── dunstrc ├── redshift └── .config │ └── redshift.conf ├── tools ├── .config │ └── systemd │ │ └── user │ │ ├── dump-lutris-playtime.timer │ │ └── dump-lutris-playtime.service └── tools │ ├── trackma2syncplay │ └── example_config.yaml │ ├── sub │ ├── vertical_kanji.py │ └── merge_qcs.py │ ├── clone-root │ ├── mpris_now_playing │ ├── track_lutris_playtime │ └── track_lutris_playtime.py │ └── set_up_btrfs_drive ├── xbindkeys └── .xbindkeysrc ├── openurl ├── .local │ └── share │ │ └── applications │ │ └── openurl.desktop └── .config │ └── openurl.conf ├── system └── .config │ └── systemd │ └── user │ └── systembus-notify.service ├── lftp └── .lftprc ├── git ├── bin │ └── git-copy-commit-url ├── .gitignore_global └── .gitconfig ├── polybar └── .config │ └── polybar │ ├── scripts │ ├── polyyadfile │ ├── systemd-units │ ├── pulse-sink-source │ ├── wttr.py │ └── polyyad.py │ └── launch.sh ├── noisetorch └── .config │ └── systemd │ └── user │ └── noisetorch@.service ├── teiler ├── .config │ └── teiler │ │ ├── profiles │ │ └── my-mp4-noaudio │ │ └── config └── bin │ └── teiler_helper ├── lazydocker └── .config │ └── lazydocker │ └── config.yml ├── readline └── .inputrc ├── alacritty └── .config │ └── alacritty │ ├── alacritty.toml │ ├── keybindings.toml │ └── colors.toml ├── .misc └── FireFox │ ├── OneeChan Tubnil.json │ ├── web-scrobbler.json │ ├── userChrome.css │ ├── OneeChan v5.6.1 Settings.json │ ├── vimium-options.json │ └── treestyletab.css ├── .hooks └── pre-push ├── parcellite └── .config │ └── parcellite │ └── parcelliterc ├── termite └── .config │ └── termite │ └── config ├── README.md ├── fontconfig └── .config │ └── fontconfig │ └── fonts.conf ├── i3 ├── .config │ └── i3status │ │ └── config └── bin │ ├── backlightctl │ └── set-default-sink ├── aegisub └── .aegisub │ └── automation │ ├── autoload │ └── unapply_template.lua │ └── include │ └── op_overloads.lua ├── htop └── .config │ └── htop │ └── htoprc └── vesktop └── .config └── vesktop └── settings └── quickCss.css /.stowrc: -------------------------------------------------------------------------------- 1 | --no-folding 2 | --verbose=1 3 | -------------------------------------------------------------------------------- /zsh/.zprofile: -------------------------------------------------------------------------------- 1 | emulate sh -c '. ~/.profile' 2 | -------------------------------------------------------------------------------- /bash/.bash_logout: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.bash_logout 3 | # 4 | -------------------------------------------------------------------------------- /youtube-dl/.config/yt-dlp/config: -------------------------------------------------------------------------------- 1 | ../youtube-dl/config -------------------------------------------------------------------------------- /gtk/.gtkrc-2.0.mine: -------------------------------------------------------------------------------- 1 | gtk-font-name = "DejaVu Sans 11" 2 | -------------------------------------------------------------------------------- /bin/bin/xclipargs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | $@ $(xsel -ob) 3 | -------------------------------------------------------------------------------- /mpv/.config/mpv/script-opts/convert_script.conf: -------------------------------------------------------------------------------- 1 | use_same_dir=yes 2 | -------------------------------------------------------------------------------- /bin/bin/beet2mpv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | beet list -p $@ | mpv --playlist=- 4 | -------------------------------------------------------------------------------- /hexchat/.config/hexchat/urlhandlers.conf: -------------------------------------------------------------------------------- 1 | NAME Open in mpv 2 | CMD !mpv "%s" 3 | 4 | -------------------------------------------------------------------------------- /zsh/.zlogout: -------------------------------------------------------------------------------- 1 | # deactivate virtual env if any 2 | [ "$VIRTUAL_ENV" ] && deactivate 3 | -------------------------------------------------------------------------------- /fcitx/.config/fcitx/data/layout_override: -------------------------------------------------------------------------------- 1 | default,de,neo_qwertz 2 | mozc,de,neo_qwertz 3 | -------------------------------------------------------------------------------- /xdg-desktop-portal/.config/xdg-desktop-portal/portals.conf: -------------------------------------------------------------------------------- 1 | [preferred] 2 | default=gtk 3 | -------------------------------------------------------------------------------- /xinit/.xserverrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec /usr/bin/Xorg -nolisten tcp "$@" vt$XDG_VTNR 4 | -------------------------------------------------------------------------------- /gpg/.gnupg/gpa.conf: -------------------------------------------------------------------------------- 1 | default-key 55A0C8DF0B754DC7951875E39FA3981C07CD83C5 2 | detailed-view 3 | -------------------------------------------------------------------------------- /bin/bin/text2unix_test: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | find "${1:-.}" -type f -exec file "{}" \; | grep "with CRLF" 3 | -------------------------------------------------------------------------------- /mpd/.config/systemd/user/mpDris2.service.d/override.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | After=mpd.service 3 | Requires=mpd.service 4 | -------------------------------------------------------------------------------- /pulse/.config/pulse/daemon.conf: -------------------------------------------------------------------------------- 1 | default-fragments = 5 2 | default-fragment-size-msec = 2 3 | flat-volumes = no 4 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Diff.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "draw_white_space": "all", 3 | } 4 | -------------------------------------------------------------------------------- /hexchat/.config/hexchat/ctcpreply.conf: -------------------------------------------------------------------------------- 1 | NAME TIME 2 | CMD nctcp %s TIME %t 3 | 4 | NAME PING 5 | CMD nctcp %s PING %d 6 | 7 | -------------------------------------------------------------------------------- /mpv/.config/mpv/script-opts/sponsorblock.conf: -------------------------------------------------------------------------------- 1 | # Exclude 'filler' 2 | categories=sponsor,intro,outro,interaction,selfpromo 3 | -------------------------------------------------------------------------------- /bin/bin/aunpack-all: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | for arg in "$@"; do 4 | aunpack -- "$arg" 5 | # 7z x -- "$arg" 6 | done 7 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Console Input Widget.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "auto_match_enabled": true, 3 | } 4 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Plain text.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": 3 | [ 4 | "txt" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Shell-Unix-Generic.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "default_line_ending": "unix", 3 | } 4 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/insert_date.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "tz_in": "CET", 3 | "format": "%x", 4 | } 5 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/PackageResourceViewer.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "return_to_previous": true 3 | } 4 | -------------------------------------------------------------------------------- /xdg-desktop-portal/.config/systemd/user/xdg-desktop-portal.service.d/override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | Environment="XDG_CURRENT_DESKTOP=gtk" 3 | -------------------------------------------------------------------------------- /feh/.config/feh/themes: -------------------------------------------------------------------------------- 1 | # default theme 2 | feh --scale-down \ 3 | --action1 "[delete to trash] rofi-yesno 'delete %n?' && trash -- %F" 4 | -------------------------------------------------------------------------------- /mpv/.config/mpv/_get_default-input.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | perl -pe 's/^#(?!#|\s)//g' < /usr/share/doc/mpv/input.conf > default-input.conf 4 | -------------------------------------------------------------------------------- /bin/bin/text2unix: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | find "${1:-.}" -type f -exec file "{}" \; | grep "with CRLF" | awk -F ': ' '{ print $1 }' - | xargs -d "\n" -- dos2unix -k -- 3 | -------------------------------------------------------------------------------- /picom/.config/picom.conf: -------------------------------------------------------------------------------- 1 | # reference file at /etc/xdg/picom.conf 2 | 3 | backend = "xrender"; 4 | vsync = true; 5 | 6 | shadow = false; 7 | fading = false; 8 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Markdown.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "rulers": 3 | [ 4 | 80 5 | ], 6 | "draw_white_space": "all", 7 | } 8 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/Tubnil_mod.sublime-color-scheme: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "background": "hsl(0, 0%, 9.5%)", 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/Theme - Nil/Regex Widget - Nil.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "syntax": "Packages/Regular Expressions/RegExp.tmLanguage" 3 | } 4 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Terminal.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "terminal": "alacritty", 3 | "parameters": ["--working-directory", "%CWD%"], 4 | } 5 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/Commit Message (Read Only).sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "syntax": "Packages/Git Formats/Git Commit Message.sublime-syntax", 3 | } 4 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Regex Replace Widget.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "syntax": "Packages/PackageDev/Package/Regex Replacement.sublime-syntax", 3 | } 4 | -------------------------------------------------------------------------------- /gpg/.gnupg/gpg.conf: -------------------------------------------------------------------------------- 1 | keyid-format LONG 2 | auto-key-retrieve 3 | no-greeting 4 | # this server is too restrictive and needs another as fallback 5 | # keyserver hkps://keys.openpgp.org 6 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/sublime_jedi.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "python_package_paths": ["/opt/sublime_text_3", "C:\\Program Files\\Sublime Text 3"] 3 | } 4 | -------------------------------------------------------------------------------- /rofi/.config/rofi/config.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | terminal: "alacritty"; 3 | drun-match-fields: "all"; 4 | tokenize: true; 5 | } 6 | 7 | @theme "/usr/share/rofi/themes/Arc-Dark.rasi" 8 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/Commit Message.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "syntax": "Packages/Git Formats/Git Commit Message.sublime-syntax", 3 | "rulers": [72, 50] 4 | } 5 | -------------------------------------------------------------------------------- /mpv/.config/mpv/script-opts/osc.conf: -------------------------------------------------------------------------------- 1 | vidscale=no 2 | hidetimeout=1500 3 | seekbarstyle=bar 4 | timems=yes 5 | # box (default), slimbox, bottombar, topbar 6 | layout=bottombar 7 | minmousemove=2 8 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/LaTeX/latex_item.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Item 3 | tabTrigger: i 4 | scope: text.tex.latex 5 | --- 6 | \item $0 7 | -------------------------------------------------------------------------------- /youtube-dl/.config/youtube-dl/config: -------------------------------------------------------------------------------- 1 | --force-ipv4 2 | --format=bestvideo[height<=?1440]+bestaudio/best 3 | --output="%(title)s_%(id)s.%(ext)s" 4 | --no-mtime 5 | --netrc 6 | --embed-chapters 7 | -------------------------------------------------------------------------------- /bash/.bashrc: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.bashrc 3 | # 4 | 5 | # If not running interactively, don't do anything 6 | [[ $- != *i* ]] && return 7 | 8 | alias ls='ls --color=auto' 9 | PS1='[\u@\h \W]\$ ' 10 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/LSP-basedpyright.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "enabled": false, 3 | "settings": { 4 | "basedpyright.dev_environment": "sublime_text_38", 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Snippets/self_setattr.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: self.… = … 3 | tabTrigger: s 4 | scope: source.python 5 | --- 6 | self.$1 = $1 7 | -------------------------------------------------------------------------------- /bin/bin/inotifyrun: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | FORMAT=$(echo -e "\n\033[1;33m ==> %w%f written\033[0m") 3 | "$@" 4 | while inotifywait -qre close_write --format "$FORMAT" . --exclude /target/ 5 | do 6 | "$@" 7 | done 8 | -------------------------------------------------------------------------------- /bin/bin/watchdo: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # $1 - file to watch 4 | # $2 - commands to execute 5 | 6 | while true; do 7 | inotifywatch -e modify -t 1 "$1" 2>/dev/null | grep -q total && eval "$2"; 8 | done 9 | -------------------------------------------------------------------------------- /BetterDiscord/.config/BetterDiscord/_commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | cd $DIR 5 | 6 | git add plugins/ themes/ 7 | git commit -m "$(date -Iseconds)" 8 | -------------------------------------------------------------------------------- /bash/.bash_profile: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.bash_profile 3 | # 4 | 5 | [[ -f ~/.profile ]] && . ~/.profile 6 | # apparently .bashrc is only sourced in non-login (and interactive) shells 7 | [[ -f ~/.bashrc ]] && . ~/.bashrc 8 | -------------------------------------------------------------------------------- /mpv/.config/mpv/_commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | cd $DIR 5 | 6 | git add scripts/ shaders/ fonts/ .gitignore 7 | git commit -m "$(date -Iseconds)" 8 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Snippets/docstring.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Doc String 3 | tabTrigger: doc 4 | scope: source.python 5 | --- 6 | """${1:$SELECTION}""" 7 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Snippets/pdb.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Invoke pdb 3 | tabTrigger: pdb 4 | scope: source.python 5 | --- 6 | import pdb; pdb.set_trace() 7 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Snippets/shebang.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Shebang 3 | tabTrigger: sb 4 | scope: source.python 5 | --- 6 | #!/usr/bin/env python${1:3} 7 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/url-file.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: URL file content 3 | tabTrigger: url 4 | scope: source.ini 5 | --- 6 | [InternetShortcut] 7 | URL=$1 8 | -------------------------------------------------------------------------------- /helix/.config/helix/languages.toml: -------------------------------------------------------------------------------- 1 | [[language]] 2 | name = "rust" 3 | 4 | [language.auto-pairs] 5 | # add <> and remove '' 6 | '(' = ')' 7 | '{' = '}' 8 | '[' = ']' 9 | '"' = '"' 10 | '`' = '`' 11 | '<' = '>' 12 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Delete Right and Move Right.sublime-macro: -------------------------------------------------------------------------------- 1 | [ 2 | { "command": "right_delete" }, 3 | { "command": "move", 4 | "args": { "by": "characters", "forward": true } } 5 | ] 6 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/INI.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": 3 | [ 4 | "ini.dist", 5 | "timer", 6 | ".npmrc", 7 | "service", 8 | "conf", 9 | "url", 10 | ], 11 | } 12 | -------------------------------------------------------------------------------- /mpv/.config/mpv/.gitignore: -------------------------------------------------------------------------------- 1 | /_commit.sh 2 | /_get_default-input.sh 3 | /_update.sh 4 | scripts/pitchcontrol.lua 5 | scripts/excerpt.lua 6 | watch_later/ 7 | script-opts/ 8 | /*.conf 9 | *.db 10 | sponsorblock.txt 11 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/Diff - Merge Dark.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "color_scheme": "Packages/Theme - Nil/Tubnil_mod.tmTheme", 3 | // "color_scheme": "Tubnil_mod.sublime-color-scheme", 4 | } 5 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/File Mode - Merge Dark.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "color_scheme": "Packages/Theme - Nil/Tubnil_mod.tmTheme", 3 | // "color_scheme": "Tubnil_mod.sublime-color-scheme", 4 | } 5 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Default.sublime-commands: -------------------------------------------------------------------------------- 1 | [ 2 | { "caption": "Developer: Open API Files", "command": "open_api_files" }, 3 | { "caption": "Open Locate", "command": "open_locate" }, 4 | ] 5 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/dependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "*": { 3 | "*": [ 4 | "pathlib", 5 | "sublime_lib", 6 | "resumeback" 7 | ] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ranger/.config/ranger/pygments-style-tubnil/install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | usersite="$(python -c "import site; print(site.getusersitepackages())")" 4 | mkdir -p "$usersite" 5 | python setup.py develop --install-dir "$usersite" 6 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/Commit Message - Merge Dark.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "color_scheme": "Packages/Theme - Nil/Tubnil_mod.tmTheme", 3 | // "color_scheme": "Tubnil_mod.sublime-color-scheme", 4 | } 5 | -------------------------------------------------------------------------------- /dunst/.config/systemd/user/dunst.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Dunst notification daemon 3 | 4 | [Service] 5 | ExecStart=/usr/bin/dunst 6 | Type=simple 7 | #Environment=DISPLAY=:0 8 | 9 | [Install] 10 | WantedBy=default.target 11 | -------------------------------------------------------------------------------- /redshift/.config/redshift.conf: -------------------------------------------------------------------------------- 1 | ; https://wiki.archlinux.org/index.php/Redshift 2 | [redshift] 3 | temp-day=4900 4 | temp-night=3200 5 | adjustment-method=randr 6 | location-provider=manual 7 | 8 | [manual] 9 | ;lat= 10 | ;lon= 11 | -------------------------------------------------------------------------------- /tools/.config/systemd/user/dump-lutris-playtime.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Record playtimes in Lutris every day (at 0600) 3 | 4 | [Timer] 5 | OnCalendar=06:00 6 | Persistent=true 7 | 8 | [Install] 9 | WantedBy=timers.target 10 | -------------------------------------------------------------------------------- /xbindkeys/.xbindkeysrc: -------------------------------------------------------------------------------- 1 | # Run `xbindkeys -d` to see an example configuration 2 | 3 | # Bind extra mouse buttons to page up & down 4 | # swapped for CSL mouse 5 | "xdotool key Prior" 6 | b:9 7 | 8 | "xdotool key Next" 9 | b:8 10 | -------------------------------------------------------------------------------- /bin/bin/rofi-yesno: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # 3 | # Ask for confirmation with rofi. Returns non-zero exit code if declined. 4 | # Specify prompt with $1. 5 | 6 | echo -en "yes\nno" | rofi -dmenu -p "$1" | read -r answer 7 | [[ $answer == yes ]] 8 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/GitGutter.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "debounce_delay": 500, 3 | "show_markers_on_untracked_file": false, 4 | "show_line_annotation": false, 5 | "line_annotation_ruler": 2, 6 | } 7 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Python Windows Launcher.sublime-build: -------------------------------------------------------------------------------- 1 | { 2 | "shell_cmd": "py -u \"$file\"", 3 | "file_regex": "^ *File \"(...*?)\", line ([0-9]*)", 4 | "selector": "source.python" 5 | } 6 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/ReST Headers/h2.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Heading 2 3 | tabTrigger: h2 4 | scope: text.html.markdown, text.restructuredtext 5 | --- 6 | ${1:Heading 2} 7 | ${1/./=/g} 8 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/ReST Headers/h4.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Heading 4 3 | tabTrigger: h3 4 | scope: text.html.markdown, text.restructuredtext 5 | --- 6 | ${1:Heading 4} 7 | ${1/./-/g} 8 | -------------------------------------------------------------------------------- /mpv/.config/mpv/script-opts/playlistmanager.conf: -------------------------------------------------------------------------------- 1 | # https://github.com/jonniek/mpv-playlistmanager/blob/master/playlistmanager.conf 2 | style_ass_tags={\fnDejaVuSans\fs12} 3 | playlist_savepath=~/.local/share/mpv/playlists 4 | resolve_url_titles=yes 5 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Delete Left Right Twice.sublime-macro: -------------------------------------------------------------------------------- 1 | [ 2 | {"command": "left_delete" }, 3 | {"command": "right_delete" }, 4 | {"command": "left_delete" }, 5 | {"command": "right_delete" } 6 | ] 7 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/LSP-yaml.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "settings": { 3 | "yaml.customTags": ["!reference sequence"], 4 | // "yaml.schemas": { 5 | // "kubernetes": ["chart/*.yaml"] 6 | // }, 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/ReST Headers/h3.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Heading 3 3 | tabTrigger: h3 4 | scope: text.html.markdown, text.restructuredtext 5 | --- 6 | ${1:Heading 3} 7 | ${1/./\*/g} 8 | -------------------------------------------------------------------------------- /xinit/.xprofile: -------------------------------------------------------------------------------- 1 | # https://wiki.archlinux.org/index.php/Xprofile 2 | 3 | # set steam to minimize to tray 4 | export STEAM_FRAME_FORCE_CLOSE=1 5 | 6 | # disable "bell" beeper 7 | xset b off 8 | 9 | # start applications 10 | # blabla & 11 | -------------------------------------------------------------------------------- /bin/bin/extract_links: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # usage: extract_links [in_file] [out_file] 4 | 5 | exec grep -o -P 'https?://(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&/=]*)' \ 6 | "${1:--}" > "${2:-/dev/stdout}" 7 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/Tag.sublime-menu: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "caption": "Delete remote tag from origin", 4 | "command": "git", 5 | "args": {"argv": ["push", "--delete", "origin", "$tag_name"]} 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/FichteMarkDown.sublime-settings: -------------------------------------------------------------------------------- 1 | // These settings override both User and Default settings for the FichteMarkDown syntax 2 | { 3 | "color_scheme": "Packages/User/FichteMarkDown/Twilight-Fichte.tmTheme" 4 | } 5 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/Theme - Nil/Widget - Nil.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "color_scheme": "Packages/Theme - Nil/Tubnil_mod.tmTheme", 3 | // "color_scheme": "Packages/Theme - Nil/Widget - Nil.stTheme", 4 | "draw_shadows": false 5 | } 6 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/ReST Headers/h1.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Heading 1 3 | tabTrigger: h1 4 | scope: text.html.markdown, text.restructuredtext 5 | --- 6 | ${1/./=/g} 7 | ${1:Heading 1} 8 | ${1/./=/g} 9 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/scope_hunter.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "show_popup": false, 3 | "show_panel": true, 4 | "highlight_style": "outline", 5 | "selectors": true, 6 | "styling": true, 7 | "debug": true, 8 | } 9 | -------------------------------------------------------------------------------- /bin/bin/rtouch: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | # Recursively touch files by creating parent directories when necessary 4 | 5 | for file in "$@"; do 6 | if [[ "$file" = */* ]]; then 7 | mkdir -p "${file%/*}" 8 | fi; 9 | 10 | touch "$file"; 11 | done 12 | -------------------------------------------------------------------------------- /openurl/.local/share/applications/openurl.desktop: -------------------------------------------------------------------------------- 1 | # set this as the default handler in ~/.config/mimeapps.list 2 | [Desktop Entry] 3 | Exec=openurl %U 4 | MimeType=x-scheme-handler/http;x-scheme-handler/https; 5 | Name=openurl 6 | NoDisplay=true 7 | Type=Application 8 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Pylint.sublime-build: -------------------------------------------------------------------------------- 1 | { 2 | "shell_cmd": "pylint \"$file\"", 3 | //"file_regex": "^\\*+ Module ().*", 4 | "line_regex": "^\\w: *(\\d+), *(\\d+): (.*)", 5 | "selector": "source.python" 6 | } 7 | -------------------------------------------------------------------------------- /system/.config/systemd/user/systembus-notify.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Forward notifications for the system user to the current user 3 | 4 | [Service] 5 | ExecStart=/usr/bin/systembus-notify 6 | Type=simple 7 | 8 | [Install] 9 | WantedBy=default.target 10 | -------------------------------------------------------------------------------- /bin/bin/beet2mpd: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | music_dir="$(rg -o '^music_directory\s+"([^"]+?)/?"' -r '$1' ~/.config/mpd/mpd.conf)" 4 | 5 | beet list $@ -f '$path' \ 6 | | sed "s#^${music_dir}/## 7 | t 8 | d" \ 9 | | sort | tee /dev/fd/2 \ 10 | | mpc add 11 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/BracketGuard.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | // If the current document has more characters automatic checking of brackets 3 | // is disabled. 4 | "file_length_threshold" : 1000000, 5 | "check_on_save" : true 6 | } 7 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/LaTeX.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "auto_complete_triggers": 3 | [ 4 | { 5 | "characters": "\\", 6 | "selector": "text.tex.latex" 7 | } 8 | ], 9 | "extensions": 10 | [ 11 | "sty" 12 | ], 13 | "tab_size": 2 14 | } 15 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/MarkdownPreview.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "show_panel_on_build": true, 3 | "parser": "github", 4 | "github_inject_header_ids": true, 5 | "build_action": "browser", 6 | "file_path_conversions": "relative" 7 | } 8 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Application Snippets/hexchat_callback.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Hexchat Callback 3 | tabTrigger: hcc 4 | scope: source.python 5 | --- 6 | def ${1:event}_cb(word, word_eol, ${2:userdata}): 7 | ${3:pass} 8 | -------------------------------------------------------------------------------- /feh/.config/feh/keys: -------------------------------------------------------------------------------- 1 | # rotate left (or right) 2 | orient_3 l 3 | orient_1 L 4 | 5 | # unbind "f" and then to toggle_fullscreen 6 | save_filelist 7 | toggle_fullscreen v f 8 | 9 | # Unbind default C-Delete action and replace with prompt to trash 10 | delete 11 | action_1 1 C-Delete -------------------------------------------------------------------------------- /mpd/.config/systemd/user/mpd.service.d/override.conf: -------------------------------------------------------------------------------- 1 | # Work around issue with mpd not notifying systemd fast enough 2 | # so it times out before the database has been scanned. 3 | # https://github.com/MusicPlayerDaemon/MPD/issues/259 4 | [Service] 5 | #Type=simple 6 | TimeoutStartSec=180 7 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/LaTeX/latex_enum.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Enumeration (annotated) 3 | tabTrigger: enum 4 | scope: text.tex.latex 5 | --- 6 | \begin{enumerate}${1/(.+)/\[/}$1${1/(.+)/\]/} 7 | \item $0 8 | \end{enumerate} 9 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/LaTeX/latex_item.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | Item 6 | text.tex.latex 7 | i 8 | 9 | -------------------------------------------------------------------------------- /lftp/.lftprc: -------------------------------------------------------------------------------- 1 | alias ll cls -lah --si --filesize --sortnocase --basename 2 | alias .. cd .. 3 | alias ... cd ../.. 4 | 5 | set cmd:prompt '\nlftp \S\? \u\@\h\n >\e[35m\w\e[0m\n <\e[34m\l\e[0m\n$ ' 6 | # .netrc is only used for the default protocol (idk why) 7 | set cmd:default-protocol sftp 8 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Snippets/self_setattr.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | self.… = … 6 | source.python 7 | s 8 | 9 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Snippets/docstring.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | Doc String 6 | source.python 7 | doc 8 | 9 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Snippets/pdb.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | Invoke pdb 6 | source.python 7 | pdb 8 | 9 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Snippets/shebang.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | Shebang 6 | source.python 7 | sb 8 | 9 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Application Snippets/sublime_text_event_listener.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Sublime Text EventListener 3 | tabTrigger: st_listener 4 | scope: source.python 5 | --- 6 | class ${1:TestListener}(sublime_plugin.EventListener): 7 | ${2:pass} 8 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/url-file.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | URL file content 7 | source.ini 8 | url 9 | 10 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/cycle_groups.py: -------------------------------------------------------------------------------- 1 | import sublime_plugin 2 | 3 | 4 | class CycleGroupsCommand(sublime_plugin.WindowCommand): 5 | def run(self): 6 | w = self.window 7 | w.focus_group((w.active_group() + 1) % w.num_groups()) 8 | # TODO multiple selected tabs 9 | -------------------------------------------------------------------------------- /mpv/.config/mpv/shaders/kyoani_fog.glsl: -------------------------------------------------------------------------------- 1 | // interpolates luma from 16-235 to 0-235 2 | 3 | //!HOOK LUMA 4 | //!BIND HOOKED 5 | //!DESC Anti Kyoani Fog 6 | 7 | #define const_1 ( 16.0 / 235.0) 8 | #define const_2 (235.0 / 219.0) 9 | 10 | vec4 hook() { 11 | return (LUMA_tex(LUMA_pos) - const_1) * const_2; 12 | } 13 | -------------------------------------------------------------------------------- /tools/.config/systemd/user/dump-lutris-playtime.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Fetch current lutris playtime and dump it to files 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=%h/tools/track_lutris_playtime/track_lutris_playtime.py 7 | 8 | # To be triggered by a timer 9 | # [Install] 10 | # WantedBy=default.target 11 | -------------------------------------------------------------------------------- /bin/bin/foobar: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | export WINEPREFIX='/home/fichte/.wine32' 4 | export FREETYPE_PROPERTIES="truetype:interpreter-version=35" 5 | exec wine 'C:\Program Files\foobar2000\foobar2000.exe' $@ 6 | # wine C:\\\\windows\\\\command\\\\start.exe /Unix /home/fichte/.wine32/dosdevices/c:/users/Public/Desktop/foobar2000.lnk $@ 7 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Application Snippets/sublime_text_text_command.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Sublime Text TextCommand 3 | tabTrigger: st_text_cmd 4 | scope: source.python 5 | --- 6 | class ${1:TestCommand}Command(sublime_plugin.TextCommand): 7 | def run(self, edit): 8 | ${2:pass} 9 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Application Snippets/sublime_text_window_command.sane-snippet: -------------------------------------------------------------------------------- 1 | --- 2 | description: Sublime Text WindowCommand 3 | tabTrigger: st_win_cmd 4 | scope: source.python 5 | --- 6 | class ${1:TestCommand}Command(sublime_plugin.WindowCommand): 7 | def run(self): 8 | ${2:pass} 9 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/ReST Headers/h2.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Heading 2 7 | text.html.markdown, text.restructuredtext 8 | h2 9 | 10 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/ReST Headers/h3.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Heading 3 7 | text.html.markdown, text.restructuredtext 8 | h3 9 | 10 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/ReST Headers/h4.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Heading 4 7 | text.html.markdown, text.restructuredtext 8 | h3 9 | 10 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/Main.sublime-menu: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "repository", 4 | "children": [ 5 | { 6 | "caption": "Open Terminal…", 7 | "command": "git", 8 | "args": { "argv": ["terminal"] } 9 | }, 10 | ], 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/Diff Context.sublime-menu: -------------------------------------------------------------------------------- 1 | [ 2 | { "caption": "-" }, 3 | { 4 | "caption": "File History", 5 | "command": "search", "args": { "query": "file:\"$path\"" } 6 | }, 7 | { 8 | "caption": "Blame", 9 | "command": "blame", "args": { "path": "$path" } 10 | }, 11 | ] 12 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/ReST Headers/h1.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | Heading 1 8 | text.html.markdown, text.restructuredtext 9 | h1 10 | 11 | -------------------------------------------------------------------------------- /bin/bin/aur-remove: -------------------------------------------------------------------------------- 1 | #!/bin/sh -- 2 | # aur-remove - remove listed packages from all local repositories 3 | 4 | if [ "$#" -eq 0 ]; then 5 | printf 'usage: aur remove package [package ...]\n' >&2 6 | exit 1 7 | fi 8 | 9 | aur repo --list-path | while read -r repo_path; do 10 | repo-remove "$repo_path" "$@" 11 | paccache -c "${repo_path%/*}" -rvk0 "$@" 12 | done 13 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Application Snippets/hexchat_callback.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Hexchat Callback 7 | source.python 8 | hcc 9 | 10 | -------------------------------------------------------------------------------- /bin/bin/aur-remove-sync: -------------------------------------------------------------------------------- 1 | #!/bin/sh -- 2 | # aur-remove-sync - Remove listed packages from $AURDEST 3 | 4 | if [ "$#" -eq 0 ]; then 5 | printf 'usage: aur remove-sync package [package ...]\n' >&2 6 | exit 1 7 | fi 8 | 9 | XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" 10 | AURDEST="${AURDEST:-$XDG_CACHE_HOME/aurutils/sync}" 11 | 12 | cd "$AURDEST" 13 | rm -vrf -- "$@" 14 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/LaTeX/latex_enum.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | Enumeration (annotated) 8 | text.tex.latex 9 | enum 10 | 11 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/FileHistory.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "debug": false, 3 | "monospace_font": false, 4 | "prettify_history": true, 5 | "remove_non_existent_files_on_preview": true, 6 | "timestamp_format": "%Y-%m-%d %H:%M:%S", 7 | "timestamp_mode": "history_access", 8 | "cleanup_on_startup": true, 9 | "reopen_file_in_current_group": false 10 | } 11 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Zeal.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "docsets_user": [ 3 | { "name": "Sublime Text", "selector": "source.json.sublime, source.yaml.sublime, source.python" }, 4 | { "name": "Docker", "selector": "source.dockerfile", "namespace": "docker" }, 5 | { "name": "JavaScript", "selector": "source.ts" }, 6 | ], 7 | "multi_match": "join", 8 | } 9 | -------------------------------------------------------------------------------- /ranger/.config/ranger/pygments-style-tubnil/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | # install with: 4 | # $ python setup.py develop --install-dir "$HOME/.local/lib/python3.7/site-packages" 5 | 6 | setup( 7 | name="pygmentize-style-tubnil", 8 | version="0.1", 9 | entry_points=""" 10 | [pygments.styles] 11 | tubnil = tubnil:TubnilStyle 12 | """, 13 | ) 14 | -------------------------------------------------------------------------------- /bin/bin/toggle-dark-mode: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | get_theme() { 4 | gsettings get org.gnome.desktop.interface color-scheme 5 | } 6 | 7 | set_theme() { 8 | gsettings set org.gnome.desktop.interface color-scheme $1 9 | } 10 | 11 | if [[ $(get_theme) == "'prefer-dark'" ]]; then 12 | set_theme 'prefer-light' 13 | else 14 | set_theme 'prefer-dark' 15 | fi 16 | 17 | get_theme 18 | -------------------------------------------------------------------------------- /bin/bin/lowercase: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | echo "lowercasing everything in $1" 3 | for SRC in `find $1 -depth` 4 | do 5 | DST=`dirname "${SRC}"`/`basename "${SRC}" | tr '[A-Z]' '[a-z]'` 6 | if [ "${SRC}" != "${DST}" ] 7 | then 8 | #[ ! -e "${DST}" ] && echo mv -T "${SRC}" "${DST}" 9 | [ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}" || echo "${SRC} was not renamed" 10 | fi 11 | done 12 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Application Snippets/sublime_text_event_listener.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | Sublime Text EventListener 7 | source.python 8 | st_listener 9 | 10 | -------------------------------------------------------------------------------- /bin/bin/share: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | req_url='https://0x0.st/' 4 | 5 | echo "arg: $1" 6 | if [ -z "$1" ]; then 7 | curl -F "file=@/dev/stdin;filename=stdin.txt" $req_url | read -r url 8 | elif [ -f "$1" ]; then 9 | curl -F "file=@\"$1\"" $req_url | read -r url 10 | else 11 | echo "File $1 does not exist" 12 | exit 1 13 | fi 14 | echo -n "$url" | xsel -ib 15 | notify-send -a "share" "File uploaded" "$url" 16 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Application Snippets/sublime_text_text_command.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | Sublime Text TextCommand 8 | source.python 9 | st_text_cmd 10 | 11 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Application Snippets/sublime_text_window_command.sane.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | Sublime Text WindowCommand 8 | source.python 9 | st_win_cmd 10 | 11 | -------------------------------------------------------------------------------- /git/bin/git-copy-commit-url: -------------------------------------------------------------------------------- 1 | #!/usr/bin/zsh 2 | 3 | sha="$1" 4 | [[ -z $sha ]] && echo "no commit sha given" && exit 1 5 | 6 | origin="$(git remote get-url origin)" 7 | base_url="https://${${${${origin#https://}#git@}%.git}/://}" 8 | if [[ "$base_url" == *github* ]]; then 9 | url="$base_url/commit/$sha"; 10 | elif [[ "$base_url" == *bitbucket* ]]; then 11 | url="$base_url/commits/$sha"; 12 | fi 13 | echo -n "$url" | xsel -ib 14 | echo "$url" 15 | -------------------------------------------------------------------------------- /bin/bin/mons-primary: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # 3 | # Prompt for a monitor to make the primary. 4 | 5 | mons=$(mons) 6 | monitors=$(rg '^\d+.*' -o <<< $mons) 7 | rest=$(rg '^\d+.*' -v <<< $mons) 8 | echo -en "$monitors" \ 9 | | rofi -dmenu -i -p "Specify the monitor to make the primary" -mesg "$rest" -l $(wc -l <<< $monitors) \ 10 | | awk '{print $2}' \ 11 | | read -r answer 12 | echo -n $answer 13 | [[ -n $answer ]] && mons --primary $answer 14 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Python Virtualenv.sublime-build: -------------------------------------------------------------------------------- 1 | { 2 | "shell_cmd": "source ./.venv/bin/activate && python -u \"$file\"", 3 | "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", 4 | "working_dir": "${project_path:${folder:$file_path}}", 5 | "selector": "source.python", 6 | 7 | "windows": { 8 | "shell_cmd": ".\\venv\\Scripts\\activate.bat & python -u \"$file\"" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /bin/bin/aur-gc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Remove unused build files in aur-sync cache 4 | XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} 5 | AURDEST=${AURDEST:-$XDG_CACHE_HOME/aurutils/sync} 6 | 7 | # Assumes build files were retrieved through git(1) 8 | find "$AURDEST" -name .git -execdir git clean -xf \; 9 | 10 | # Print directories which do not contain a PKGBUILD file 11 | for d in "$AURDEST"/*; do 12 | [[ -f $d/PKGBUILD ]] || printf '%s\n' "$d" 13 | done 14 | -------------------------------------------------------------------------------- /mpv/.config/mpv/script-opts/thumbfast.conf: -------------------------------------------------------------------------------- 1 | # Maximum thumbnail size in pixels (scaled down to fit) 2 | #max_height=200 3 | #max_width=200 4 | 5 | # Thumbnail interval in seconds set to 0 to disable (warning: high cpu usage) 6 | #interval=6 7 | 8 | # Number of thumbnails 9 | #min_thumbnails=6 10 | #max_thumbnails=120 11 | 12 | # Spawn thumbnailer on file load for faster initial thumbnails 13 | #spawn_first=no 14 | 15 | # Enable on network playback 16 | #network=yes 17 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/polyyadfile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/zsh 2 | 3 | input_file=${1-/dev/stdin} 4 | 5 | tmp_file=$(mktemp) 6 | trap "rm -f '$tmp_file'" 0 7 | 8 | <$input_file tee "$tmp_file" | wc -lL | LFS=' ' read lines chars _ 9 | echo "lines: $lines, chars: $chars" 10 | 11 | <$tmp_file \ 12 | ~/.config/polybar/scripts/polyyad.py \ 13 | --text-info --no-buttons --close-on-unfocus \ 14 | --height $((lines * 19 + 10)) \ 15 | --width $((chars * 10)) 16 | -------------------------------------------------------------------------------- /mpv/.config/mpv/script-opts/quality-menu.conf: -------------------------------------------------------------------------------- 1 | # https://github.com/christoph-heinrich/mpv-quality-menu/blob/master/quality-menu.conf 2 | 3 | # use youtube-dl to fetch a list of available formats (overrides quality_strings) 4 | #fetch_formats=yes 5 | 6 | # list of ytdl-format strings to choose from 7 | quality_strings_video=[ {"1440p" : "bestvideo[height<=?1440]"}, {"1080p" : "bestvideo[height<=?1080]"}, {"720p" : "bestvideo[height<=?720]"}, {"480p" : "bestvideo[height<=?480]"} ] 8 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/AdvancedNewFile.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "show_files": true, 3 | "completion_type": "nix", 4 | "rename_default": "", 5 | "append_extension_on_move": false, 6 | "copy_default": "", 7 | "append_extension_on_copy": false, 8 | "warn_overwrite_on_move": true, 9 | "rename_file_default_root": "current", 10 | "copy_file_default_root": "current", 11 | "cursor_before_extension": true 12 | } 13 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/PlainTasks.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | // plugin settings 3 | "date_format": "(%Y-%m-%d %H:%M)", 4 | "show_remain_due": true, 5 | "before_date_space": "", 6 | 7 | // normal setting overrides 8 | "color_scheme": "Packages/Theme - Nil/Tubnil_mod.tmTheme", 9 | // "color_scheme": "Packages/PlainTasks/tasks-monokai.hidden-tmTheme", 10 | "line_numbers": true, 11 | "line_numbers": true, 12 | "draw_indent_guides": true, 13 | } 14 | -------------------------------------------------------------------------------- /noisetorch/.config/systemd/user/noisetorch@.service: -------------------------------------------------------------------------------- 1 | # https://github.com/lawl/NoiseTorch/wiki/Start-automatically-with-Systemd#create-systemd-unit 2 | [Unit] 3 | Description=Noisetorch Noise Cancelling 4 | Requires=pipewire.socket 5 | StartLimitIntervalSec=35 6 | StartLimitBurst=9 7 | 8 | [Service] 9 | Type=simple 10 | RemainAfterExit=yes 11 | ExecStart=/usr/bin/noisetorch -i -s '%i' 12 | ExecStop=/usr/bin/noisetorch -u 13 | Restart=on-failure 14 | RestartSec=3 15 | 16 | 17 | [Install] 18 | WantedBy=default.target 19 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/GitSavvy.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "show_commit_diff": true, 3 | "inline_diff_auto_scroll": true, 4 | "fallback_encoding": "cp-850", 5 | "show_remotes_in_branch_dashboard": true, 6 | "show_remotes_in_tags_dashboard": true, 7 | "api_tokens": { 8 | // "github.com": "ADD YOUR TOKEN HERE" 9 | }, 10 | "tab_order": [ 11 | "status", 12 | "branch", 13 | "rebase", 14 | "graph" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /bin/bin/rmove: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # rsync-based move 4 | # 5 | # usage: rmove 6 | # 7 | # Copy files over using rsync (and showing its process indicator), 8 | # then remove source files. 9 | # Also need to remove empty directories since rsync doesn't, 10 | # but don't do that for now. 11 | 12 | rsync \ 13 | --archive \ 14 | -hhh \ 15 | --verbose \ 16 | --progress \ 17 | --remove-source-files \ 18 | "$@" 19 | 20 | # find "$1" -type d -empty -print -delete 21 | -------------------------------------------------------------------------------- /teiler/.config/teiler/profiles/my-mp4-noaudio: -------------------------------------------------------------------------------- 1 | border="-show_region 1" 2 | 3 | # convert to yuv420p because browsers can't handle 444 subsampling 4 | # zscale requires --enable-libzimg 5 | # Alternatively: -pix_fmt yuv420p 6 | all_encopts="-r 30 -pix_fmt yuv420p -c:v libx264 -c:a libvorbis" 7 | #all_encopts="-r 30 -vf zscale=f=spline36:m=709,format=yuv420p -c:v libx264 -c:a libvorbis" 8 | encopts="$all_encopts -s $res -movflags +faststart" 9 | rect_encopts="$all_encopts -preset slow -crf 18" 10 | ext="mp4" 11 | ffaudio="" 12 | -------------------------------------------------------------------------------- /lazydocker/.config/lazydocker/config.yml: -------------------------------------------------------------------------------- 1 | # https://github.com/jesseduffield/lazydocker/blob/master/docs/Config.md 2 | # https://pkg.go.dev/github.com/jesseduffield/lazydocker/pkg/config 3 | 4 | gui: 5 | expandFocusedSidePanel: true 6 | returnImmediately: true 7 | 8 | commandTemplates: 9 | dockerCompose: docker compose 10 | 11 | logs: 12 | tail: 500 13 | 14 | customCommands: 15 | containers: 16 | - name: bash 17 | attach: true 18 | command: 'docker exec -it {{ .Container.ID }} bash' 19 | serviceNames: [] 20 | -------------------------------------------------------------------------------- /fcitx/.config/fcitx/conf/fcitx-quickphrase.config: -------------------------------------------------------------------------------- 1 | [QuickPhrase] 2 | # Trigger Key for QuickPhrase 3 | # Available Value: 4 | # None 5 | # Semicolon 6 | # Grave 7 | QuickPhraseTriggerKey=None 8 | # Alternative Trigger Key for QuickPhrase 9 | AlternativeTriggerKey=ALT_SPACE 10 | # Choose key modifier 11 | # Available Value: 12 | # None 13 | # Alt 14 | # Ctrl 15 | # Shift 16 | #ChooseModifier=None 17 | # Do not show spell hint 18 | # Available Value: 19 | # True False 20 | #DisableSpell=False 21 | # Maximum hint length 22 | #MaximumHintLength=2 23 | 24 | -------------------------------------------------------------------------------- /gtk/.config/gtk-3.0/settings.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | gtk-theme-name=Arc-Dark-solid 3 | gtk-icon-theme-name=Adwaita 4 | gtk-font-name=DejaVu Sans 11 5 | # gtk-font-name=Cantarell 11 6 | gtk-cursor-theme-name=Adwaita 7 | gtk-cursor-theme-size=0 8 | gtk-toolbar-style=GTK_TOOLBAR_BOTH 9 | gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR 10 | gtk-button-images=1 11 | gtk-menu-images=1 12 | gtk-enable-event-sounds=1 13 | gtk-enable-input-feedback-sounds=1 14 | gtk-xft-antialias=1 15 | gtk-xft-hinting=1 16 | gtk-xft-hintstyle=hintmedium 17 | gtk-xft-rgba=rgb 18 | -------------------------------------------------------------------------------- /readline/.inputrc: -------------------------------------------------------------------------------- 1 | set editing-mode emacs 2 | set enable-bracketed-paste on 3 | 4 | # termite 5 | "\e[H": beginning-of-line 6 | "\e[F": end-of-line 7 | "\e[A": 8 | "\e[5~": history-search-backward 9 | "\e[6~": history-search-forward 10 | 11 | # alacritty 12 | "\e[OH": beginning-of-line 13 | "\e[OF": end-of-line 14 | "\e[1;5D": backward-word 15 | "\e[1;5C": forward-word 16 | 17 | # general 18 | "\e[[D": backward-char 19 | "\e[[C": forward-char 20 | "\e[[A": previous-history 21 | "\e[[B": next-history 22 | "\eH": backward-kill-word 23 | "\e[3;5~": kill-word 24 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/LSP-ruff.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "initializationOptions": 3 | { 4 | "settings": { 5 | "lint.preview": true, 6 | "lint.ignore": [ 7 | // ST cleans this automatically on save 8 | "W291", // Trailing whitespace 9 | "W292", // No newline at end of file 10 | "W293", // Blank line contains whitespace 11 | ], 12 | "format.preview": true, 13 | "lineLength": 120 14 | } 15 | }, 16 | } 17 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/Flake8.sublime-build: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": ["flake8", "--exit-zero", "$file"], 3 | "file_regex": "^(.+):([0-9]+):(\\d+): (.*)", 4 | "working_dir": "${folder:${project_path:$file_path}}", 5 | "selector": "source.python", 6 | 7 | "variants": [ 8 | { 9 | "name": "Project", 10 | "cmd": ["flake8", ".", "--exit-zero", "--exclude=.git,__pycache__,.venv*,node_modules"], 11 | "working_dir": "${folder:${project_path:$file_path}}" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Python/pytest.sublime-build: -------------------------------------------------------------------------------- 1 | { 2 | "shell_cmd": "py.test --color no", 3 | "selector": "", 4 | "file_regex": "^(.*?):(\\d+):", 5 | "env": { 6 | "TINYCSS_SKIP_SPEEDUPS_TESTS": "a" 7 | }, 8 | 9 | "variants": [ 10 | { 11 | "name": "Run quiet", 12 | "shell_cmd": "py.test -q --color no" 13 | }, 14 | { 15 | "name": "Project root", 16 | "working_dir": "${project_path:${folder}}" 17 | }, 18 | ] 19 | 20 | } 21 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/LSP-typescript.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "initializationOptions": { 3 | "preferences": { 4 | // Addresses slowness in ST due to many, many completions. 5 | // https://github.com/sublimelsp/LSP-typescript/issues/129 6 | "includeCompletionsForModuleExports": false, 7 | 8 | // Ignore certain modules for auto-importable completions 9 | // because of their sheer amount causing delays in ST. 10 | "autoImportFileExcludePatterns": ["core-js"] 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /alacritty/.config/alacritty/alacritty.toml: -------------------------------------------------------------------------------- 1 | # Documentation: 2 | # - alacritty(5) 3 | # - https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty.5.scd 4 | 5 | [font] 6 | # * https://wiki.archlinux.org/index.php/font_configuration#Fontconfig_configuration 7 | # * file:///usr/share/doc/fontconfig/fontconfig-user.html 8 | size = 10 9 | normal = { family = "Terminus" } 10 | 11 | [mouse] 12 | hide_when_typing = true 13 | 14 | [window] 15 | padding = { x = 2, y = 2 } 16 | 17 | [general] 18 | import = [ 19 | "~/.config/alacritty/colors.toml", 20 | "~/.config/alacritty/keybindings.toml", 21 | ] 22 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/systemd-units: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | num_failed() { 4 | systemctl $1 list-units --failed | rg '(\d+) loaded units listed.' -r '$1' -o 5 | } 6 | 7 | case $1 in 8 | count) 9 | failed=$(( $(num_failed --user) + $(num_failed --system) )) 10 | if ((failed)); then 11 | echo $failed 12 | fi 13 | ;; 14 | print) 15 | echo "SYSTEM" 16 | systemctl --system list-units --failed 17 | echo "\nUSER" 18 | systemctl --user list-units --failed 19 | ;; 20 | *) 21 | echo "Unknown command" >&2 22 | ;; 23 | esac 24 | -------------------------------------------------------------------------------- /teiler/bin/teiler_helper: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | # original from /usr/bin/teiler_helper 3 | 4 | # source $HOME/.config/teiler/config 5 | 6 | # define uploaders 7 | # images 8 | uploadFile () { 9 | url=$(curl -F "file=@$1" https://0x0.st) 10 | echo -n "$url" | xclip -selection clipboard 11 | notify-send -a "teiler" "Image Uploaded" "$url" 12 | } 13 | 14 | # this is stupid, but it's what `teiler` calls this with 15 | if [[ $1 == "--upload" ]]; then 16 | if [[ $2 == "image" ]]; then uploadFile "$3" 17 | elif [[ $2 == "video" ]]; then uploadFile "$3" 18 | elif [[ $2 == "text" ]]; then uploadFile "$3" 19 | fi 20 | fi 21 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Snippets/Rust/pln.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | source.rust 9 | pln 10 | println!(…) 11 | 12 | -------------------------------------------------------------------------------- /polybar/.config/polybar/launch.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Stopping running units …" 4 | systemctl --user stop polybar-\* 5 | 6 | # Launch bars, based on xrandr output 7 | i=0 8 | inputs=$(polybar --list-all-monitors) 9 | printf "Starting %d polybar units …\n" $(wc -l <<< $inputs) 10 | while IFS=: read -r output rest; do 11 | ((i = i+1)) 12 | if [[ "$rest" == *primary* ]]; then 13 | bar=primary 14 | else 15 | bar=secondary 16 | fi 17 | systemd-run --user \ 18 | -u "polybar-$bar-$output" \ 19 | -E POLY_MONITOR="$output" \ 20 | polybar $bar 21 | done <<< $inputs 22 | 23 | echo "Bars launched" 24 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Tubnil_mod.sublime-color-scheme: -------------------------------------------------------------------------------- 1 | { 2 | // http://www.sublimetext.com/docs/3/color_schemes.html 3 | "variables": { 4 | }, 5 | "globals": { 6 | "line_diff_width": "2", 7 | // "brackets_options": "glow bold underline", 8 | }, 9 | "rules": [ 10 | { 11 | "scope": "markup.underline", 12 | "font_style": "underline", 13 | }, 14 | { 15 | // override color for some syntaxes using this non-standard scope 16 | "scope": "keyword.operator.accessor", 17 | "foreground": "#DAD6CD", 18 | } 19 | ], 20 | } 21 | -------------------------------------------------------------------------------- /gtk/.gtkrc-2.0: -------------------------------------------------------------------------------- 1 | # DO NOT EDIT! This file will be overwritten by LXAppearance. 2 | # Any customization should be done in ~/.gtkrc-2.0.mine instead. 3 | 4 | include "/home/fichte/.gtkrc-2.0.mine" 5 | gtk-theme-name="Arc-Dark-solid" 6 | gtk-icon-theme-name="Adwaita" 7 | gtk-font-name="DejaVu Sans 11" 8 | gtk-cursor-theme-name="Adwaita" 9 | gtk-cursor-theme-size=0 10 | gtk-toolbar-style=GTK_TOOLBAR_BOTH 11 | gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR 12 | gtk-button-images=1 13 | gtk-menu-images=1 14 | gtk-enable-event-sounds=1 15 | gtk-enable-input-feedback-sounds=1 16 | gtk-xft-antialias=1 17 | gtk-xft-hinting=1 18 | gtk-xft-hintstyle="hintmedium" 19 | gtk-xft-rgba="rgb" 20 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/FileIcons/theme/Nil.sublime-theme: -------------------------------------------------------------------------------- 1 | { 2 | "rules": [ 3 | { 4 | "class": "icon_file_type", 5 | "layer0.tint": [255, 255, 255], 6 | "layer0.opacity": 0.85, 7 | "content_margin": [8, 8] 8 | }, 9 | { 10 | "class": "icon_file_type", 11 | "parents": [{"class": "tree_row", "attributes": ["hover"]}], 12 | "layer0.opacity": 0.7 13 | }, 14 | { 15 | "class": "icon_file_type", 16 | "parents": [{"class": "tree_row", "attributes": ["selected"]}], 17 | "layer0.opacity": 1.0 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /.misc/FireFox/OneeChan Tubnil.json: -------------------------------------------------------------------------------- 1 | {"name":"Tubnil","authorName":"FichteFoll","authorTrip":"","replyOp":"1.0","navOp":"0.9","mainColor":"0d1114","brderColor":"0b1316","inputColor":"090d0f","inputbColor":"0d1114","headerBGColor":"0d1114","headerColor":"f8f8f8","boardColor":"f8f8f8","bgColor":"090d0f","textColor":"f8f8f8","blinkColor":"4797cc","headerLColor":"53bdb1","headerLHColor":"3090b5","linkColor":"53bdb1","linkHColor":"3090b5","qlColor":"53bdb1","nameColor":"d63e34","tripColor":"d4b63c","titleColor":"b88cd1","quoteColor":"96c83b","unreadColor":"4270b2","postHLColor":"d4b63c","quotesYouHLColor":"d4b63c","ownPostHLColor":"d4b63c","threadHLColor":"b88cd1","replybgHLColor":"090d10","replyslctColor":"d4b63c"} 2 | -------------------------------------------------------------------------------- /pulse/.config/pulse/default.pa: -------------------------------------------------------------------------------- 1 | .include /etc/pulse/default.pa 2 | unload-module module-role-cork 3 | 4 | # Stream setup 5 | # Add a remap sink to the default sink that is looped back to a recording sink, 6 | # along with a loopback for the mic whose monitor can be recorded. 7 | load-module module-remap-sink sink_name=default_record master=default sink_properties="device.description='Default+Record'" 8 | 9 | load-module module-null-sink sink_name=record sink_properties="device.description='Record'" 10 | load-module module-loopback source=default_record.monitor sink=record 11 | load-module module-loopback source="alsa_input.usb-Focusrite_Scarlett_Solo_USB_Y77R9F80B6C053-00.analog-stereo" sink=record 12 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/pulse-sink-source: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | pactl subscribe \ 4 | | while :; do 5 | sinkicon=$(pactl info | rg -q --pcre2 'Default Sink:.*(alsa_output\.usb-Plantronics_Plantronics_Blackwire_5220_Series)' && echo -n "") 6 | sourceicon=$([[ "$(pactl get-source-mute "$(pactl get-default-source)")" = "Mute: yes" ]] && echo -n "") 7 | [[ -z "$sinkicon$sourceicon" ]] && echo || echo "$sourceicon $sinkicon" 8 | while 9 | # wait until something relevant changed 10 | read -r line && [[ ! "$line" =~ "on sink" ]] && [[ ! "$line" =~ "on source" ]] && [[ ! "$line" =~ "on server" ]] 11 | do :; done 12 | done 13 | -------------------------------------------------------------------------------- /fcitx/.config/fcitx/conf/fcitx-keyboard.config: -------------------------------------------------------------------------------- 1 | [Keyboard] 2 | # Commit with extra space when choose candidate word 3 | # Available Value: 4 | # True False 5 | #CommitWithExtraSpace=False 6 | # Choose key modifier 7 | # Available Value: 8 | # None 9 | # Alt 10 | # Ctrl 11 | # Shift 12 | #ChooseModifier=Alt 13 | # Toggle the word hint 14 | #HotkeyToggleWordHint=CTRL_ALT_H 15 | # Minimum length to trigger word hint 16 | #MinimumHintLength=1 17 | # Maximum length of spell hint list 18 | MaximumHintLength=8 19 | # Use enter to commit the existing string 20 | # Available Value: 21 | # True False 22 | #UseEnterToCommit=False 23 | # Add current input buffer to user dictionary 24 | #HotkeyAddToUserDict=CTRL_ALT_N 25 | 26 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/LaTeXTools.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "windows": { 3 | "texpath" : "", 4 | "distro" : "miktex", 5 | "sumatra": "c:\\Program Files (x86)\\SumatraPDF\\SumatraPDF.exe", 6 | "sublime_executable": "sublime_text.exe", 7 | "keep_focus_delay": 0.5 8 | }, 9 | "builder_settings" : { 10 | "options": ["--shell-escape"] 11 | }, 12 | "open_pdf_on_build": false, 13 | "keep_focus": false, 14 | "display_bad_boxes": true, 15 | "use_biblatex": true, 16 | "bibliography": "new", 17 | //"output_directory": "c:\\Users\\Fichte\\AppData\\Roaming\\LaTeXTools", 18 | //"aux_directory": "c:\\Users\\Fichte\\AppData\\Roaming\\LaTeXTools" 19 | } 20 | -------------------------------------------------------------------------------- /fcitx/.config/fcitx/conf/fcitx-classic-ui.config: -------------------------------------------------------------------------------- 1 | [ClassicUI] 2 | # Status Panel Position X 3 | #MainWindowOffsetX=500 4 | # Status Panel Position Y 5 | #MainWindowOffsetY=40 6 | # Font Size 7 | #FontSize=0 8 | # Font 9 | #Font=Sans 10 | # Menu Font 11 | #MenuFont=Sans 12 | # Font Locale to display 13 | #FontLocale=zh_CN.UTF-8 14 | # Use System Tray Icon 15 | # Available Value: 16 | # True False 17 | #UseTray=True 18 | # Status Panel Hide Mode 19 | # Available Value: 20 | # Show 21 | # Auto 22 | # Hide when tray icon is available 23 | # Hide 24 | #MainWindowHideMode=Hide when tray icon is available 25 | # Vertical Candidate Word List 26 | # Available Value: 27 | # True False 28 | #VerticalList=False 29 | # Skin Name 30 | SkinType=dark 31 | 32 | -------------------------------------------------------------------------------- /tools/tools/trackma2syncplay/example_config.yaml: -------------------------------------------------------------------------------- 1 | # This file is used by the `t2s` script. 2 | # The file MUST be named `config.yaml`. 3 | # 4 | # It MUST hold a mapping of 'identifiers' to a set of show names 5 | # that are treated as regular expressions, 6 | # joined with `|` 7 | # and used as inputs for the `--include` and `--exclude` parameters 8 | # of `trackma2syncplay.py` respectively. 9 | # 10 | # When multiple users share the same show, 11 | # they SHOULD also use identical patterns for them 12 | # for additional show info with other users to be useful. 13 | _never: !!set 14 | ? Attack on Titan 15 | 16 | user1: !!set 17 | ? Death Note 18 | 19 | user2: !!set 20 | ? ^Re:Zero 21 | 22 | user3: !!set 23 | ? ^Re:Zero 24 | ? Death Note 25 | -------------------------------------------------------------------------------- /zsh/zshrc/colors.zsh: -------------------------------------------------------------------------------- 1 | alias diff='diff --color=auto' 2 | alias grep='grep --color=auto' 3 | 4 | # support colors in less 5 | export LESS_TERMCAP_mb=$'\E[01;31m' # begin bold 6 | export LESS_TERMCAP_md=$'\E[01;31m' # begin blink 7 | export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink 8 | export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video 9 | export LESS_TERMCAP_se=$'\E[0m' # reset reverse video 10 | export LESS_TERMCAP_us=$'\E[01;32m' # begin underline 11 | export LESS_TERMCAP_ue=$'\E[0m' # reset underline 12 | 13 | # requires 'source-highlight' package 14 | export LESSOPEN='| /usr/bin/source-highlight-esc.sh %s' 15 | export LESS='-R ' 16 | 17 | export COLORTERM="yes" # ??? 18 | 19 | # color setup for ls: 20 | eval $(dircolors -b) 21 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/TodoReview.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "patterns": { 3 | "TODO": "\\bTODO(:|\\s)+(?P.*)$", 4 | "TOCHECK": "\\b(TOCHECK|CHECK ?ME)(:|\\s)+(?P.*)$", 5 | "XXX": "\\bXXX(:|\\s)+(?P.*)$", 6 | "TOFIX": "\\b(TOFIX|FIX ?ME)(:|\\s)+(?P.*)$" 7 | }, 8 | "patterns_weight": { 9 | "TOFIX": 1, 10 | "TODO": 2, 11 | "TOCHECK": 3, 12 | "XXX": 4 13 | }, 14 | "render_header_date": "%A, %Y-%m-%d at %H:%M", 15 | "exclude_folders": [ 16 | "*.git*", 17 | "*node_modules*", 18 | "*.venv*", 19 | "htmlcov" 20 | ], 21 | "render_include_folder": true, 22 | "render_folder_depth": "auto", 23 | } 24 | -------------------------------------------------------------------------------- /alacritty/.config/alacritty/keybindings.toml: -------------------------------------------------------------------------------- 1 | # Documentation: 2 | # - alacritty(5) 3 | # - alacritty-bindings(5) 4 | # - https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty.5.scd 5 | 6 | [[keyboard.bindings]] 7 | key = "Home" 8 | mods = "Control" 9 | action = "ScrollToTop" 10 | 11 | [[keyboard.bindings]] 12 | key = "End" 13 | mods = "Control" 14 | action = "ScrollToBottom" 15 | 16 | [[keyboard.bindings]] 17 | key = "Up" 18 | mods = "Control|Shift" 19 | action = "ScrollLineUp" 20 | 21 | [[keyboard.bindings]] 22 | key = "Down" 23 | mods = "Control|Shift" 24 | action = "ScrollLineDown" 25 | 26 | [[keyboard.bindings]] 27 | key = "T" 28 | mods = "Control|Shift" 29 | action = "SpawnNewInstance" 30 | 31 | [[keyboard.bindings]] 32 | key = "Delete" 33 | mods = "Control" 34 | chars = "\u001B[3;5~" 35 | -------------------------------------------------------------------------------- /dunst/.config/dunst/dunstrc: -------------------------------------------------------------------------------- 1 | # documentation: dunst(5) 2 | # system config: /etc/dunst/dunstrc 3 | 4 | [global] 5 | font = Monospace 10 6 | markup = full 7 | # The format of the message. Possible variables are: 8 | # %a appname 9 | # %s summary 10 | # %b body 11 | # %i iconname (including its path) 12 | # %I iconname (without its path) 13 | # %p progress value if set ([ 0%] to [100%]) or nothing 14 | # %n progress value if set without any extra characters 15 | # Markup is allowed 16 | format = "%s %p (%a)\n%b" 17 | width = 400 18 | idle_threshold = 120 19 | monitor = 1 20 | #follow = keyboard 21 | history_length = 30 22 | dmenu = /usr/bin/rofi -dmenu -p dunst: 23 | mouse_right_click = context 24 | max_icon_size = 64 25 | -------------------------------------------------------------------------------- /.hooks/pre-push: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # See .git/hooks/pre-push.sample for documentation. 4 | 5 | remote="$1" 6 | url="$2" 7 | 8 | z40=0000000000000000000000000000000000000000 9 | 10 | while read local_ref local_sha remote_ref remote_sha 11 | do 12 | if [[ "$local_ref" == *private* ]]; then 13 | # prevent pushing "private" refs 14 | echo >&2 "$local_ref is a private ref, not pushing" 15 | exit 1 16 | fi 17 | 18 | if [ "$remote_sha" = $z40 ]; then 19 | # New branch, examine all commits 20 | range="$local_sha" 21 | else 22 | # Update to existing branch, examine new commits 23 | range="$remote_sha..$local_sha" 24 | fi 25 | 26 | commit=`git rev-list -n 1 --grep '^!!' "$range"` 27 | if [ -n "$commit" ]; then 28 | echo >&2 "Found local-only commit in $local_ref, not pushing" 29 | exit 1 30 | fi 31 | done 32 | 33 | exit 0 34 | -------------------------------------------------------------------------------- /bin/bin/share_clip: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | req_url='https://0x0.st/' 4 | 5 | targets=$(xclip -t TARGETS -o) 6 | if { grep image/png -q <<< "$targets" }; then 7 | xclip -o -t image/png | curl -F "file=@-;filename=.png" $req_url | read -r url 8 | 9 | elif { grep UTF8_STRING -q <<< "$targets" }; then 10 | xsel -ob | read -rd '' clip 11 | 12 | if [ -f "$clip" ]; then 13 | echo "Detected path to an existing file; uploading the file's contents instead" 14 | exec share "$clip" 15 | fi 16 | 17 | # set filename with .txt so that x0.at sends a content-type header 18 | curl -F "file=@-;filename=.txt" $req_url <<< "$clip" | read -r url 19 | 20 | else 21 | notify-send -a "share" "Clipboard was empty" 22 | exit 1 23 | fi 24 | 25 | echo -n "$url" | xsel -ib 26 | notify-send -a "share" "Clipboard uploaded" "$url" 27 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/Preferences.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "added_words": 3 | [ 4 | "fixup", 5 | "Changelog", 6 | "online", 7 | "plugin", 8 | "plugins", 9 | "namespace", 10 | "intransparent", 11 | "changelog", 12 | ], 13 | "always_show_commit_graph": true, 14 | "diff_style": "auto", 15 | "draw_white_space": "all", 16 | "editor_wait_args": "--wait --new-window", 17 | "font_face": "Atkinson Hyperlegible Mono Regular", 18 | "font_size": 10, 19 | "log_commands": true, 20 | "log_control_tree": false, 21 | "log_input": false, 22 | "remember_workspace": false, 23 | "theme": "Merge Dark.sublime-theme", 24 | "time_format": "24h", 25 | "translate_tabs_to_spaces": true, 26 | "side_bar_layout": "commit_graph_as_column", 27 | "update_check": false, 28 | "display_author_date": true, 29 | "diff_algorithm": "match_git", 30 | } 31 | -------------------------------------------------------------------------------- /sublime-text/bin/sublp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This script is a wrapper for the `subl` command 4 | # that ensures a project file exists for a folder 5 | # and opens that when provided with a folder path. 6 | # 7 | # If no folder is provided, 8 | # it falls back to the current working directory. 9 | 10 | path="${1-.}" 11 | path="$(realpath "$path")" 12 | folder_name="$(basename "$path")" 13 | 14 | if [[ ! -d "$path" ]]; then 15 | echo >/dev/stderr "error: $path is not a folder" 16 | exit 1 17 | fi 18 | 19 | project_path="$path/$folder_name.sublime-project" 20 | 21 | if [[ ! -f "$project_path" ]]; then 22 | cat > "$project_path" << JSON 23 | { 24 | "folders": [ 25 | { 26 | "path": ".", 27 | }, 28 | ], 29 | } 30 | JSON 31 | fi 32 | 33 | echo "opening $project_path ..." 34 | subl --background --project "$project_path" 35 | -------------------------------------------------------------------------------- /helix/.config/helix/config.toml: -------------------------------------------------------------------------------- 1 | # https://docs.helix-editor.com/editor.html 2 | [editor] 3 | line-number = "relative" 4 | cursorline = true 5 | bufferline = "multiple" 6 | color-modes = true 7 | 8 | [editor.lsp] 9 | display-inlay-hints = true 10 | 11 | [editor.file-picker] 12 | hidden = false 13 | 14 | [editor.whitespace.render] 15 | # space = "all" 16 | tab = "all" 17 | nbsp = "all" 18 | nnbsp = "all" 19 | 20 | [editor.indent-guides] 21 | render = true 22 | # character = "│" # Examples: "│" "▏", "┆", "┊", "⸽" 23 | skip-levels = 1 24 | 25 | # alacritty supports the Enhanced Keyboard protocol 26 | [keys.normal] 27 | tab = "move_parent_node_end" 28 | S-tab = "move_parent_node_start" 29 | A-minus = "flip_selections" 30 | 31 | [keys.insert] 32 | S-tab = "move_parent_node_start" 33 | 34 | [keys.select] 35 | tab = "extend_parent_node_end" 36 | S-tab = "extend_parent_node_start" 37 | -------------------------------------------------------------------------------- /mpv/.config/mpv/script-opts/uosc.conf: -------------------------------------------------------------------------------- 1 | # https://github.com/tomasklaen/uosc/blob/main/script-opts/uosc.conf 2 | 3 | # general 4 | opacity=speed=0.25,menu=0.6,curtain=0.6,title=0.4,playlist_position=0.6,thumbnail=0.4,tooltip=0.4 5 | proximity_in=40 6 | proximity_out=100 7 | stream_quality_options=1440,1080,720,480 8 | use_trash=yes 9 | languages=en 10 | menu_type_to_search=no 11 | 12 | speed_step=1.1 13 | speed_step_is_factor=yes 14 | 15 | top_bar=always 16 | top_bar_persistency=audio 17 | top_bar_size=56 18 | top_bar_controls=no 19 | top_bar_alt_title=${?demuxer-via-network==yes:${path}}${?demuxer-via-network==no:${filename}}${!sub-delay==0 ms: | Sub Delay: ${sub-delay}} 20 | top_bar_flash_on=audio,video,image 21 | 22 | timeline_persistency=audio 23 | timeline_style=bar 24 | timeline_step=0 25 | 26 | # Should be enough to read the top bar / file name 27 | flash_duration=2000 28 | -------------------------------------------------------------------------------- /bin/bin/video-to-gif: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # parse args 4 | _fps=(--fps 10) 5 | zparseopts -D -E -K -fps:=_fps i:=_input o:=_output 6 | fps=$_fps[2] 7 | input=$_input[2] 8 | output=$_output[2] 9 | params=($@) 10 | 11 | if [[ -z $1 || $1 == --help || $1 == -h || -z "$input" || -z "$output" ]]; then 12 | echo "params:" 13 | echo " --fps n (optional)" 14 | echo " -i input" 15 | echo " -o output" 16 | exit 1 17 | fi 18 | 19 | # calculate delay setting for convert 20 | # -r x => 1/x 21 | # -delay AxB => A/B 22 | # delay=$(( 1000 / $fps )) 23 | # echo "fps: $fps; delay: $delay" 24 | 25 | tmpdir=$(mktemp -d) 26 | 27 | ffmpeg -i "$input" -r $fps $params "$tmpdir/out_%04d.png" 28 | # convert $tmpdir/out_*.png -delay $delay -loop 0 -colors 32 -layers optimize "$output" 29 | convert $tmpdir/out_*.png -colors 32 -delay 1x$fps -loop 0 -layers optimize "$output" 30 | # gifsicle 31 | 32 | rm -r $tmpdir 33 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/relink_resource_file.py: -------------------------------------------------------------------------------- 1 | import re 2 | import os 3 | 4 | import sublime 5 | import sublime_plugin 6 | 7 | 8 | class RelinkResourceFileListener(sublime_plugin.EventListener): 9 | 10 | def on_post_save_async(self, view): 11 | path = view.file_name() 12 | if not path: 13 | return 14 | packages_path = sublime.packages_path() 15 | merge_packages_path = re.sub(r"sublime-text(-3)?", "sublime-merge", packages_path) 16 | # TODO Windows/macOS 17 | 18 | is_resource_file = path.startswith(packages_path) or path.startswith(merge_packages_path) 19 | if is_resource_file and os.path.islink(path): 20 | self._relink(path) 21 | 22 | def _relink(self, path): 23 | link_path = os.readlink(path) 24 | print("relinking", path, link_path) 25 | os.remove(path) 26 | os.symlink(link_path, path) 27 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/LSP-rust-analyzer.sublime-settings: -------------------------------------------------------------------------------- 1 | // Settings in here override those in "LSP-rust-analyzer/LSP-rust-analyzer.sublime-settings" 2 | { 3 | "settings": { 4 | "rust-analyzer.diagnostics.disabled": ["unresolved-proc-macro"], 5 | "rust-analyzer.hover.actions.run.enable": false, 6 | "rust-analyzer.hover.documentation.keywords.enable": false, 7 | "rust-analyzer.inlayHints.parameterHints.enable": true, 8 | "rust-analyzer.inlayHints.typeHints.hideClosureInitialization": true, 9 | "rust-analyzer.lens.debug.enable": false, 10 | "rust-analyzer.lens.run.enable": false, 11 | "rust-analyzer.completion.snippets.custom": { 12 | "println!": { 13 | "postfix": "pln", 14 | "body": "println!(\"${receiver}\");", 15 | "scope": "expr" 16 | }, 17 | }, 18 | }, 19 | } 20 | -------------------------------------------------------------------------------- /parcellite/.config/parcellite/parcelliterc: -------------------------------------------------------------------------------- 1 | [rc] 2 | RCVersion=1 3 | use_copy=true 4 | use_primary=false 5 | synchronize=false 6 | save_history=true 7 | history_pos=false 8 | history_x=1 9 | history_y=1 10 | history_limit=25 11 | data_size=0 12 | item_size=5 13 | automatic_paste=true 14 | auto_key=true 15 | auto_mouse=false 16 | key_input=false 17 | restore_empty=true 18 | rc_edit=false 19 | type_search=false 20 | case_search=false 21 | ignore_whiteonly=true 22 | trim_wspace_begend=false 23 | trim_newline=false 24 | hyperlinks_only=false 25 | confirm_clear=true 26 | current_on_top=true 27 | single_line=true 28 | reverse_history=false 29 | item_length=50 30 | persistent_history=true 31 | persistent_separate=true 32 | persistent_on_top=false 33 | persistent_delim=\\n 34 | nonprint_disp=true 35 | ellipsize=2 36 | multi_user=true 37 | icon_name=parcellite 38 | menu_key= 39 | history_key=Y 40 | phistory_key=Y 41 | actions_key=A 42 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/LSP.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "clients": { 3 | "haskell-language-server": { 4 | "enabled": true, 5 | "command": ["haskell-language-server-wrapper", "--lsp"], 6 | "selector": "source.haskell" 7 | }, 8 | "helm-ls": { 9 | // Requires https://github.com/mrjosh/helm-ls 10 | // and https://github.com/redhat-developer/yaml-language-server. 11 | "enabled": true, 12 | "command": ["helm_ls", "serve"], 13 | "selector": "source.yaml.go", 14 | }, 15 | }, 16 | "diagnostics_highlight_style": "box", 17 | "inhibit_snippet_completions": false, 18 | "log_debug": true, 19 | // "log_server": [""], 20 | "refactoring_auto_save": "preserve", 21 | "show_code_actions": "bulb", 22 | "show_diagnostics_count_in_view_status": true, 23 | "show_diagnostics_panel_on_save": 2, 24 | "show_diagnostics_severity_level": 4, 25 | "show_inlay_hints": true, 26 | "diagnostics_panel_include_severity_level": 4, 27 | } 28 | -------------------------------------------------------------------------------- /termite/.config/termite/config: -------------------------------------------------------------------------------- 1 | [options] 2 | # bitmap fonts are broken 3 | #font = xos4 Terminus 10 4 | #font = Misc Fixed 10 5 | font = Operator Mono 10 6 | font = Monospace 10 7 | 8 | allow_bold = true 9 | mouse_autohide = true 10 | scrollback_lines = 7000 11 | 12 | [colors] 13 | background = #0a0a0a 14 | foreground = #eaeaea 15 | foreground_bold = #ffffff 16 | 17 | # black 18 | color0 = #000000 19 | # bright_black 20 | color8 = #666666 21 | # red 22 | color1 = #d54e53 23 | # bright_red 24 | color9 = #ff3334 25 | # green 26 | color2 = #9ec400 27 | # bright_green 28 | color10 = #b6f430 29 | # yellow 30 | color3 = #e6c547 31 | # bright_yellow 32 | color11 = #e7c547 33 | # blue 34 | color4 = #7aa6da 35 | # bright_blue 36 | color12 = #7aa6da 37 | # magenta 38 | color5 = #c397d8 39 | # bright_magenta 40 | color13 = #b77ee0 41 | # cyan 42 | color6 = #70c0ba 43 | # bright_cyan 44 | color14 = #54ced6 45 | # white 46 | color7 = #ffffff 47 | # bright_white 48 | color15 = #ffffff 49 | -------------------------------------------------------------------------------- /bin/bin/btrfs-subvolumify: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Turn an existing directory into a btrfs subvolume 4 | # by renaming it temporarily, 5 | # creating the subvolume 6 | # and moving files back over. 7 | 8 | path="$(realpath "${1?path missing}")" 9 | if [ ! -d "$path" ]; then 10 | echo "$path is not a directory!" 11 | exit 1 12 | fi 13 | 14 | echo "Checking if $path is already a btrfs subvolume …" 15 | if sudo btrfs subvolume show "$path" >/dev/null 2>/dev/null; then 16 | echo "$path is already a btrfs subvolume! Nothing to do." 17 | exit 18 | fi 19 | 20 | tmppath="${path}__" 21 | if [ -e "$tmppath" ]; then 22 | echo "Temporary path $tmppath already exists! Aborting …" 23 | exit 2 24 | fi 25 | 26 | mv -v "$path" "$tmppath" 27 | 28 | btrfs subvolume create "$path" 29 | 30 | echo "Moving files into subvolume …" 31 | mv "$tmppath"/* "$path" 32 | 33 | echo "Removing temporary folder recursively …" 34 | find "$tmppath" -type d -empty -print -delete 35 | 36 | echo "Done." 37 | -------------------------------------------------------------------------------- /xinit/.xinitrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | userresources=$HOME/.Xresources 4 | usermodmap=$HOME/.Xmodmap 5 | sysresources=/etc/X11/xinit/.Xresources 6 | sysmodmap=/etc/X11/xinit/.Xmodmap 7 | 8 | # merge in defaults and keymaps 9 | if [ -f $sysresources ]; then 10 | xrdb -merge $sysresources 11 | fi 12 | 13 | if [ -f $sysmodmap ]; then 14 | xmodmap $sysmodmap 15 | fi 16 | 17 | if [ -f "$userresources" ]; then 18 | xrdb -merge "$userresources" 19 | fi 20 | 21 | if [ -f "$usermodmap" ]; then 22 | xmodmap "$usermodmap" 23 | fi 24 | 25 | # config fcitx 26 | export GTK_IM_MODULE=fcitx 27 | export QT_IM_MODULE=fcitx 28 | export XMODIFIERS=@im=fcitx 29 | 30 | # Source xprofile 31 | [ -f /etc/xprofile ] && . /etc/xprofile 32 | [ -f ~/.xprofile ] && . ~/.xprofile 33 | 34 | # source xinitrc.d files 35 | if [ -d /etc/X11/xinit/xinitrc.d ] ; then 36 | for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do 37 | [ -x "$f" ] && . "$f" 38 | done 39 | unset f 40 | fi 41 | 42 | # finally, start WM 43 | exec i3 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FichteFoll's dotfiles 2 | 3 | These are my dotfiles 4 | as I use them on Arch Linux. 5 | 6 | The files are primaritly managed with *stow*, 7 | the GNU software package installation manager. 8 | See [here][stow-guide] for an introduction. 9 | 10 | In short, 11 | clone the repo into your home folder, 12 | cd into it and run `stow pkgnames…`. 13 | 14 | [stow-guide]: http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html 15 | 16 | I have different branches for my machine-specific overrides. 17 | 18 | 19 | ## License 20 | 21 | Unless otherwise noted in the file or parent folder, 22 | all files in this repository are licensed under [CC-0][]. 23 | 24 | [![!CC-0](https://licensebuttons.net/p/zero/1.0/88x31.png)][CC-0] 25 | 26 | To the extent possible under law, 27 | FichteFoll has waived all copyright and related or neighboring rights 28 | to FichteFoll's dotfiles. 29 | This work is published from: Germany. 30 | 31 | [CC-0]: https://creativecommons.org/publicdomain/zero/1.0/ 32 | -------------------------------------------------------------------------------- /.misc/FireFox/web-scrobbler.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "search": { 4 | "album": "(.*) - Single" 5 | }, 6 | "replace": { 7 | "album": "$1" 8 | } 9 | }, 10 | { 11 | "search": { 12 | "album": "(.*) - EP" 13 | }, 14 | "replace": { 15 | "album": "$1" 16 | } 17 | }, 18 | { 19 | "search": { 20 | "artist": "(.*) - Topic" 21 | }, 22 | "replace": { 23 | "artist": "$1" 24 | } 25 | }, 26 | { 27 | "search": { 28 | "track": "\\s*\\(?Lyrics? Video\\)?" 29 | }, 30 | "replace": { 31 | "track": "" 32 | } 33 | }, 34 | { 35 | "search": { 36 | "track": "\\s*- Lyrics" 37 | }, 38 | "replace": { 39 | "track": "" 40 | } 41 | }, 42 | { 43 | "search": { 44 | "track": "\\s*- HQ" 45 | }, 46 | "replace": { 47 | "track": "" 48 | } 49 | }, 50 | { 51 | "search": { 52 | "track": "\\s*\\(?Original( Mix)?\\)?" 53 | }, 54 | "replace": { 55 | "track": "" 56 | } 57 | } 58 | ] 59 | -------------------------------------------------------------------------------- /fontconfig/.config/fontconfig/fonts.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | monospace 6 | 7 | DejaVu Sans Mono 8 | 9 | 10 | 11 | sans 12 | 13 | DejaVu Sans 14 | 15 | 16 | 17 | sans-serif 18 | 19 | DejaVu Sans 20 | 21 | 22 | 28 | 29 | 37 | 38 | -------------------------------------------------------------------------------- /git/.gitignore_global: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | *.pyc 10 | 11 | # Packages # 12 | ############ 13 | # it's better to unpack these files and commit the raw source 14 | # git has its own built in compression methods 15 | *.7z 16 | *.dmg 17 | *.gz 18 | *.iso 19 | *.jar 20 | *.rar 21 | *.tar 22 | *.zip 23 | *.sublime-package 24 | 25 | # Logs and databases # 26 | ###################### 27 | *.log 28 | *.sqlite 29 | 30 | # OS generated files # 31 | ###################### 32 | .DS_Store 33 | .DS_Store? 34 | ._* 35 | .Spotlight-V100 36 | .Trashes 37 | ehthumbs.db 38 | Thumbs.db 39 | 40 | # Cache directories # 41 | ##################### 42 | __pycache__/ 43 | .mypy_cache/ 44 | .cache/ 45 | .ruff_cache/ 46 | 47 | # Virtual Environments # 48 | ######################## 49 | .venv/ 50 | venv/ 51 | 52 | # Tool-specific files # 53 | ####################### 54 | .idea/ 55 | *.iml 56 | *.sublime-project 57 | *.sublime-workspace 58 | .java-version 59 | pyrightconfig.json 60 | 61 | # Environment/Secret files # 62 | ############################ 63 | /.env 64 | secrets/ 65 | -------------------------------------------------------------------------------- /bin/bin/ytdl-music: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | cd /data/audio/\!download/ytdl 4 | 5 | # https://regex101.com/r/tb0qw7/1 6 | read -rd '' metadata_regex <.+?) \ +[-/]\ +)? 11 | ((?P\d+) \ +-\ +)? 12 | (?P.+?) 13 | \ * 14 | (\( 15 | ( Album:\ * 16 | | (?P<albumartist>.+?)\ +-\ + 17 | ) 18 | (?P<album>.+?) 19 | \))? 20 | \ * 21 | ([|\[{].*)? 22 | (\((official|lyric|full).*)? 23 | $ 24 | EOF 25 | 26 | if [[ "$1" =~ '(/playlist|/user/|/channel/)' ]]; then 27 | # it's a playlist 28 | echo "detected youtube playlist url" 29 | # use release_date for sorting instead of playlist_index as that may change 30 | output_fmt="%(playlist_title)s_%(playlist_id)s/%(playlist_index)s_%(title)s_%(id)s.%(ext)s" 31 | else 32 | output_fmt="%(extractor)s/%(title)s_%(id)s.%(ext)s" 33 | fi 34 | 35 | # add --playlist-reverse if playlist is sorted newest first 36 | youtube-dl \ 37 | -f bestaudio -x \ 38 | --no-playlist --ignore-errors \ 39 | --add-metadata \ 40 | --metadata-from-title "$metadata_regex" \ 41 | -o "$output_fmt" \ 42 | $@ 43 | -------------------------------------------------------------------------------- /alacritty/.config/alacritty/colors.toml: -------------------------------------------------------------------------------- 1 | # Documentation: 2 | # - alacritty(5) 3 | # - https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty.5.scd 4 | 5 | # Colors (Tomorrow Night Bright, modified) 6 | [colors.primary] 7 | background = "#0a0a0a" 8 | foreground = "#eaeaea" 9 | 10 | [colors.cursor] 11 | # Colors the cursor will use if `custom_cursor_colors` is true 12 | cursor = "#ffffff" 13 | text = "#000000" 14 | 15 | [colors.normal] 16 | black = "#000000" 17 | blue = "#7aa6da" 18 | cyan = "#70c0ba" 19 | green = "#9ec400" 20 | magenta = "#c397d8" 21 | red = "#d54e53" 22 | white = "#ffffff" 23 | yellow = "#e6c547" 24 | 25 | [colors.bright] 26 | black = "#666666" 27 | blue = "#7aa6da" 28 | cyan = "#54ced6" 29 | green = "#b6f430" 30 | magenta = "#b77ee0" 31 | red = "#ff3334" 32 | white = "#ffffff" 33 | yellow = "#e7c547" 34 | 35 | [colors.dim] 36 | black = "#333333" 37 | blue = "#6699cc" 38 | cyan = "#66cccc" 39 | green = "#99cc99" 40 | magenta = "#cc99cc" 41 | red = "#f2777a" 42 | white = "#dddddd" 43 | yellow = "#ffcc66" 44 | 45 | [colors.search.focused_match] 46 | background = "CellForeground" 47 | foreground = "CellBackground" 48 | 49 | [colors.search.matches] 50 | background = "#707070" 51 | foreground = "CellForeground" 52 | -------------------------------------------------------------------------------- /zsh/zshrc/options.zsh: -------------------------------------------------------------------------------- 1 | HISTFILE=${ZDOTDIR:-${HOME}}/.zsh_history 2 | HISTSIZE=5000 3 | SAVEHIST=10000 4 | 5 | # append history list to the history file; this is the default but we make sure 6 | # because it's required for share_history. 7 | setopt append_history 8 | # import new commands from the history file also in other zsh-session 9 | setopt share_history 10 | # save each command's beginning timestamp and the duration to the history file 11 | setopt extended_history 12 | # If a new command line being added to the history list duplicates an older 13 | # one, the older command is removed from the list 14 | setopt histignorealldups 15 | # remove command lines from the history list when the first character on the 16 | # line is a space 17 | setopt histignorespace 18 | # display PID when suspending processes as well 19 | setopt longlistjobs 20 | # not just at the end 21 | setopt completeinword 22 | # make cd push the old directory onto the directory stack. 23 | setopt auto_pushd 24 | # report the status of backgrounds jobs immediately 25 | setopt notify 26 | # avoid "beep"ing 27 | setopt nobeep 28 | # complete common prefix AND open comp list when hitting tab instead of only the former 29 | unsetopt list_ambiguous 30 | 31 | setopt nomatch 32 | unsetopt autocd 33 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/open_locate.py: -------------------------------------------------------------------------------- 1 | import shlex 2 | import subprocess 3 | from pathlib import Path 4 | 5 | import sublime 6 | import sublime_plugin 7 | 8 | from resumeback import send_self 9 | import sublime_lib 10 | 11 | 12 | class SearchTermsInputHandler(sublime_plugin.TextInputHandler): 13 | def placeholder(self): 14 | return "Search terms (-A)" 15 | 16 | 17 | class OpenLocateCommand(sublime_plugin.WindowCommand): 18 | @send_self 19 | def run(self, this, *, search_terms="", terms=()): 20 | if not terms and search_terms: 21 | terms = shlex.split(search_terms) 22 | 23 | window = self.window 24 | yield sublime.set_timeout_async(this.send_wait, 0) # Switch to async thread 25 | output = subprocess.check_output(["locate", "-A", *terms], text=True).strip() 26 | 27 | if len(options := output.splitlines()) == 1: 28 | path = options[0] 29 | else: 30 | path = yield sublime_lib.show_selection_panel(window, options, on_select=this.send) 31 | window.open_file(path) 32 | 33 | def input(self, search_terms=None, terms=()): 34 | if not terms and not search_terms: 35 | return SearchTermsInputHandler() 36 | -------------------------------------------------------------------------------- /.misc/FireFox/userChrome.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Various sources for userChrome tweaks. 3 | * 4 | * https://www.reddit.com/r/FirefoxCSS/ 5 | * https://github.com/eoger/tabcenter-redux/wiki/Custom-CSS-tweaks 6 | * https://www.reddit.com/r/firefox/comments/7dvtw0/guide_how_to_edit_your_context_menu/ 7 | * https://github.com/Timvde/UserChrome-Tweaks 8 | * https://github.com/Aris-t2/CustomCSSforFx 9 | * 10 | * TODO https://www.reddit.com/r/FirefoxCSS/comments/7das2k/cant_change_aboutnewtab/ 11 | */ 12 | 13 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */ 14 | 15 | :root { 16 | --content-background: #262626; 17 | } 18 | 19 | /* Hide top horizontal tabs in favor of Tree Style Tab sidebar */ 20 | #tabbrowser-tabs, #TabsToolbar { 21 | visibility: collapse !important; 22 | } 23 | 24 | 25 | /* Hide/Shrink sidebar header */ 26 | /*#sidebar-box #sidebar-header { 27 | visibility: collapse; 28 | }*/ 29 | #sidebar-box #sidebar-header * { 30 | margin-top: -3px !important; 31 | margin-bottom: -3px !important; 32 | } 33 | 34 | 35 | /* Get rid of that annoying flash of white when loading new pages. */ 36 | browser, browser.display.background_color, tabbrowser tabpanels { 37 | background-color: var(--content-background); 38 | } 39 | -------------------------------------------------------------------------------- /hexchat/.config/hexchat/colors.conf: -------------------------------------------------------------------------------- 1 | color_0 = dada d6d6 cdcd 2 | color_1 = 1313 1414 1515 3 | color_2 = 35c2 35c2 b332 4 | color_3 = 9300 bad2 425c 5 | color_4 = e2e2 3d3d 3636 6 | color_5 = 64eb 18e2 169d 7 | color_6 = 4e4e 1c1c 6b6b 8 | color_7 = 6666 3636 1f1f 9 | color_8 = ffff cccc 3333 10 | color_9 = 8210 d178 32a8 11 | color_10 = 3d3d 8f8f 9a9a 12 | color_11 = 0000 d2d2 e5e5 13 | color_12 = 4bbd 4dbc b894 14 | color_13 = baba 4444 e7e7 15 | color_14 = 7e3b 7c06 73ec 16 | color_15 = 4ec2 4a04 4a04 17 | color_16 = 4a4a 0a0a 2f2f 18 | color_17 = f2f2 6f6f bcbc 19 | color_18 = 2cf7 63ab 389a 20 | color_19 = 2a2a a1a1 9898 21 | color_20 = 6c6c 7171 c4c4 22 | color_21 = d3d3 3636 8282 23 | color_22 = 2626 8b8b d2d2 24 | color_23 = 6c6c 7171 c4c4 25 | color_24 = 7d23 11bb 0df0 26 | color_25 = b5b5 8989 0000 27 | color_26 = bce6 4000 bcb1 28 | color_27 = 5baf 7f20 8a66 29 | color_28 = 8585 9999 0000 30 | color_29 = cbcb 4b4b 1616 31 | color_30 = b5b5 8989 0000 32 | color_31 = cbcb 4b4b 1616 33 | color_256 = 0000 2b2b 3636 34 | color_257 = 5858 6e6e 7575 35 | color_258 = dada d6d6 cdcd 36 | color_259 = 1313 1414 1515 37 | color_260 = f2f2 6f6f bcbc 38 | color_261 = 3333 9999 cccc 39 | color_262 = f2f2 6f6f bcbc 40 | color_263 = 9f88 5742 da9c 41 | color_264 = 4e4e 4a4a 4a4a 42 | color_265 = d3d3 3636 8282 43 | -------------------------------------------------------------------------------- /fcitx/.config/fcitx/data/QuickPhrase.mb: -------------------------------------------------------------------------------- 1 | paid Getting paid means they'll actually approach their work with a certain degree of seriousness and at least try to maintain a standard. 2 | fliptable (╯°□°)╯︵ ┻━┻ 3 | fixtable ┬─┬ ノ( ゜-゜ノ) 4 | lenny ( ͡° ͜ʖ ͡°) 5 | lennycrowd ( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°) 6 | ou (☞゚∀゚)☞ 7 | herewego ᕕ( ᐛ )ᕗ 8 | herewego ᕙ( ᐖ )ᓓ 9 | weee ヽ( ゚ヮ・)ノ 10 | weeebear ヽʕ •ᴥ•ʔノ 11 | shrug ┐(°ヮ°)┌ 12 | shrug ┐( ̄ー ̄)┌ 13 | shrug ┐(°⊱,°)┌ 14 | y (* ̄▽ ̄)y 15 | y (* ̄︶ ̄)y 16 | y ^_^)y 17 | kyuubei /人◕ ‿‿ ◕人\ 18 | disapproval ಠ_ಠ 19 | yuzu °◇° 20 | deadpan (¯―¯٥) 21 | deadpan (;¬_¬) 22 | flowergirl (◕‿◕✿) 23 | kiss (づ ̄ ³ ̄)づ 24 | kyah (⁄ ⁄•⁄ω⁄•⁄ ⁄) 25 | disappointed ( ་ − ་ )ུ 26 | cryingblood ( ༎ຶ ۝ ༎ຶ ) 27 | despair ヽ( ゚д゚)ノ 28 | despair ᕦ( ゚д゚)ᕤ 29 | despair o( ゚д゚)o 30 | despair └( ゚д゚)┘ 31 | despair ᕙ( ゚д゚)ᕗ 32 | despair o( ᐚ)o 33 | punch ( ゜▽゜)=◯)`ν゜) 34 | D: ᐚ 35 | D: ( ゚д゚) 36 | D: (;´Д`) 37 | D: ( ;´Д`) 38 | D: (((( ;°Д°)))) 39 | D: (;๏д๏) 40 | :D ᐛ 41 | :D ᐖ 42 | :V ᑆ 43 | :V ᑈ 44 | :V ᑃ 45 | :V (°⊱°) 46 | :V ᐵ 47 | :c ᑥ 48 | :c ᑣ 49 | www ᓬᓬᓬ 50 | www ᕒᕒᕒ 51 | :b ᒂ 52 | :3 (´。• ω •。`) 53 | cmon (¬_¬'')ԅ( ̄ε ̄ԅ) 54 | magic (∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。゚. * 55 | hammer ⌨ █▬▬◟(`ﮧ´ ◟ ) 56 | sqrt √ 57 | smile (╹◡╹) 58 | line ───────────────────────────────── 59 | facepalm (-‸ლ) 60 | fp (-‸ლ) 61 | dab ∠( 'ω')/ 62 | amogus ඞ 63 | fumo (ᗜ ˰ ᗜ) 64 | gottem (☞゚ヮ゚)☞ 65 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Fmt.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "rules": [ 3 | // JSON: jq 4 | { "selector": "source.json", "cmd": ["jq"] }, 5 | // XML: xmlstarlet 6 | { "selector": "text.xml", "cmd": ["xmlstarlet", "format"] }, 7 | // HTML: tidy 8 | { "selector": "text.html.basic", "cmd": ["tidy", "--drop-empty-elements", "no"] }, 9 | // Python: ufmt 10 | // { "selector": "source.python", "cmd": ["ufmt", "format", "-"] }, 11 | // the above in individual steps: 12 | // { "selector": "source.python", "cmd": ["usort", "format", "-"] }, 13 | // { "selector": "source.python", "cmd": ["black", "-q", "-"] }, 14 | // Rust: rustfmt 15 | { "selector": "source.rust", "cmd": ["rustfmt"] }, 16 | // YAML: yamlfmt 17 | { "selector": "source.yaml", "cmd": ["yamlfmt", "-"] }, 18 | // Python: ruff 19 | { 20 | "selector": "source.python", 21 | "cmd": [ 22 | "ruff", 23 | "format", 24 | "--isolated", 25 | "--line-length=100", 26 | "--preview", 27 | "--stdin-filename=stdin.py", 28 | "--target-version=py313", 29 | ], 30 | "format_on_save": false, 31 | }, 32 | ], 33 | "timeout": 15, 34 | "merge_type": "replace", 35 | } 36 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/Commit.sublime-menu: -------------------------------------------------------------------------------- 1 | [ 2 | { "id": "end" }, 3 | { 4 | "caption": "Create \"fixup!\" commit", 5 | "command": "git", 6 | "args": {"argv": ["commit", "--fixup", "$commit"]}, 7 | }, 8 | { 9 | "caption": "Reset --keep", 10 | "command": "git", 11 | "args": {"argv": ["reset", "--keep", "$commit"]}, 12 | }, 13 | { 14 | "caption": "Copy commit URL", 15 | "command": "git", 16 | "args": {"argv": ["copy-commit-url", "$commit"]}, 17 | }, 18 | { 19 | "caption": "Show Branches containing this commit...", 20 | "command": "git", 21 | "args": {"argv": ["branch", "-a", "--contains", "$commit"]} 22 | }, 23 | { "id": "rebase", "caption": "-" }, 24 | { 25 | "caption": "Rebase onto…", 26 | "command": "show_command_palette", 27 | "args": { 28 | "command": "git", 29 | "args": {"argv": ["rebase", "$commit~1", "--onto", "$select_ref"]}, 30 | }, 31 | }, 32 | { 33 | "caption": "Start interactive rebase… (terminal)", 34 | "command": "git", 35 | "args": {"argv": ["rebase-terminal", "$commit~1"]}, 36 | }, 37 | { 38 | "caption": "Start interactive rebase… (ST)", 39 | "command": "git", 40 | "args": {"argv": ["rebase", "-i", "$commit~1"]}, 41 | }, 42 | ] 43 | -------------------------------------------------------------------------------- /bin/bin/arch-news: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | # depends: html2text hq 4 | 5 | # make the file writable by your user 6 | log_file="${log_file:-/var/log/arch-news.log}" 7 | 8 | get_news_log() { 9 | # returns timestamp of last news seen 10 | if [ -f $log_file ]; then 11 | tail -n 1 $log_file | grep -o "^[0-9]*" 12 | else 13 | echo "0" 14 | fi 15 | } 16 | 17 | # parse news (RSS) 18 | rss="$(curl -sSL "https://www.archlinux.org/feeds/news/")" 19 | IFS=$'\0' readarray -d $'\0' headers < <(<<< "$rss" hq -0 'item title' text) 20 | IFS=$'\0' readarray -d $'\0' times < <(<<< "$rss" hq -0 'item pubDate' text) 21 | IFS=$'\0' readarray -d $'\0' contents < <(<<< "$rss" hq -0 'item description' text) 22 | 23 | # display news, if newer 24 | maxid=$((${#headers[@]} - 1)) 25 | id=maxid 26 | since=$(get_news_log) 27 | while ((id >= 0)); do 28 | epoch="$(date -d "${times[id]}" +%s)" 29 | if (( since < epoch )); then 30 | timestamp="$(date -d "${times[id]}" -Idate)" 31 | # piping into html2text broken in version on repos 32 | # https://bugs.archlinux.org/task/64593 33 | content="$(html2text <(echo "${contents[id]}") --protect-links --ignore-images)" 34 | printf -- "\e[1m%s | %s\e[0m\n\e[2m%s\e[0m\n" "${timestamp}" "${headers[id]}" "$content" 35 | echo "$epoch | ${headers[id]}" >> "$log_file" 36 | if ((id > 0)); then 37 | printf -- "\n" 38 | fi 39 | fi 40 | id=$((id - 1)) 41 | done 42 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/python_print.py: -------------------------------------------------------------------------------- 1 | import sublime 2 | import sublime_plugin 3 | 4 | quotes = ['"', "'", '"""', "'''"] 5 | 6 | 7 | class PythonPrintCommand(sublime_plugin.TextCommand): 8 | def run(self, edit): 9 | sel = self.view.sel() 10 | regions = [reg if not reg.empty() else self.view.word(reg) for reg in sel] 11 | self.view.add_regions("old_sel", regions) 12 | 13 | # Apply in reverse to not mess up our previously saved regions 14 | # This is also necessary because we need to change the selection 15 | for reg in reversed(regions): 16 | selected_text = self.view.substr(reg) 17 | if not selected_text: 18 | continue 19 | for quote in quotes: 20 | if quote not in selected_text: 21 | break 22 | text = f"\nprint(f{quote}{{{selected_text}=}}{quote})" 23 | # view.insert does not auto-indent, so we run the insert command 24 | # self.view.insert(edit, line.end(), text) 25 | sel.clear() 26 | line = self.view.line(reg) 27 | sel.add(sublime.Region(line.end(), line.end())) 28 | self.view.run_command('insert', {'characters': text}) 29 | 30 | # Restore old selection (additionally, the expanded selection 31 | # if a selection was empty before) 32 | sel.clear() 33 | sel.add_all(self.view.get_regions("old_sel")) 34 | self.view.erase_regions("old_sel") 35 | -------------------------------------------------------------------------------- /i3/.config/i3status/config: -------------------------------------------------------------------------------- 1 | # i3status configuration file. 2 | # see "man i3status" for documentation. 3 | 4 | general { 5 | colors = true 6 | interval = 1 7 | } 8 | 9 | order += "run_watch VPN" 10 | order += "run_watch DHCP" 11 | order += "disk /" 12 | order += "disk /data" 13 | order += "load" 14 | order += "volume master" 15 | order += "cpu_temperature 0" 16 | order += "tztime local" 17 | 18 | #order += "battery 0" 19 | #order += "ipv6" 20 | #order += "wireless _first_" 21 | #order += "ethernet _first_" 22 | 23 | tztime local { 24 | format = "%Y-%m-%d %H:%M:%S %z" 25 | } 26 | 27 | wireless _first_ { 28 | format_up = "W: (%quality at %essid) %ip" 29 | format_down = "W: down" 30 | } 31 | 32 | ethernet _first_ { 33 | # if you use %speed, i3status requires root privileges 34 | format_up = "E: %ip (%speed)" 35 | format_down = "E: down" 36 | } 37 | 38 | battery 0 { 39 | format = "%status %percentage %remaining" 40 | } 41 | 42 | run_watch DHCP { 43 | pidfile = "/var/run/dhclient*.pid" 44 | format_down = "" 45 | } 46 | 47 | run_watch VPN { 48 | pidfile = "/var/run/vpnc/pid" 49 | format_down = "" 50 | } 51 | 52 | load { 53 | format = "L: %1min" 54 | } 55 | 56 | disk "/" { 57 | format = "/: %avail" 58 | } 59 | 60 | disk "/data" { 61 | format = "/data: %avail" 62 | } 63 | 64 | volume master { 65 | format = "♪: %volume" 66 | format_muted = "♪: MM (%volume)" 67 | device = "default" 68 | mixer = "Master" 69 | mixer_idx = 0 70 | } 71 | 72 | cpu_temperature 0 { 73 | format = "T: %degrees°C" 74 | max_threshold = 42 75 | } 76 | -------------------------------------------------------------------------------- /bin/bin/mpris_now_playing: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | import subprocess 5 | import time 6 | 7 | SEP = "\uFFEF" 8 | PATH = "/tmp/now_playing.txt" 9 | 10 | 11 | def main(): 12 | last_playing = "" 13 | while True: 14 | now_playing = get_now_playing_str() 15 | if last_playing != now_playing: 16 | with open(PATH, "w", encoding='utf-8') as fp: 17 | print("playing:", now_playing) 18 | fp.write(now_playing if now_playing else "") 19 | last_playing = now_playing 20 | 21 | time.sleep(1) 22 | 23 | 24 | def playerctl(*args, player=None, all=False): 25 | if player: 26 | args = [f"--player={player}", *args] 27 | result = subprocess.check_output(["playerctl", *args], encoding="utf-8").strip() 28 | return result if not all else result.split() 29 | 30 | 31 | def list_players(): 32 | return playerctl("--list-all").split() 33 | 34 | 35 | def get_now_playing_str(): 36 | players = list_players() 37 | statuses = playerctl('status', all=True) 38 | 39 | try: 40 | player = players[statuses.index('Playing')] 41 | except ValueError: 42 | return 43 | 44 | artist = playerctl("metadata", "xesam:artist", player=player) 45 | title = playerctl("metadata", "xesam:title", player=player) 46 | if artist: 47 | return f"{artist} - {title}" 48 | else: 49 | return title 50 | 51 | 52 | if __name__ == '__main__': 53 | try: 54 | main() 55 | except KeyboardInterrupt: 56 | pass 57 | finally: 58 | if os.path.exists(PATH): 59 | os.remove(PATH) 60 | -------------------------------------------------------------------------------- /BetterDiscord/.config/BetterDiscord/data/stable/custom.css: -------------------------------------------------------------------------------- 1 | /* reduce padding in member list */ 2 | [class*="scroller-"][class*="members-"] [class*="member-"] { 3 | padding: 1px 0 !important; 4 | } 5 | [class*="members-"] [class*="member-"] > [class*="layout-"] { 6 | height: 39px; 7 | } 8 | 9 | /* hide stupid buttons */ 10 | [class*="channelTextArea-"] [class*="buttons-"] button:not([aria-label="Select emoji"]), 11 | [class*="colorPremiumGradient-"], 12 | [aria-label="Add Super Reaction"] { 13 | display:none; 14 | } 15 | 16 | /* hide Library & Nitro & Birthday Buttons on DM */ 17 | [class*="privateChannels-"] [href="/store"], 18 | [class*="privateChannels-"] [href="/library"], 19 | [class*="privateChannels-"] [href="/activities"] { 20 | display: none; 21 | } 22 | 23 | /* bigger jumboable emoji in compact */ 24 | [class*="compact-"] [class*=messageContent] img.emoji.jumboable { 25 | width: 32px; 26 | height: 32px; 27 | } 28 | 29 | 30 | /* Adjust reaction padding & border */ 31 | [class*="reaction-"] { 32 | margin-top: 2px; 33 | border-radius: 4px; 34 | } 35 | 36 | [class*="reactionInner-"] { 37 | padding: 2px 4px; 38 | } 39 | 40 | /* add `@` to new usernames */ 41 | :is([class*=userTagWithNickname], [class*=nameTagSmall]) span:only-child:before { 42 | content: '@'; 43 | } 44 | 45 | /* hide avatar decorations */ 46 | [class^=avatarDecoration-] { 47 | display: none; 48 | } 49 | svg[class^=bannerSVGWrapper-] > mask > image { 50 | display: none; 51 | } 52 | svg[class*=avatarDecorationHint-] { 53 | top: 0; 54 | left: 0; 55 | } 56 | svg[class*=avatarDecorationHint-] > foreignObject { 57 | width: 80px; 58 | height: 80px; 59 | mask: url(#svg-mask-avatar-status-round-80); 60 | } 61 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/LSP-vue.sublime-settings: -------------------------------------------------------------------------------- 1 | // Settings in here override those in "LSP-vue/LSP-vue.sublime-settings" 2 | 3 | { 4 | // TODO remove selector once hybrid mode is supported 5 | // https://github.com/sublimelsp/LSP-vue/issues/130 6 | "selector": "text.html.vue | source.ts | source.tsx | source.js | source.jsx", 7 | "settings": { 8 | "vue.inlayHints.missingProps": true, 9 | "vue.inlayHints.inlineHandlerLeading": true, 10 | "vue.inlayHints.vBindShorthand": true, 11 | 12 | // > NOTE: Inlay hints require TypeScript 4.4+. 13 | // javascript inlay hints options. 14 | "javascript.inlayHints.enumMemberValues.enabled": true, 15 | "javascript.inlayHints.functionLikeReturnTypes.enabled": true, 16 | "javascript.inlayHints.parameterNames.enabled": "none", 17 | "javascript.inlayHints.parameterNames.suppressWhenArgumentMatchesName": true, 18 | "javascript.inlayHints.parameterTypes.enabled": true, 19 | "javascript.inlayHints.propertyDeclarationTypes.enabled": true, 20 | "javascript.inlayHints.variableTypes.enabled": true, 21 | // typescript inlay hints options. 22 | "typescript.inlayHints.enumMemberValues.enabled": true, 23 | "typescript.inlayHints.functionLikeReturnTypes.enabled": true, 24 | "typescript.inlayHints.parameterNames.enabled": "none", 25 | "typescript.inlayHints.parameterNames.suppressWhenArgumentMatchesName": true, 26 | "typescript.inlayHints.parameterTypes.enabled": true, 27 | "typescript.inlayHints.propertyDeclarationTypes.enabled": true, 28 | "typescript.inlayHints.variableTypes.enabled": true, 29 | }, 30 | } 31 | -------------------------------------------------------------------------------- /zsh/.profile: -------------------------------------------------------------------------------- 1 | # default applications 2 | export TERMINAL=alacritty 3 | export TERM=alacritty 4 | export EDITOR=helix # "subl -nw" # kak 5 | export PAGER=less 6 | 7 | # volta 8 | export VOLTA_HOME="$HOME/.volta" 9 | 10 | # prepend user scripts (for overrides) and volta dir (shadows `node`, `npm` and more) 11 | export PATH="$HOME/bin:$VOLTA_HOME/bin:$PATH" 12 | # append executables from python, cargo and ruby 13 | export PATH="$PATH:$HOME/.local/bin:$HOME/.cargo/bin" 14 | 15 | # make systemd aware of our "new" PATH 16 | systemctl --user import-environment PATH 17 | 18 | # enable aliasing for java (JDownloader) 19 | # https://wiki.archlinux.org/index.php/Java_Runtime_Environment_fonts#Anti-aliasing 20 | export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=gasp' 21 | 22 | # Disable gtk scrolling overlays. 23 | # This is supposed to also work via 24 | # `gsettings set org.gnome.desktop.interface overlay-scrolling false` 25 | # but it did not for me. 26 | export GTK_OVERLAY_SCROLLING=0 27 | 28 | # start ssh-agent 29 | eval "$(ssh-agent -s)" 30 | trap 'test -n "$SSH_AUTH_SOCK" && eval "`/usr/bin/ssh-agent -k`"' 0 31 | 32 | if [ -f "/usr/lib/seahorse/ssh-askpass" ] ; then 33 | export SSH_ASKPASS="/usr/lib/seahorse/ssh-askpass" 34 | elif [ -f "/usr/lib/ssh/ssh-askpass" ] ; then 35 | export SSH_ASKPASS="/usr/lib/ssh/ssh-askpass" 36 | fi 37 | 38 | # load private environment variables 39 | [ -f ~/.profile-private ] && source ~/.profile-private 40 | 41 | # start Xorg if there is no session and we're on tty1 42 | if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then 43 | echo "Starting X server" 44 | exec startx 45 | fi 46 | # if [ "$(tty)" = "/dev/tty1" ]; then 47 | # echo "Starting Sway" 48 | # exec sway 49 | # fi 50 | -------------------------------------------------------------------------------- /tools/tools/sub/vertical_kanji.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | r"""Really simple script to create vertical kanji lines by inserting \N inbetween. 4 | 5 | Requires https://github.com/rfw/python-ass. 6 | """ 7 | 8 | import re 9 | import sys 10 | 11 | import ass 12 | 13 | 14 | def main(): 15 | file_path = sys.argv[1] 16 | with open(file_path, 'r') as fp: 17 | doc = ass.parse(fp) 18 | 19 | for i, event in enumerate(doc.events[:]): 20 | if event.TYPE == 'Dialogue' and event.effect == "fx": 21 | doc.events[i] = None # set to None to remove later 22 | continue 23 | 24 | if ( 25 | event.TYPE == 'Comment' and event.effect == "karaoke" 26 | or event.TYPE == 'Dialogue' and not event.effect 27 | ): 28 | if "Kanji" in event.style: 29 | comment_event = ass.document.Comment(**event.fields) 30 | comment_event.effect = "karaoke" 31 | new_event = ass.document.Dialogue(**event.fields) 32 | new_event.effect = "fx" 33 | 34 | # Cannot use str.join because tags might be inbetween text 35 | parts = re.split(r"(\{[^\}]*\})", new_event.text) 36 | parts = (f"{c}\\N" if not part.startswith("{") else c 37 | for part in parts 38 | for c in part) 39 | new_event.text = "".join(parts)[:-2] 40 | 41 | doc.events[i] = comment_event 42 | doc.events.append(new_event) 43 | 44 | # remove events flagged for deletion 45 | doc.events = filter(None, doc.events) 46 | 47 | with open(file_path + "_", 'w') as fp: 48 | doc.dump_file(fp) 49 | 50 | 51 | if __name__ == '__main__': 52 | main() 53 | -------------------------------------------------------------------------------- /i3/bin/backlightctl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import subprocess 4 | import argparse 5 | import sys 6 | 7 | 8 | def _xbacklight(*args: str, **kwargs) -> subprocess.CompletedProcess: 9 | return subprocess.run(["xbacklight", *args], check=True, **kwargs) 10 | 11 | 12 | def _set_backlight(value: float) -> subprocess.CompletedProcess: 13 | return _xbacklight("-set", str(value)) 14 | 15 | 16 | def _get_backlight() -> float: 17 | proc = _xbacklight("-get", stdout=subprocess.PIPE, encoding='ascii') 18 | return float(proc.stdout) 19 | 20 | # def _dec_backlight(value: float): 21 | # return _xbacklight("-dec", value) 22 | 23 | 24 | def main(): 25 | parser = argparse.ArgumentParser(description="Control backlight using xbacklight." 26 | " Prevents you from setting 0 by default.") 27 | parser.add_argument("action", choices=["inc", "dec", "set"]) 28 | parser.add_argument("value", type=float, nargs="?", default=10, 29 | help="Value to set or in-/decrease by. Percentage. Default: 10") 30 | parser.add_argument("--allow-zero", action='store_true') 31 | params = parser.parse_args() 32 | 33 | max_value = 100 34 | min_value = 0 if params.allow_zero else 1 35 | 36 | current_value = _get_backlight() 37 | print("current value:", current_value, file=sys.stderr) 38 | 39 | if params.action == 'set': 40 | new_value = params.value 41 | elif params.action == 'inc': 42 | new_value = current_value + params.value 43 | elif params.action == 'dec': 44 | new_value = current_value - params.value 45 | 46 | new_value = min(max(min_value, new_value), max_value) 47 | 48 | print("new value:", new_value, file=sys.stderr) 49 | _set_backlight(new_value) 50 | 51 | 52 | if __name__ == '__main__': 53 | main() 54 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/Default.sublime-commands: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "caption": "List \"gone\" branches (tracked branch was deleted)", 4 | "command": "git", 5 | "args": { "argv": ["ls-gone"] } 6 | }, 7 | { 8 | "caption": "Remove \"gone\" branches (tracked branch was deleted)", 9 | "command": "git", 10 | "args": { "argv": ["rm-gone"] } 11 | }, 12 | { 13 | "caption": "Open Terminal", 14 | "command": "git", 15 | "args": { "argv": ["terminal"] } 16 | }, 17 | { 18 | "caption": "Start interactive rebase in terminal", 19 | "command": "git", 20 | "args": {"argv": ["rebase-terminal", "$select_commit"]} 21 | }, 22 | { 23 | "caption": "Change Theme: Default", 24 | "command": "set_preference", 25 | "args": { "setting": "theme", "value": "Merge.sublime-theme" }, 26 | }, 27 | { 28 | "caption": "Change Theme: Merge Dark", 29 | "command": "set_preference", 30 | "args": { "setting": "theme", "value": "Merge Dark.sublime-theme" }, 31 | }, 32 | { 33 | "caption": "Create \"fixup!\" commit", 34 | "command": "git", 35 | "args": {"argv": ["commit", "--fixup", "$select_commit", "-m", "$text"]}, 36 | }, 37 | { 38 | "caption": "Rebase onto… (branch/tag)", 39 | "command": "git", 40 | "args": {"argv": ["rebase", "$select_branch", "--onto", "$select_ref"]}, 41 | }, 42 | { 43 | "caption": "Rebase onto… (commit)", 44 | "command": "git", 45 | "args": {"argv": ["rebase", "$select_branch", "--onto", "$select_commit"]}, 46 | }, 47 | { 48 | "caption": "Checkout Pull Request", 49 | "command": "git", 50 | "args": {"argv": ["gh", "pr", "checkout", "$text"]}, 51 | }, 52 | ] 53 | -------------------------------------------------------------------------------- /ranger/.config/ranger/pygments-style-tubnil/tubnil.py: -------------------------------------------------------------------------------- 1 | from pygments.style import Style 2 | from pygments.token import ( 3 | Keyword, Name, Comment, String, Error, 4 | Number, Operator, Generic, Literal, 5 | ) 6 | 7 | # http://pygments.org/docs/styles/ 8 | class TubnilStyle(Style): 9 | default_style = "" 10 | styles = { 11 | # https://bitbucket.org/birkenfeld/pygments-main/src/default/pygments/token.py 12 | Comment: '#747166', 13 | Keyword: '#CB6A27 bold', 14 | Literal: '#3399CC', 15 | String: '#A9D158', 16 | String.Delimiter: '#E882B2', 17 | String.Escape: '#797BE6', 18 | Number: '#99CC66', 19 | Operator: '#3D8F9A', 20 | Error: '#ff3334 bold', 21 | # 22 | # Name: '#F26FBC', # in Python, everything is a name??? 23 | Name.Function: '#F26FBC bold', # bg:#4A0A2F 24 | Name.Class: '#F26FBC bold', # bg:#4A0A2F 25 | Name.Entity: '#F26FBC bold', # bg:#4A0A2F 26 | # Name.Namespace: '#F26FBC bold', # bg:#4A0A2F # also Python imports 27 | Name.Constant: '#34A2D9', 28 | Name.Tag: '#7f8ee5', 29 | Name.Builtin: '#1786BD', 30 | Name.Variable: '#3399CC', 31 | Name.Exception: '#6E9CBE', 32 | # 33 | # These deviate a bit for better rendering on console 34 | Generic.Inserted: '#9ec400', # '#cae297 bg:#11401b', 35 | Generic.Deleted: '#ff3334', # '#fdc3ba bg:#531c16', 36 | Generic.Heading: '#F26FBC bold', 37 | Generic.Strong: 'bold', 38 | Generic.Emph: 'italic', 39 | Generic.Error: '#ff3334 bold', 40 | } 41 | -------------------------------------------------------------------------------- /aegisub/.aegisub/automation/autoload/unapply_template.lua: -------------------------------------------------------------------------------- 1 | -- made by FichteFoll 2 | 3 | 4 | script_name = "Unapply karaoke template" 5 | script_description = "Reverse standard karaoke templater" 6 | script_author = "FichteFoll" 7 | script_version = 1.0 8 | 9 | -- loaded, fx_utils = xpcall(require, debug.traceback, "FX_utils") 10 | 11 | -- ############################# funcs ############################## 12 | 13 | 14 | function unapply_template_macro(subs) 15 | aegisub.progress.title(script_name); 16 | unapply_template(subs) 17 | aegisub.set_undo_point(script_name) 18 | end 19 | 20 | function unapply_template(subs) 21 | aegisub.progress.task("Unapplying effect...") 22 | 23 | local i, maxi = 1, #subs 24 | local ai, maxai = i, maxi 25 | while i <= maxi do 26 | if aegisub.progress.is_cancelled() then 27 | if aegisub.cancel then aegisub.cancel() end 28 | return 29 | end 30 | 31 | aegisub.progress.task(string.format("Unapplying effect (%d/%d)...", ai, maxai)) 32 | aegisub.progress.set((ai-1) / maxai * 100) 33 | 34 | local l = subs[i] 35 | if (l.class == "dialogue" and not l.comment and l.effect == "fx") then 36 | subs.delete(i) 37 | maxi = maxi - 1 38 | else 39 | if (l.class == "dialogue" and l.comment and l.effect == "karaoke") then 40 | l.comment = false 41 | l.effect = '' 42 | subs[i] = l 43 | end 44 | 45 | i = i + 1 46 | end 47 | end 48 | end 49 | 50 | function unapply_template_validation(subs) 51 | for i = 1, #subs do 52 | local l = subs[i] 53 | if (l.class == "dialogue" and ( 54 | (not l.comment and l.effect == "fx") or 55 | ( l.comment and l.effect == "karaoke") )) then 56 | return true 57 | end 58 | end 59 | 60 | return false, "No karaoke line found" 61 | end 62 | 63 | aegisub.register_macro(script_name, "Unapplies standard karaoke templater", unapply_template_macro, unapply_template_validation) 64 | -------------------------------------------------------------------------------- /htop/.config/htop/htoprc: -------------------------------------------------------------------------------- 1 | # Beware! This file is rewritten by htop when settings are changed in the interface. 2 | # The parser is also very primitive, and not human-friendly. 3 | htop_version=3.3.0 4 | config_reader_min_version=3 5 | fields=0 48 18 118 39 119 2 46 47 49 50 1 6 | hide_kernel_threads=1 7 | hide_userland_threads=1 8 | hide_running_in_container=0 9 | shadow_other_users=1 10 | show_thread_names=0 11 | show_program_path=0 12 | highlight_base_name=1 13 | highlight_deleted_exe=1 14 | shadow_distribution_path_prefix=0 15 | highlight_megabytes=1 16 | highlight_threads=1 17 | highlight_changes=1 18 | highlight_changes_delay_secs=5 19 | find_comm_in_cmdline=1 20 | strip_exe_from_cmdline=1 21 | show_merged_command=0 22 | header_margin=0 23 | screen_tabs=0 24 | detailed_cpu_time=0 25 | cpu_count_from_one=0 26 | show_cpu_usage=1 27 | show_cpu_frequency=0 28 | show_cpu_temperature=0 29 | degree_fahrenheit=0 30 | update_process_names=0 31 | account_guest_in_cpu_meter=1 32 | color_scheme=0 33 | enable_mouse=1 34 | delay=15 35 | hide_function_bar=0 36 | header_layout=two_50_50 37 | column_meters_0=AllCPUs4 CPU 38 | column_meter_modes_0=1 3 39 | column_meters_1=CPU Memory Swap LoadAverage Blank LoadAverage Tasks Uptime 40 | column_meter_modes_1=1 1 1 1 2 2 2 2 41 | tree_view=1 42 | sort_key=0 43 | tree_sort_key=0 44 | sort_direction=1 45 | tree_sort_direction=-1 46 | tree_view_always_by_pid=0 47 | all_branches_collapsed=0 48 | screen:Main=PID USER NICE M_PSS M_RESIDENT M_SWAP STATE PERCENT_CPU PERCENT_MEM TIME NLWP Command 49 | .sort_key=PID 50 | .tree_sort_key=PID 51 | .tree_view_always_by_pid=0 52 | .tree_view=1 53 | .sort_direction=1 54 | .tree_sort_direction=-1 55 | .all_branches_collapsed=0 56 | screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command 57 | .sort_key=IO_RATE 58 | .tree_sort_key=PID 59 | .tree_view_always_by_pid=0 60 | .tree_view=0 61 | .sort_direction=-1 62 | .tree_sort_direction=1 63 | .all_branches_collapsed=0 64 | -------------------------------------------------------------------------------- /bin/bin/follow_clip: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import argparse 4 | import time 5 | 6 | import pyperclip 7 | 8 | 9 | def parse_args(): 10 | parser = argparse.ArgumentParser(description="Follow the system clipboard and print to stdout.") 11 | parser.add_argument("-c", "--current", 12 | help="Include the current clipboard contents.") 13 | parser.add_argument("-ws", "--no-ignore-whitespace", dest='ignore_ws', action='store_false', 14 | help="Ignore whitespace-only clips.") 15 | parser.add_argument("-s", "--strip-whitespace", dest='strip_ws', action='store_true', 16 | help="Strip whitespace characters at the beginning and the end.") 17 | parser.add_argument("--count", type=int, default=0, 18 | help="Exit after n items. 0 = infinite (default)") 19 | parser.add_argument("-0", dest='separator', action='store_const', const="\000", default='\n', 20 | help="Use null byte to separate clipboard entries. Default is to use a newline.") 21 | 22 | return parser.parse_args() 23 | 24 | 25 | def main(): 26 | params = parse_args() 27 | 28 | def handle_paste(paste: str): 29 | if params.ignore_ws and not paste.strip(): 30 | return 31 | if params.strip_ws: 32 | paste = paste.strip() 33 | print(paste, end=params.separator, flush=True) 34 | 35 | count = 0 36 | last_paste = "" if params.current else pyperclip.paste() 37 | while True: 38 | new_paste = pyperclip.paste() 39 | if new_paste != last_paste: 40 | handle_paste(new_paste) 41 | last_paste = new_paste 42 | count += 1 43 | if params.count and params.count == count: 44 | break 45 | 46 | time.sleep(0.3) 47 | 48 | # TODO do we have to signal something to stdout? 49 | 50 | 51 | if __name__ == '__main__': 52 | try: 53 | main() 54 | except KeyboardInterrupt: 55 | pass 56 | -------------------------------------------------------------------------------- /mpv/.config/mpv/_update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | mkdir -p "$DIR/scripts" 6 | cd "$DIR/shaders" 7 | wget -N https://gist.githubusercontent.com/igv/a015fc885d5c22e6891820ad89555637/raw/KrigBilateral.glsl 8 | wget -N https://pastebin.com/raw/yacMe6EZ -O noise_static_luma.hook 9 | 10 | mkdir -p "$DIR/scripts" 11 | cd "$DIR/scripts" 12 | # wget -N https://gist.githubusercontent.com/CyberShadow/2f71a97fb85ed42146f6d9f522bc34ef/raw/autosave.lua 13 | wget -N https://github.com/ekisu/mpv-webm/releases/download/latest/webm.lua 14 | wget -N https://raw.githubusercontent.com/4e6/mpv-reload/master/reload.lua 15 | wget -N https://raw.githubusercontent.com/jonniek/mpv-playlistmanager/master/playlistmanager.lua 16 | wget -N https://raw.githubusercontent.com/jonniek/mpv-scripts/master/appendURL.lua 17 | wget -N https://raw.githubusercontent.com/occivink/mpv-scripts/master/scripts/seek-to.lua 18 | wget -N https://raw.githubusercontent.com/po5/memo/master/memo.lua 19 | wget -N https://raw.githubusercontent.com/po5/thumbfast/master/thumbfast.lua 20 | wget -N https://raw.githubusercontent.com/VideoPlayerCode/mpv-tools/master/scripts/cycle-video-rotate.lua 21 | wget -N https://raw.githubusercontent.com/christoph-heinrich/mpv-quality-menu/master/quality-menu.lua 22 | wget -N https://raw.githubusercontent.com/christoph-heinrich/mpv-subtitle-lines/master/subtitle-lines.lua 23 | 24 | wget -N https://raw.githubusercontent.com/po5/mpv_sponsorblock/master/sponsorblock.lua 25 | mkdir -p sponsorblock_shared 26 | cd sponsorblock_shared 27 | wget -N https://raw.githubusercontent.com/po5/mpv_sponsorblock/master/sponsorblock_shared/main.lua 28 | wget -N https://raw.githubusercontent.com/po5/mpv_sponsorblock/master/sponsorblock_shared/sponsorblock.py 29 | 30 | # uosc 31 | cd "$DIR" 32 | rm -rf fonts/uosc_* scripts/uosc* 33 | wget -N https://github.com/tomasklaen/uosc/releases/latest/download/uosc.zip 34 | unzip -o uosc.zip 35 | rm -v uosc.zip 36 | rm -v scripts/uosc/bin/ziggy-{darwin,windows.exe} 37 | -------------------------------------------------------------------------------- /tools/tools/clone-root: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This is a quick script to clone/copy my root filesystem using rsync. 4 | # Both source (the fs root) and destination need to be supplied via $@. 5 | 6 | rsync \ 7 | --archive \ 8 | --progress \ 9 | --human-readable \ 10 | `#--one-file-system` \ 11 | `#--crtimes` \ 12 | `# specific excludes (that don't already have their own subvolume` \ 13 | --filter '- /home/*/.cache/' \ 14 | --filter '- /home/*/.cargo/' \ 15 | --filter '- /home/*/.config/Cypress/' \ 16 | --filter '- /home/*/.config/Slack/' \ 17 | --filter '- /home/*/.local/share/docker/' \ 18 | --filter '- /home/*/.local/share/jvm/' \ 19 | --filter '- /home/*/.local/share/pnpm/' \ 20 | --filter '- /home/*/.local/share/Zeal/' \ 21 | --filter '- /home/*/.m2/' \ 22 | --filter '- /home/*/.node-gyp/' \ 23 | --filter '- /home/*/.npm/' \ 24 | --filter '- /home/*/.rustup/toolchains/' \ 25 | --filter '- /var/cache/pacman/pkg' \ 26 | --filter '- /var/lib/aurbuild/' \ 27 | --filter '- /var/lib/docker/' \ 28 | --filter '- /swapfile' \ 29 | --filter '- /swap/' \ 30 | `# general excludes for /home folders` \ 31 | --filter '- /home/**/.venv/' \ 32 | --filter '- /home/**/Ferdium/Partitions/*/*Cache*' \ 33 | --filter '- /home/**/Service Worker/*Cache*/' \ 34 | --filter '- /home/**/chromium/*Cache*/' \ 35 | --filter '- /home/**/discord/*Cache*/' \ 36 | --filter '- /home/**/vesktop/*Cache*/' \ 37 | --filter '- /home/**/__pycache__/' \ 38 | --filter '- /home/**/node_modules/' \ 39 | --filter '- /home/**/target/' \ 40 | $@ 41 | 42 | # Note that `--one-file-system` obviously does not cross fily-system boundaries, 43 | # which will matter for btrfs sub-volume mounts, 44 | # as well as the boot partition. 45 | 46 | # Some file attributes (e.g. setsuid) will not be synchronized by rsync, 47 | # so the `shadow` package needs to be re-installed afterwards, 48 | # as well as anything using fs capabilities (via `setcap`). 49 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/Package Control.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "bootstrapped": 4, 3 | "debug": false, 4 | "ignore_vcs_packages": true, 5 | "in_process_packages": [ 6 | ], 7 | "install_prereleases": [ 8 | "Package Control", 9 | "PackageDev", 10 | ], 11 | "installed_packages": [ 12 | "AdvancedNewFile", 13 | "Alignment", 14 | "AlignTab", 15 | "ApplySyntax", 16 | "AutomaticPackageReloader", 17 | "Bash Completions", 18 | "BetterFindBuffer", 19 | "BracketHighlighter", 20 | "ChannelRepositoryTools", 21 | "ColorHelper", 22 | "Containerfile", 23 | "Decent Swift Syntax", 24 | "DocBlockr", 25 | "Edit Preferences", 26 | "File History", 27 | "FileIcons", 28 | "FindKeyConflicts", 29 | "Fmt", 30 | "INI", 31 | "Inline Fold", 32 | "Insert Nums", 33 | "InsertDate", 34 | "Just", 35 | "Kotlin", 36 | "LaTeX-cwl", 37 | "LaTeXTools", 38 | "LSP", 39 | "LSP-basedpyright", 40 | "LSP-ruff", 41 | "LSP-rust-analyzer", 42 | "MarkdownPreview", 43 | "MarkdownTOC", 44 | "Meson", 45 | "Missing Palette Commands", 46 | "MultiEditUtils", 47 | "Open URL", 48 | "Origami", 49 | "OverrideAudit", 50 | "Package Control", 51 | "PackageDev", 52 | "PackageResourceViewer", 53 | "PlainTasks", 54 | "QuickRulers", 55 | "rainbow_csv", 56 | "RestructuredText Improved", 57 | "SaneSnippets", 58 | "Sass", 59 | "ScopeHunter", 60 | "SelectUntil", 61 | "SimpleSyntax", 62 | "SSH Config", 63 | "SublimeLinter", 64 | "SublimeLinter-addon-filter", 65 | "SublimeLinter-addon-toggler", 66 | "SublimeLinter-annotations", 67 | "SublimeLinter-contrib-codespell", 68 | "SublimeLinter-contrib-sublime-syntax", 69 | "SublimeLinter-contrib-yamllint", 70 | "SublimeLinter-eslint", 71 | "SublimeLinter-flake8", 72 | "SublimeLinter-lua", 73 | "SublimeLinter-mypy", 74 | "Table Editor", 75 | "Terminal", 76 | "Theme - Nil", 77 | "TodoReview", 78 | "UnitTesting", 79 | "Vue", 80 | "Wrap Plus", 81 | "Zeal", 82 | ], 83 | // "repositories": [ 84 | // "https://packagecontrol.io/prerelease/packages.json", 85 | // ], 86 | } 87 | -------------------------------------------------------------------------------- /tools/tools/mpris_now_playing: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Write currently playing song artist and title into a file. 3 | 4 | Useful for stream setups like OBS. 5 | """ 6 | 7 | import os 8 | import subprocess 9 | import time 10 | 11 | PATH = "/tmp/now_playing.txt" 12 | POLL_INTERVAL = 5 # in seconds 13 | 14 | 15 | def main(): 16 | last_playing = None 17 | while True: 18 | now_playing = get_now_playing_str() 19 | if last_playing != now_playing: 20 | print("playing:", now_playing) 21 | with open(PATH, "w", encoding='utf-8') as fp: 22 | fp.write(now_playing if now_playing else "") 23 | last_playing = now_playing 24 | 25 | time.sleep(POLL_INTERVAL) 26 | 27 | 28 | def playerctl(*args, player=None, all=False): 29 | if player: 30 | args = [f"--player={player}", *args] 31 | elif all: 32 | args = ["--all-players", *args] 33 | proc = subprocess.run(["playerctl", *args], capture_output=True, text=True) 34 | if proc.stderr == "No player could handle this command\n": 35 | return None 36 | elif proc.returncode: 37 | print(f"Non-zero returncode from playerctl ({proc.returncode}:") 38 | print(proc.stderr) 39 | return None 40 | else: 41 | return proc.stdout if not all else proc.stdout.splitlines() 42 | 43 | 44 | def list_players(): 45 | return playerctl("--list-all").split() 46 | 47 | 48 | def get_now_playing_str(): 49 | players = list_players() 50 | statuses = playerctl('status', all=True) 51 | 52 | if 'Playing' not in statuses: 53 | return None 54 | i = statuses.index('Playing') 55 | player = players[i] 56 | 57 | title = playerctl("metadata", "xesam:title", player=player) 58 | artist = playerctl("metadata", "xesam:artist", player=player) 59 | if artist: 60 | return f"{artist} - {title}" 61 | elif title: 62 | return title 63 | else: 64 | return None 65 | 66 | 67 | if __name__ == '__main__': 68 | try: 69 | main() 70 | except KeyboardInterrupt: 71 | pass 72 | finally: 73 | if os.path.exists(PATH): 74 | os.remove(PATH) 75 | -------------------------------------------------------------------------------- /teiler/.config/teiler/config: -------------------------------------------------------------------------------- 1 | ##### teiler configuration file ###### 2 | 3 | # general variables 4 | 5 | # the path where images, videos and pastes should be saved 6 | img_path=/data/Images/Screenshots 7 | vid_path=$img_path 8 | paste_path=$img_path 9 | 10 | # set viewer for images and videos plus editor for images 11 | viewer=feh # eog 12 | # editor=pinta 13 | player=mpv 14 | 15 | # Hitting Enter will upload 16 | always_ul=0 17 | 18 | # Uploading options 19 | # Possible Choices for img_ul: fb, scp, s3, imgur 20 | # Possible Choices for vid_ul: fb, scp, s3 21 | # Possible Choices for paste_ul: fb, scp, ix 22 | #img_ul=imgur 23 | #vid_ul=fb 24 | #paste_ul=ix 25 | 26 | # Screencast options 27 | # Resolution to change to when recording in fullscreen 28 | #res=800x600 29 | 30 | # If you use a custom rate for X, set it here. 31 | # rate=120 32 | 33 | # Profile to use for screencasts 34 | # profiles are stored in $HOME/.config/teiler/profiles 35 | # teiler ships with 3 profiles atm. mp4-pulse, mp4-noaudio 36 | # and webm-noaudio 37 | # You can create your own profiles, but changes to existing profiles 38 | # will be overwritten on startup 39 | profile="my-mp4-noaudio" 40 | 41 | # hotkeys 42 | upload="Alt+1" 43 | noupload="Alt+2" 44 | delayup="Alt+3" 45 | delaysave="Alt+4" 46 | 47 | view="Alt+1" 48 | historyupload="Alt+2" 49 | edit="Alt+3" 50 | clip="Alt+4" 51 | 52 | 53 | # Normally you don't want to change anything here! 54 | SCREENCAST_PIDFILE=/tmp/$USER-teiler-screencast.pid 55 | namekey=teiler 56 | random_string=$(date +'%Y-%m-%d_%H-%M-%S') 57 | img_filemask=$random_string.png 58 | paste_filemask=$random_string.txt 59 | 60 | # video filemask is without extension, since it gets the extension 61 | # from set profile 62 | vid_filemask=$random_string 63 | 64 | help_color="#0C73C2" 65 | slop_color="255,0,0" 66 | slop_border=2 67 | hidecursor=yes 68 | # slop options 69 | slop_border=1 70 | slop_color="255,0,0" 71 | hidecursor=yes 72 | 73 | # rofi options ###### 74 | # here you can override options for rofi. normally rofi options 75 | # are read from ~/.Xresources, so setting options there is recommended. 76 | # you can dump options for ~/.Xresources with "rofi -dump-xresources" 77 | # rofiopts="-border 2 -width 35 -lines 40 -padding 12" 78 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/Default/Syntax Tests.sublime-syntax: -------------------------------------------------------------------------------- 1 | %YAML 1.2 2 | --- 3 | # http://www.sublimetext.com/docs/3/syntax.html 4 | # https://github.com/sublimehq/sublime_text/issues/3022#issuecomment-1937034498 5 | name: Sublime Syntax Tests 6 | hidden: true 7 | scope: text.syntax-tests 8 | variables: 9 | scope_segment: \w+(?:[\w-]*\+*) # \+* is for the non standard scope.c++ scopes 10 | 11 | contexts: 12 | main: 13 | # summaries 14 | - match: ^(\[)Finished(\]) 15 | scope: meta.summary.finished.syntax-tests markup.info.finished.syntax-tests 16 | captures: 17 | 1: punctuation.definition.markup.begin.syntax-tests 18 | 2: punctuation.definition.markup.end.syntax-tests 19 | - match: ^(FAILED)(:) (\d+) of (\d+) assertions in (\d+) files failed 20 | scope: meta.summary.failure.syntax-tests 21 | captures: 22 | 1: markup.error.failed.syntax-tests 23 | 2: punctuation.separator.syntax-tests 24 | 3: constant.numeric.syntax-tests 25 | 4: constant.numeric.syntax-tests 26 | 5: constant.numeric.syntax-tests 27 | - match: ^(Success)(:) (\d+) assertions in (\d+) files passed 28 | scope: meta.summary.success.syntax-tests 29 | captures: 30 | 1: markup.info.success.syntax-tests 31 | 2: punctuation.separator.syntax-tests 32 | 3: constant.numeric.syntax-tests 33 | 4: constant.numeric.syntax-tests 34 | 35 | # locations 36 | - match: ^Packages/(..[^:]*)(:)(\d+)(:)(\d+) 37 | scope: meta.path.syntax-tests entity.name.section 38 | captures: 39 | 2: punctuation.separator.sequence.syntax-tests 40 | 3: constant.numeric.integer.decimal.syntax-tests 41 | 4: punctuation.separator.sequence.syntax-tests 42 | 5: constant.numeric.integer.decimal.syntax-tests 43 | 44 | # assertions 45 | - match: ^\s*(expect|found)(:) 46 | captures: 47 | 1: keyword.other.syntax-tests 48 | 2: punctuation.separator.syntax-tests 49 | push: assertion-body 50 | 51 | assertion-body: 52 | - match: \n 53 | pop: 1 54 | - match: '{{scope_segment}}' 55 | scope: string.unquoted.scope-segment.scope-selector 56 | - match: \. 57 | scope: punctuation.separator.scope-segments.scope-selector 58 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/open_api.py: -------------------------------------------------------------------------------- 1 | # https://gist.github.com/OdatNurd/d74821a67ba6627d3f617cd4265bfb5d 2 | import sublime 3 | import sublime_plugin 4 | 5 | import glob 6 | import os 7 | 8 | 9 | def get_plugin_files(): 10 | """ 11 | Return a list of all of the files that are used to provide the Sublime API; 12 | this covers files from all available plugin hosts, including those that 13 | may not have existed at the point where this plugin was created. 14 | """ 15 | if hasattr(get_plugin_files, "files"): 16 | return get_plugin_files.files 17 | 18 | root = os.path.dirname(sublime.executable_path()) 19 | 20 | if int(sublime.version()) >= 4000: 21 | lib_path = os.path.join(root, "Lib") 22 | 23 | host_dirs = [p for p in os.listdir(lib_path) 24 | if os.path.isdir(os.path.join(lib_path, p))] 25 | 26 | else: 27 | lib_path = root 28 | host_dirs = [root] 29 | 30 | files = [] 31 | for path in host_dirs: 32 | files.extend(glob.glob(os.path.join(lib_path, path, "*.py"))) 33 | 34 | get_plugin_files.files = sorted(files) 35 | return get_plugin_files.files 36 | 37 | 38 | class FileInputHandler(sublime_plugin.ListInputHandler): 39 | def placeholder(self): 40 | return "Select API file to open" 41 | 42 | def list_items(self): 43 | files = get_plugin_files() 44 | 45 | items = [] 46 | for file in files: 47 | path, plugin = os.path.split(file) 48 | _, host = os.path.split(path) 49 | items.append(("%s - %s" % (host, plugin), file)) 50 | 51 | return items 52 | 53 | 54 | class OpenApiFilesCommand(sublime_plugin.WindowCommand): 55 | def run(self, file): 56 | view = self.window.open_file(file) 57 | view.settings().set("_make_read_only", True) 58 | 59 | def input(self, args): 60 | if "file" not in args: 61 | return FileInputHandler() 62 | 63 | 64 | class ApiFileListener(sublime_plugin.ViewEventListener): 65 | @classmethod 66 | def is_applicable(cls, settings): 67 | return settings.get("_make_read_only", False) 68 | 69 | def on_load(self): 70 | self.view.set_read_only(True) 71 | self.view.settings().erase("_make_read_only") 72 | -------------------------------------------------------------------------------- /i3/bin/set-default-sink: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # usage: set-default-sink [{speakers,headphones,hdmi}] 4 | # 5 | # Set the default sink (for PipeWire) using `pactl`, 6 | # using a set of pre-defined conditions 7 | # that can be selected with the first argument. 8 | 9 | import json 10 | import sys 11 | import re 12 | from functools import partial 13 | from subprocess import check_call, check_output 14 | from typing import Callable, NotRequired, TypedDict 15 | 16 | 17 | class Port(TypedDict): 18 | type: NotRequired[str] 19 | availability: NotRequired[str] 20 | 21 | 22 | class Sink(TypedDict): 23 | name: str 24 | ports: NotRequired[list[Port]] 25 | 26 | 27 | def is_available_hdmi_sink(sink: Sink) -> bool: 28 | return any( 29 | p.get('type') == 'HDMI' and p.get('availability') != 'not available' 30 | for p in sink.get('ports', []) 31 | ) 32 | 33 | 34 | def is_sink_name_matching_regex(sink: Sink, regex: str) -> bool: 35 | return bool(re.match(regex, sink['name'])) 36 | 37 | 38 | FILTERS: dict[str, Callable[[Sink], bool]] = { 39 | 'speakers': partial( 40 | is_sink_name_matching_regex, 41 | regex=( 42 | r'alsa_output\.pci-0000_00_\w{2}\..*\.analog-stereo' 43 | r'|alsa_output\.usb-Lenovo_ThinkPad_USB-C_Dock_Audio_.*\.analog-stereo' 44 | ), 45 | ), 46 | 'headphones': partial( 47 | is_sink_name_matching_regex, 48 | regex=( 49 | r'alsa_output\.usb-Focusrite_Scarlett_Solo_USB_.*' 50 | r'|alsa_output\.usb-Plantronics_Plantronics_Blackwire_5220_Series_.*\.analog-stereo' 51 | ), 52 | ), 53 | 'hdmi': is_available_hdmi_sink, 54 | } 55 | 56 | 57 | def main() -> int: 58 | if not (sink_filter := FILTERS.get(sys.argv[1])): 59 | print("unknown sink identifier") 60 | return 1 61 | 62 | output = check_output(["pactl", "--format", "json", "list", "sinks"]) 63 | sinks: list[Sink] = json.loads(output) 64 | 65 | if sink := next(filter(sink_filter, sinks), None): 66 | print(f"setting default sink to: {sink['name']}") 67 | _ = check_call(["pactl", "set-default-sink", sink['name']]) 68 | return 0 69 | else: 70 | print("no matching sink found") 71 | return 2 72 | 73 | 74 | if __name__ == '__main__': 75 | sys.exit(main()) 76 | -------------------------------------------------------------------------------- /ranger/.config/ranger/rc.conf: -------------------------------------------------------------------------------- 1 | set autosave_bookmarks true 2 | set binary_size_prefix true 3 | set save_backtick_bookmark false 4 | set show_hidden true 5 | set vcs_aware true 6 | set preview_images true 7 | set preview_images_method ueberzug 8 | set unicode_ellipsis true 9 | set draw_borders true 10 | set dirname_in_tabs true 11 | set update_title true 12 | set cd_tab_case insensitive 13 | # Use smart tab completion with less typing? E.g. ":cd /f/b/b<tab>" yields ":cd /foo/bar/baz". 14 | set cd_tab_fuzzy true 15 | 16 | # Various 'scout' aliases and bindings 17 | # -s instead of -i 18 | alias find scout -lseft 19 | alias filter scout -sgfpt 20 | # alias search scout -rs 21 | map s console search_inc%space 22 | map / console search_inc%space 23 | map F console filter%space 24 | 25 | # For aurutils review 26 | alias aur chain aur_mark_new; flat 1; scout -vpr ^\.SRCINFO$|\.(asc|bz2|deb|gitignore|gz|log|rpm|sig|tgz|xz|zstd?)$; set column_ratios 2,5 27 | alias quit! eval -q import sys; sys.exit(111) 28 | alias q! quit! 29 | map Q quit! 30 | 31 | # Shell- and terminal-related 32 | map T shell -f alacritty --working-directory %d 33 | 34 | # Via ranger-zoxide plugin 35 | # git clone git@github.com:jchook/ranger-zoxide.git ~/.config/ranger/plugins/zoxide 36 | map zz console z%space 37 | # overrides image toggle, but I never used that 38 | map zi zi 39 | 40 | # Drag'n'Drop using dragon https://github.com/mwh/dragon 41 | alias dragon-drop shell -f dragon-drop 42 | map Df dragon-drop %s 43 | map Da dragon-drop %s --all --and-exit 44 | map Dt dragon-drop --target --keep --print-path | xargs -d"\n" -n1 -- mv -t . 45 | 46 | # Other bindings 47 | map ys shell share %f 48 | map Dm shell -f meld %s 49 | map R reload_cwd 50 | map bk bulkrename 51 | map yc shell xsel -ib < %f 52 | map N shell -f nautilus %d 53 | map dt console shell trash -- %%s 54 | map mkcd console mkcd%space 55 | 56 | # tag-specific bindings 57 | setintag M sort mtime 58 | setintag M sort_reverse False 59 | 60 | # word (re-)moval in console 61 | cmap <a-left> <c-left> 62 | cmap <a-right> <c-right> 63 | 64 | cmap <C-w> <c-backspace> 65 | cmap <A-d> <C-left> 66 | 67 | cmap <C-backspace> eval fm.ui.console.delete_word() 68 | cmap <C-delete> eval fm.ui.console.delete_word(backward=False) 69 | cmap <C-LEFT> eval fm.ui.console.move_word(left=1) 70 | cmap <C-right> eval fm.ui.console.move_word(right=1) 71 | -------------------------------------------------------------------------------- /tools/tools/track_lutris_playtime/track_lutris_playtime.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """Extract playtime from lutris and archive it daily. 4 | 5 | Writes data into multiple CSV files, one per game, 6 | for later analysis. 7 | The date written is the one of the day of execution of the script. 8 | When using a systemd timer to schedule it 9 | when the machine is first started for the day, 10 | this will then *generally* record the playtime 11 | of the day before (when creating a difference). 12 | More precisely, it will be the day 13 | of the previously recorded entry 14 | in case there is a gap. 15 | """ 16 | 17 | import sqlite3 18 | from typing import NamedTuple 19 | import time 20 | import csv 21 | from pathlib import Path 22 | 23 | DB_PATH = Path("~/.local/share/lutris/pga.db").expanduser() 24 | DATA_PATH = Path(__file__).parent / "data" 25 | 26 | 27 | class GameInfo(NamedTuple): 28 | id: int 29 | name: str 30 | playtime: int 31 | 32 | 33 | def main(): 34 | rows = load() 35 | dump(rows) 36 | 37 | 38 | def load() -> list[GameInfo]: 39 | with sqlite3.connect(DB_PATH) as sql: 40 | rows = sql.execute("SELECT id, name, playtime FROM games WHERE playtime > 0").fetchall() 41 | return [GameInfo(*row) for row in rows] 42 | 43 | 44 | def dump(rows: list[GameInfo]) -> None: 45 | today = time.strftime("%Y-%m-%d") 46 | print(f"Saving data for {today}") 47 | DATA_PATH.mkdir(parents=True, exist_ok=True) 48 | for row in rows: 49 | dump_row(today, row) 50 | print(f"Saved data for {len(rows)} games") 51 | 52 | 53 | def dump_row(date: str, row: GameInfo) -> None: 54 | out_path = None 55 | write_header = False 56 | for path in DATA_PATH.iterdir(): 57 | if path.name.startswith(f"{row.id}_"): 58 | out_path = path 59 | break 60 | else: 61 | out_path = DATA_PATH / f"{row.id}_{row.name}.csv" 62 | write_header = True 63 | print(f"Creating new file: {out_path.name}") 64 | 65 | playtime = row.playtime if row.playtime is not None else 0.0 66 | with out_path.open('a') as f: 67 | writer = csv.writer(f) 68 | if write_header: 69 | writer.writerow(["date", "playtime"]) 70 | writer.writerow([date, playtime]) 71 | print(f"{row.name}: {playtime}") 72 | 73 | 74 | if __name__ == '__main__': 75 | main() 76 | -------------------------------------------------------------------------------- /.misc/FireFox/OneeChan v5.6.1 Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Left Margin": 65, 3 | "Custom Left Margin": 0, 4 | "Right Margin": 65, 5 | "Custom Right Margin": 0, 6 | "Style Thread Stats": true, 7 | "Rounded Corners": false, 8 | "Underline All Links": false, 9 | "Show Banner": false, 10 | "Reduce Banner Opacity": false, 11 | "Show Board Banners": false, 12 | "Show Board Name": true, 13 | "Show Reply to Thread Button": true, 14 | "Show Checkboxes": false, 15 | "Show Blotter": true, 16 | "Show 4chan Ads": false, 17 | "Show Top Ad": true, 18 | "Show Middle Ad": true, 19 | "Show Bottom Ad": true, 20 | "Reduce Ad Opacity": false, 21 | "Show Navigation Links": true, 22 | "Show Top Links": true, 23 | "Show Bottom Links": true, 24 | "Show Previous/Next buttons": false, 25 | "Sidebar Position": 1, 26 | "Disable In Catalog View": false, 27 | "SS-like Sidebar": false, 28 | "Minimal Sidebar": true, 29 | "Autohide Style": 1, 30 | "Transparent QR": false, 31 | "Remove Background": false, 32 | "Remove Controls": false, 33 | "Expanding Form Inputs": true, 34 | "Force QR to Sidebar Size": false, 35 | "Hide Mascots in Catalog": true, 36 | "Mascots Overlap Posts": false, 37 | "Reduce Mascot Opacity": true, 38 | "Grayscale Mascots": false, 39 | "Fit Width": true, 40 | "Show Reply Header": true, 41 | "Show Post Info On Hover": false, 42 | "Show File Info": true, 43 | "Underline QuoteLinks": false, 44 | "Indent OP": false, 45 | "Allow Wrapping Around OP": false, 46 | "OP Background": false, 47 | "Recolor Even Replies": false, 48 | "Reduce Thumbnail Opacity": false, 49 | "Backlink Icons": true, 50 | "Backlinks on Bottom": false, 51 | "Borders": 2, 52 | "Margin Between Replies": "", 53 | "Post Message Margin": 2, 54 | "Justified Text": true, 55 | "Show Background": true, 56 | "Unified Thumbnail Size": false, 57 | "Show Header Background Gradient": true, 58 | "Show Header Shadow": true, 59 | "Highlight Current Board": true, 60 | "Highlight (OP) quotes": false, 61 | "Highlight (You) quotes": false, 62 | "Post Decoration Style": 0, 63 | "Post Decoration Width": 1, 64 | "Custom Decoration Width": 0, 65 | "Post Highlight Style": "solid", 66 | "Font Family": "sans-serif", 67 | "Font Size": 13, 68 | "Backlink Font Size": 9, 69 | "Bitmap Font": false, 70 | "Version Fix": 1, 71 | "Selected Theme": 29, 72 | "NSFW Theme": 29 73 | } -------------------------------------------------------------------------------- /hexchat/.config/hexchat/commands.conf: -------------------------------------------------------------------------------- 1 | NAME ACTION 2 | CMD me &2 3 | 4 | NAME AME 5 | CMD allchan me &2 6 | 7 | NAME ANICK 8 | CMD allserv nick &2 9 | 10 | NAME AMSG 11 | CMD allchan say &2 12 | 13 | NAME BANLIST 14 | CMD quote MODE %c +b 15 | 16 | NAME CHAT 17 | CMD dcc chat %2 18 | 19 | NAME DIALOG 20 | CMD query %2 21 | 22 | NAME DMSG 23 | CMD msg =%2 &3 24 | 25 | NAME EXIT 26 | CMD quit 27 | 28 | NAME GREP 29 | CMD lastlog -h -r -- &2 30 | 31 | NAME IGNALL 32 | CMD ignore %2!*@* ALL 33 | 34 | NAME J 35 | CMD join &2 36 | 37 | NAME KILL 38 | CMD quote KILL %2 :&3 39 | 40 | NAME LEAVE 41 | CMD part &2 42 | 43 | NAME M 44 | CMD msg &2 45 | 46 | NAME OMSG 47 | CMD msg @%c &2 48 | 49 | NAME ONOTICE 50 | CMD notice @%c &2 51 | 52 | NAME RAW 53 | CMD quote &2 54 | 55 | NAME SERVHELP 56 | CMD quote HELP 57 | 58 | NAME SPING 59 | CMD ping 60 | 61 | NAME SQUERY 62 | CMD quote SQUERY %2 :&3 63 | 64 | NAME SSLSERVER 65 | CMD server -ssl &2 66 | 67 | NAME SV 68 | CMD echo HexChat %v %m 69 | 70 | NAME UMODE 71 | CMD mode %n &2 72 | 73 | NAME UPTIME 74 | CMD quote STATS u 75 | 76 | NAME VER 77 | CMD ctcp %2 VERSION 78 | 79 | NAME VERSION 80 | CMD ctcp %2 VERSION 81 | 82 | NAME WALLOPS 83 | CMD quote WALLOPS :&2 84 | 85 | NAME WI 86 | CMD quote WHOIS %2 87 | 88 | NAME WII 89 | CMD quote WHOIS %2 %2 90 | 91 | NAME dispcurrsong 92 | CMD me is listening to: &7 93 | 94 | NAME np 95 | CMD wp &2 96 | 97 | NAME to 98 | CMD topic %c 99 | 100 | NAME hs 101 | CMD msg HostServ &2 102 | 103 | NAME cs 104 | CMD msg ChanServ &2 105 | 106 | NAME ns 107 | CMD msg NickServ &2 108 | 109 | NAME ms 110 | CMD msg MemoServ &2 111 | 112 | NAME cmo 113 | CMD mode %c &2 114 | 115 | NAME selfadmin 116 | CMD msg ChanServ ADMIN %c %n 117 | 118 | NAME selfop 119 | CMD msg ChanServ OP %c %n 120 | 121 | NAME selfvoice 122 | CMD msg ChanServ VOICE %c %n 123 | 124 | NAME time 125 | CMD ctcp %2 time 126 | 127 | NAME withop 128 | CMD selfop 129 | 130 | NAME withop 131 | CMD timer 1 &2 132 | 133 | NAME withop 134 | CMD timer 1 msg ChanServ DEOP %c %n 135 | 136 | NAME admin 137 | CMD mode %c +a &2 138 | 139 | NAME deadmin 140 | CMD mode %c -a &2 141 | 142 | NAME pyx 143 | CMD py exec hexchat.command('say ' + str(&2)) 144 | 145 | NAME disconnect 146 | CMD discon 147 | 148 | NAME ou 149 | CMD (☞゚∀゚)☞ O U 150 | 151 | NAME x0 152 | CMD say https://x0.at/%2 &3 153 | 154 | NAME kare 155 | CMD msg KareRaisu xdcc send %2 156 | 157 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/ApplySyntax.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | // Auto add extensions to language settings file in User folder. 3 | "add_exts_to_lang_settings": false, 4 | 5 | "debug": false, 6 | 7 | // Erase default settings 8 | "default_syntaxes": [], 9 | "syntaxes": [ 10 | { 11 | "syntax": "i3wm config/i3wm config", 12 | "rules": [ 13 | {"file_path": ".*i3/config$"}, 14 | ] 15 | }, 16 | { 17 | "syntax": "ShellScript/Bash", 18 | "rules": [ 19 | {"file_path": ".*/\\.env(\\.[^/]*)?$"}, 20 | ] 21 | }, 22 | { 23 | "syntax": "SimpleSyntax/ssHash", 24 | "rules": [ 25 | {"file_path": ".*/mpv/input\\.conf$"}, 26 | {"file_path": ".*/\\.(in|ex)clude$"}, 27 | {"file_path": ".*/(fstab|crypttab)(\\./w+)?$"}, 28 | ] 29 | }, 30 | { 31 | "syntax": "SSH Config/SSH Config", 32 | "rules": [ 33 | {"file_path": ".*/\\.ssh/config$"}, 34 | {"file_path": ".*/ssh_config$"}, 35 | ], 36 | }, 37 | { 38 | "syntax": "Regular Expressions/RegExp", 39 | "rules": [ 40 | {"file_path": ".*/openurl\\.conf$"}, 41 | ] 42 | }, 43 | { 44 | "syntax": "INI/INI", 45 | "rules": [ 46 | {"file_path": ".*/polybar/config$"}, 47 | {"file_path": ".*/dunstrc$"}, 48 | {"file_path": ".*/\\.icsv2ledgerrc$"}, 49 | ] 50 | }, 51 | { 52 | "syntax": "rainbow_csv/pregenerated_grammars/CSV (Rainbow)", 53 | "rules": [ 54 | {"file_path": ".*\\.icsv2ledgerrc-mapping$"}, 55 | ] 56 | }, 57 | { 58 | "syntax": "Go/YAML (Go)", 59 | "rules": [ 60 | // Helm 61 | {"file_path": ".*/templates/[^/]+\\.(ya?ml|tpl)$"}, 62 | // Rancher 63 | {"file_path": ".*ya?ml\\.tpl$"}, 64 | ] 65 | }, 66 | { 67 | "syntax": "TOML/TOML", 68 | "rules": [ 69 | {"file_path": ".*/poetry\\.lock$"}, 70 | ] 71 | }, 72 | { 73 | "syntax": "Ledger/Ledger", 74 | "rules": [ 75 | {"file_path": ".*/accounting/.*\\.txt$"}, 76 | ] 77 | }, 78 | ], 79 | } 80 | -------------------------------------------------------------------------------- /tools/tools/sub/merge_qcs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | """Merge multiple QC documents, as created by kSub and mpvQC, into one. 4 | 5 | Sorts lines and attributes them with their reporter 6 | (sourced from the filename). 7 | """ 8 | 9 | # TODO option/mode to merge into ASS file 10 | 11 | import argparse 12 | from collections import namedtuple 13 | import io 14 | import logging 15 | import os 16 | import sys 17 | from typing import Generator 18 | 19 | 20 | l = logging.getLogger(__name__) 21 | 22 | 23 | QCLine = namedtuple('QCLine', 'line source') 24 | 25 | 26 | def extract_qc_lines(f: io.TextIOWrapper) -> Generator[str, None, None]: 27 | line_iter = iter(f) 28 | 29 | # go to data section 30 | # while "[DATA]\n" != next(line_iter, None) is not None: 31 | # pass 32 | for line in line_iter: 33 | if line == "[DATA]\n": 34 | break 35 | 36 | for line in line_iter: 37 | if not line.startswith("#"): 38 | yield line.strip() 39 | 40 | 41 | def get_subber_name(fname: str) -> str: 42 | stem, _ = os.path.splitext(fname) 43 | qc, *fragments, name = stem.split('_') 44 | assert qc == "[QC]" 45 | return name 46 | 47 | 48 | def main(): 49 | l.addHandler(logging.StreamHandler(sys.stderr)) 50 | l.setLevel(logging.INFO) 51 | 52 | parser = argparse.ArgumentParser() 53 | parser.add_argument('in_files', nargs="+", # dest='in_files', action='append', 54 | type=argparse.FileType('r', encoding='utf-8-sig'), 55 | default='-') 56 | parser.add_argument('-o', dest='out_file', 57 | type=argparse.FileType('w', encoding='utf-8-sig'), 58 | default='-') 59 | params = parser.parse_args() 60 | l.debug("Params: %s", params) 61 | 62 | # read input 63 | qc_lines = set() 64 | for file in params.in_files: 65 | fpath = getattr(file, 'name', "<no_name>") 66 | l.info("reading %r", fpath) 67 | fname = os.path.basename(fpath) 68 | name = get_subber_name(fname) 69 | 70 | local_qc_lines = {QCLine(line, name) for line in extract_qc_lines(file)} 71 | if not local_qc_lines: 72 | l.warn("File from %s (%r) contained no lines!", name, fpath) 73 | else: 74 | qc_lines |= local_qc_lines 75 | file.close() 76 | 77 | # write output 78 | params.out_file.write("[DATA]\n") 79 | for qc_line in sorted(qc_lines): 80 | params.out_file.write(f"{qc_line.line} {{{qc_line.source}}}\n") 81 | params.out_file.write(f"# Total lines: {len(qc_lines)}\n") 82 | params.out_file.close() 83 | 84 | 85 | if __name__ == '__main__': 86 | main() 87 | -------------------------------------------------------------------------------- /.misc/FireFox/vimium-options.json: -------------------------------------------------------------------------------- 1 | { 2 | "settingsVersion": "1.66", 3 | "exclusionRules": [ 4 | { 5 | "pattern": "https?://localhost:8888/*", 6 | "passKeys": "" 7 | }, 8 | { 9 | "pattern": "https?://krunker.io/*", 10 | "passKeys": "" 11 | }, 12 | { 13 | "pattern": "https?://animemusicquiz.com/*", 14 | "passKeys": "" 15 | }, 16 | { 17 | "pattern": "https?://app.roll20.net/*", 18 | "passKeys": "" 19 | }, 20 | { 21 | "pattern": "https?://openings.moe/*", 22 | "passKeys": "" 23 | }, 24 | { 25 | "pattern": "https?://www.figma.com/*", 26 | "passKeys": "" 27 | }, 28 | { 29 | "pattern": "https?://vtt.kageru.moe/*", 30 | "passKeys": "" 31 | } 32 | ], 33 | "filterLinkHints": false, 34 | "waitForEnterForFilteredHints": true, 35 | "hideHud": false, 36 | "keyMappings": "map F LinkHints.activateModeToOpenInNewForegroundTab\nmap et LinkHints.activateModeToOpenInNewTab\nmap zp togglePinTab\nmap zm toggleMuteTab\nmap I passNextKey\nmap J nextTab\nmap K previousTab\nmap yd LinkHints.activateModeToDownloadLink\nmap gn firstTab", 37 | "linkHintCharacters": "sadfjklewcmpgh", 38 | "linkHintNumbers": "0123456789", 39 | "newTabUrl": "about:newtab", 40 | "nextPatterns": "next,more,older,>,›,→,»,≫,>>", 41 | "previousPatterns": "prev,previous,back,newer,<,‹,←,«,≪,<<", 42 | "regexFindMode": false, 43 | "ignoreKeyboardLayout": false, 44 | "scrollStepSize": 60, 45 | "smoothScroll": true, 46 | "grabBackFocus": true, 47 | "searchEngines": "w: http://en.wikipedia.org/wiki/Special:Search?search=%s Wikipedia\ndw: http://de.wikipedia.org/wiki/Special:Search?search=%s Wikipedia (de)\ng: https://duckduckgo.com/?q=%s DuckDuckGo\ngg: https://www.google.com/search?q=%s Google\ngi: https://www.google.com/search?tbm=isch&q=%s Google Images\ngm: https://www.google.com/maps?q=%s Google Maps\nud: https://www.urbandictionary.com/define.php?term=%s UrbanDictionary\nwa: http://www.wolframalpha.com/input/?i=%s Wolfram|Alpha\n\ngh: https://github.com/search?q=%s GitHub\nso: http://stackoverflow.com/search?q=%s StackOverflow\nsu: http://superuser.com/search?q=%s SuperUser\nimdb: http://www.imdb.com/find?s=all&q=%s IMDB\n\nwa: http://www.wolframalpha.com/input/?i=%s Wolfram|Alpha", 48 | "searchUrl": "https://duckduckgo.com/?q=", 49 | "userDefinedLinkHintCss": "div > .vimiumHintMarker {\n/* linkhint boxes */\nbackground: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFF785),\n color-stop(100%,#FFC542));\nborder: 1px solid #E3BE23;\n}\n\ndiv > .vimiumHintMarker span {\n/* linkhint text */\ncolor: black;\nfont-weight: bold;\nfont-size: 12px;\n}\n\ndiv > .vimiumHintMarker > .matchingCharacter {\n}" 50 | } -------------------------------------------------------------------------------- /zsh/zshrc/completions.zsh: -------------------------------------------------------------------------------- 1 | # The following lines were added by compinstall 2 | 3 | zstyle ':completion:*' completer _complete _ignored _approximate 4 | zstyle ':completion:*' completions 1 5 | zstyle ':completion:*' format 'Completing %d' 6 | zstyle ':completion:*' glob 1 7 | zstyle ':completion:*' group-name '' 8 | zstyle ':completion:*' insert-unambiguous true 9 | zstyle ':completion:*' list-prompt "%SAt %p: Hit TAB for more, or the character to insert%s" 10 | zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=** r:|=**' 11 | zstyle ':completion:*' max-errors 2 12 | zstyle ':completion:*' menu select #=long 13 | zstyle ':completion:*' prompt 'correct %e errors' 14 | zstyle ':completion:*' select-prompt "%SScrolling active: current selection at %p/%l~%s" 15 | zstyle ':completion:*' substitute 1 16 | zstyle :compinstall filename '/home/fichte/.zshrc' 17 | 18 | # autoload -Uz compinit 19 | # compinit 20 | # End of lines added by compinstall 21 | 22 | # http://zshwiki.org/home/examples/compquickstart 23 | zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%{\e[0m%}' 24 | zstyle ':completion:*:descriptions' format $'%{\e[0;31m%}completing %B%d%b%{\e[0m%}' 25 | # zstyle ':completion:*:descriptions' format "- %d -" 26 | # zstyle ':completion:*:corrections' format "- %d - (errors %e})" 27 | zstyle ':completion:*:default' list-prompt '%S%M matches%s' 28 | # highlight current prefix and next characters to press 29 | # http://www.smallbulb.net/2018/797-zsh-completion-with-visual-hints 30 | zstyle -e ':completion:*:default' list-colors 'reply=("${PREFIX:+=(#bi)($PREFIX:t)(?)*==90=01}:${(s.:.)LS_COLORS}")' 31 | zstyle ':completion:*:manuals' separate-sections true 32 | zstyle ':completion:*:manuals.(^1*)' insert-sections true 33 | zstyle ':completion:*' verbose yes 34 | zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX + $#SUFFIX) / 3 )) )' 35 | zstyle ':completion::approximate*:*' prefix-needed false 36 | zstyle ':completion:*:processes' command 'ps -au$USER' 37 | 38 | # complete manual by their section 39 | zstyle ':completion:*:manuals' separate-sections true 40 | zstyle ':completion:*:manuals.*' insert-sections true 41 | zstyle ':completion:*:man:*' menu yes select 42 | 43 | autoload -Uz compinit 44 | compinit 45 | 46 | # Third-party packages for auto competions 47 | # - zsh-autosuggestions: fish-like auto completions 48 | # - git-flow-completion-git 49 | sources=(/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 50 | $HOME/zshrc/zsh-autosuggestions/zsh-autosuggestions.zsh 51 | /usr/share/git-flow/git-flow-completion.zsh) 52 | for src in $sources; do 53 | [[ -e "$src" ]] && source "$src" 54 | done 55 | unset sources src 56 | # ZSH_AUTOSUGGEST_USE_ASYNC=1 57 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/wttr.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """Replace weather glyphs from wttr.in with fontawesome glyphs.""" 3 | 4 | import sys 5 | from urllib.request import urlopen 6 | 7 | BASE_URI = "https://wttr.in/" 8 | 9 | # https://github.com/chubin/wttr.in/blob/master/lib/constants.py 10 | GLYPH_MAP = { 11 | # https://erikflowers.github.io/weather-icons/ 12 | # "✨": ("", "#E9E314"), # Unknown 13 | "☀️": ("%{T5}\uf00d%{T-}", "#E9E314"), # Sunny 14 | "☁️": ("%{T5}\uf013%{T-}", "#555"), # Cloudy 15 | "🌫": ("%{T5}\uf014%{T-}", None), # Fog 16 | "🌦": ("%{T5}\uf0b2%{T-}", "#1773DA"), # LightRain 17 | "🌧": ("%{T5}\uf019%{T-}", "#1773DA"), # HeavyRain 18 | "🌩": ("%{T5}\uf01e%{T-}", "#CE3C24"), # ThunderyHeavyRain 19 | "⛈": ("%{T5}\uf01d%{T-}", "#CE3C24"), # ThunderyShowers 20 | "🌨": ("%{T5}\uf064%{T-}", "#BDC7D3"), # LightSnow(Showers) 21 | "❄️": ("%{T5}\uf076%{T-}", "#FFF"), # HeavySnow 22 | "❄️": ("%{T5}\uf076%{T-}", "#FFF"), # HeavySnowShowers 23 | "⛅️": ("%{T5}\uf002%{T-}", "#E5C764"), # PartlyCloudy 24 | # 25 | # https://fontawesome.com/icons?d=gallery&q=weather 26 | # "✨": ("", "#E9E314"), # Unknown <= not displayed 27 | # "☀️": ("", "#E9E314"), # Sunny 28 | # "☁️": ("", "#555"), # Cloudy 29 | # "🌫": ("", None), # Fog 30 | # "🌦": ("", "#1773DA"), # LightRain # "" is pro only 31 | # "🌧": ("", "#1773DA"), # HeavyRain 32 | # "🌩": ("", "#CE3C24"), # ThunderyHeavyRain <= not displayed 33 | # "⛈": ("", "#CE3C24"), # ThunderyShowers <= not displayed 34 | # "🌨": ("", "#BDC7D3"), # LightSnow <= not displayed 35 | # "🌨": ("", "#BDC7D3"), # LightSnowShowers <= not displayed 36 | # "❄️": ("", "#CE3C24"), # HeavySnow <= not displayed 37 | # "❄️": ("", "#CE3C24"), # HeavySnowShowers <= not displayed 38 | # "⛅️": ("", "#E5C764"), # PartlyCloudy 39 | # wttr outputs PartlyCloudy for "Light Rain, Rain Shower" 40 | } 41 | 42 | # Color codes for temperature: 43 | # https://github.com/schachmat/wego/blob/994e4f141759a1070d7b0c8fbe5fad2cc7ee7d45/frontends/ascii-art-table.go#L51 44 | 45 | 46 | def main(): 47 | uri_path = sys.argv[1] if len(sys.argv) > 1 else '?format=%c+%t' 48 | try: 49 | with urlopen(BASE_URI + uri_path) as f: 50 | text = f.read().decode() 51 | except Exception as e: 52 | return e.__class__.__name__ 53 | 54 | for glyph, (repl, color) in GLYPH_MAP.items(): 55 | if color: 56 | text = text.replace(glyph, f"%{{F{color}}}{repl}%{{F-}}") 57 | else: 58 | text = text.replace(glyph, repl) 59 | 60 | # text += " |" + "|".join(x[0] for x in GLYPH_MAP.values()) 61 | return text 62 | 63 | 64 | if __name__ == '__main__': 65 | print(main()) 66 | -------------------------------------------------------------------------------- /.misc/FireFox/treestyletab.css: -------------------------------------------------------------------------------- 1 | /* Show title of unread tabs with red and italic font */ 2 | /* 3 | tab-item.unread .label-content { 4 | color: red !important; 5 | font-style: italic !important; 6 | } 7 | */ 8 | 9 | /* Add private browsing indicator per tab */ 10 | .tab.private-browsing .label:before { 11 | content: "🕶"; 12 | } 13 | 14 | /* Only show close button on hover, and tint red */ 15 | #tabbar tab-item:not(.active) tab-item-substance:not(:hover) tab-closebox { 16 | display: none; 17 | } 18 | tab-item tab-closebox:hover::before, 19 | tab-item.active tab-closebox:hover::before { 20 | background: hsla(0, 70%, 60%); 21 | opacity: 0.8; /* defaults to 0.1 */ 22 | } 23 | 24 | /* Dim unloaded tabs */ 25 | tab-item.discarded .label-content { 26 | opacity: 0.65; 27 | } 28 | 29 | /* Add margin around favicon */ 30 | tab-item .favicon { 31 | margin-left: .2em; 32 | margin-right: .2em; 33 | } 34 | 35 | /* Tab counts (use with <number>gt via vimium-ff) */ 36 | #tabbar { 37 | counter-reset: vtabs atabs tabs; 38 | /* vtabs tracks visible tabs, atabs tracks active tabs, tabs tracks all tabs */ 39 | } 40 | tab-item:not(.collapsed):not(.discarded) { 41 | counter-increment: vtabs atabs tabs; 42 | } 43 | tab-item:not(.collapsed) { 44 | counter-increment: vtabs tabs; 45 | } 46 | tab-item:not(.discarded) { 47 | counter-increment: atabs tabs; 48 | } 49 | tab-item { 50 | counter-increment: tabs; 51 | } 52 | tab-item .extra-items-container.behind::after { 53 | color: hsla(0, 0%, 100%, 0.65); 54 | content: counter(tabs); 55 | font-size: xx-small; 56 | right: 0.2em; 57 | padding: 0.2em; 58 | pointer-events: none; 59 | position: absolute; 60 | bottom: 0.2em; 61 | z-index: 1000; 62 | } 63 | .newtab-button::after { 64 | content: var(--tab-count-text); 65 | font-size: small; 66 | pointer-events: none; 67 | 68 | position: absolute; 69 | left: 0.5em; 70 | 71 | /* TST 2.4.0 - Fix for Issue #1664 */ 72 | background: transparent !important; 73 | mask: none !important; 74 | } 75 | .newtab-button:hover { 76 | --tab-count-text: counter(atabs) "/" counter(tabs) " tabs"; 77 | } 78 | 79 | /* Apply gtk theme colors */ 80 | /* removed with https://github.com/piroor/treestyletab/commit/d3d39e05432f644c6e0ed46e0a6b214f3a9360cb; variables renamed later */ 81 | :root { 82 | /* used in gtk window titles */ 83 | --sidebar-background: hsl(227, 14%, 20%); 84 | 85 | --tab-surface-regular: hsl(227, 14%, 25%); 86 | /*--tab-surface-active: -moz-CellHighlight;*/ 87 | --tab-text-regular: hsl(168, 6%, 83%); 88 | --tab-border: var(--sidebar-background); 89 | --tab-side-border: hsl(227, 14%, 20%); 90 | --tab-surface-hover: hsl(227, 22%, 34%); 91 | --tab-dropmarker: var(--tab-text-regular); 92 | } 93 | 94 | :root.sidebar #background { 95 | background-color: var(--sidebar-background); 96 | } 97 | -------------------------------------------------------------------------------- /git/.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = FichteFoll 3 | email = fichtefoll2@googlemail.com 4 | # sign-only sub-key 5 | signingkey = 54FBDF4B50960FC9 6 | # sign and certify sub-key (same as main key); used previously 7 | # signingkey = 07CD83C5 8 | 9 | [commit] 10 | gpgSign = true 11 | 12 | [alias] 13 | b = branch 14 | c = commit 15 | cm = commit --message 16 | ca = commit --all 17 | co = checkout 18 | d = diff 19 | ds = diff --staged 20 | fap = fetch --all --tags --prune 21 | r = reset 22 | rb = rebase 23 | rba = rebase --abort 24 | s = status -s 25 | 26 | lg = log --graph --oneline --decorate 27 | ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat 28 | ld = !f() { git show "$1"; git diff "$1^..$1"; }; f 29 | lnew = "!f() { git log "$1@{1}..$1@{0}"; }; f" 30 | can = commit --amend --no-edit 31 | cAm = commit --all --message 32 | cAa = commit --all --amend -C HEAD 33 | cAan = commit --all --amend --no-edit 34 | 35 | ; Manage "gone" local branches (branches whose tracking branch doesn't exist anymore) 36 | ls-gone = !git for-each-ref --format '%(refname:strip=2) %(upstream:track)' refs/heads | awk '$2 == \"[gone]\" {print $1}' 37 | rm-gone = !git ls-gone | xargs --no-run-if-empty git branch -D 38 | 39 | ; Pull request management 40 | ; https://gist.github.com/gnarf/5406589 41 | prr = !f() { git fetch -fu $1 "refs/pull/$2/head:pr/$2"; }; f 42 | pr = prr origin 43 | pru = prr upstream 44 | pr-clean = !git branch -D $(git for-each-ref --format='%(refname:strip=2)' refs/heads/pr) 45 | 46 | ; Sublime Merge integrations 47 | terminal = !systemd-run --user alacritty --working-directory "$(pwd)" 48 | rebase-terminal = "!f() { systemd-run --user alacritty --working-directory "$(pwd)" --hold -e "$SHELL" -c "git rebase -i $1"; }; f" 49 | gh = !gh 50 | 51 | [branch] 52 | autosetuprebase = always 53 | 54 | [push] 55 | default = simple 56 | autoSetupRemote = true 57 | 58 | [gc] 59 | autoDetach = false 60 | 61 | [pull] 62 | rebase = true 63 | 64 | [merge] 65 | conflictStyle = zdiff3 66 | tool = smerge 67 | 68 | [core] 69 | excludesfile = ~/.gitignore_global 70 | 71 | [rebase] 72 | autoSquash = true 73 | 74 | [log] 75 | follow = true 76 | 77 | [mergetool "smerge"] 78 | cmd = smerge --wait mergetool \"$BASE\" \"$LOCAL\" \"$REMOTE\" -o \"$MERGED\" 79 | trustExitCode = true 80 | 81 | [filter "lfs"] 82 | clean = git-lfs clean -- %f 83 | smudge = git-lfs smudge -- %f 84 | process = git-lfs filter-process 85 | required = true 86 | 87 | [core] 88 | pager = delta 89 | 90 | [delta] 91 | line-numbers = true 92 | minus-style = syntax auto 93 | # side-by-side = true 94 | 95 | [interactive] 96 | diffFilter = delta --color-only 97 | [tag] 98 | gpgSign = true 99 | [rerere] 100 | enabled = true 101 | [init] 102 | defaultBranch = main 103 | [diff] 104 | algorithm = histogram 105 | -------------------------------------------------------------------------------- /BetterDiscord/.config/BetterDiscord/themes/Nox_tempfixes.theme.css: -------------------------------------------------------------------------------- 1 | /*//META{"name":"Nox-tempfixes","description":"Fixes for the Nox theme","author":"Various","version":"1.0.5"}*//**/ 2 | 3 | .tutorial-3w5I9h /* Inbox Tutorial */ { 4 | background-color: var(--nox-level2); 5 | } 6 | .children-rWhLdy.da-children > .container-cMG81i.da-container.large-laZJpW > .inner-2P4tQO.da-inner , .theme-dark .bd-addon-list .bd-addon-card /* PluginRepo / ThemeRepo */ { 7 | background-color: var(--nox-level3); 8 | } 9 | .theme-dark .feature-2w65J5 , .banner-WELp4M /* Nitro stuff */ { 10 | background-color: var(--nox-level1); 11 | } 12 | .lookInverted-2D7oAl.colorBrand-3pXr91:disabled /* Nitro Subscribe button was a white block on :disabled */ { 13 | background-color: var(--nox-accent) !important; 14 | } 15 | .accountList-33MS45 , .connection-1fbD7X , .connectionHeader-2MDqhu , .flex-1xMQg5.flex-1O1GKY.da-flex.da-flex.horizontal-1ae9ci.horizontal-2EEEnY.flex-1O1GKY.directionRow-3v3tfG.justifyStart-2NDFzi.alignCenter-1dQNNs.noWrap-3jynv6.header-1RC2Wb.da-header , .contentColumn-2hrIYH .notDetected-33MY4s, .table-39R0Oe.da-table.invoice-28DmWy.da-invoice /* Connected accounts make uniform-ey*/ { 16 | background: #292929; 17 | border: none; 18 | box-shadow: 0 5px 10px rgba(0,0,0,0.2), 0 1px 0 rgba(255,255,255,0.03) inset; 19 | border-radius: 3px; 20 | } 21 | .connectionHeader-2MDqhu /* Nicer headers for connected accounts */ { 22 | border-radius: 3px 3px 0 0; 23 | } 24 | div#message-delete > .label-22pbtT.da-label /* Make "Delete Message" label colored, as it should be*/{ 25 | color: #f04747 !important; 26 | } 27 | 28 | /* Emoji Menu Redo */ 29 | .wrapper-1-Fsb8.da-wrapper.header-ywPcAE.da-header { 30 | background: #292929; 31 | border: none; 32 | box-shadow: 0 5px 10px rgba(0,0,0,0.2), 0 1px 0 rgba(255,255,255,0.03) inset; 33 | border-radius: 3px; 34 | width: calc(100% + 8px); 35 | margin-bottom: 5px; 36 | border-radius: 0; 37 | } 38 | .wrapper-1rqM3x .inspector-S2gM3e, .wrapper-1rqM3x .categoryList-2Kzf65 { 39 | background-color: var(--nox-level2); 40 | border-color: var(--nox-level2); 41 | } 42 | .header-8ilj5e.da-header { 43 | box-shadow: none; 44 | } 45 | /* Emoji Menu Redo */ 46 | 47 | #status-picker #status-picker-custom-status /* Status popup fix for opacity on text when hovering over selection */ { 48 | z-index: -1; 49 | } 50 | 51 | .searchResultMessage-1fxgXh.da-searchResultMessage.hit-1fVM9e.da-hit { 52 | background: var(--nox-level2); 53 | box-shadow: 0 0 10px 6px var(--nox-level3); 54 | border-radius: 0 55 | } 56 | .searchResult-9tQ1uo:before, .searchResult-9tQ1uo:after { 57 | background-image: none 58 | } 59 | .searchResult-9tQ1uo.expanded-w_LCGl { 60 | background: var(--nox-level2) 61 | } 62 | 63 | /*Emoji selection color fix*/ 64 | .emojiSection-3Fb9ix.da-emojiSection { 65 | background-color: var(--nox-level2); 66 | } 67 | .guildSection-1EoFKd.da-guildSection { 68 | background-color: var(--nox-level1); 69 | } 70 | -------------------------------------------------------------------------------- /hexchat/.config/hexchat/keybindings.conf: -------------------------------------------------------------------------------- 1 | # HexChat key bindings config file 2 | 3 | ACCEL=<Primary>Page_Up 4 | Change Page 5 | D1:-1 6 | D2:Relative 7 | 8 | ACCEL=<Primary>Page_Down 9 | Change Page 10 | D1:1 11 | D2:Relative 12 | 13 | ACCEL=<Alt>9 14 | Change Page 15 | D1:9 16 | D2! 17 | 18 | ACCEL=<Alt>8 19 | Change Page 20 | D1:8 21 | D2! 22 | 23 | ACCEL=<Alt>7 24 | Change Page 25 | D1:7 26 | D2! 27 | 28 | ACCEL=<Alt>6 29 | Change Page 30 | D1:6 31 | D2! 32 | 33 | ACCEL=<Alt>5 34 | Change Page 35 | D1:5 36 | D2! 37 | 38 | ACCEL=<Alt>4 39 | Change Page 40 | D1:4 41 | D2! 42 | 43 | ACCEL=<Alt>3 44 | Change Page 45 | D1:3 46 | D2! 47 | 48 | ACCEL=<Alt>2 49 | Change Page 50 | D1:2 51 | D2! 52 | 53 | ACCEL=<Alt>1 54 | Change Page 55 | D1:1 56 | D2! 57 | 58 | ACCEL=<Alt>0 59 | Change Page 60 | D1:auto 61 | D2! 62 | 63 | ACCEL=<Primary>o 64 | Insert in Buffer 65 | D1: 66 | D2! 67 | 68 | ACCEL=<Primary>b 69 | Insert in Buffer 70 | D1: 71 | D2! 72 | 73 | ACCEL=<Primary>k 74 | Insert in Buffer 75 | D1: 76 | D2! 77 | 78 | ACCEL=<Primary>i 79 | Insert in Buffer 80 | D1: 81 | D2! 82 | 83 | ACCEL=<Primary>u 84 | Insert in Buffer 85 | D1: 86 | D2! 87 | 88 | ACCEL=<Shift>Page_Down 89 | Change Selected Nick 90 | D1! 91 | D2! 92 | 93 | ACCEL=<Shift>Page_Up 94 | Change Selected Nick 95 | D1:Up 96 | D2! 97 | 98 | ACCEL=Page_Down 99 | Scroll Page 100 | D1:Down 101 | D2! 102 | 103 | ACCEL=<Primary>Home 104 | Scroll Page 105 | D1:Top 106 | D2! 107 | 108 | ACCEL=<Primary>End 109 | Scroll Page 110 | D1:Bottom 111 | D2! 112 | 113 | ACCEL=Page_Up 114 | Scroll Page 115 | D1:Up 116 | D2! 117 | 118 | ACCEL=<Shift>Down 119 | Scroll Page 120 | D1:+1 121 | D2! 122 | 123 | ACCEL=<Shift>Up 124 | Scroll Page 125 | D1:-1 126 | D2! 127 | 128 | ACCEL=Down 129 | Next Command 130 | D1! 131 | D2! 132 | 133 | ACCEL=Up 134 | Last Command 135 | D1! 136 | D2! 137 | 138 | ACCEL=Tab 139 | Complete nick/command 140 | D1! 141 | D2! 142 | 143 | ACCEL=space 144 | Check For Replace 145 | D1! 146 | D2! 147 | 148 | ACCEL=Return 149 | Check For Replace 150 | D1! 151 | D2! 152 | 153 | ACCEL=KP_Enter 154 | Check For Replace 155 | D1! 156 | D2! 157 | 158 | ACCEL=<Primary>Tab 159 | Complete nick/command 160 | D1:Up 161 | D2! 162 | 163 | ACCEL=<Alt>Left 164 | Move front tab left 165 | D1! 166 | D2! 167 | 168 | ACCEL=<Alt>Right 169 | Move front tab right 170 | D1! 171 | D2! 172 | 173 | ACCEL=<Primary><Shift>Page_Up 174 | Move tab family left 175 | D1! 176 | D2! 177 | 178 | ACCEL=<Primary><Shift>Page_Down 179 | Move tab family right 180 | D1! 181 | D2! 182 | 183 | ACCEL=F9 184 | Run Command 185 | D1:/GUI MENU TOGGLE 186 | D2! 187 | 188 | ACCEL=<Primary>Up 189 | Push input line into history 190 | D1! 191 | D2! 192 | 193 | ACCEL=<Primary>Tab 194 | Change Page 195 | D1:1 196 | D2:Relative 197 | 198 | ACCEL=<Primary><Shift>ISO_Left_Tab 199 | Change Page 200 | D1:-1 201 | D2:Relative 202 | 203 | ACCEL=<Primary><Shift>n 204 | Change Page 205 | D1:auto 206 | D2! 207 | 208 | -------------------------------------------------------------------------------- /bin/bin/recently_used: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """Add files to the recently-used list. 4 | 5 | Overview: 6 | 7 | File dialogs and file managers (like Nautilus) have a "Recently Used" file 8 | list. Files are not automatically added to this list when they are created. 9 | Sometimes it would be nice to have scripts that generate files also add 10 | them to this list. For example, a script that takes screenshots can also 11 | add the resulting file(s) to the recently used list, making it easier to 12 | grab a screenshot and then open it in GIMP or Inkscape. 13 | """ 14 | # Based on https://github.com/xenomachina/recently_used. 15 | 16 | __copyright__ = "Copyright ©2016 Laurence Gonsalves" 17 | __license__ = "GPLv2" 18 | __email__ = "laurence@xenomachina.com" 19 | 20 | import argparse 21 | import sys 22 | 23 | import gi 24 | 25 | # Required for Gtk.main_quit 26 | gi.require_version('Gtk', '3.0') 27 | 28 | from gi.repository import Gio # noqa:E402 29 | from gi.repository import GLib # noqa:E402 30 | from gi.repository import Gtk # noqa:E402 31 | 32 | 33 | def create_argparser(): 34 | description, epilog = __doc__.strip().split('\n', 1) 35 | parser = argparse.ArgumentParser( 36 | description=description, 37 | epilog=epilog, 38 | formatter_class=argparse.RawDescriptionHelpFormatter, 39 | ) 40 | parser.add_argument('-A', '--appname', 41 | help="Application name (defaults to name of this script)") 42 | parser.add_argument('file', nargs='+', 43 | help="Path to a file to add to recently used list") 44 | return parser 45 | 46 | 47 | def warn(msg): 48 | print('WARNING: ' + msg, file=sys.stderr) 49 | 50 | 51 | def main(args): 52 | if args.appname: 53 | GLib.set_application_name(args.appname) 54 | 55 | # Add files to list 56 | recent_mgr = Gtk.RecentManager.get_default() 57 | for path in args.file: 58 | file = Gio.File.new_for_path(path) 59 | if not file.query_exists(): 60 | warn(f"{path!r} doesn't exist") 61 | else: 62 | uri = file.get_uri() 63 | recent_mgr.add_item(uri) 64 | print(f"Adding {uri!r}") 65 | 66 | # RecentManager.add_item is async, so we need to start the main loop for 67 | # those calls to actually do something. We want to quit as soon as they are 68 | # complete, so after scheduling them, we schedule an idle task to quit the 69 | # loop. Note that the order here is important. If the idle task is 70 | # scheduled first it will execute first! 71 | GLib.idle_add(Gtk.main_quit) 72 | Gtk.main() 73 | 74 | 75 | if __name__ == '__main__': 76 | error = None 77 | argparser = create_argparser() 78 | try: 79 | main(argparser.parse_args()) 80 | except (FileExistsError, FileNotFoundError) as exc: 81 | error = f"{exc.strerror}: {exc.filename}" 82 | 83 | if error: 84 | print(f'{argparser.prog}: ERROR: {error}', file=sys.stderr) 85 | sys.exit(1) 86 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/polyyad.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import argparse 4 | import os 5 | import re 6 | import subprocess 7 | import sys 8 | 9 | 10 | def get_pointer_info(): 11 | # X=1471 12 | # Y=925 13 | # SCREEN=0 14 | # WINDOW=88080389 15 | output = subprocess.check_output(["xdotool", "getmouselocation", "--shell"], encoding='ascii') 16 | mouse = dict(pair.split('=') for pair in output.splitlines()) 17 | 18 | # WINDOW=75497474 19 | # X=1920 20 | # Y=0 21 | # WIDTH=2560 22 | # HEIGHT=27 23 | # SCREEN=0 24 | output = subprocess.check_output(["xdotool", "getwindowgeometry", "--shell", mouse['WINDOW']], 25 | encoding='ascii') 26 | geometry = dict(pair.split('=') for pair in output.splitlines()) 27 | return mouse, geometry 28 | 29 | 30 | def get_screen_size(): 31 | if ( 32 | (display := os.environ.get('DISPLAY', ":0")) 33 | and (m := re.search(r":(\d+)(\.\d+)?$", display)) 34 | ): 35 | screen = m.group(1) 36 | else: 37 | screen = "0" 38 | # Screen 0: minimum 320 x 200, current 4480 x 1440, maximum 16384 x 16384 39 | output = subprocess.check_output(["xrandr", "-q"], encoding='ascii') 40 | for line in output.splitlines(): 41 | if line.startswith(f"Screen {screen}:"): 42 | groups = re.search(r"current (\d+) x (\d+)", line).groups() 43 | return tuple(map(int, groups)) 44 | else: 45 | return None 46 | 47 | 48 | def main(): 49 | parser = argparse.ArgumentParser() 50 | # TODO argument for window border size? 51 | parser.add_argument("--width", type=int, default=200) 52 | parser.add_argument("--height", type=int, default=200) 53 | parser.add_argument("--bottom", action='store_true', default=False) 54 | # TODO add 'auto' feature, 55 | # but cannot figure out how to determine position and resolution 56 | # of currently displayed output 57 | # without manually parsing xrandr. 58 | params, rest = parser.parse_known_args() 59 | 60 | mouse, geometry = get_pointer_info() 61 | print(f"{mouse=}") 62 | print(f"{geometry=}") 63 | screen_size = get_screen_size() 64 | print(f"{screen_size=}") 65 | 66 | if params.bottom: 67 | y = int(geometry['Y']) - params.height 68 | else: 69 | y = int(geometry['Y']) + int(geometry['HEIGHT']) 70 | 71 | width = params.width 72 | height = params.height 73 | if screen_size: 74 | width = min(width, screen_size[0]) 75 | height = min(height, screen_size[1] - y) 76 | 77 | x = int(mouse['X']) - width / 2 78 | 79 | print(f"{x=}, {y=}") 80 | print(f"{params.width=}, {params.height=}") 81 | print(f"{width=}, {height=}") 82 | 83 | cmd = ["yad", 84 | f"--width={width}", f"--height={height}", 85 | f"--posx={x}", f"--posy={y}", 86 | *rest] 87 | print("cmd:", " ".join(cmd)) 88 | subprocess.call(cmd, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr) 89 | 90 | 91 | if __name__ == '__main__': 92 | main() 93 | -------------------------------------------------------------------------------- /sublime-merge/.config/sublime-merge/Packages/User/Default (Linux).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | // Meta & Navigation 3 | { "keys": ["f8"], "command": "toggle_console" }, 4 | 5 | // Use ctrl+pageup/down for switch repo tabs 6 | // and alt+… for file tabs. 7 | // Unbind ctrl+(shift+)tab because it doesn't support recency. 8 | { "keys": ["ctrl+shift+tab"], "command": "noop" }, 9 | { "keys": ["ctrl+tab"], "command": "noop" }, 10 | { "keys": ["ctrl+pageup"], "command": "prev_tab" }, 11 | { "keys": ["ctrl+pagedown"], "command": "next_tab" }, 12 | { "keys": ["alt+pageup"], "command": "prev_file_tab" }, 13 | { "keys": ["alt+pagedown"], "command": "next_file_tab" }, 14 | 15 | // Editing 16 | { "keys": ["alt+q"], "command": "wrap_lines", }, 17 | { "keys": ["alt+d"], "command": "run_macro_file", "args": { "file": "Packages/Default/Delete Line.sublime-macro" } }, 18 | 19 | { "keys": ["ctrl+d"], "command": "duplicate_line" }, 20 | { "keys": ["ctrl+shift+d"], "command": "find_under_expand" }, 21 | 22 | { "keys": ["ctrl+alt+up"], "command": "select_lines", "args": { "forward": false }, 23 | "context": [{ "key": "control", "operator": "equal", "operand": "text_control" }], 24 | }, 25 | { "keys": ["ctrl+alt+down"], "command": "select_lines", "args": { "forward": true }, 26 | "context": [{ "key": "control", "operator": "equal", "operand": "text_control" }], 27 | }, 28 | 29 | { "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false}, 30 | "context": [{ "key": "control", "operator": "equal", "operand": "text_control" }], 31 | }, 32 | { "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true}, 33 | "context": [{ "key": "control", "operator": "equal", "operand": "text_control" }], 34 | }, 35 | 36 | /// Git /// 37 | 38 | // Create and push tag (analogous to branch bindings) 39 | { "keys": ["ctrl+shift+g"], 40 | "command": "show_command_palette", 41 | "args": { 42 | "command": "create_tag", 43 | }, 44 | }, 45 | { "keys": ["ctrl+g"], 46 | "command": "show_command_palette", 47 | "args": { 48 | "command": "push_tag", 49 | "args": { "remote": "origin" }, 50 | }, 51 | }, 52 | 53 | // Push and pull 54 | { "keys": ["ctrl+down"], 55 | "command": "git", 56 | "args": { "argv": ["fetch", "--all", "--tags", "--prune"] } 57 | }, 58 | { "keys": ["ctrl+alt+shift+up"], 59 | "command": "show_command_palette", 60 | "args": { 61 | "command": "push", 62 | "args": { "mode": "push --force-with-lease", "prompt": true } 63 | }, 64 | }, 65 | { "keys": ["ctrl+p"], 66 | "command": "show_command_palette", 67 | "args": { 68 | "command": "checkout_branch", 69 | }, 70 | }, 71 | 72 | /// Other /// 73 | 74 | // Open terminal in git root 75 | { "keys": ["ctrl+k", "ctrl+t"], "command": "git", "args": { "argv": ["terminal"] } }, 76 | 77 | // Copy commit hash 78 | { "keys": ["ctrl+c"], 79 | "command": "copy_to_clipboard", 80 | "args": { "text": "$commit" }, 81 | "context": [ 82 | { "key": "control", "operand": "commit_table" }, 83 | { "key": "search_mode", "operator": "not_equal" } 84 | ], 85 | }, 86 | ] 87 | -------------------------------------------------------------------------------- /tools/tools/set_up_btrfs_drive: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Create the initial subvolume and folder structure 4 | # for a BTRFS drive to be used as the root partition. 5 | # 6 | # Assumes the drive has been mounted at $1 and has an otherwise empty file system. 7 | # root folders (and subvolumes) will be created with `sudo`, 8 | # other folders (notably within /home/$USER) with the current user. 9 | # 10 | # Swap must be configured manually inside the `@swap` sub-volume, 11 | # e.g. via: 12 | # $ cd "$1"/@swap 13 | # $ sudo btrfs filesystem mkswapfile --size 17g --uuid clear swapfile 14 | # Acquire the offset for resuming: 15 | # $ btrfs inspect-internal map-swapfile swapfile 16 | # 17 | # See also: 18 | # - https://wiki.archlinux.org/title/Btrfs 19 | # - https://btrfs.readthedocs.io/en/latest/Swapfile.html 20 | 21 | cd "${1:?must provide mountpoint of filesystem root}" 22 | 23 | set -ex 24 | 25 | user=$(id -un) 26 | group=$(id -gn) 27 | if [[ $user == root ]]; then 28 | echo "Must be called by a non-root user." 29 | exit 1 30 | fi 31 | 32 | # create main subvolumes 33 | sudo btrfs subvolume create @root 34 | sudo btrfs subvolume create @home 35 | sudo btrfs subvolume create @swap 36 | sudo btrfs subvolume set-default @root 37 | # snapshotting will be configured later 38 | # sudo btrfs subvolume create @snapshots 39 | 40 | # create root filesystem structure & subvolumes 41 | # note that /swap -> @swap and /home -> @home 42 | # using separate mount entries in fstab 43 | prepare_root() { 44 | pushd @root 45 | sudo mkdir -p boot 46 | sudo btrfs subvolume create var 47 | sudo btrfs subvolume create var/cache 48 | sudo mkdir -p var/lib 49 | sudo btrfs subvolume create var/lib/docker 50 | sudo mkdir -p home 51 | sudo mkdir -p swap 52 | popd 53 | } 54 | prepare_root 55 | 56 | # Continue setting up home folder as "current user" 57 | prepare_user() { 58 | # create user home folder 59 | sudo btrfs subvolume create @home/$user 60 | # Transfer ownership of home folder 61 | sudo chown $user:$group @home/$user 62 | 63 | pushd @home/$user 64 | btrfs subvolume create .cache 65 | btrfs subvolume create .cargo 66 | 67 | prepare_local_share() { 68 | mkdir -p .local/share 69 | pushd .local/share 70 | btrfs subvolume create Zeal 71 | btrfs subvolume create docker 72 | btrfs subvolume create jvm 73 | btrfs subvolume create pipx 74 | btrfs subvolume create Steam 75 | mkdir -p Steam/steamapps 76 | btrfs subvolume create Steam/steamapps/common 77 | btrfs subvolume create Steam/steamapps/compatdata 78 | btrfs subvolume create honkers-railway-launcher 79 | mkdir -p lutris 80 | btrfs subvolume create lutris/runtime 81 | mkdir -p mcomix 82 | btrfs subvolume create mcomix/library_covers 83 | popd 84 | } 85 | prepare_local_share 86 | 87 | btrfs subvolume create .m2 88 | btrfs subvolume create .npm 89 | btrfs subvolume create .nvm 90 | btrfs subvolume create .rustup 91 | btrfs subvolume create .wine32_games 92 | btrfs subvolume create data 93 | btrfs subvolume create games 94 | btrfs subvolume create tmp 95 | popd 96 | } 97 | prepare_user 98 | 99 | sudo btrfs subv set-default @root 100 | 101 | sudo btrfs subv list --sort=path . 102 | -------------------------------------------------------------------------------- /BetterDiscord/.config/BetterDiscord/_update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | cd "$DIR/plugins" 6 | wget -N https://github.com/BetterDiscordPlugins/userscripts/raw/master/NRM.plugin.js 7 | wget -N https://github.com/jaimeadf/BetterDiscordPlugins/raw/build/BiggerStreamPreview/dist/BiggerStreamPreview.plugin.js 8 | wget -N https://github.com/jaimeadf/BetterDiscordPlugins/raw/build/WhoReacted/dist/WhoReacted.plugin.js 9 | wget -N https://github.com/l0c4lh057/BetterDiscordStuff/raw/master/Plugins/TypingIndicator/TypingIndicator.plugin.js 10 | wget -N https://github.com/Metalloriff/BetterDiscordPlugins/raw/master/DoubleClickVoiceChannels.plugin.js 11 | wget -N https://github.com/mwittrien/BetterDiscordAddons/raw/master/Library/0BDFDB.plugin.js 12 | wget -N https://github.com/mwittrien/BetterDiscordAddons/raw/master/Plugins/EditUsers/EditUsers.plugin.js 13 | wget -N https://github.com/mwittrien/BetterDiscordAddons/raw/master/Plugins/RemoveBlockedUsers/RemoveBlockedUsers.plugin.js 14 | wget -N https://github.com/rauenzi/BDPluginLibrary/raw/master/release/0PluginLibrary.plugin.js 15 | wget -N https://github.com/rauenzi/BetterDiscordAddons/raw/master/Plugins/AccountDetailsPlus/AccountDetailsPlus.plugin.js 16 | wget -N https://github.com/rauenzi/BetterDiscordAddons/raw/master/Plugins/BetterRoleColors/BetterRoleColors.plugin.js 17 | wget -N https://github.com/rauenzi/BetterDiscordAddons/raw/master/Plugins/DoNotTrack/DoNotTrack.plugin.js 18 | wget -N https://github.com/rauenzi/BetterDiscordAddons/raw/master/Plugins/HideDisabledEmojis/HideDisabledEmojis.plugin.js 19 | wget -N https://github.com/Strencher/BetterDiscordStuff/raw/master/PlatformIndicators/APlatformIndicators.plugin.js 20 | wget -N https://github.com/Strencher/BetterDiscordStuff/raw/master/SuppressReplyMentions/SuppressReplyMentions.plugin.js 21 | 22 | # the following have been broken by a discord update and have not yet been fixed 23 | #wget -N https://github.com/Arashiryuu/crap/raw/master/greenText.plugin.js 24 | #wget -N https://github.com/jaimeadf/BetterDiscordPlugins/raw/release/dist/GuildProfile/GuildProfile.plugin.js 25 | #wget -N https://github.com/jaimeadf/BetterDiscordPlugins/raw/release/dist/WhoReacted/WhoReacted.plugin.js 26 | #wget -N https://github.com/l0c4lh057/BetterDiscordStuff/raw/master/Plugins/ChannelTabs/ChannelTabs.plugin.js 27 | 28 | # never worked or not using anymore 29 | #wget -N https://github.com/Finicalmist/CopyCode/raw/master/copyCode.plugin.js 30 | #wget -N https://github.com/Inve1951/BetterDiscordStuff/raw/master/plugins/linkProfilePicture.plugin.js 31 | #wget -N https://github.com/Jiiks/BetterDiscordApp/raw/master/Plugins/dblClickEdit.plugin.js 32 | wget -N https://github.com/mwittrien/BetterDiscordAddons/raw/master/Plugins/DisplayServersAsChannels/DisplayServersAsChannels.plugin.js 33 | wget -N https://github.com/mwittrien/BetterDiscordAddons/raw/master/Plugins/MessageUtilities/MessageUtilities.plugin.js 34 | wget -N https://github.com/rauenzi/BetterDiscordAddons/raw/master/Plugins/PermissionsViewer/PermissionsViewer.plugin.js 35 | wget -N https://github.com/rauenzi/BetterDiscordAddons/raw/master/Plugins/RoleMembers/RoleMembers.plugin.js 36 | 37 | cd "$DIR/themes" 38 | # wget -N https://github.com/Inve1951/BetterDiscordStuff/raw/master/themes/showURLs.theme.css 39 | # wget -N https://github.com/rauenzi/BetterDiscordAddons/raw/master/Themes/RadialStatus/RadialStatus.theme.css 40 | # wget -N https://github.com/rauenzi/Nox/raw/master/release/Nox.theme.css 41 | -------------------------------------------------------------------------------- /sublime-text/.config/sublime-text/Packages/User/bh_core.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | // Define region highlight styles 3 | "bracket_styles": { 4 | // "default" and "unmatched" styles are special 5 | // styles. If they are not defined here, 6 | // they will be generated internally with 7 | // internal defaults. 8 | 9 | // "default" style defines attributes that 10 | // will be used for any style that does not 11 | // explicitly define that attribute. So if 12 | // a style does not define a color, it will 13 | // use the color from the "default" style. 14 | "default": { 15 | "icon": "dot", 16 | "color": "constant", 17 | "style": "outline" 18 | }, 19 | 20 | // This particular style is used to highlight 21 | // unmatched bracekt pairs. It is a special 22 | // style. 23 | "unmatched": { 24 | "icon": "question", 25 | "color": "invalid.illegal", 26 | "style": "outline" 27 | }, 28 | // User defined region styles 29 | "curly": { 30 | "icon": "curly_bracket", 31 | "color": "keyword" 32 | // "style": "underline" 33 | }, 34 | "round": { 35 | "icon": "round_bracket", 36 | "color": "variable" 37 | // "style": "outline" 38 | }, 39 | "square": { 40 | "icon": "square_bracket", 41 | "color": "storage", 42 | "style": "outline" 43 | }, 44 | "angle": { 45 | "icon": "angle_bracket", 46 | "color": "entity" 47 | // "style": "underline" 48 | }, 49 | "tag": { 50 | "icon": "tag", 51 | "color": "entity", 52 | "style": "outline" 53 | }, 54 | "single_quote": { 55 | "icon": "single_quote", 56 | "color": "string" 57 | // "style": "underline" 58 | }, 59 | "double_quote": { 60 | "icon": "double_quote", 61 | "color": "string" 62 | // "style": "underline" 63 | }, 64 | "regex": { 65 | "icon": "regex", 66 | "color": "string.regexp" 67 | // "style": "underline" 68 | }, 69 | "mditalic": { 70 | "icon": "star", 71 | "color": "variable" 72 | // "style": "underline" 73 | }, 74 | "mdbold": { 75 | "icon": "star", 76 | "color": "variable" 77 | // "style": "underline" 78 | } 79 | }, 80 | 81 | // "bracket_string_escape_mode": "regex", 82 | 83 | "user_brackets": [ 84 | // Lua 85 | { 86 | "name": "lua", 87 | "language_list": ["Lua", "Lua_user"] 88 | } 89 | ], 90 | "user_scope_brackets": [ 91 | // Python f-strings 92 | { 93 | "name": "py_single_quote", 94 | "open": "(?:u|b|f)?r?((?:'')?')", 95 | "scopes": ["meta.string", "string"] 96 | }, 97 | { 98 | "name": "py_double_quote", 99 | "open": "(?:u|b|f)?r?((?:\"\")?\")", 100 | "scopes": ["meta.string", "string"] 101 | } 102 | ], 103 | "show_offscreen_bracket_popup": true, 104 | "show_in_widgets": true 105 | } 106 | -------------------------------------------------------------------------------- /vesktop/.config/vesktop/settings/quickCss.css: -------------------------------------------------------------------------------- 1 | /* reduce padding in member list */ 2 | [class*=scrollerBase][class*=members] [class*=memberInner] { 3 | padding-top: 0px; 4 | padding-bottom: 0px; 5 | height: 36px; 6 | } 7 | 8 | /* bigger jumboable emoji in compact */ 9 | [class*=compact] [class*=messageContent] img.emoji.jumboable { 10 | width: 32px; 11 | height: 32px; 12 | } 13 | 14 | /* Decrease reaction padding & border radius */ 15 | /* Also something about large reactions */ 16 | [class*=reaction], [class*=largeReactionBtn][class*=forceShowLook] { 17 | /* margin: 0 2px 0 0;*/ 18 | border-radius: 4px; 19 | } 20 | [class*=largeReactionBtn][class*=forceShowLook] { 21 | /* Aligning this properly is stupid, but here we go */ 22 | padding: 4px 6px 6px 5px; 23 | } 24 | [class*=reactionInner] { 25 | padding: 3px 5px; 26 | } 27 | [class*=reaction] .emoji[class*=reactionLarge], [class*=largeReactionBtn] { 28 | width: 1rem; 29 | height: 1rem; 30 | } 31 | [class*=largeReactions] { 32 | padding: 0; 33 | } 34 | 35 | /* adjust avatar size for who-reacted */ 36 | [class*=reactionInner] { 37 | [class*=size24] { 38 | :not(svg *) { 39 | height: 18px; 40 | width: 18px; 41 | } 42 | 43 | svg { 44 | margin-right: -5px; 45 | } 46 | } 47 | 48 | & > div:not([class]):last-child { 49 | /* the original `scale(0.9)` messes with size calculation and there is no class on this element */ 50 | transform: none !important; 51 | } 52 | } 53 | 54 | /* add `@` to "new" usernames */ 55 | :is([class*=userTagWithNickname], [class*=nameTagSmall]) span:only-child:before { 56 | content: '@'; 57 | } 58 | 59 | /* --------------------------------------- */ 60 | 61 | /* https://github.com/abbie/discord-css/ */ 62 | @import url('https://abbie.github.io/discord-css/import.css'); 63 | 64 | :root { 65 | --\\--compact-title-bar: true; 66 | --\\--compact-input-box: true; 67 | --\\--compact-context-menu: true; 68 | --\\--compact-user-area: true; 69 | --\\--compact-channel-categories: true; 70 | --\\--compact-server-list: true; 71 | 72 | --\\--hide-nameplates: true; 73 | --\\--hide-guild-tags: true; 74 | --\\--hide-display-name-styles: true; /* not yet merged */ 75 | --\\--hide-profile-effects: true; 76 | --\\--hide-avatar-decorations: true; 77 | --\\--hide-gradient-glow-usernames: true; 78 | --\\--hide-server-boost-goal: true; 79 | --\\--hide-server-activity: true; 80 | --\\--hide-user-activity: true; 81 | --\\--hide-context-menu-quick-reactions: false; 82 | --\\--hide-hover-quick-reactions: false; 83 | --\\--hide-image-edit-button: true; 84 | --\\--hide-gif-button: true; 85 | --\\--hide-sticker-button: true; 86 | --\\--hide-emoji-button: false; 87 | --\\--hide-apps-button: true; 88 | --\\--hide-gift-button: true; 89 | --\\--hide-help-button: true; 90 | --\\--hide-shop-button: true; 91 | --\\--hide-nitro-button: true; 92 | --\\--hide-quest-button: true; 93 | --\\--hide-active-now: true; 94 | --\\--hide-nitro-upsells: true; 95 | --\\--hide-vencord-desktop-platform-indicator: true; 96 | --\\--hide-cluttery-badges: true; 97 | /* ^ hides quest, hypesquad, active dev, orb collector, and discriminator badges */ 98 | 99 | --\\--darker-scrollbar: true; 100 | --\\--darker-hovered-message: true; 101 | --\\--prevent-sidebar-resizing: false; 102 | --\\--fix-minor-icon-misalignments: true; 103 | } 104 | -------------------------------------------------------------------------------- /openurl/.config/openurl.conf: -------------------------------------------------------------------------------- 1 | #(?x) 2 | # ^ Trick to make syntax highlighting treat this as an extended regular expression 3 | # and recognize comments. 4 | # 5 | # Perform regular expression replacements on URIs. 6 | repl:^https?://holodex\.net/watch/([\w_-]{11}).* https://youtube.com/watch?v=\1 7 | repl:^https?://www\.kkinstagram\.com/(.*) https://www.instagram.com/\1 8 | 9 | # Don't perform requests for matching URIs. 10 | # slowpics does a redirect for my custom user agent & is generally aggressively filtering. 11 | # In fact, it appears I am IP-blocked already. 12 | noreq:^https?://slow\.pics/c/ 13 | # redirects when not logged in 14 | noreq:^https?://gitlab\.com/ 15 | noreq:^https://[\w-]*.sharepoint.com/ 16 | # Youtube wants "consent" for like everything now, so we skip requests/relocation 17 | noreq:^https?://[^/]*?youtube\.com/ 18 | noreq:^https?://youtu\.be/ 19 | # Some pages are quite sensitive to secrets and quickly remove them via redirects 20 | noreq:^https://accounts\.google\.com/ 21 | #nohead:^https?://[^/]*officeapps\.live\.com/ 22 | # archive.is responds with 429 Too Many Requests 23 | noreq:^https?://archive\.is/ 24 | 25 | # Redirect when not logged in 26 | noreq:^https://([^.]+\.)?safelinks\.protection\.outlook\.com/ 27 | noreq:^https://outlook\.office\.com/mail/ 28 | noreq:^https?://gitlab\.com/ 29 | 30 | # match after mime type first 31 | mime:^video/ mpv 32 | mime:^audio/ mpv 33 | mime:^image/gif$ mpv 34 | # feh uses imagemagick to convert SVGs, but cannot do that for URLs 35 | #mime:^image/svg feh --magick-timeout 1 36 | # display is terrible, but for now it works 37 | mime:^image/svg display 38 | mime:^image/ feh 39 | 40 | # playlist extensions, imgur, mkv (not recognized on some hosts) 41 | \.m3u8?(\?|$) mpv 42 | \.gifv?(\?|$) mpv 43 | \.mkv(\?|$) mpv 44 | 45 | # various video sites 46 | ^https?://[^/]*?youtube\.com/(.*v=|embed/|shorts/|live/|clip/) mpv 47 | ^https?://youtu\.be/ mpv 48 | ^https?://[^/]*?dailymotion\.com/video/ mpv 49 | ^https?://(giant\.)?gfycat\.com/(gifs/detail/)?[^/]+$ mpv 50 | ^https?://www.gifdeliverynetwork.com/ mpv 51 | ^https?://(clips|go|www)?\.?twitch\.tv/(video/)?[^/]+/?$ mpv 52 | ^https?://(www\.)?twitch\.tv/(?=.*/clip/|videos/) mpv 53 | ^https?://livestreamfails\.com/post mpv 54 | ^https?://vimeo\.com/\d+$ mpv 55 | ^https?://giphy\.com/gifs/ mpv 56 | ^https://streamable\.com/[^/]+$ mpv 57 | ^https://www\.liveleak\.com/view mpv 58 | ^https://twitter\.com/.*/video/ mpv 59 | ^https://www\.mediathek\.daserste\.de/.*/Video mpv 60 | ^https://soundcloud\.com/([^/]+/?){2}$ mpv 61 | ^https://www\.bitchute\.com/video/ mpv 62 | ^https://www\.nicovideo\.jp/watch/ mpv 63 | ^https://v\.redd\.it/ mpv 64 | ^https://www\.screencast\.com/t/ mpv 65 | ^https://www\.bilibili\.com/video/ mpv 66 | ^https://www\.bilibili\.com/festival/.*bvid= mpv 67 | ^https://vm\.tiktok\.com/\w{9}/ mpv 68 | ^https://www\.tiktok\.com/[^/]+/video/ mpv 69 | ^https://www\.(dd)?instagram\.com/reel/ mpv 70 | ^https?://v\.animethemes\.moe/ mpv 71 | ^https?://outplayed\.tv/media/ mpv 72 | ^https?://medal\.tv/[^?]+/clips/ mpv 73 | ^https?://medal\.tv/\?contentId= mpv 74 | # try opening a tweet as a video and fall back to firefox 75 | ^https://(((m|mobile)?\.|fx|vx)?twitter\.com|nitter\.ca|(fixup)?x\.com)/[^/]+/status/|https://t\.co/ zsh -c 'mpv --force-window=yes "$1" || firefox "$1"' -- 76 | 77 | # jdownloader captchas 78 | ^http://127.0.0.1:\d+/captcha/ chromium 79 | 80 | # default 81 | ^ firefox 82 | -------------------------------------------------------------------------------- /bin/bin/i3lock-shot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Inspired by https://git.fleshless.org/misc/tree/i3lock-extra 3 | 4 | import argparse 5 | from functools import partial 6 | import logging 7 | from pathlib import Path 8 | import os 9 | import subprocess 10 | import sys 11 | from typing import List 12 | 13 | 14 | logger = logging.getLogger(__name__) 15 | tmpdir = Path(f"/run/user/{os.getuid()}/i3lock-shot") 16 | 17 | 18 | def parse_args() -> argparse.Namespace: 19 | parser = argparse.ArgumentParser( 20 | description="Prepare an image to be used with i3lock. Outputs path on stdout.", 21 | ) 22 | parser.add_argument("-u", "--umask", type=partial(int, base=8), default=0o077, 23 | help="User mask for created files. Base 8.") 24 | parser.add_argument("-d", "--tmpdir", type=Path, default=tmpdir, 25 | help="Directory to store temporary files in.") 26 | parser.add_argument("-i", "--image-file", type=Path, 27 | help="Use the provided image instead of making a screenshot.") 28 | parser.add_argument("-g", "--grayscale", action='store_true', 29 | help="Apply a grayscale filter.") 30 | parser.add_argument("-p", "--pixelize", action='store_true', 31 | help="Apply a pixelize filter.") 32 | parser.add_argument("-P", "--pixelize-scale", type=float, default=10, 33 | help="Set the amount by which the image is down and upscaled" 34 | " using nearest neighbor to achieve the pixelize effect.") 35 | parser.add_argument("-b", "--blur", action='store_true', 36 | help="Apply a blur filter.") 37 | parser.add_argument("-t", "--tint", nargs=2, metavar=("color", "percent"), 38 | help="Tint image with the provided color and percentage.") 39 | 40 | return parser.parse_args() 41 | 42 | 43 | def build_filter_chain(params: argparse.Namespace) -> List[str]: 44 | filters: List[str] = [] 45 | 46 | if params.grayscale: 47 | filters += ["-grayscale", "rec601luma"] 48 | 49 | if params.pixelize: 50 | filters += [ 51 | "-scale", f"{100 / params.pixelize_scale}%", 52 | "-scale", f"{100 * params.pixelize_scale}%", 53 | ] 54 | 55 | if params.blur: 56 | filters += ["-blur", "4x8"] 57 | 58 | if params.tint: 59 | filters += [ 60 | "-fill", params.tint[0], 61 | "-colorize", params.tint[1], 62 | ] 63 | 64 | return filters 65 | 66 | 67 | def screenshot(target_path: Path): 68 | subprocess.check_call(["scrot", "--overwrite", target_path]) 69 | 70 | 71 | def apply_filters(filters: List[str], source_path: Path, target_path: Path): 72 | subprocess.check_call(["convert", source_path, *filters, target_path]) 73 | 74 | 75 | def main(args: List[str]) -> int: 76 | params = parse_args() 77 | os.umask(params.umask) 78 | params.tmpdir.mkdir(parents=True, exist_ok=True) 79 | 80 | if not params.image_file: 81 | params.image_file = params.tmpdir / "shot.png" 82 | screenshot(params.image_file) 83 | elif not params.image_file.is_file(): 84 | logger.error("Provided image is not a file") 85 | return 1 86 | 87 | filters = build_filter_chain(params) 88 | if filters: 89 | bg_file = params.tmpdir / "bg.png" 90 | apply_filters(filters, params.image_file, bg_file) 91 | else: 92 | bg_file = params.image_file 93 | 94 | print(bg_file) 95 | return 0 96 | 97 | 98 | if __name__ == '__main__': 99 | sys.exit(main(sys.argv[1:])) 100 | -------------------------------------------------------------------------------- /zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # source all .zsh files in that folder 2 | # order shouldn't matter 3 | sources=($HOME/zshrc/*.zsh) 4 | for src in $sources; do 5 | source "$src" 6 | done 7 | unset sources src 8 | 9 | 10 | # "command not found" hook to search package list 11 | [[ -e /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh 12 | 13 | # automatically quote URLs 14 | # autoload -U url-quote-magic 15 | # zle -N self-insert url-quote-magic 16 | # autoload -Uz bracketed-paste-magic 17 | # zle -N bracketed-paste bracketed-paste-magic 18 | 19 | 20 | # stat command as built-in # http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fstat-Module 21 | # autoload -Uz stat 22 | 23 | 24 | # fish-like syntax highlighting 25 | # requires 'zsh-syntax-highlighting' package 26 | sources=(/usr/share/{,zsh/plugins}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh) 27 | for src in $sources; do 28 | [[ -e "$src" ]] && source "$src" 29 | done 30 | unset sources src 31 | 32 | 33 | # use zsh's run-help (<M-h> to invoke on current line) 34 | # (( ${+aliases[run-help]} )) && unalias run-help 35 | alias run-help >&/dev/null && unalias run-help 36 | for rh in run-help{,-git,-openssl,-sudo,-aur}; do 37 | autoload -Uz $rh 38 | done; unset rh 39 | alias help=run-help 40 | 41 | 42 | # Set up virtualenvwrapper 43 | # https://virtualenvwrapper.readthedocs.io/en/latest/index.html 44 | # 45 | # Provides: 46 | # mkvirtualenv [-a project_path] [-i package] [-r requirements_file] [virtualenv options] ENVNAME 47 | # mktmpenv [(-c|--cd)|(-n|--no-cd)] [VIRTUALENV_OPTIONS] 48 | # lsvirtualenv [-b] [-l] [-h] 49 | # showvirtualenv [env] 50 | # rmvirtualenv ENVNAME 51 | # cpvirtualenv ENVNAME [TARGETENVNAME] 52 | # allvirtualenv command with arguments 53 | # workon [(-c|--cd)|(-n|--no-cd)] [environment_name|"."] 54 | # deactivate 55 | # cdvirtualenv [subdir] 56 | # cdsitepackages [subdir] 57 | # lssitepackages 58 | # add2virtualenv directory1 directory2 ... 59 | # toggleglobalsitepackages [-q] 60 | # mkproject 61 | # setvirtualenvproject 62 | # cdproject 63 | # wipeenv 64 | # virtualenvwrapper 65 | export WORKON_HOME=${HOME}/.virtualenvs 66 | # source /usr/bin/virtualenvwrapper.sh 67 | [[ -e /usr/bin/virtualenvwrapper_lazy.sh ]] && source /usr/bin/virtualenvwrapper_lazy.sh 68 | 69 | # fnm/nvm 70 | if command -v fnm >/dev/null; then 71 | eval "$(fnm env --use-on-cd --shell zsh)" 72 | elif [[ -e /usr/share/nvm/init-nvm.sh ]]; then 73 | source /usr/share/nvm/init-nvm.sh 74 | fi 75 | 76 | # quick directory jumping and file access (completions) through zoxide(1) 77 | # z: jump to directory 78 | # zi: open interactive move (via fzf) 79 | command -v zoxide >/dev/null && eval "$(zoxide init zsh)" 80 | 81 | # Java environment management 82 | command -v jenv >/dev/null && eval "$(jenv init -)" 83 | 84 | # fzf key bindings 85 | [[ -e /usr/share/fzf/key-bindings.zsh ]] && source /usr/share/fzf/key-bindings.zsh 86 | 87 | # Env settings for tools 88 | export AUR_PAGER="ranger --cmd aur" 89 | export AUR_REPO="aur" # default for aur packages 90 | export AUR_SYNC_USE_NINJA="1" 91 | 92 | export FZF_DEFAULT_COMMAND="fd --type file --follow --hidden --exclude .git --color=always" 93 | export FZF_DEFAULT_OPTS="--ansi" 94 | 95 | # Allow Gcloud to use numpy of site-packages 96 | # https://cloud.google.com/iap/docs/using-tcp-forwarding#increasing_the_tcp_upload_bandwidth 97 | export CLOUDSDK_PYTHON_SITEPACKAGES=1 98 | 99 | # UV cannot hardlink because it crosses btrfs sub-volumes. 100 | export UV_LINK_MODE=copy 101 | 102 | # Load file with confidential information 103 | [[ -e $HOME/.zshrc-private ]] && source ~/.zshrc-private 104 | -------------------------------------------------------------------------------- /aegisub/.aegisub/automation/include/op_overloads.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | These are small operator overloads for general use in Lua, mainly to my likings. 3 | 4 | Written by FichteFoll; thanks to Sleepy_Coder 5 | 2012-12-24 6 | ]] 7 | 8 | local STR, NUM, BOOL, NIL = {}, {}, {}, {} 9 | STR = getmetatable('') 10 | 11 | -- ("hello")[2] -> e 12 | STR.__index 13 | = function (self, key) 14 | if type(key) == 'number' then 15 | if key < 1 or key > self:len() then 16 | error(("Attempt to get index %d which is not in the range of the string's length"):format(key), 2) 17 | end 18 | return self:sub(key, key) 19 | end 20 | return string[key] 21 | end 22 | 23 | -- str = "heeeello"; str[3] = "is" -> "heisello" || DOES NOT WORK! 24 | STR.__newindex = 25 | function (self, key, value) 26 | value = tostring(value) 27 | if type(key) == 'number' and type(value) == 'string' then 28 | if key < 1 or key > self:len() then 29 | error(("Attempt to set index %d which is not in the range of the string's length"):format(key), 2) 30 | end 31 | -- seems like strings are not referenced ... 32 | self = self:sub(1, key-1) .. value .. self:sub(key+value:len(), -1) 33 | -- print(("new value: %s; key: %d"):format(self, key)) 34 | return self 35 | end 36 | end 37 | 38 | -- string * num -> string.rep 39 | STR.__mul = 40 | function (op1, op2) 41 | return type(op2) == 'number' and op1:rep(op2) or error("Invalid type for arithmetic on string", 2) 42 | end 43 | 44 | -- string % table -> string.format 45 | STR.__mod = 46 | function (op1, op2) 47 | 48 | if type(op2) == 'table' then 49 | if #op2 > 0 then 50 | -- make `nil` to string 51 | for k,v in pairs(op2) do 52 | if v == nil then op2[k] = "nil"; end 53 | end 54 | return op1:format(unpack(op2)) -- sadly I can not forward errors happening here 55 | else 56 | error("Format table is empty", 2) 57 | end 58 | else 59 | return op1:format(op2 == nil and "nil" or op2) 60 | end 61 | end 62 | 63 | -- #string -> count chars 64 | STR.__len = 65 | function (self) 66 | return self:len() 67 | end 68 | 69 | -- e.g. num = 1234.5; num:floor() 70 | NUM.__index = math 71 | 72 | -- rarely useful 73 | BOOL.__index = BOOL 74 | 75 | -- a wrapper for boolean tests 76 | BOOL.b2n = 77 | function (bool) 78 | return type(bool) ~= 'boolean' and bool or (bool and 1 or 0) 79 | end 80 | 81 | -- various arithmetics on booleans by converting `false` to `0` and `true` to `1`. 82 | -- `nil` will be converted to `0` as well, btw. 83 | BOOL.__add = 84 | function (op1, op2) 85 | -- op2.b2n() won't work because it is possible that one of these ops is not a boolean 86 | return BOOL.b2n(op1) + BOOL.b2n(op2) 87 | end 88 | 89 | BOOL.__sub = 90 | function (op1, op2) 91 | return BOOL.b2n(op1) - BOOL.b2n(op2) 92 | end 93 | 94 | BOOL.__mul = 95 | function (op1, op2) 96 | return BOOL.b2n(op1) * BOOL.b2n(op2) 97 | end 98 | 99 | BOOL.__div = 100 | function (op1, op2) 101 | return BOOL.b2n(op1) / BOOL.b2n(op2) 102 | end 103 | 104 | BOOL.__pow = 105 | function (op1, op2) 106 | return BOOL.b2n(op1) ^ BOOL.b2n(op2) 107 | end 108 | 109 | BOOL.__unm = 110 | function (self) 111 | return not self 112 | end 113 | 114 | -- copy BOOL's functions over to NIL and remove a few values 115 | for key, val in pairs(BOOL) do 116 | NIL[key] = val 117 | end 118 | NIL.b2n = nil 119 | NIL.__unm = nil 120 | 121 | -- nil[3] -> nil (no error) - is this behaviour useful? 122 | NIL.__index = NIL 123 | 124 | -- Apparently, Aegisub does not provide the debug module ... 125 | -- if debug then 126 | -- debug.setmetatable( 0, NUM ) 127 | -- debug.setmetatable(true, BOOL) 128 | -- debug.setmetatable( nil, NIL ) 129 | -- end 130 | --------------------------------------------------------------------------------