├── misc ├── .config │ ├── mc │ │ ├── hotlist │ │ ├── panels.ini │ │ ├── mc.keymap │ │ └── ini │ ├── wgetrc │ ├── htop │ │ ├── rc │ │ └── htoprc │ ├── npm │ │ ├── rc │ │ └── npmrc │ ├── aria2 │ │ ├── conf │ │ └── aria2.conf │ ├── direnv │ │ ├── rc │ │ ├── allow │ │ └── direnvrc │ ├── less │ │ └── .placeholder │ ├── zathura │ │ ├── rc │ │ └── zathurarc │ ├── fd │ │ └── ignore │ ├── asdf │ │ ├── asdf-DEPRECATED-use-mise-instead │ │ └── asdfrc │ ├── flake8 │ ├── pacman │ │ └── makepkg.conf │ ├── gh │ │ ├── hosts.yml │ │ └── config.yml │ ├── surfraw │ │ ├── conf │ │ └── elvi │ │ │ └── man │ ├── remmina │ │ └── remmina.pref │ ├── aurman │ │ └── aurman_config │ ├── sxhkd │ │ └── sxhkdrc │ ├── peco │ │ └── config.json │ ├── mise │ │ └── config.toml │ ├── yay │ │ └── config.json │ ├── most │ │ └── config │ ├── wireplumber │ │ └── wireplumber.conf.d │ │ │ └── bt-codecs.conf.disbled │ ├── paru │ │ └── paru.conf │ ├── lsd │ │ └── config.yaml │ ├── mouseless │ │ └── config.yaml │ ├── pipewire │ │ └── media-session.d │ │ │ └── bluez-monitor.conf │ └── topgrade.d │ │ └── topgrade.toml ├── .yarnrc ├── .gemrc └── .octaverc ├── zsh ├── .config │ └── zsh │ │ ├── rc │ │ ├── zshrc │ │ ├── .zshenv │ │ ├── zinit │ │ ├── functions-zsh │ │ ├── zshenv │ │ ├── keyboard │ │ └── zle └── .zshenv ├── bash ├── .config │ └── bash │ │ ├── rc │ │ ├── completion │ │ ├── bashrc │ │ └── aliases ├── .bashrc ├── .bash_logout ├── .profile └── .extend.bashrc ├── PERSONAL ├── ruby ├── .ruby-version ├── .guard.rb └── .rubocop.yml ├── shell └── .config │ ├── zsh │ ├── env │ ├── functions-env │ ├── interactive │ ├── functions-debug │ └── functions-interactive │ ├── bash │ ├── env │ ├── interactive │ ├── functions-debug │ ├── functions-env │ └── functions-interactive │ ├── yash │ ├── profile │ ├── rc │ ├── interactive │ ├── functions-debug │ ├── functions-env │ └── functions-interactive │ ├── shell │ ├── functions-interactive │ ├── TODO │ ├── functions-debug │ ├── interactive │ ├── env │ ├── functions-env │ └── xdg │ └── user-dirs.dirs ├── tmux └── .config │ ├── tmux │ └── conf │ └── tmuxinator │ ├── test.yml │ ├── git.yml │ ├── tmuxinator.yml │ ├── sample_app.yml │ ├── vim.yml │ ├── aiml.yml │ ├── tensorflow.yml │ ├── ERC20.yml │ ├── nndl.yml │ ├── nn.yml │ └── default.yml ├── vscode-TODO-filter-out-secrets ├── Z-archive └── npm │ ├── .cache │ └── npm │ │ └── .placeholder │ ├── .local │ └── share │ │ └── npm │ │ └── .placeholder │ ├── .config │ └── npm │ │ └── config │ └── README ├── vim-placeholder-dirs └── .config │ ├── nvim │ └── .placeholder ├── gconf └── .gconf │ └── apps │ └── gnome-terminal │ ├── %gconf.xml │ └── profiles │ ├── %gconf.xml │ └── Default │ └── %gconf.xml ├── vscode └── .config │ └── Code │ ├── languagepacks.json │ └── User │ ├── keybindings.json │ ├── syncLocalSettings.json │ └── settings.json ├── mosquitto └── .config │ └── mosquitto │ ├── pskfile.example │ ├── aclfile.example │ └── pwfile.example ├── sshrc └── .config │ └── sshrc │ ├── sshrc.d │ ├── id_ed25519_dotfiles_pull │ ├── id_ed25519_dotfiles_pull.pub │ └── known_hosts │ └── rc ├── .gitmodules ├── home ├── .ssh-ident └── .condarc ├── X11 ├── .xsession ├── .xmodmap ├── .xprofile ├── .Xresources ├── .extend.xinitrc └── .xinitrc ├── update ├── .gitignore ├── restow ├── stow └── .stow-global-ignore ├── LICENSE ├── README.md ├── git └── .config │ └── git │ ├── ignore │ └── attributes ├── xfce4 └── .config │ └── xfce4 │ └── terminal │ ├── terminalrc │ └── accels.scm ├── install ├── ranger └── .config │ └── ranger │ ├── commands.py │ ├── scope.sh │ └── rifle.conf ├── mimeapps.list └── .config │ └── mimeapps.list └── wezterm └── .config └── wezterm └── wezterm.lua /misc/.config/mc/hotlist: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /misc/.config/wgetrc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /zsh/.config/zsh/rc: -------------------------------------------------------------------------------- 1 | zshrc -------------------------------------------------------------------------------- /bash/.config/bash/rc: -------------------------------------------------------------------------------- 1 | bashrc -------------------------------------------------------------------------------- /misc/.config/htop/rc: -------------------------------------------------------------------------------- 1 | htoprc -------------------------------------------------------------------------------- /misc/.config/mc/panels.ini: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /misc/.config/npm/rc: -------------------------------------------------------------------------------- 1 | npmrc -------------------------------------------------------------------------------- /zsh/.config/zsh/zshrc: -------------------------------------------------------------------------------- 1 | .zshrc -------------------------------------------------------------------------------- /PERSONAL: -------------------------------------------------------------------------------- 1 | ../code/ravi-personal -------------------------------------------------------------------------------- /bash/.bashrc: -------------------------------------------------------------------------------- 1 | .config/bash/bashrc -------------------------------------------------------------------------------- /misc/.config/aria2/conf: -------------------------------------------------------------------------------- 1 | aria2.conf -------------------------------------------------------------------------------- /misc/.config/direnv/rc: -------------------------------------------------------------------------------- 1 | direnvrc -------------------------------------------------------------------------------- /misc/.config/less/.placeholder: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /misc/.config/zathura/rc: -------------------------------------------------------------------------------- 1 | zathurarc -------------------------------------------------------------------------------- /ruby/.ruby-version: -------------------------------------------------------------------------------- 1 | system 2 | -------------------------------------------------------------------------------- /shell/.config/zsh/env: -------------------------------------------------------------------------------- 1 | ../shell/env -------------------------------------------------------------------------------- /tmux/.config/tmux/conf: -------------------------------------------------------------------------------- 1 | tmux.conf -------------------------------------------------------------------------------- /vscode-TODO-filter-out-secrets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /zsh/.config/zsh/.zshenv: -------------------------------------------------------------------------------- 1 | zshenv -------------------------------------------------------------------------------- /zsh/.zshenv: -------------------------------------------------------------------------------- 1 | .config/zsh/zshenv -------------------------------------------------------------------------------- /Z-archive/npm/.cache/npm/.placeholder: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /shell/.config/bash/env: -------------------------------------------------------------------------------- 1 | ../shell/env -------------------------------------------------------------------------------- /shell/.config/yash/profile: -------------------------------------------------------------------------------- 1 | ../shell/env -------------------------------------------------------------------------------- /vim-placeholder-dirs/.config/nvim: -------------------------------------------------------------------------------- 1 | vim -------------------------------------------------------------------------------- /Z-archive/npm/.local/share/npm/.placeholder: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gconf/.gconf/apps/gnome-terminal/%gconf.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /misc/.config/mc/mc.keymap: -------------------------------------------------------------------------------- 1 | /etc/mc/mc.keymap -------------------------------------------------------------------------------- /shell/.config/yash/rc: -------------------------------------------------------------------------------- 1 | ../shell/interactive -------------------------------------------------------------------------------- /vim-placeholder-dirs/.config/.placeholder: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vscode/.config/Code/languagepacks.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /misc/.config/fd/ignore: -------------------------------------------------------------------------------- 1 | .git 2 | node_modules 3 | -------------------------------------------------------------------------------- /gconf/.gconf/apps/gnome-terminal/profiles/%gconf.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /misc/.config/asdf/asdf-DEPRECATED-use-mise-instead: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /shell/.config/bash/interactive: -------------------------------------------------------------------------------- 1 | ../shell/interactive -------------------------------------------------------------------------------- /shell/.config/yash/interactive: -------------------------------------------------------------------------------- 1 | ../shell/interactive -------------------------------------------------------------------------------- /shell/.config/zsh/functions-env: -------------------------------------------------------------------------------- 1 | ../shell/functions-env -------------------------------------------------------------------------------- /shell/.config/zsh/interactive: -------------------------------------------------------------------------------- 1 | ../shell/interactive -------------------------------------------------------------------------------- /zsh/.config/zsh/zinit: -------------------------------------------------------------------------------- 1 | ../../../../.local/share/zinit -------------------------------------------------------------------------------- /misc/.config/flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 120 3 | -------------------------------------------------------------------------------- /shell/.config/bash/functions-debug: -------------------------------------------------------------------------------- 1 | ../shell/functions-debug -------------------------------------------------------------------------------- /shell/.config/bash/functions-env: -------------------------------------------------------------------------------- 1 | ../shell/functions-env -------------------------------------------------------------------------------- /shell/.config/yash/functions-debug: -------------------------------------------------------------------------------- 1 | ../shell/functions-debug -------------------------------------------------------------------------------- /shell/.config/yash/functions-env: -------------------------------------------------------------------------------- 1 | ../shell/functions-env -------------------------------------------------------------------------------- /shell/.config/zsh/functions-debug: -------------------------------------------------------------------------------- 1 | ../shell/functions-debug -------------------------------------------------------------------------------- /tmux/.config/tmuxinator/test.yml: -------------------------------------------------------------------------------- 1 | - extra: echo 'foobar' -------------------------------------------------------------------------------- /shell/.config/bash/functions-interactive: -------------------------------------------------------------------------------- 1 | ../shell/functions-interactive -------------------------------------------------------------------------------- /shell/.config/yash/functions-interactive: -------------------------------------------------------------------------------- 1 | ../shell/functions-interactive -------------------------------------------------------------------------------- /shell/.config/zsh/functions-interactive: -------------------------------------------------------------------------------- 1 | ../shell/functions-interactive -------------------------------------------------------------------------------- /mosquitto/.config/mosquitto/pskfile.example: -------------------------------------------------------------------------------- 1 | id:deadbeef 2 | easy:12345 3 | -------------------------------------------------------------------------------- /misc/.config/direnv/allow: -------------------------------------------------------------------------------- 1 | /home/ravi/code/ravi-personal/stow/misc/.config/direnv/allow -------------------------------------------------------------------------------- /Z-archive/npm/.config/npm/config: -------------------------------------------------------------------------------- 1 | cache=$XDG_CACHE_HOME/npm 2 | prefix=$XDG_DATA_HOME/npm 3 | -------------------------------------------------------------------------------- /sshrc/.config/sshrc/sshrc.d/id_ed25519_dotfiles_pull: -------------------------------------------------------------------------------- 1 | /home/ravi/.ssh/id_ed25519_dotfiles_pull -------------------------------------------------------------------------------- /shell/.config/shell/functions-interactive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Functions for interactive shells 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vimfiles"] 2 | path = vim 3 | url = git@github.org:HaleTom/vimfiles.git 4 | -------------------------------------------------------------------------------- /sshrc/.config/sshrc/sshrc.d/id_ed25519_dotfiles_pull.pub: -------------------------------------------------------------------------------- 1 | /home/ravi/.ssh/id_ed25519_dotfiles_pull.pub -------------------------------------------------------------------------------- /misc/.config/pacman/makepkg.conf: -------------------------------------------------------------------------------- 1 | PACKAGER="\"Ravi\" Tom Hale <$(echo gbz@unyr.rr | tr '[n-za-m]' '[a-z]')>" 2 | -------------------------------------------------------------------------------- /misc/.config/gh/hosts.yml: -------------------------------------------------------------------------------- 1 | github.com: 2 | user: HaleTom 3 | git_protocol: ssh 4 | users: 5 | HaleTom: 6 | -------------------------------------------------------------------------------- /home/.ssh-ident: -------------------------------------------------------------------------------- 1 | # https://github.com/ccontavalli/ssh-ident 2 | 3 | # Prevent "All keys already loaded" 4 | VERBOSITY = LOG_ERROR 5 | -------------------------------------------------------------------------------- /misc/.config/surfraw/conf: -------------------------------------------------------------------------------- 1 | export SURFRAW_customsearch_provider=google 2 | export SURFRAW_graphical_browser=$BROWSER 3 | export SURFRAW_graphical=yes 4 | -------------------------------------------------------------------------------- /misc/.config/remmina/remmina.pref: -------------------------------------------------------------------------------- 1 | [remmina_pref] 2 | secret=d3H74TPtnYado9Ot+Jm46uUG9I80GOCB2iaaF4WRuPw= 3 | uid=Linux+4.4.33-1-MANJARO+x86_64+en_AU.UTF-8+61743713 4 | bdate=736334 5 | -------------------------------------------------------------------------------- /shell/.config/shell/TODO: -------------------------------------------------------------------------------- 1 | Move debug_shell to env to save stubbing if $SHELL_DEBUG unset 2 | - rename to _shell_debug_to_file? Or just remove it? 3 | 4 | Setting and unsetting _shell_rc_dir is ugly 5 | -------------------------------------------------------------------------------- /X11/.xsession: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # ~/.xsession 5 | # 6 | # Executed by xdm/gdm/kdm at login 7 | # 8 | 9 | [[ -f ~/.extend.xsession ]] && . ~/.extend.xsession 10 | 11 | xmodmap ~/.xmodmap 12 | -------------------------------------------------------------------------------- /misc/.yarnrc: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "--emoji" true 6 | lastUpdateCheck 1526898367856 7 | prefix "/home/ravi/.local/share/npm" 8 | -------------------------------------------------------------------------------- /misc/.config/aurman/aurman_config: -------------------------------------------------------------------------------- 1 | [miscellaneous] 2 | default_show_changes 3 | keyserver=hkp://ipv4.pool.sks-keyservers.net:11371 4 | # optimistic_versioning # Should only be used when needed 5 | fdsakflasd 6 | -------------------------------------------------------------------------------- /Z-archive/npm/README: -------------------------------------------------------------------------------- 1 | Variables inside config would not be expanded leading to literal '$XDG' directories 2 | 3 | Also, stow would link the whole .cache directory, meaning that cached files would actually be put under .dotfiles 4 | -------------------------------------------------------------------------------- /X11/.xmodmap: -------------------------------------------------------------------------------- 1 | ! 2 | ! Swap Caps_Lock and Control_L 3 | ! 4 | remove Lock = Caps_Lock 5 | remove Control = Control_L 6 | keysym Control_L = Caps_Lock 7 | keysym Caps_Lock = Control_L 8 | add Lock = Caps_Lock 9 | add Control = Control_L 10 | -------------------------------------------------------------------------------- /home/.condarc: -------------------------------------------------------------------------------- 1 | changeps1: false 2 | report_errors: true 3 | 4 | channels: 5 | - fastai 6 | - pytorch 7 | - intel 8 | - conda-forge 9 | - defaults 10 | 11 | pinned_packages: 12 | - conda-forge::pip 13 | - conda-forge::python 14 | -------------------------------------------------------------------------------- /mosquitto/.config/mosquitto/aclfile.example: -------------------------------------------------------------------------------- 1 | # This affects access control for clients with no username. 2 | topic read $SYS/# 3 | 4 | # This only affects clients with username "roger". 5 | user roger 6 | topic foo/bar 7 | 8 | # This affects all clients. 9 | pattern write $SYS/broker/connection/%c/state 10 | -------------------------------------------------------------------------------- /update: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Pull and push on .dotfiles and PERSONAL 4 | # Run restow 5 | 6 | cd "$(dirname "$0")" || exit 1 7 | 8 | if [[ -d PERSONAL ]]; then 9 | echo "Update PERSONAL repo..." >&2 10 | (cd PERSONAL && git pp && ./install) 11 | fi 12 | 13 | echo "Update .dotfiles repo..." >&2 14 | git pp 15 | ./restow 16 | -------------------------------------------------------------------------------- /misc/.gemrc: -------------------------------------------------------------------------------- 1 | # --user-install forces install to $HOME/.gem/ 2 | # Unset this to allow $GEM_HOME to set install location 3 | # 4 | # It is enabled by Manjaro in /etc/gemrc: 5 | # > # --user-install is used to install to $HOME/.gem/ by default since we want to separate 6 | # > # pacman installed gems and gem installed gems 7 | 8 | install: --no-user-install 9 | -------------------------------------------------------------------------------- /misc/.config/direnv/direnvrc: -------------------------------------------------------------------------------- 1 | # The following two virtualenv layouts are from: 2 | # https://github.com/direnv/direnv/wiki/Python#-virtualenvwrapper 3 | 4 | layout_virtualenv() { 5 | local venv_path="$1" 6 | source ${venv_path}/bin/activate 7 | } 8 | 9 | layout_virtualenvwrapper() { 10 | local venv_path="${WORKON_HOME}/$1" 11 | layout_virtualenv $venv_path 12 | } 13 | -------------------------------------------------------------------------------- /bash/.config/bash/completion: -------------------------------------------------------------------------------- 1 | # Debian user-defined completion -*- shell-script -*- 2 | 3 | _ppa_lists(){ 4 | local cur 5 | _init_completion || return 6 | 7 | COMPREPLY=( $( find /etc/apt/sources.list.d/ -name "*$cur*.list" \ 8 | -exec basename {} \; 2> /dev/null ) ) 9 | return 0 10 | } && 11 | complete -F _ppa_lists apt-update-repo 12 | -------------------------------------------------------------------------------- /misc/.octaverc: -------------------------------------------------------------------------------- 1 | % Specify inputrc (eg if bracketed paste escapes break the prompt) 2 | % Not needed after removing ~/.config/octave. 3 | % http://octave.1599824.n4.nabble.com/inputrc-issue-td1601582.html 4 | % read_readline_init_file ("/dev/null") 5 | 6 | graphics_toolkit('gnuplot'); 7 | 8 | % PS1('\w >> ') 9 | PS1("\\[\\033[01;31m\\]\\W:\\#> \\[\\033[0m\\]"); 10 | 11 | % vim: ft=matlab 12 | -------------------------------------------------------------------------------- /ruby/.guard.rb: -------------------------------------------------------------------------------- 1 | notification(:tmux, { 2 | timeout: 0.1, # Just flash it 3 | display_message: true, 4 | display_title: true, 5 | default_message_color: 'black', 6 | # display_on_all_clients: true, 7 | success: 'colour22', 8 | failure: 'colour124', 9 | pending: 'colour166', 10 | color_location: %w[status-left-bg pane-active-border-fg pane-border-fg], 11 | }) if ENV['TMUX'] 12 | -------------------------------------------------------------------------------- /mosquitto/.config/mosquitto/pwfile.example: -------------------------------------------------------------------------------- 1 | roger:$6$clQ4Ocu312S0qWgl$Cv2wUxgEN73c6C6jlBkswqR4AkHsvDLWvtEXZZ8NpsBLgP1WAo/qA+WXcmEN/mjDNgdUwcxRAveqNMs2xUVQYA== 2 | sub_client:$6$U+qg0/32F0g2Fh+n$fBPSkq/rfNyEQ/TkEjRgwGTTVBpvNhKSyGShovH9KHewsvJ731tD5Zx26IHhR5RYCICt0L9qBW0/KK31UkCliw== 3 | pub_client:$6$vxQ89y+7WrsnL2yn$fSPMmEZn9TSrC8s/jaPmxJ9NijWpkP2e7bMJLz78JXR1vW2x8+T3FZ23byJA6xs5Mt+LeOybAHwcUv0OCl40rA== 4 | -------------------------------------------------------------------------------- /X11/.xprofile: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.xprofile 3 | # 4 | 5 | # Set key repeat rate 6 | xset r rate 200 40 # 200ms delay, then 40 repeats per second 7 | 8 | # if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then 9 | # eval "$(dbus-launch --sh-syntax --exit-with-session)" 10 | # fi 11 | 12 | # Environment variables 13 | # 14 | 15 | [[ -f ~/.extend.xprofile ]] && . ~/.extend.xprofile 16 | -------------------------------------------------------------------------------- /bash/.bash_logout: -------------------------------------------------------------------------------- 1 | # ~/.bash_logout: executed by bash(1) when login shell exits 2 | 3 | # When leaving the console, clear the screen to increase privacy 4 | 5 | if [ "$SHLVL" = 1 ]; then 6 | if [ -x /usr/bin/clear_console ]; then 7 | /usr/bin/clear_console -q # Seems to be ubuntu only 8 | else 9 | /usr/bin/clear 10 | fi 11 | fi 12 | 13 | # The user's exit code is automatically preserved 14 | -------------------------------------------------------------------------------- /ruby/.rubocop.yml: -------------------------------------------------------------------------------- 1 | Rails: 2 | Enabled: true 3 | 4 | # Commonly used screens these days easily fit more than 80 characters. 5 | Metrics/LineLength: 6 | Max: 100 7 | 8 | # Mixing the hash styles looks just silly. 9 | Style/HashSyntax: 10 | EnforcedStyle: ruby19_no_mixed_keys 11 | 12 | # Don't require nested classes. Use Module::Class instead 13 | Style/ClassAndModuleChildren: 14 | EnforcedStyle: compact 15 | -------------------------------------------------------------------------------- /misc/.config/sxhkd/sxhkdrc: -------------------------------------------------------------------------------- 1 | # https://github.com/baskerville/sxhkd?tab=readme-ov-file#description 2 | 3 | XF86AudioRaiseVolume 4 | wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ 5 | 6 | XF86AudioLowerVolume 7 | wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- 8 | 9 | XF86AudioMute 10 | wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle 11 | 12 | XF86AudioMicMute 13 | wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle 14 | -------------------------------------------------------------------------------- /shell/.config/shell/functions-debug: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Debug functions 4 | # Intended to be optionally sourced when debugging non-interactive shells 5 | 6 | # TODO: rename me cmd_to_file? 7 | debug_file() { 8 | if [ -z "$_debug_file" ]; then 9 | _debug_file=/tmp/${SHELL_NAME}-$$ 10 | touch "$_debug_file" 11 | echo "$SHELL_NAME debugging to: $_debug_file" >&2 12 | fi 13 | "$@" >> "$_debug_file" 14 | # echo "$@" ">>" /tmp/$SHELL_NAME-$$ 15 | } 16 | -------------------------------------------------------------------------------- /vscode/.config/Code/User/keybindings.json: -------------------------------------------------------------------------------- 1 | // Place your key bindings in this file to override the defaultsauto[] 2 | [ 3 | { 4 | "command": "vscode-neovim.compositeEscape1", 5 | "key": "j", 6 | "when": "neovim.mode == insert && editorTextFocus", 7 | "args": "j" 8 | }, 9 | 10 | { 11 | "command": "vscode-neovim.compositeEscape2", 12 | "key": "k", 13 | "when": "neovim.mode == insert && editorTextFocus", 14 | "args": "k" 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /misc/.config/asdf/asdfrc: -------------------------------------------------------------------------------- 1 | # https://asdf-vm.com/manage/configuration.html 2 | 3 | # Read from (eg) `.ruby-version` if no asdf `.tool-versions` file 4 | # https://asdf-vm.com/manage/configuration.html#legacy-version-file 5 | legacy_version_file = no 6 | # changed to no to allow mise to manage this instead 7 | 8 | use_release_candidates = no 9 | always_keep_download = no 10 | plugin_repository_last_check_duration = 60 11 | disable_plugin_short_name_repository = no 12 | concurrency = auto 13 | 14 | # vim: ft=none ft=bash 15 | -------------------------------------------------------------------------------- /misc/.config/peco/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "_homepage": "https://github.com/peco/peco", 3 | "_default_keymap": "https://github.com/peco/peco#default-keymap", 4 | "StickySelection": true, 5 | "OnCancel": "error", 6 | 7 | "Keymap": { 8 | "C-j": "peco.SelectDown", 9 | "C-k": "peco.SelectUp", 10 | "C-l": "peco.RefreshScreen", 11 | "C-z": "peco.ToggleRangeMode", 12 | "C-t": "peco.ToggleQuery", 13 | "C-h": "peco.ToggleSingleKeyJump" 14 | }, 15 | 16 | "SingleKeyJump": { 17 | "ShowPrefix": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /shell/.config/shell/interactive: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Interactive shell commands 3 | 4 | if [ -n "$_already_sourcing_interactive" ]; then return 5 | else _already_sourcing_interactive=true; fi 6 | 7 | # For non-login shells: source env if not yet sourced 8 | if [ -z "$_shell_rc_dir" ]; then 9 | _shell_rc_dir=${_shell_rc_dir:=${XDG_CONFIG_HOME:=$HOME/.config}/shell} 10 | . "$_shell_rc_dir"/env 11 | fi 12 | debug_file echo "Reading interactive" 13 | 14 | . "${_shell_rc_dir}"/functions-interactive 15 | 16 | unset _already_sourcing_interactive 17 | unset _shell_rc_dir 18 | debug_file echo "DONE reading interactive" 19 | -------------------------------------------------------------------------------- /X11/.Xresources: -------------------------------------------------------------------------------- 1 | #if __has_include(".extend.Xresources") 2 | #include ".extend.Xresources" 3 | #endif 4 | 5 | ! ^ The above lines are no comments! 6 | ! Leave them as they are if a file ~/.extend.Xresources is being used on your system. 7 | ! config can be added there or also here below. 8 | ! For comments use "!" 9 | 10 | Xft.dpi: 96 11 | Xft.antialias: true 12 | Xft.hinting: true 13 | Xft.rgba: rgb 14 | Xft.autohint: false 15 | Xft.hintstyle: hintslight 16 | Xft.lcdfilter: lcddefault 17 | 18 | XTerm*background: #2b2b2b 19 | XTerm*foreground: #e7e7e7 20 | XTerm*pointerColor: #16A085 21 | XTerm*faceName: Fixed 22 | XTerm*faceSize: 11 23 | -------------------------------------------------------------------------------- /X11/.extend.xinitrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # ~/.xinitrc 5 | # 6 | # Executed by startx (run your window manager from here) 7 | # 8 | 9 | # export GTK2_RC_FILES="$HOME/.gtkrc-2.0" 10 | export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" 11 | export GTK_CSD=1 12 | 13 | DEFAULT_SESSION=xfce4-session 14 | 15 | # 16 | # I've disabled tap-to-click as some were still getting through. 17 | # 18 | 19 | # input set-prop 'ELAN1300:00 04F3:3028 Touchpad xx' "libinput Disable While Typing Enabled" 1 2>/dev/null 20 | 21 | # Synaptics disable tapping and scrolling for 0.5 seconds after last keypress 22 | # https://wiki.archlinux.org/index.php/Touchpad_Synaptics#Using_syndaemon 23 | # syndaemon -i 0.5 -t -K -R -d 24 | -------------------------------------------------------------------------------- /misc/.config/npm/npmrc: -------------------------------------------------------------------------------- 1 | # https://docs.npmjs.com/misc/config 2 | # 3 | # Check config with: npm config ls -l | grep / | grep -v '^; | sort' 4 | 5 | # XDG Base Dirs compliance 6 | prefix=${XDG_DATA_HOME}/npm # prefix is unnecessary (and unsupported) if Node.js is installed by nvm. 7 | cache=${XDG_CACHE_HOME}/npm 8 | init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js 9 | logs-dir=${XDG_STATE_HOME}/npm/logs 10 | 11 | # Setting prefix is incompatible with nvm 12 | # Use ~/bin/node-modules-dir "$@" to run a command with node prefix set 13 | # prefix=${XDG_DATA_HOME}/npm 14 | 15 | # npm warn Unknown user config "tmp". This will stop working in the next major version of npm. 16 | # tmp=${XDG_RUNTIME_DIR}/npm 17 | 18 | # https://docs.npmjs.com/misc/config#link 19 | link 20 | -------------------------------------------------------------------------------- /zsh/.config/zsh/functions-zsh: -------------------------------------------------------------------------------- 1 | # Start zsh with a particular configuration 2 | function figzsh { 3 | local zdotdir=$1 4 | if [[ -d $zdotdir ]]; then 5 | # shellcheck disable=SC2153 # Possible misspelling: ZDOTDIR may not be assigned. Did you mean zdotdir? 6 | zdotdir=$ZDOTDIR 7 | else 8 | zdotdir="$HOME/code/zdotdirs/${1:-skel}" 9 | if [[ ! -d $zdotdir ]]; then 10 | printf "%s is not a directory.\n" "$zdotdir" >&2 11 | return 1 12 | fi 13 | fi 14 | ZDOTDIR=$zdotdir exec -l zsh 15 | } 16 | 17 | 18 | # Remove files without asking 19 | # Allows for alias rm=rm -I 20 | function Rm { 21 | setopt localoptions rm_star_silent 22 | command rm "$@" 23 | } 24 | 25 | 26 | # vim: filetype=zsh 27 | -------------------------------------------------------------------------------- /shell/.config/user-dirs.dirs: -------------------------------------------------------------------------------- 1 | # This file is written by xdg-user-dirs-update 2 | # If you want to change or add directories, just edit the line you're 3 | # interested in. All local changes will be retained on the next run 4 | # 5 | # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped 6 | # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an 7 | # absolute path. No other format is supported. 8 | 9 | XDG_DOWNLOAD_DIR="$HOME/rx" 10 | XDG_DOCUMENTS_DIR="$HOME/Documents" 11 | 12 | # Dependencies 13 | XDG_DESKTOP_DIR="$XDG_DOCUMENTS_DIR/Desktop" 14 | XDG_MUSIC_DIR="$XDG_DOCUMENTS_DIR/Music" 15 | XDG_PICTURES_DIR="$XDG_DOCUMENTS_DIR/Pictures" 16 | XDG_PUBLICSHARE_DIR="$XDG_DOCUMENTS_DIR/Public" 17 | XDG_TEMPLATES_DIR="$XDG_DOCUMENTS_DIR/Templates" 18 | XDG_VIDEOS_DIR="$XDG_DOCUMENTS_DIR/Videos" 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Don't put a comment after a command! 2 | 3 | # Ignore personal configuration for git when sharing to GitHub: 4 | /git/.gitconfig.local 5 | /*-ravi 6 | 7 | /zsh/.config/zsh/history 8 | /zsh/.config/zsh/.zcompdump 9 | 10 | # Personal allowed .envrc files 11 | /misc/.config/direnv/allow/ 12 | 13 | ipython/.ipython/profile_default/history.sqlite 14 | 15 | # These get dynamically updated by bashrc 16 | tmux/.config/tmuxinator/tmuxinator.bash 17 | tmux/.config/tmuxinator/tmuxinator.zsh 18 | 19 | # VS Code 20 | vscode/.config/Code/* 21 | !vscode/.config/Code/languagepacks.json 22 | 23 | !vscode/.config/Code/User/ 24 | vscode/.config/Code/User/* 25 | !vscode/.config/Code/User/keybindings.json 26 | !vscode/.config/Code/User/settings.json 27 | # Changes with each sync timestamp: 28 | # !vscode/.config/Code/User/syncLocalSettings.json 29 | -------------------------------------------------------------------------------- /misc/.config/mise/config.toml: -------------------------------------------------------------------------------- 1 | # https://mise.jdx.dev/configuration.html#global-config-config-mise-config-toml 2 | 3 | [settings] 4 | 5 | # uv (python) 6 | # 2025-05-24: disabled this as the experimental flag is required 7 | # and I don't know what else that will affect 8 | # See upnote on "mise" for other per-project options (or even global!) 9 | # https://mise.jdx.dev/mise-cookbook/python.html#mise-uv 10 | # experimental = true 11 | # python.uv_venv_auto = true 12 | # Env var $MISE_PYTHON_UV_VENV_AUTO does the same thing: 13 | # https://mise.jdx.dev/lang/python.html#python.uv_venv_auto 14 | 15 | # 2025-05-24 disable warning caused by breaking change: 16 | # https://github.com/jdx/mise/discussions/4345 17 | idiomatic_version_file_enable_tools = [] 18 | 19 | [tools] 20 | rust = "latest" 21 | 22 | 23 | # 2025-05-24: Don't remember what this was about: 24 | # paranoid = true # awaiting issue fix 25 | -------------------------------------------------------------------------------- /restow: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | dir=${1:-$(dirname "$0")} 6 | 7 | if [[ $# -gt 1 || ! -d $dir ]]; then 8 | printf "Usage: %s [directory]\n" "${0##*/}" 9 | printf "Run install under PERSONAL directory if it exists.\n" 10 | printf "Stow directories to %s\n" "$HOME" 11 | printf "Run stow on all directories under given directory\n" 12 | printf "Else, run stow on all directories which are siblings to this file\n" 13 | printf "\nDirectories named PERSONAL Z-* .* are excluded.\n" 14 | exit 1 15 | fi 16 | 17 | cd "$dir" 18 | 19 | # Link personal stow directories to main directory 20 | if [[ -f PERSONAL/install ]]; then 21 | PERSONAL/install 22 | fi 23 | 24 | # Assume that there are no newlines in directory names 25 | find -L . -maxdepth 1 -type d ! \( -name PERSONAL -o -name '.*' -o -name 'Z-*' \) -print | sed 's/^.\///' | xargs -t -n1 -- stow -v --target="$HOME" 26 | -------------------------------------------------------------------------------- /misc/.config/gh/config.yml: -------------------------------------------------------------------------------- 1 | # What protocol to use when performing git operations. Supported values: ssh, https 2 | git_protocol: https 3 | # What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment. 4 | editor: 5 | # When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled 6 | prompt: enabled 7 | # A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager. 8 | pager: 9 | # Aliases allow you to create nicknames for gh commands 10 | aliases: 11 | co: pr checkout 12 | # The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport. 13 | http_unix_socket: 14 | # What web browser gh should use when opening URLs. If blank, will refer to environment. 15 | browser: 16 | version: "1" 17 | -------------------------------------------------------------------------------- /stow/.stow-global-ignore: -------------------------------------------------------------------------------- 1 | # vim swap files 2 | \..*\.sw[a-p] # vim uses 'o' then, 'n'... back to 'a'. 3 | 4 | ################################################################################ 5 | # Don't override default config 6 | # https://www.gnu.org/software/stow/manual/html_node/Types-And-Syntax-Of-Ignore-Lists.html 7 | ################################################################################ 8 | # Comments and blank lines are allowed. 9 | 10 | RCS 11 | .+,v 12 | 13 | CVS 14 | \.\#.+ # CVS conflict files / emacs lock files 15 | \.cvsignore 16 | 17 | \.svn 18 | _darcs 19 | \.hg 20 | 21 | \.git 22 | \.gitignore 23 | 24 | .stow-local-ignore 25 | .stowrc 26 | 27 | .+~ # emacs backup files 28 | \#.*\# # emacs autosave files 29 | 30 | ^/README 31 | ^/README.* 32 | ^/LICENSE.* 33 | ^/COPYING 34 | ################################################################################ 35 | -------------------------------------------------------------------------------- /misc/.config/yay/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "aururl": "https://aur.archlinux.org", 3 | "buildDir": "/home/ravi/.cache/yay", 4 | "editor": "", 5 | "editorflags": "", 6 | "makepkgbin": "makepkg", 7 | "makepkgconf": "", 8 | "pacmanbin": "pacman", 9 | "pacmanconf": "/etc/pacman.conf", 10 | "tarbin": "bsdtar", 11 | "redownload": "no", 12 | "rebuild": "no", 13 | "answerclean": "", 14 | "answerdiff": "All", 15 | "answeredit": "", 16 | "answerupgrade": "", 17 | "gitbin": "git", 18 | "gpgbin": "gpg", 19 | "gpgflags": "", 20 | "mflags": "", 21 | "sortby": "votes", 22 | "gitflags": "", 23 | "removemake": "no", 24 | "requestsplitn": 150, 25 | "sortmode": 0, 26 | "completionrefreshtime": 7, 27 | "sudoloop": false, 28 | "timeupdate": false, 29 | "devel": true, 30 | "cleanAfter": true, 31 | "gitclone": true, 32 | "provides": true, 33 | "pgpfetch": true, 34 | "upgrademenu": true, 35 | "cleanmenu": true, 36 | "diffmenu": true, 37 | "editmenu": false, 38 | "combinedupgrade": false, 39 | "useask": false 40 | } 41 | -------------------------------------------------------------------------------- /misc/.config/most/config: -------------------------------------------------------------------------------- 1 | % From: https://wiki.archlinux.org/index.php/Color_output_in_console#man 2 | 3 | % Color settings 4 | color normal lightgray black 5 | color status yellow blue 6 | color underline yellow black 7 | color overstrike brightblue black 8 | 9 | % less-like keybindings 10 | unsetkey "^K" 11 | unsetkey "g" 12 | unsetkey "G" 13 | unsetkey ":" 14 | 15 | setkey next_file ":n" 16 | setkey find_file ":e" 17 | setkey next_file ":p" 18 | setkey toggle_options ":o" 19 | setkey toggle_case ":c" 20 | setkey delete_file ":d" 21 | setkey exit ":q" 22 | 23 | setkey bob "g" 24 | setkey eob "G" 25 | setkey down "e" 26 | setkey down "E" 27 | setkey down "j" 28 | setkey down "^N" 29 | setkey up "y" 30 | setkey up "^Y" 31 | setkey up "k" 32 | setkey up "^P" 33 | setkey up "^K" 34 | setkey page_down "f" 35 | setkey page_down "^F" 36 | setkey page_up "b" 37 | setkey page_up "^B" 38 | setkey other_window "z" 39 | setkey other_window "w" 40 | setkey search_backward "?" 41 | setkey bob "p" 42 | setkey goto_mark "'" 43 | setkey find_file "E" 44 | setkey edit "v" 45 | -------------------------------------------------------------------------------- /misc/.config/wireplumber/wireplumber.conf.d/bt-codecs.conf.disbled: -------------------------------------------------------------------------------- 1 | monitor.bluez.rules = [ 2 | { 3 | matches = [{ device.name = "~bluez_card.*" }] 4 | actions = { 5 | update-props = { 6 | # Enable codecs 7 | bluez5.enable-lc3 = true 8 | bluez5.enable-ldac = true 9 | bluez5.enable-sbc-xq = true 10 | 11 | # Prioritised codecs 12 | # Always includes SBC as universal fallback 13 | bluez5.codecs = [ lc3 sbc_xq ldac aptx_hd aptx_adaptive aptx aac sbc ] 14 | 15 | # SBC-XQ: Force high-quality 16 | # https://fossies.org/linux/pipewire/spa/plugins/bluez5/README-SBC-XQ.md 17 | # https://soundexpert.org/articles/-/blogs/audio-quality-of-sbc-xq-bluetooth-audio-codec 18 | bluez5.sbc-xq.bitpool = 94 # Maximum bitpool for 551kbps 19 | 20 | # LDAC: Balance quality/battery 21 | bluez5.a2dp.ldac.quality = "sq" 22 | 23 | # Enable automatic profile switching 24 | bluez5.auto-connect = [ a2dp_sink hfp_hf hsp_hs ] 25 | } 26 | } 27 | } 28 | ] 29 | 30 | -------------------------------------------------------------------------------- /sshrc/.config/sshrc/sshrc.d/known_hosts: -------------------------------------------------------------------------------- 1 | bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw== 2 | github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl 3 | github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== 4 | github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= 5 | -------------------------------------------------------------------------------- /misc/.config/aria2/aria2.conf: -------------------------------------------------------------------------------- 1 | # Comment at EOL not supported 2 | 3 | bt-prioritize-piece=head=100M,tail=5M 4 | 5 | max-connection-per-server=4 6 | min-split-size=2M 7 | # on-download-complete=exit 8 | 9 | # falloc is recommended for ext4 (with extents support) & btrfs 10 | file-allocation=falloc 11 | 12 | bt-tracker=udp://tracker.opentrackr.org:1337/announce,https://tracker2.ctix.cn:443/announce,https://tracker1.520.jp:443/announce,udp://opentracker.i2p.rocks:6969/announce,udp://open.demonii.com:1337/announce,udp://tracker.openbittorrent.com:6969/announce,http://tracker.openbittorrent.com:80/announce,udp://open.stealth.si:80/announce,udp://exodus.desync.com:6969/announce,https://t1.hloli.org:443/announce,udp://tracker.moeking.me:6969/announce,http://bt.endpot.com:80/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker-udp.gbitt.info:80/announce,udp://explodie.org:6969/announce,https://tracker.gbitt.info:443/announce,http://tracker.gbitt.info:80/announce,http://montreal.nyap2p.com:8080/announce,udp://uploads.gamecoast.net:6969/announce,udp://tracker2.dler.org:80/announce, 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Tom Hale 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vscode/.config/Code/User/syncLocalSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ignoreUploadFiles": [ 3 | "state.*", 4 | "syncLocalSettings.json", 5 | ".DS_Store", 6 | "sync.lock", 7 | "projects.json", 8 | "projects_cache_vscode.json", 9 | "projects_cache_git.json", 10 | "projects_cache_svn.json", 11 | "gpm_projects.json", 12 | "gpm-recentItems.json" 13 | ], 14 | "ignoreUploadFolders": [ 15 | "workspaceStorage" 16 | ], 17 | "ignoreExtensions": [], 18 | "gistDescription": "Visual Studio Code Settings Sync Gist", 19 | "version": 343, 20 | "token": "b17b9297b678ab3f7aa67fedc862abb0543f6785", 21 | "downloadPublicGist": false, 22 | "supportedFileExtensions": [ 23 | "json", 24 | "code-snippets" 25 | ], 26 | "openTokenLink": true, 27 | "disableUpdateMessage": false, 28 | "lastUpload": "2020-08-17T07:06:34.422Z", 29 | "lastDownload": "2020-08-17T07:06:34.422Z", 30 | "githubEnterpriseUrl": null, 31 | "askGistDescription": false, 32 | "customFiles": {}, 33 | "hostName": null, 34 | "universalKeybindings": false, 35 | "autoUploadDelay": 20 36 | } -------------------------------------------------------------------------------- /tmux/.config/tmuxinator/git.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/rails.yml 2 | 3 | name: git 4 | root: ~/repo/git 5 | 6 | # Optional tmux socket 7 | # socket_name: foo 8 | 9 | # Runs before everything. Use it to start daemons etc. 10 | # pre: sudo /etc/rc.d/mysqld start 11 | 12 | # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. 13 | # pre_window: rbenv shell 2.0.0-p247 14 | 15 | # Pass command line options to tmux. Useful for specifying a different tmux.conf. 16 | # tmux_options: -f ~/.tmux.mac.conf 17 | 18 | # Change the command to call tmux. This can be used by derivatives/wrappers like byobu. 19 | # tmux_command: byobu 20 | 21 | # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. 22 | # startup_window: logs 23 | 24 | # Controls whether the tmux session should be attached to automatically. Defaults to true. 25 | # attach: false 26 | 27 | # Runs after everything. Use it to attach to tmux with custom options etc. 28 | # post: tmux -CC attach -t rails 29 | 30 | windows: 31 | - editor: 32 | layout: main-vertical 33 | panes: 34 | - vim 35 | - bash 36 | - shell: bash 37 | -------------------------------------------------------------------------------- /shell/.config/shell/env: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This file is intended to be sourced by all shells, login and interactive 3 | # Therefore, keep it short and sweet 4 | 5 | if [ -n "$_already_sourcing_env" ]; then return; 6 | else _already_sourcing_env=true; fi 7 | 8 | # Set _shell_rc_dir 9 | _shell_rc_dir=${_shell_rc_dir:=${XDG_CONFIG_HOME:=$HOME/.config}/shell} 10 | # If this is set then this file can be assumed to have been sourced 11 | 12 | # Source functions 13 | . "$_shell_rc_dir"/functions-env 14 | if [ -n "$_SHELL_DEBUG" ]; then 15 | . "$_shell_rc_dir"/functions-debug 16 | else 17 | debug_file() { :; } # stub it out 18 | fi 19 | 20 | if sh_is_zsh; then SHELL_NAME=zsh; 21 | elif sh_is_bash; then SHELL_NAME=bash; 22 | else SHELL_NAME=$(basename "$(readlink /proc/$$/exe)"); fi 23 | 24 | # debug_file uses $SHELL_NAME 25 | debug_file echo "Reading env" 26 | 27 | . "$_shell_rc_dir"/xdg 28 | 29 | case $- in 30 | *i*) 31 | debug_file echo "Interactive shell" 32 | . "${_shell_rc_dir}"/interactive 33 | ;; 34 | *) 35 | debug_file echo "Non-interactive shell" 36 | esac 37 | 38 | [ ! "$_already_sourcing_interactive" ] && unset _shell_rc_dir 39 | unset _already_sourcing_env 40 | debug_file echo "DONE Reading env" 41 | -------------------------------------------------------------------------------- /tmux/.config/tmuxinator/tmuxinator.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/rails.yml 2 | 3 | name: tmuxinator 4 | root: ~/repo/tmuxinator 5 | 6 | # Optional tmux socket 7 | # socket_name: foo 8 | 9 | # Runs before everything. Use it to start daemons etc. 10 | # pre: sudo /etc/rc.d/mysqld start 11 | 12 | # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. 13 | # pre_window: rbenv shell 2.0.0-p247 14 | 15 | # Pass command line options to tmux. Useful for specifying a different tmux.conf. 16 | # tmux_options: -f ~/.tmux.mac.conf 17 | 18 | # Change the command to call tmux. This can be used by derivatives/wrappers like byobu. 19 | # tmux_command: byobu 20 | 21 | # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. 22 | # startup_window: logs 23 | 24 | # Controls whether the tmux session should be attached to automatically. Defaults to true. 25 | # attach: false 26 | 27 | # Runs after everything. Use it to attach to tmux with custom options etc. 28 | # post: tmux -CC attach -t rails 29 | 30 | windows: 31 | - editor: 32 | layout: main-vertical 33 | panes: 34 | - vim 35 | - bash 36 | - shell: bash 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tom Hale's .dotfiles 2 | 3 | 4 | ## Features 5 | 6 | * Uses `stow` to manage the dotfiles which are split into modular packages. Attempts install if not installed. 7 | * Follows the [XDG Base Directory Specification](https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) where feasible (credit to Arch's [XDG Base Directory support](https://wiki.archlinux.org/index.php/XDG_Base_Directory_support) page). 8 | * Coloured `bash` prompt with right-aligned part 9 | * Works with both `{ba,z}sh` 10 | * Bunches of `git` aliases and helper functions 11 | * `tmux` config which is actually [backwards compatible](https://stackoverflow.com/a/40902312/5353461) given [`tmux` won't implement backwards compatibility](https://github.com/tmux/tmux/issues/1732) 12 | * Pretty ponies with aphorisms when opening a new tmux pane 13 | 14 | 15 | ## Installation 16 | 17 | ``` 18 | git clone git@github.com:HaleTom/dotfiles.git ~/.dotfiles 19 | git clone git@bitbucket.org:HaleTom/scripts.git ~/bin # Optional - lots of useful scripts 20 | 21 | # Private configuration - ignore if you're not me. 22 | git clone git@bitbucket.org:HaleTom/ravi-personal.git ~/code/ravi-personal && ~/code/ravi-personal/install 23 | 24 | ~/.dotfiles/install 25 | ``` 26 | -------------------------------------------------------------------------------- /misc/.config/surfraw/elvi/man: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # AUTHOR: Tom "Ravi" Hale 4 | # DATE: 2017-09-17 5 | # DESC: Elvi to open a man-page 6 | # elvis: man -- view a man page from manned.org 7 | . surfraw || exit 1 8 | 9 | w3_usage_hook () { 10 | cat </dev/null 29 | 30 | # 31 | # # Use the same section search order as /bin/man 32 | # for section in 1 n l 8 3 0 2 5 4 9 6 7; do 33 | # url="http://man7.org/linux/man-pages/man${section}/truncate.${section}.html" 34 | # # From https://stackoverflow.com/questions/12199059/how-to-check-if-an-url-exists-with-the-shell-and-probably-curl 35 | # if curl --output /dev/null --silent --head --fail "$url"; then 36 | # echo "URL exists: $url" 37 | # else 38 | # echo "URL does not exist: $url" 39 | # fi 40 | # done 41 | # 42 | -------------------------------------------------------------------------------- /tmux/.config/tmuxinator/sample_app.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/rails.yml 2 | 3 | name: sample_app 4 | root: ~/prj/sample_app 5 | 6 | # Optional tmux socket 7 | # socket_name: foo 8 | 9 | # Runs before everything. Use it to start daemons etc. 10 | # pre: sudo /etc/rc.d/mysqld start 11 | 12 | # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. 13 | # pre_window: rbenv shell 2.0.0-p247 14 | 15 | # Pass command line options to tmux. Useful for specifying a different tmux.conf. 16 | # tmux_options: -f ~/.tmux.mac.conf 17 | 18 | # Change the command to call tmux. This can be used by derivatives/wrappers like byobu. 19 | # tmux_command: byobu 20 | 21 | # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. 22 | # startup_window: logs 23 | 24 | # Controls whether the tmux session should be attached to automatically. Defaults to true. 25 | # attach: false 26 | 27 | # Runs after everything. Use it to attach to tmux with custom options etc. 28 | # post: tmux -CC attach -t rails 29 | 30 | windows: 31 | - editor: 32 | layout: main-vertical 33 | panes: 34 | - vim 35 | - bundle exec guard 36 | - server: bundle exec rails s 37 | - logs: tail -f log/development.log 38 | -------------------------------------------------------------------------------- /shell/.config/shell/functions-env: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Functions used in all {,ba,z}sh shells (login, interactive, scripts) 3 | # After the optional debug functions, this should be the first file sourced by ./env 4 | 5 | sh_is_zsh() { [ -n "$ZSH_VERSION" ]; } 6 | sh_is_bash() { [ -n "$BASH_VERSION" ]; } 7 | sh_is_sh() { ! { sh_is_zsh || sh_is_bash; } } 8 | 9 | ############################################################################## 10 | # Quit here if {ba,z}sh, load the advanced versions of functions instead 11 | if ! sh_is_sh; then 12 | . "$_shell_rc_dir"/functions-env-non-posix 13 | return $? 14 | fi 15 | ############################################################################## 16 | 17 | # Based on: https://stackoverflow.com/a/29824428/5353461 18 | token_quote() { 19 | for i; do 20 | printf '%s' "$i" | sed "s/'/'\\\\''/g; 1 s/^/'/; $ s/$/' /" 21 | done 22 | printf "\n" 23 | } 24 | 25 | # Say the file, line number and optional message for debugging 26 | # Inspired by bash's `caller` builtin 27 | # Thanks to https://unix.stackexchange.com/a/453153/143394 28 | yelp () { 29 | # Use shell-quote if it exists for nicer output 30 | # POSIX $LINENO not useful: only gives the line number of THIS file. 31 | if command -v shell-quote >/dev/null 2>&1; then 32 | shell-quote -- "$0:" "$@" >&2 33 | else 34 | token_quote "$0:" "$@" >&2 35 | fi 36 | } 37 | -------------------------------------------------------------------------------- /git/.config/git/ignore: -------------------------------------------------------------------------------- 1 | # Don't put a comment after an ignore line! 2 | 3 | # Editor swap files # 4 | ##################### 5 | *~ 6 | # vim swap files: 7 | *.sw? 8 | 9 | # Lock files # 10 | ############## 11 | # Gemfile.lock should be included unless I'm writing a Gem. 12 | # *.lock 13 | 14 | # Debugging files # 15 | ################### 16 | .byebug_history 17 | 18 | # Jupyter checkpoints # 19 | ####################### 20 | .ipynb_checkpoints/ 21 | 22 | # Temporary files # 23 | ################## 24 | tmp/ 25 | temp/ 26 | 27 | # Caches # 28 | ########## 29 | __pycache__/ 30 | .cache/ 31 | 32 | # Compiled source # 33 | ################### 34 | *.com 35 | *.class 36 | *.dll 37 | *.exe 38 | *.o 39 | *.so 40 | *.zwc 41 | 42 | # Packages # 43 | ############ 44 | # it's better to unpack these files and commit the raw source 45 | # git has its own built in compression methods 46 | *.7z 47 | *.bz2 48 | *.dmg 49 | *.gz 50 | *.iso 51 | *.jar 52 | *.rar 53 | *.tar 54 | *.tgz 55 | *.zip 56 | *.Z 57 | node_modules/ 58 | 59 | # Logs and databases # 60 | ###################### 61 | yarn-error.log 62 | # *.log 63 | # *.sql 64 | # *.sqlite 65 | 66 | # OS generated files # 67 | ###################### 68 | .DS_Store 69 | .DS_Store? 70 | ._* 71 | .Spotlight-V100 72 | .Trashes 73 | ehthumbs.db 74 | Thumbs.db 75 | 76 | # exuberant ctags file # 77 | ######################## 78 | /tags 79 | /tags.temp 80 | -------------------------------------------------------------------------------- /git/.config/git/attributes: -------------------------------------------------------------------------------- 1 | # Documentation: 2 | # https://git-scm.com/docs/gitattributes 3 | 4 | # Repository specific files go in .gitattributes at whatever level of the tree 5 | 6 | # Comments must be on lines by themselves 7 | # 8 | # Explicitly set the default, which is making diff "Unspecified" 9 | * !diff 10 | 11 | # Set the default behavior, in case people don't have core.autocrlf set. 12 | * text=auto 13 | 14 | # Get custom diff hunk headers 15 | *.rb ruby 16 | *.pl perl 17 | *.html html 18 | *.html.erb html 19 | *.css css 20 | *.c cpp 21 | *.h cpp 22 | *.py python 23 | *.tex tex 24 | 25 | # textconv filetypes 26 | # Note: If there is no converted `diff` output then `git diff` won't mention the filename 27 | *.bin diff=hexdump 28 | *.doc diff=strings 29 | *.docx diff=strings 30 | *.ipynb diff=jupyternotebook 31 | *.ipynb merge=jupyternotebook 32 | *.pdf diff=pdf 33 | *.zip diff=zip 34 | *.tar diff=tar -tvv 35 | *.tgz diff=tar -tvvz 36 | *.tar.gz diff=tar -tvvz 37 | *.jpg diff=exif 38 | *.jpeg diff=exif 39 | *.ps diff=ps 40 | 41 | # Mark a text file as a binary, eg #.ps 42 | # *.ps -diff # this is done in .gitconfig instead 43 | # 44 | # Sometimes you would need to override an setting of an attribute for a path to 45 | # Unspecified state. This can be done by listing the name of the attribute 46 | # prefixed with an exclamation point !. Eg: favico.jpg !exif 47 | # 48 | # 49 | -------------------------------------------------------------------------------- /bash/.profile: -------------------------------------------------------------------------------- 1 | # ~/.profile: executed by the command interpreter for login shells. 2 | # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login 3 | # exists. 4 | # see /usr/share/doc/bash/examples/startup-files for examples. 5 | # the files are located in the bash-doc package. 6 | 7 | # the default umask is set in /etc/profile; for setting the umask 8 | # for ssh logins, install and configure the libpam-umask package. 9 | #umask 022 10 | 11 | # Manjaro defaults: 12 | [[ "$XDG_CURRENT_DESKTOP" == "KDE" ]] || [[ "$XDG_CURRENT_DESKTOP" == "GNOME" ]] || export QT_QPA_PLATFORMTHEME="qt5ct" 13 | [[ -f ~/.extend.profile ]] && . ~/.extend.profile 14 | 15 | 16 | ## Mapped this via MS Windows VM Host instead 17 | # if [ -x `which setxkbmap` ]; then 18 | # setxkbmap -option 'caps:ctrl_modifier' 19 | # fi 20 | 21 | ## Undo Caps Lock => Escape 22 | # # These work even if Caps Lock is mapped to Control in Windows VM Host 23 | # if [ -x `xcape` ]; then 24 | # # wait -t milliseconds before actioning the non-tap version 25 | # xcape -t 300 -e 'Caps_Lock=Escape' 26 | # # Win VM Host does this 27 | # # xcape -t 300 -e 'Alt_R=Caps_Lock' 28 | # fi 29 | 30 | # if running bash 31 | if [ -n "$BASH_VERSION" ]; then 32 | # include .bashrc if it exists 33 | if [ -f "$HOME/.bashrc" ]; then 34 | . "$HOME/.bashrc" 35 | fi 36 | fi 37 | 38 | # Manage path in .bashrc instead 39 | # # set PATH so it includes user's private bin if it exists 40 | # if [ -d "$HOME/bin" ] ; then 41 | # PATH="$HOME/bin:$PATH" 42 | # fi 43 | -------------------------------------------------------------------------------- /gconf/.gconf/apps/gnome-terminal/profiles/Default/%gconf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DejaVu Sans Mono for Powerline 11 6 | 7 | 8 | 9 | solid 10 | 11 | 12 | Default 13 | 14 | 15 | #AAAAAAAAAAAA 16 | 17 | 18 | #000000000000 19 | 20 | 21 | 22 | 23 | #000000000000 24 | 25 | 26 | #2E2E34343636:#CCCC00000000:#4E4E9A9A0606:#C4C4A0A00000:#34346565A4A4:#757550507B7B:#060698209A9A:#D3D3D7D7CFCF:#88888A8A8585:#EFEF29292929:#8A8AE2E23434:#FCFCE9E94F4F:#72729F9FCFCF:#ADAD7F7FA8A8:#3434E2E2E2E2:#EEEEEEEEECEC 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /xfce4/.config/xfce4/terminal/terminalrc: -------------------------------------------------------------------------------- 1 | [Configuration] 2 | MiscAlwaysShowTabs=FALSE 3 | MiscBell=FALSE 4 | MiscBordersDefault=TRUE 5 | MiscCursorBlinks=FALSE 6 | MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK 7 | MiscDefaultGeometry=80x36 8 | MiscInheritGeometry=FALSE 9 | MiscMenubarDefault=TRUE 10 | MiscMouseAutohide=TRUE 11 | MiscToolbarDefault=FALSE 12 | MiscConfirmClose=TRUE 13 | MiscCycleTabs=TRUE 14 | MiscTabCloseButtons=TRUE 15 | MiscTabCloseMiddleClick=TRUE 16 | MiscTabPosition=GTK_POS_TOP 17 | MiscHighlightUrls=TRUE 18 | ScrollingLines=999999 19 | BackgroundMode=TERMINAL_BACKGROUND_TRANSPARENT 20 | BackgroundDarkness=1.000000 21 | MiscBellUrgent=TRUE 22 | MiscMouseWheelZoom=TRUE 23 | MiscMiddleClickOpensUri=FALSE 24 | MiscCopyOnSelect=TRUE 25 | MiscDefaultWorkingDir= 26 | MiscRewrapOnResize=TRUE 27 | MiscUseShiftArrowsToScroll=FALSE 28 | MiscSlimTabs=FALSE 29 | ColorPalette=rgb(28,27,25);rgb(255,49,40);rgb(38,175,36);rgb(251,184,41);rgb(107,143,202);rgb(187,0,187);rgb(10,174,179);rgb(167,167,167);rgb(94,94,94);rgb(255,150,150);rgb(149,249,145);rgb(255,240,59);rgb(171,200,255);rgb(255,0,255);rgb(83,253,233);rgb(255,255,255) 30 | ColorCursor=#ebdbb2 31 | ShortcutsNoMnemonics=TRUE 32 | ShortcutsNoHelpkey=TRUE 33 | ShortcutsNoMenukey=TRUE 34 | FontName=Iosevka SS06 13.69921875 35 | MiscNewTabAdjacent=FALSE 36 | MiscShowRelaunchDialog=TRUE 37 | MiscSearchDialogOpacity=100 38 | MiscShowUnsafePasteDialog=FALSE 39 | TitleMode=TERMINAL_TITLE_HIDE 40 | ColorForeground=#fdc8ff24ee22 41 | ColorBackground=#000000000000 42 | ColorBoldIsBright=FALSE 43 | ColorCursorUseDefault=FALSE 44 | MiscRightClickAction=TERMINAL_RIGHT_CLICK_ACTION_CONTEXT_MENU 45 | 46 | -------------------------------------------------------------------------------- /tmux/.config/tmuxinator/vim.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/vim.yml 2 | 3 | name: vim 4 | root: ~/repo/vim 5 | 6 | # Optional tmux socket 7 | # socket_name: foo 8 | 9 | # Runs before everything. Use it to start daemons etc. 10 | # pre: sudo /etc/rc.d/mysqld start 11 | 12 | # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. 13 | # pre_window: rbenv shell 2.0.0-p247 14 | 15 | # Pass command line options to tmux. Useful for specifying a different tmux.conf. 16 | # tmux_options: -f ~/.tmux.mac.conf 17 | 18 | # Change the command to call tmux. This can be used by derivatives/wrappers like byobu. 19 | # tmux_command: byobu 20 | 21 | # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. 22 | # startup_window: editor 23 | 24 | # Specitifes (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. 25 | # startup_pane: 1 26 | 27 | # Controls whether the tmux session should be attached to automatically. Defaults to true. 28 | # attach: false 29 | 30 | # Runs after everything. Use it to attach to tmux with custom options etc. 31 | # post: tmux -CC attach -t vim 32 | 33 | windows: 34 | - editor: 35 | layout: main-vertical 36 | # Synchronize all panes of this window, can be enabled before or after the pane commands run. 37 | # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after' 38 | # synchronize: after 39 | panes: 40 | - vim 41 | - guard 42 | - server: bundle exec rails s 43 | - logs: tail -f log/development.log 44 | -------------------------------------------------------------------------------- /tmux/.config/tmuxinator/aiml.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/tensorflow.yml 2 | 3 | name: AI/ML 4 | root: ~/doc/AI/ML 5 | 6 | # Optional tmux socket 7 | # socket_name: foo 8 | 9 | # Runs before everything. Use it to start daemons etc. 10 | # pre: sudo /etc/rc.d/mysqld start 11 | 12 | # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. 13 | # pre_window: rbenv shell 2.0.0-p247 14 | 15 | # Pass command line options to tmux. Useful for specifying a different tmux.conf. 16 | # tmux_options: -f ~/.tmux.mac.conf 17 | 18 | # Change the command to call tmux. This can be used by derivatives/wrappers like byobu. 19 | # tmux_command: byobu 20 | 21 | # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. 22 | # startup_window: editor 23 | 24 | # Specitifes (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. 25 | # startup_pane: 1 26 | 27 | # Controls whether the tmux session should be attached to automatically. Defaults to true. 28 | # attach: false 29 | 30 | # Runs after everything. Use it to attach to tmux with custom options etc. 31 | # post: tmux -CC attach -t tensorflow 32 | 33 | windows: 34 | - bash: 35 | # layout: main-vertical 36 | # # Synchronize all panes of this window, can be enabled before or after the pane commands run. 37 | # # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after' 38 | # # synchronize: after 39 | # panes: 40 | # - vim 41 | # - 42 | # - server: bundle exec rails s 43 | # - logs: tail -f log/development.log 44 | -------------------------------------------------------------------------------- /tmux/.config/tmuxinator/tensorflow.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/tensorflow.yml 2 | 3 | name: tensorflow 4 | root: ~/prj/tensorflow 5 | 6 | # Optional tmux socket 7 | # socket_name: foo 8 | 9 | # Runs before everything. Use it to start daemons etc. 10 | # pre: sudo /etc/rc.d/mysqld start 11 | 12 | # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. 13 | # pre_window: rbenv shell 2.0.0-p247 14 | 15 | # Pass command line options to tmux. Useful for specifying a different tmux.conf. 16 | # tmux_options: -f ~/.tmux.mac.conf 17 | 18 | # Change the command to call tmux. This can be used by derivatives/wrappers like byobu. 19 | # tmux_command: byobu 20 | 21 | # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. 22 | # startup_window: editor 23 | 24 | # Specitifes (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. 25 | # startup_pane: 1 26 | 27 | # Controls whether the tmux session should be attached to automatically. Defaults to true. 28 | # attach: false 29 | 30 | # Runs after everything. Use it to attach to tmux with custom options etc. 31 | # post: tmux -CC attach -t tensorflow 32 | 33 | windows: 34 | - editor: 35 | layout: main-vertical 36 | # Synchronize all panes of this window, can be enabled before or after the pane commands run. 37 | # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after' 38 | # synchronize: after 39 | panes: 40 | - vim 41 | - 42 | - server: bundle exec rails s 43 | - logs: tail -f log/development.log 44 | -------------------------------------------------------------------------------- /tmux/.config/tmuxinator/ERC20.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/tensorflow.yml 2 | 3 | name: ERC20 4 | root: ~/repo/erc20 5 | 6 | # Optional tmux socket 7 | # socket_name: foo 8 | 9 | # Runs before everything. Use it to start daemons etc. 10 | # pre: sudo /etc/rc.d/mysqld start 11 | 12 | # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. 13 | # pre_window: rbenv shell 2.0.0-p247 14 | 15 | # Pass command line options to tmux. Useful for specifying a different tmux.conf. 16 | tmux_options: -f "$XDG_CONFIG_HOME"/tmux/tmux.conf 17 | 18 | # Change the command to call tmux. This can be used by derivatives/wrappers like byobu. 19 | # tmux_command: byobu 20 | 21 | # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. 22 | # startup_window: editor 23 | 24 | # Specitifes (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. 25 | # startup_pane: 1 26 | 27 | # Controls whether the tmux session should be attached to automatically. Defaults to true. 28 | # attach: false 29 | 30 | # Runs after everything. Use it to attach to tmux with custom options etc. 31 | # post: tmux -CC attach -t tensorflow 32 | 33 | windows: 34 | - bash: 35 | # layout: main-vertical 36 | # # Synchronize all panes of this window, can be enabled before or after the pane commands run. 37 | # # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after' 38 | # # synchronize: after 39 | # panes: 40 | # - vim 41 | # - 42 | # - server: bundle exec rails s 43 | # - logs: tail -f log/development.log 44 | -------------------------------------------------------------------------------- /tmux/.config/tmuxinator/nndl.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/tensorflow.yml 2 | 3 | name: NN&DL 4 | root: ~/doc/AI/Coursera-DL/current 5 | 6 | # Optional tmux socket 7 | # socket_name: foo 8 | 9 | # Runs before everything. Use it to start daemons etc. 10 | # pre: sudo /etc/rc.d/mysqld start 11 | 12 | # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. 13 | # pre_window: rbenv shell 2.0.0-p247 14 | 15 | # Pass command line options to tmux. Useful for specifying a different tmux.conf. 16 | # tmux_options: -f ~/.tmux.mac.conf 17 | 18 | # Change the command to call tmux. This can be used by derivatives/wrappers like byobu. 19 | # tmux_command: byobu 20 | 21 | # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. 22 | # startup_window: editor 23 | 24 | # Specitifes (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. 25 | # startup_pane: 1 26 | 27 | # Controls whether the tmux session should be attached to automatically. Defaults to true. 28 | # attach: false 29 | 30 | # Runs after everything. Use it to attach to tmux with custom options etc. 31 | # post: tmux -CC attach -t tensorflow 32 | 33 | windows: 34 | - bash: 35 | # layout: main-vertical 36 | # # Synchronize all panes of this window, can be enabled before or after the pane commands run. 37 | # # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after' 38 | # # synchronize: after 39 | # panes: 40 | # - vim 41 | # - 42 | # - server: bundle exec rails s 43 | # - logs: tail -f log/development.log 44 | -------------------------------------------------------------------------------- /tmux/.config/tmuxinator/nn.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/tensorflow.yml 2 | 3 | name: NeuralNetwork 4 | root: ~/prj/nn 5 | 6 | # Optional tmux socket 7 | # socket_name: foo 8 | 9 | # Runs before everything. Use it to start daemons etc. 10 | # pre: sudo /etc/rc.d/mysqld start 11 | 12 | # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. 13 | # pre_window: rbenv shell 2.0.0-p247 14 | 15 | # Pass command line options to tmux. Useful for specifying a different tmux.conf. 16 | # tmux_options: -f ~/.tmux.mac.conf 17 | tmux_options: -f "$XDG_CONFIG_HOME"/tmux/tmux.conf 18 | 19 | # Change the command to call tmux. This can be used by derivatives/wrappers like byobu. 20 | # tmux_command: byobu 21 | 22 | # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. 23 | # startup_window: editor 24 | 25 | # Specitifes (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. 26 | # startup_pane: 1 27 | 28 | # Controls whether the tmux session should be attached to automatically. Defaults to true. 29 | # attach: false 30 | 31 | # Runs after everything. Use it to attach to tmux with custom options etc. 32 | # on_project_first_start: tmux -f "$XDG_CONFIG_HOME"/tmux/tmux.conf 33 | # TERM=xterm-256color 34 | 35 | windows: 36 | - bash: 37 | # layout: main-vertical 38 | # # Synchronize all panes of this window, can be enabled before or after the pane commands run. 39 | # # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after' 40 | # # synchronize: after 41 | # panes: 42 | # - vim 43 | # - 44 | # - server: bundle exec rails s 45 | # - logs: tail -f log/development.log 46 | -------------------------------------------------------------------------------- /misc/.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.2.2 4 | config_reader_min_version=3 5 | fields=0 48 17 18 38 39 40 2 46 47 49 1 6 | hide_kernel_threads=1 7 | hide_userland_threads=0 8 | hide_running_in_container=0 9 | shadow_other_users=0 10 | show_thread_names=0 11 | show_program_path=1 12 | highlight_base_name=0 13 | highlight_deleted_exe=1 14 | shadow_distribution_path_prefix=0 15 | highlight_megabytes=1 16 | highlight_threads=1 17 | highlight_changes=0 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=1 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=0 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=LeftCPUs Memory Swap 38 | column_meter_modes_0=1 1 1 39 | column_meters_1=RightCPUs Tasks LoadAverage Uptime 40 | column_meter_modes_1=1 2 2 2 41 | tree_view=0 42 | sort_key=47 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 PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command 49 | .sort_key=PERCENT_MEM 50 | .tree_sort_key=PID 51 | .tree_view=0 52 | .tree_view_always_by_pid=0 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=0 60 | .tree_view_always_by_pid=0 61 | .sort_direction=-1 62 | .tree_sort_direction=1 63 | .all_branches_collapsed=0 64 | -------------------------------------------------------------------------------- /X11/.xinitrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # ~/.xinitrc 4 | # 5 | # Executed by startx (run your window manager from here) 6 | 7 | if [[ -f ~/.extend.xinitrc ]];then 8 | . ~/.extend.xinitrc 9 | else 10 | DEFAULT_SESSION=xfce4-session 11 | fi 12 | 13 | userresources=$HOME/.Xresources 14 | usermodmap=$HOME/.Xmodmap 15 | sysresources=/etc/X11/xinit/.Xresources 16 | sysmodmap=/etc/X11/xinit/.Xmodmap 17 | 18 | # merge in defaults and keymaps 19 | 20 | if [ -f $sysresources ]; then 21 | xrdb -merge $sysresources 22 | fi 23 | 24 | if [ -f $sysmodmap ]; then 25 | xmodmap $sysmodmap 26 | fi 27 | 28 | if [ -f "$userresources" ]; then 29 | xrdb -merge "$userresources" 30 | fi 31 | 32 | if [ -f "$usermodmap" ]; then 33 | xmodmap "$usermodmap" 34 | fi 35 | 36 | # start some nice programs 37 | 38 | if [ -d /etc/X11/xinit/xinitrc.d ] ; then 39 | for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do 40 | [ -x "$f" ] && . "$f" 41 | done 42 | unset f 43 | fi 44 | 45 | get_session(){ 46 | local dbus_args=(--sh-syntax --exit-with-session) 47 | case $1 in 48 | awesome) dbus_args+=(awesome) ;; 49 | bspwm) dbus_args+=(bspwm-session) ;; 50 | budgie) dbus_args+=(budgie-desktop) ;; 51 | cinnamon) dbus_args+=(cinnamon-session) ;; 52 | deepin) dbus_args+=(startdde) ;; 53 | enlightenment) dbus_args+=(enlightenment_start) ;; 54 | fluxbox) dbus_args+=(startfluxbox) ;; 55 | gnome) dbus_args+=(gnome-session) ;; 56 | i3|i3wm) dbus_args+=(i3 --shmlog-size 0) ;; 57 | jwm) dbus_args+=(jwm) ;; 58 | kde) dbus_args+=(startkde) ;; 59 | lxde) dbus_args+=(startlxde) ;; 60 | lxqt) dbus_args+=(lxqt-session) ;; 61 | mate) dbus_args+=(mate-session) ;; 62 | xfce) dbus_args+=(xfce4-session) ;; 63 | openbox) dbus_args+=(openbox-session) ;; 64 | *) dbus_args+=($DEFAULT_SESSION) ;; 65 | esac 66 | 67 | echo "dbus-launch ${dbus_args[*]}" 68 | } 69 | 70 | exec $(get_session) 71 | 72 | 73 | # twm & 74 | # xclock -geometry 50x50-1+1 & 75 | # xterm -geometry 80x50+494+51 & 76 | # xterm -geometry 80x20+494-0 & 77 | #exec xterm -geometry 80x66+0+0 -name login 78 | -------------------------------------------------------------------------------- /tmux/.config/tmuxinator/default.yml: -------------------------------------------------------------------------------- 1 | # ~/.tmuxinator/<%= name %>.yml 2 | 3 | name: <%= name %> 4 | root: ~/ 5 | 6 | # Optional tmux socket 7 | # socket_name: foo 8 | 9 | # Runs before everything. Use it to start daemons etc. 10 | # pre: sudo /etc/rc.d/mysqld start 11 | 12 | # Project hooks 13 | # Runs on project start, always 14 | # on_project_start: command 15 | # Run on project start, the first time 16 | # on_project_first_start: command 17 | # Run on project start, after the first time 18 | # on_project_restart: command 19 | # Run on project exit ( detaching from tmux session ) 20 | # on_project_exit: command 21 | # Run on project stop 22 | # on_project_stop: command 23 | 24 | # Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. 25 | # pre_window: rbenv shell 2.0.0-p247 26 | 27 | # Pass command line options to tmux. Useful for specifying a different tmux.conf. 28 | tmux_options: -f "$XDG_CONFIG_HOME"/tmux/tmux.conf 29 | 30 | # Change the command to call tmux. This can be used by derivatives/wrappers like byobu. 31 | # tmux_command: byobu 32 | 33 | # Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. 34 | # startup_window: editor 35 | 36 | # Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. 37 | # startup_pane: 1 38 | 39 | # Controls whether the tmux session should be attached to automatically. Defaults to true. 40 | # attach: false 41 | 42 | # Runs after everything. Use it to attach to tmux with custom options etc. 43 | # post: tmux -CC attach -t <%= name %> 44 | 45 | windows: 46 | - editor: 47 | layout: main-vertical 48 | # Synchronize all panes of this window, can be enabled before or after the pane commands run. 49 | # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after' 50 | # synchronize: after 51 | panes: 52 | - vim 53 | - guard 54 | - server: bundle exec rails s 55 | - logs: tail -f log/development.log 56 | -------------------------------------------------------------------------------- /zsh/.config/zsh/zshenv: -------------------------------------------------------------------------------- 1 | # $ZDOTDIR/.zshenv - this file will always be sourced, unless: zsh -f or zsh --no-rcs 2 | 3 | # /etc/zsh/zshenv is ALWAYS sourced prior, and cannot be skipped with -f 4 | 5 | # This file is used for setting user's environment variables. 6 | # It should not contain commands that produce output or assume the shell is attached to a tty. 7 | 8 | # Sourced before the login shell files: 9 | # /etc/zsh/zprofile, /etc/profile and $ZDOTDIR/.zprofile (in that order) 10 | 11 | # If $ZDOTDIR is not set, $HOME is used instead. 12 | # Dotfiles has: .zshenv -> .config/zsh/zshenv 13 | export ZDOTDIR=$HOME/.config/zsh 14 | 15 | # Files sourced next: 16 | # /etc/zprofile, .zprofile, /etc/zshrc, .zshrc, /etc/zlogin, .zlogin, and .zlogout 17 | 18 | # If option GLOBAL_RCS is unset in any of the files, no global configuration files (/etc/zsh/*) will be read after that file. 19 | # If option RCS is unset in any of the files, no configuration files will be read after that file. 20 | 21 | # If LOGIN shell, the following are read after this file: 22 | # /etc/zprofile (Arch: /etc/zsh/zprofile) 23 | # - Only for login shells 24 | # - At 2025-09-17, contained only: emulate sh -c 'source /etc/profile' 25 | # 26 | # /etc/profile (sourced from above) 27 | # - Sources /etc/profile.d/*.sh 28 | # 29 | # $ZDOTDIR/.zprofile (also only if login shell) 30 | 31 | # If the shell is INTERACTIVE, then /etc/zsh/zshrc, and then $ZDOTDIR/.zshrc 32 | 33 | # LOGIN shell, login and logout: 34 | # Finally, if a LOGIN shell, /etc/zsh/zlogin and $ZDOTDIR/.zlogin are read. 35 | # When a login shell exits (except via `exec`), $ZDOTDIR/.zlogout then /etc/zlogout are read. 36 | 37 | # Note: ~/.profile is NOT sourced by default Zsh startup. 38 | 39 | ########################################################################## 40 | ########################################################################## 41 | 42 | # If $ZDOTDIR is not set, $HOME is used instead. 43 | # Dotfiles has: .zshenv -> .config/zsh/zshenv 44 | export ZDOTDIR=$HOME/.config/zsh 45 | 46 | # Source environment (eg $XDG_*) for all shells 47 | # source "$ZDOTDIR"/env 48 | 49 | 50 | # Which shells read ~/.profile and when? 51 | # https://www.perplexity.ai/search/csh-startup-files-cwpQKOKLR6eGwOZR5jrIKA 52 | -------------------------------------------------------------------------------- /misc/.config/paru/paru.conf: -------------------------------------------------------------------------------- 1 | # man paru.conf 2 | 3 | [options] 4 | 5 | BottomUp 6 | # Put best result next to the cursor, not possibly scrolled off the screen 7 | 8 | Devel 9 | # During sysupgrade also check AUR development packages for updates. Currently only Git packages are supported. 10 | 11 | CleanAfter 12 | # Remove untracked files after installation. 13 | 14 | Provides 15 | # Look for matching providers when searching for AUR packages. When 16 | # multiple providers are found a menu will appear prompting you to pick one. This 17 | # increases dependency resolve time although this should not be noticeable. 18 | 19 | BatchInstall 20 | # When building and installing AUR packages; instead of installing each package 21 | # after building, queue each package for install. Then once either all packages 22 | # are built or a package in the build queue is needed as a dependency to build 23 | # another package, install all the packages in the install queue. 24 | 25 | # RemoveMake = ask 26 | # Keep packages that are only required to build (not use) the software. 27 | 28 | # SkipReview 29 | # Show PKGBUILD diffs 30 | 31 | UpgradeMenu 32 | # Show a detailed list of updates in a similar format to pacman's 33 | # VerbosePkgLists option. (See pacman.conf(5)). Upgrades can be skipped using 34 | # numbers, number ranges, or repo names. 35 | 36 | NewsOnUpgrade 37 | # Print new news during sysupgrade. 38 | 39 | PgpFetch 40 | # Prompt to import unknown PGP keys from the validpgpkeys field of each PKGBUILD. 41 | 42 | 43 | # NoWarn = Packages... 44 | # Don't warn when these packages are not in the aur, out of date, or orphaned. 45 | # Maybe better to use pacman.conf for this 46 | 47 | # CombinedUpgrade 48 | # Disabled because of UpgradeMenu - don't want to ignore a repo package! 49 | # During sysupgrade, paru will first perform a refresh, then show its combined 50 | # menu of repo and AUR packages that will be upgraded. Then after reviewing the 51 | # PKGBUILDs, the repo and AUR upgrade will start with no need for manual intervention. 52 | 53 | # If paru exits for any reason after the refresh without upgrading, it will be 54 | # the user's responsibility to either resolve the reason paru exited or run a 55 | # sysupgrade through pacman directly. 56 | 57 | 58 | 59 | [bin] 60 | 61 | # FileManager = ranger 62 | # This enables fm review mode, where PKGBUILD review is done using the file manager specified by command. 63 | 64 | # Pager = Command 65 | # Command to use for paging 66 | -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail; shopt -s failglob # safe mode 4 | 5 | # XDG - set defaults as they may not be set (eg Ubuntu 14.04 LTS) 6 | # See https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html 7 | # and https://wiki.archlinux.org/index.php/XDG_Base_Directory_support 8 | export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:=$HOME/.config} 9 | export XDG_DATA_HOME=${XDG_DATA_HOME:=$HOME/.local/share} 10 | export XDG_CACHE_HOME=${XDG_CACHE_HOME:=$HOME/.cache} 11 | 12 | die() { 13 | echo "$*: $?" 14 | exit 1 15 | } 16 | 17 | function neobundle_update { 18 | local VIMRC=$XDG_CONFIG_HOME/vim/load-plugins.vim 19 | vim -N -u "$VIMRC" -c "try | NeoBundleUpdate! $* | finally | qall! | endtry" \ 20 | -U NONE -i NONE -e -s -V1 # -V1 prints X error messages 21 | } 22 | 23 | # Install stow (if not already installed) 24 | distro=$(lsb_release -si) 25 | case $distro in 26 | *Ubuntu*) 27 | dpkg -s stow &> /dev/null && sudo apt-get -y install stow ;; 28 | esac 29 | 30 | cd -P -- "$(dirname "$0")" 31 | 32 | echo "Updating submodules... (eg vim. Wait - no output)" 33 | git pull && git submodule update --init --recursive --recommend-shallow --depth 1 34 | # --shallow-submodules not supported by Ubuntu 35 | 36 | echo Submodule status: 37 | git submodule status --recursive 38 | 39 | # Stow packages 40 | stow -v stow # Setup stow itself 41 | # Install stow packages 42 | ./restow 43 | echo "Stow of packages complete" 44 | 45 | # Install fzf if not installed 46 | if [[ ! -d "$XDG_DATA_HOME/fzf" ]]; then 47 | git clone --single-branch --depth 1 'https://github.com/junegunn/fzf.git' "$XDG_DATA_HOME/fzf" 48 | { yes || true; } | "$XDG_DATA_HOME/fzf/install" --no-update-rc 49 | mv -i ~/.fzf.{bash,zsh} "$XDG_DATA_HOME/fzf/" 50 | else 51 | echo "fzf already installed in $XDG_DATA_HOME/fzf" 52 | fi 53 | 54 | # Install neobundle to bootstrap vim plugin installation 55 | # Dein is installed via load-plugins.vim 56 | neobundle_dir="$XDG_DATA_HOME/vim/bundle/neobundle.vim" 57 | if [[ ! -d $neobundle_dir ]]; then 58 | git clone --single-branch --depth 1 --shallow-submodules https://github.com/Shougo/neobundle.vim.git "$neobundle_dir" 59 | else 60 | echo "NeoBundle already installed in $neobundle_dir" 61 | fi 62 | 63 | # vim plugins 64 | echo "Installing vimproc for parallel vim plugin updates..." 65 | neobundle_update vimproc 66 | echo "Install/update all plugins..." 67 | neobundle_update 68 | 69 | echo 70 | echo "Run ~/bin/local-update for YouCompleteMe and more" 71 | echo 72 | -------------------------------------------------------------------------------- /misc/.config/zathura/zathurarc: -------------------------------------------------------------------------------- 1 | # https://wiki.archlinux.org/index.php/Zathura 2 | # 3 | # https://man.cx/zathurarc(5) 4 | 5 | set smooth-scroll true 6 | set scroll-step 100 7 | 8 | set adjust-open width 9 | set window-width 3000 10 | set window-height 3000 11 | 12 | set selection-clipboard clipboard 13 | set highlight-color "#fdf6e3" # green 14 | 15 | set window-title-page true 16 | set window-title-basename true 17 | 18 | set incremental-search true 19 | 20 | #Change column of first page 21 | set pages-per-row 1 22 | set first-page-column 1:1:1:1 23 | 24 | # 25 | # Mappings only below here 26 | # 27 | 28 | # Open file in Adobe Acrobat 29 | map feedkeys ":exec acroread $FILE" 30 | 31 | # j, k for scrolling down / up 32 | map [normal] j scroll down 33 | map [normal] k scroll up 34 | map [fullscreen] j scroll down 35 | map [fullscreen] k scroll up 36 | 37 | # J, K for a screen down/up 38 | map [normal] J scroll half-down 39 | map [normal] K scroll half-up 40 | map [fullscreen] J scroll half-down 41 | map [fullscreen] K scroll half-up 42 | 43 | # Space/shift-Space for full screen down / up 44 | map [normal] scroll full-down 45 | map [normal] scroll full-up 46 | map [fullscreen] scroll full-down 47 | map [fullscreen] scroll full-up 48 | 49 | # Paper page down / up 50 | map [normal] n navigate next 51 | map [normal] p navigate previous 52 | map [fullscreen] n navigate next 53 | map [fullscreen] p navigate previous 54 | 55 | map [normal] navigate next 56 | map [normal] navigate previous 57 | map [fullscreen] navigate next 58 | map [fullscreen] navigate previous 59 | 60 | # Zoom: Releasing shift to press '-' is weird. Hold and press _/+ 61 | map [normal] + zoom in 62 | map [normal] _ zoom out 63 | map [fullscreen] + zoom in 64 | map [fullscreen] _ zoom out 65 | 66 | # Toggle [i]ndex 67 | map [normal] i toggle_index 68 | map [fullscreen] i toggle_index 69 | 70 | # Toggle f[u]llscreen 71 | map [normal] u toggle_fullscreen 72 | map [fullscreen] u toggle_fullscreen 73 | 74 | # Multi-page mode 75 | map [normal] set "first-page-column 1:1" 76 | map [normal] set "first-page-column 1:2" 77 | map [fullscreen] set "first-page-column 1:1" 78 | map [fullscreen] set "first-page-column 1:2" 79 | 80 | # Why are these only defined for normal mode by default? 81 | map [fullscreen] a adjust_window best-fit 82 | map [fullscreen] s adjust_window width 83 | map [fullscreen] f follow 84 | map [fullscreen] d toggle_page_mode 2 85 | map [fullscreen] toggle_index 86 | map [fullscreen] scroll half-down 87 | map [fullscreen] scroll half-up 88 | map [fullscreen] jumplist backward 89 | map [fullscreen] jumplist forward 90 | map [index] q quit 91 | -------------------------------------------------------------------------------- /ranger/.config/ranger/commands.py: -------------------------------------------------------------------------------- 1 | # This is a sample commands.py. You can add your own commands here. 2 | # 3 | # Please refer to commands_full.py for all the default commands and a complete 4 | # documentation. Do NOT add them all here, or you may end up with defunct 5 | # commands when upgrading ranger. 6 | 7 | # A simple command for demonstration purposes follows. 8 | # ----------------------------------------------------------------------------- 9 | 10 | from __future__ import (absolute_import, division, print_function) 11 | 12 | # You can import any python module as needed. 13 | import os 14 | 15 | # You always need to import ranger.api.commands here to get the Command class: 16 | from ranger.api.commands import Command 17 | 18 | 19 | # Any class that is a subclass of "Command" will be integrated into ranger as a 20 | # command. Try typing ":my_edit" in ranger! 21 | class my_edit(Command): 22 | # The so-called doc-string of the class will be visible in the built-in 23 | # help that is accessible by typing "?c" inside ranger. 24 | """:my_edit 25 | 26 | A sample command for demonstration purposes that opens a file in an editor. 27 | """ 28 | 29 | # The execute method is called when you run this command in ranger. 30 | def execute(self): 31 | # self.arg(1) is the first (space-separated) argument to the function. 32 | # This way you can write ":my_edit somefilename". 33 | if self.arg(1): 34 | # self.rest(1) contains self.arg(1) and everything that follows 35 | target_filename = self.rest(1) 36 | else: 37 | # self.fm is a ranger.core.filemanager.FileManager object and gives 38 | # you access to internals of ranger. 39 | # self.fm.thisfile is a ranger.container.file.File object and is a 40 | # reference to the currently selected file. 41 | target_filename = self.fm.thisfile.path 42 | 43 | # This is a generic function to print text in ranger. 44 | self.fm.notify("Let's edit the file " + target_filename + "!") 45 | 46 | # Using bad=True in fm.notify allows you to print error messages: 47 | if not os.path.exists(target_filename): 48 | self.fm.notify("The given file does not exist!", bad=True) 49 | return 50 | 51 | # This executes a function from ranger.core.acitons, a module with a 52 | # variety of subroutines that can help you construct commands. 53 | # Check out the source, or run "pydoc ranger.core.actions" for a list. 54 | self.fm.edit_file(target_filename) 55 | 56 | # The tab method is called when you press tab, and should return a list of 57 | # suggestions that the user will tab through. 58 | # tabnum is 1 for and -1 for by default 59 | def tab(self, tabnum): 60 | # This is a generic tab-completion function that iterates through the 61 | # content of the current directory. 62 | return self._tab_directory_content() 63 | -------------------------------------------------------------------------------- /zsh/.config/zsh/keyboard: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Bind single keys from their terminfo definitions 4 | # From: https://gist.github.com/AbigailBuccaneer/1fcf12edf13e03e45030 5 | # and: https://github.com/mattjj/my-oh-my-zsh/blob/master/keyboard.zsh 6 | 7 | # Create a zkbd compatible hash; 8 | # to add other keys to this hash, see: man 5 terminfo 9 | typeset -g -A key 10 | # shellcheck disable=2190,1087 11 | key=( 12 | 'Control' '\C-' 13 | 'Ctl' '\C-' 14 | 'Escape' '\e' 15 | 'Esc' '\e' 16 | 'Meta' '\M-' 17 | 'F1' "$terminfo[kf1]" 18 | 'F2' "$terminfo[kf2]" 19 | 'F3' "$terminfo[kf3]" 20 | 'F4' "$terminfo[kf4]" 21 | 'F5' "$terminfo[kf5]" 22 | 'F6' "$terminfo[kf6]" 23 | 'F7' "$terminfo[kf7]" 24 | 'F8' "$terminfo[kf8]" 25 | 'F9' "$terminfo[kf9]" 26 | 'F10' "$terminfo[kf10]" 27 | 'F11' "$terminfo[kf11]" 28 | 'F12' "$terminfo[kf12]" 29 | 'Backspace' "$terminfo[kbs]" 30 | 'Insert' "$terminfo[kich1]" 31 | 'Home' "$terminfo[khome]" 32 | 'PageUp' "$terminfo[kpp]" 33 | 'Delete' "$terminfo[kdch1]" 34 | 'End' "$terminfo[kend]" 35 | 'PageDown' "$terminfo[knp]" 36 | 'Up' "$terminfo[kcuu1]" 37 | 'Left' "$terminfo[kcub1]" 38 | 'Down' "$terminfo[kcud1]" 39 | 'Right' "$terminfo[kcuf1]" 40 | 'BackTab' "$terminfo[kcbt]" 41 | ) 42 | 43 | # Cycle through history based on characters already typed on the line 44 | # https://unix.stackexchange.com/a/285151/143394 45 | autoload -U up-line-or-beginning-search 46 | autoload -U down-line-or-beginning-search 47 | zle -N up-line-or-beginning-search 48 | zle -N down-line-or-beginning-search 49 | 50 | # Setup key accordingly 51 | [[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line 52 | [[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line 53 | [[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode 54 | [[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char 55 | [[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-beginning-search 56 | [[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-beginning-search 57 | [[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char 58 | [[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char 59 | 60 | 61 | ### 62 | ### Keep at end of file due to `return` if no terminfo entry for smkx or rmkx 63 | ### 64 | 65 | # Make sure the terminal is in application mode, when zle is active. Only then 66 | # are the values from $terminfo valid. 67 | 68 | # https://stackoverflow.com/a/29408977/5353461 69 | # http://invisible-island.net/xterm/xterm.faq.html#xterm_arrows 70 | # https://github.com/fish-shell/fish-shell/issues/2139#issuecomment-117548585 71 | 72 | # Linux consoles don't have capability 'smkx' 73 | # shellcheck disable=2154 74 | if [[ ! ${terminfo[smkx]} || ! ${terminfo[rmkx]} ]]; then 75 | return #### <--- Remainder of file may not be executed 76 | fi 77 | 78 | # If we get to here, we have terminfo entries... 79 | 80 | # keypad_xmit / application / transmit mode 81 | function zle-keypad-xmit () { echoti smkx; } 82 | # keypad_local / normal / raw / non-transmit mode 83 | function zle-keypad-local () { echoti rmkx; } 84 | 85 | hooks-add-hook zle_line_init_hook zle-keypad-xmit 86 | hooks-add-hook zle_line_finish_hook zle-keypad-local 87 | -------------------------------------------------------------------------------- /misc/.config/lsd/config.yaml: -------------------------------------------------------------------------------- 1 | # == Classic == 2 | # This is a shorthand to override some of the options to be backwards compatible 3 | # with `ls`. It affects the "color"->"when", "sorting"->"dir-grouping", "date" 4 | # and "icons"->"when" options. 5 | # Possible values: false, true 6 | classic: false 7 | 8 | # == Blocks == 9 | # This specifies the columns and their order when using the long and the tree 10 | # layout. 11 | # Possible values: permission, user, group, size, size_value, date, name, inode 12 | blocks: 13 | - permission 14 | - user 15 | - group 16 | - size 17 | - date 18 | - name 19 | 20 | # == Color == 21 | # This has various color options. (Will be expanded in the future.) 22 | color: 23 | # When to colorize the output. 24 | # When "classic" is set, this is set to "never". 25 | # Possible values: never, auto, always 26 | when: auto 27 | 28 | # == Date == 29 | # This specifies the date format for the date column. The freeform format 30 | # accepts an strftime like string. 31 | # When "classic" is set, this is set to "date". 32 | # Possible values: date, relative, + 33 | date: date 34 | 35 | # == Dereference == 36 | # Whether to dereference symbolic links. 37 | # Possible values: false, true 38 | dereference: false 39 | 40 | # == Display == 41 | # What items to display. Do not specify this for the default behavior. 42 | # Possible values: all, almost-all, directory-only 43 | # display: all 44 | 45 | # == Icons == 46 | icons: 47 | # When to use icons. 48 | # When "classic" is set, this is set to "never". 49 | # Possible values: always, auto, never 50 | when: auto 51 | # Which icon theme to use. 52 | # Possible values: fancy, unicode 53 | theme: fancy 54 | 55 | # == Ignore Globs == 56 | # A list of globs to ignore when listing. 57 | # ignore-globs: 58 | # - .git 59 | 60 | # == Indicators == 61 | # Whether to add indicator characters to certain listed files. 62 | # Possible values: false, true 63 | indicators: false 64 | 65 | # == Layout == 66 | # Which layout to use. "oneline" might be a bit confusing here and should be 67 | # called "one-per-line". It might be changed in the future. 68 | # Possible values: grid, tree, oneline 69 | layout: grid 70 | 71 | # == Recursion == 72 | recursion: 73 | # Whether to enable recursion. 74 | # Possible values: false, true 75 | enabled: false 76 | # How deep the recursion should go. This has to be a positive integer. Leave 77 | # it unspecified for (virtually) infinite. 78 | # depth: 3 79 | 80 | # == Size == 81 | # Specifies the format of the size column. 82 | # Possible values: default, short, bytes 83 | size: default 84 | 85 | # == Sorting == 86 | sorting: 87 | # Specify what to sort by. 88 | # Possible values: extension, name, time, size, version 89 | column: name 90 | # Whether to reverse the sorting. 91 | # Possible values: false, true 92 | reverse: false 93 | # Whether to group directories together and where. 94 | # When "classic" is set, this is set to "none". 95 | # Possible values: first, last, none 96 | dir-grouping: none 97 | 98 | # == No Symlink == 99 | # Whether to omit showing symlink targets 100 | # Possible values: false, true 101 | no-symlink: false 102 | 103 | # == Total size == 104 | # Whether to display the total size of directories. 105 | # Possible values: false, true 106 | total-size: false 107 | -------------------------------------------------------------------------------- /misc/.config/mouseless/config.yaml: -------------------------------------------------------------------------------- 1 | # https://github.com/jbensmann/mouseless#configuration 2 | # https://github.com/jbensmann/mouseless/blob/main/example_configs/config_full.yaml 3 | 4 | # Reload config: +z 5 | # Debug: sc_u p mouseless; mouseless -d 6 | 7 | 8 | ################### 9 | # Mouse 10 | ################### 11 | baseScrollSpeed: 20 12 | 13 | mouseLoopInterval: 5 # Rate at which the mouse pointer moves (in ms) 14 | startMouseSpeed: 2 # Initial mouse speed 15 | baseMouseSpeed: 800 # When fully accelerated 16 | # mouseLoopInterval: 20 # Default speed for mouse movement and scrolling baseScrollSpeed: 20.0 baseMouseSpeed: 1700 17 | mouseAccelerationTime: 400 # Milliseconds to accelerate to baseMouseSpeed, 0 == immediate 18 | mouseAccelerationCurve: 1 # Shape of the acceleration curve, 1.0 is linear, higher values have more time at low speeds 19 | # Decelerate hard and fast 20 | mouseDecelerationTime: 500 21 | # mouseDecelerationTime: 0 22 | mouseDecelerationCurve: 10 # Very rapid deceleration 23 | 24 | 25 | ################### 26 | # Keyboard 27 | ################### 28 | comboTime: 25 # ms to wait between 1st and 2nd keys of combos 29 | quickTapTime: 300 # Auto-repeat tap key when pressed twice within this duration 30 | fdfsa: 200 31 | 32 | ################### 33 | # Layers 34 | ################### 35 | 36 | # Remainder of config defines layers with their bindings 37 | layers: 38 | # The first layer is active at start 39 | - name: initial 40 | passThrough: true 41 | bindings: 42 | 43 | tab: tap-hold tab ; toggle-layer mouse ; 200 # when tab is held and another key pressed, activate mouse layer 44 | 45 | # https://github.com/jbensmann/mouseless/issues/90 46 | # d+f: layer mouse 47 | 48 | # Combo: both f and d pressed simultaneously 49 | f+d: layer mouse 50 | 51 | # when a is held: activate mouse layer 52 | a: tap-hold a ; toggle-layer mouse ; 200 # last parameter is ms to hold before activate 2nd argument 53 | # esc: tap-hold capslock 54 | # 55 | 56 | space: tap-hold space ; toggle-layer cursor ; 200 57 | 58 | # Work around Alt-Tab being "eaten" by initial tab binding 59 | leftalt: tap-hold leftalt ; leftalt; 200 60 | 61 | # Cursor movement 62 | - name: cursor 63 | passThrough: true 64 | bindings: 65 | k: up 66 | h: left 67 | j: down 68 | l: right 69 | i: home 70 | o: end 71 | 72 | f: leftshift 73 | d: leftctrl 74 | s: leftalt 75 | a: left 76 | 77 | 78 | v: leftctrl+v # paste 79 | c: leftctrl+c # copy 80 | x: leftctrl+x # cut 81 | q: leftalt+f4 # close window 82 | 83 | z: reload-config 84 | 85 | # Mouse movement 86 | - name: mouse 87 | # when true, keys that are not mapped keep their original meaning 88 | # passThrough: true 89 | bindings: 90 | space: layer mouse # Keep the mouse layer active 91 | q: layer initial # Quit mouse layer 92 | 93 | # Movement 94 | l: move 1 0 95 | j: move -1 0 96 | k: move 0 1 97 | i: move 0 -1 98 | p: scroll up 99 | # Buttons 100 | n: scroll down 101 | f: button left 102 | d: button middle 103 | s: button right 104 | 105 | # Speed modifiers 106 | leftalt: speed 4 107 | space: speed 2 108 | w: speed 2.5 # Pressing a, w and j or l together don't work well on Logitech K380 keyboard 109 | r: speed 2.5 110 | v: speed 2.5 111 | e: speed 0.3 112 | 113 | z: reload-config 114 | -------------------------------------------------------------------------------- /bash/.extend.bashrc: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.extend.bashrc 3 | # 4 | 5 | # Change the window title of X terminals 6 | case ${TERM} in 7 | xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*) 8 | PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"' 9 | ;; 10 | screen*) 11 | PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"' 12 | ;; 13 | esac 14 | 15 | use_color=true 16 | 17 | # Set colorful PS1 only on colorful terminals. 18 | # dircolors --print-database uses its own built-in database 19 | # instead of using /etc/DIR_COLORS. Try to use the external file 20 | # first to take advantage of user additions. Use internal bash 21 | # globbing instead of external grep binary. 22 | safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM 23 | match_lhs="" 24 | [[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" 25 | [[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(/dev/null \ 28 | && match_lhs=$(dircolors --print-database) 29 | [[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true 30 | 31 | if ${use_color} ; then 32 | # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 33 | if type -P dircolors >/dev/null ; then 34 | if [[ -f ~/.dir_colors ]] ; then 35 | eval $(dircolors -b ~/.dir_colors) 36 | elif [[ -f /etc/DIR_COLORS ]] ; then 37 | eval $(dircolors -b /etc/DIR_COLORS) 38 | fi 39 | fi 40 | 41 | if [[ ${EUID} == 0 ]] ; then 42 | PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] ' 43 | else 44 | PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] ' 45 | fi 46 | 47 | alias ls='ls --color=auto' 48 | alias grep='grep --colour=auto' 49 | alias egrep='egrep --colour=auto' 50 | alias fgrep='fgrep --colour=auto' 51 | else 52 | if [[ ${EUID} == 0 ]] ; then 53 | # show root@ when we don't have colors 54 | PS1='\u@\h \W \$ ' 55 | else 56 | PS1='\u@\h \w \$ ' 57 | fi 58 | fi 59 | 60 | unset use_color safe_term match_lhs sh 61 | 62 | alias cp="cp -i" # confirm before overwriting something 63 | alias df='df -h' # human-readable sizes 64 | alias free='free -m' # show sizes in MB 65 | alias np='nano -w PKGBUILD' 66 | alias more=less 67 | 68 | xhost +local:root > /dev/null 2>&1 69 | 70 | complete -cf sudo 71 | 72 | # Bash won't get SIGWINCH if another process is in the foreground. 73 | # Enable checkwinsize so that bash will check the terminal size when 74 | # it regains control. #65623 75 | # http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11) 76 | shopt -s checkwinsize 77 | 78 | shopt -s expand_aliases 79 | 80 | 81 | # export QT_SELECT=4 82 | 83 | # Enable history appending instead of overwriting. #139609 84 | shopt -s histappend 85 | 86 | # 87 | # # ex - archive extractor 88 | # # usage: ex 89 | ex () 90 | { 91 | if [ -f $1 ] ; then 92 | case $1 in 93 | *.tar.bz2) tar xjf $1 ;; 94 | *.tar.gz) tar xzf $1 ;; 95 | *.bz2) bunzip2 $1 ;; 96 | *.rar) unrar x $1 ;; 97 | *.gz) gunzip $1 ;; 98 | *.tar) tar xf $1 ;; 99 | *.tbz2) tar xjf $1 ;; 100 | *.tgz) tar xzf $1 ;; 101 | *.zip) unzip $1 ;; 102 | *.Z) uncompress $1;; 103 | *.7z) 7z x $1 ;; 104 | *) echo "'$1' cannot be extracted via ex()" ;; 105 | esac 106 | else 107 | echo "'$1' is not a valid file" 108 | fi 109 | } 110 | 111 | # better yaourt colors 112 | export YAOURT_COLORS="nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35" 113 | -------------------------------------------------------------------------------- /xfce4/.config/xfce4/terminal/accels.scm: -------------------------------------------------------------------------------- 1 | ; xfce4-terminal GtkAccelMap rc-file -*- scheme -*- 2 | ; this file is an automated accelerator map dump 3 | ; 4 | (gtk_accel_path "/terminal-window/goto-tab-2" "2") 5 | (gtk_accel_path "/terminal-window/goto-tab-6" "6") 6 | ; (gtk_accel_path "/terminal-window/copy-input" "") 7 | ; (gtk_accel_path "/terminal-window/close-other-tabs" "") 8 | ; (gtk_accel_path "/terminal-window/move-tab-right" "Page_Down") 9 | (gtk_accel_path "/terminal-window/goto-tab-7" "7") 10 | ; (gtk_accel_path "/terminal-window/set-title-color" "") 11 | ; (gtk_accel_path "/terminal-window/edit-menu" "") 12 | ; (gtk_accel_path "/terminal-window/zoom-menu" "") 13 | (gtk_accel_path "/terminal-window/goto-tab-1" "1") 14 | ; (gtk_accel_path "/terminal-window/fullscreen" "F11") 15 | ; (gtk_accel_path "/terminal-window/read-only" "") 16 | ; (gtk_accel_path "/terminal-window/preferences" "") 17 | ; (gtk_accel_path "/terminal-window/reset-and-clear" "") 18 | ; (gtk_accel_path "/terminal-window/about" "") 19 | (gtk_accel_path "/terminal-window/goto-tab-5" "5") 20 | ; (gtk_accel_path "/terminal-window/close-window" "q") 21 | ; (gtk_accel_path "/terminal-window/reset" "") 22 | ; (gtk_accel_path "/terminal-window/save-contents" "") 23 | ; (gtk_accel_path "/terminal-window/toggle-menubar" "") 24 | ; (gtk_accel_path "/terminal-window/copy" "c") 25 | ; (gtk_accel_path "/terminal-window/copy-html" "") 26 | ; (gtk_accel_path "/terminal-window/last-active-tab" "") 27 | ; (gtk_accel_path "/terminal-window/show-borders" "") 28 | ; (gtk_accel_path "/terminal-window/view-menu" "") 29 | ; (gtk_accel_path "/terminal-window/detach-tab" "d") 30 | ; (gtk_accel_path "/terminal-window/scroll-on-output" "") 31 | ; (gtk_accel_path "/terminal-window/show-toolbar" "") 32 | ; (gtk_accel_path "/terminal-window/next-tab" "Page_Down") 33 | ; (gtk_accel_path "/terminal-window/tabs-menu" "") 34 | ; (gtk_accel_path "/terminal-window/search-next" "") 35 | ; (gtk_accel_path "/terminal-window/search-prev" "") 36 | ; (gtk_accel_path "/terminal-window/undo-close-tab" "") 37 | ; (gtk_accel_path "/terminal-window/set-title" "s") 38 | (gtk_accel_path "/terminal-window/contents" "") 39 | ; (gtk_accel_path "/terminal-window/zoom-reset" "0") 40 | ; (gtk_accel_path "/terminal-window/close-tab" "w") 41 | ; (gtk_accel_path "/terminal-window/new-tab" "t") 42 | ; (gtk_accel_path "/terminal-window/new-window" "n") 43 | ; (gtk_accel_path "/terminal-window/terminal-menu" "") 44 | ; (gtk_accel_path "/terminal-window/show-menubar" "") 45 | ; (gtk_accel_path "/terminal-window/select-all" "a") 46 | ; (gtk_accel_path "/terminal-window/paste" "v") 47 | (gtk_accel_path "/terminal-window/goto-tab-9" "9") 48 | ; (gtk_accel_path "/terminal-window/move-tab-left" "Page_Up") 49 | ; (gtk_accel_path "/terminal-window/search" "f") 50 | ; (gtk_accel_path "/terminal-window/file-menu" "") 51 | ; (gtk_accel_path "/terminal-window/prev-tab" "Page_Up") 52 | ; (gtk_accel_path "/terminal-window/paste-selection" "") 53 | ; (gtk_accel_path "/terminal-window/zoom-in" "plus") 54 | ; (gtk_accel_path "/terminal-window/zoom-out" "minus") 55 | (gtk_accel_path "/terminal-window/goto-tab-8" "8") 56 | ; (gtk_accel_path "/terminal-window/help-menu" "") 57 | (gtk_accel_path "/terminal-window/goto-tab-4" "4") 58 | (gtk_accel_path "/terminal-window/goto-tab-3" "3") 59 | -------------------------------------------------------------------------------- /vscode/.config/Code/User/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "sync.gist": "6f5e4af72ba18e77e05aeffb98b34e52", 3 | 4 | //Worbench 5 | "workbench.colorTheme": "Kanagawa Wave", 6 | "workbench.editorAssociations": { 7 | "*.ipynb": "jupyter.notebook.ipynb" 8 | }, 9 | 10 | "extensions.experimental.affinity": { 11 | "asvetliakov.vscode-neovim": 1 12 | }, 13 | 14 | // VSCode Neovim settings 15 | "vscode-neovim.mouseSelectionStartVisualMode": true, 16 | "vscode-neovim.neovimPath": "/usr/bin/nvim", 17 | "vscode-neovim.NVIM_APPNAME": "vim-vscode", 18 | 19 | "todo-tree.tree.showScanModeButton": false, 20 | "workbench.iconTheme": "material-icon-theme", 21 | 22 | // An array of language ids which should be validated by ESLint. If not installed ESLint will show an error. 23 | "eslint.validate": ["javascript", "typescript"], 24 | 25 | // Editor 26 | "editor.defaultFormatter": "esbenp.prettier-vscode", 27 | "editor.formatOnSaveMode": "modifications", 28 | "editor.formatOnType": true, 29 | 30 | "[json]": { 31 | "editor.defaultFormatter": "esbenp.prettier-vscode" 32 | }, 33 | "[javascript]": { 34 | "editor.defaultFormatter": "esbenp.prettier-vscode" 35 | }, 36 | "[typescript]": { 37 | "editor.defaultFormatter": "esbenp.prettier-vscode" 38 | }, 39 | "editor.codeActionsOnSave": { 40 | "source.fixAll.eslint": "never" 41 | }, 42 | "[jsonc]": { 43 | "editor.defaultFormatter": "esbenp.prettier-vscode" 44 | }, 45 | "eslint.codeAction.disableRuleComment": { 46 | "enable": false 47 | }, 48 | 49 | 50 | "jest.coverageFormatter": "GutterFormatter", 51 | "eslint.codeActionsOnSave.mode": "problems", 52 | "tslint.packageManager": "yarn", 53 | "npm.packageManager": "bun", 54 | "prettier.singleQuote": true, 55 | "prettier.eslintIntegration": false, 56 | "diffEditor.renderSideBySide": false, 57 | "diffEditor.codeLens": true, 58 | "window.zoomLevel": 0, 59 | "node_require.exclude": [ 60 | "*.ts", 61 | "node_modules", 62 | "typings", 63 | "dist", 64 | "bin", 65 | "build", 66 | "tmp" 67 | ], 68 | "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", 69 | 70 | "python.languageServer": "Pylance", 71 | "python.pythonPath": "/home/ravi/.local/share/miniconda3/envs/rl/bin/python", 72 | "python.analysis.typeCheckingMode": "basic", 73 | "python.analysis.completeFunctionParens": true, 74 | 75 | "jupyter.askForKernelRestart": false, 76 | 77 | // Editor 78 | "editor.suggestSelection": "first", 79 | "editor.tabCompletion": "on", 80 | "editor.find.autoFindInSelection": "multiline", 81 | "editor.quickSuggestions": null, 82 | 83 | "[elixir]": { 84 | "editor.quickSuggestions": { 85 | "comments": "on", 86 | "strings": "on", 87 | "other": "on" 88 | } 89 | }, 90 | "elixirLS.enableTestLenses": true, 91 | "elixirLS.mixEnv": "dev", 92 | 93 | // Git / Gitlens 94 | "git.mergeEditor": true, 95 | 96 | "gitlens.ai.model": "vscode", 97 | "gitlens.ai.vscode.model": "copilot:gpt-4.1", 98 | 99 | 100 | // Copilot 101 | "github.copilot.selectedCompletionModel": "", 102 | 103 | //////////////////////////////////////////////////////// 104 | // Disabled extensions ONLY below 105 | //////////////////////////////////////////////////////// 106 | // Vim extension (disabled at 2025-10-06) 107 | "vim.autoindent": false, 108 | "vim.leader": "", 109 | "vim.handleKeys": { 110 | "": false, 111 | "": false 112 | }, 113 | "vim.easymotion": true, 114 | "vim.incsearch": true, 115 | "vim.useSystemClipboard": true, 116 | "vim.useCtrlKeys": true, 117 | "vim.hlsearch": true, 118 | "vim.insertModeKeyBindings": [ 119 | { 120 | "before": ["k", "j"], 121 | "after": [""] 122 | }, 123 | { 124 | "before": ["j", "k"], 125 | "after": [""] 126 | } 127 | ], 128 | "vim.normalModeKeyBindingsNonRecursive": [ 129 | { 130 | "before": ["", "d"], 131 | "after": ["d", "d"] 132 | }, 133 | { 134 | "before": [""], 135 | "commands": [":nohl"] 136 | } 137 | ], 138 | } -------------------------------------------------------------------------------- /misc/.config/mc/ini: -------------------------------------------------------------------------------- 1 | [Midnight-Commander] 2 | verbose=true 3 | pause_after_run=1 4 | shell_patterns=true 5 | auto_save_setup=true 6 | preallocate_space=false 7 | auto_menu=false 8 | use_internal_view=true 9 | use_internal_edit=false 10 | clear_before_exec=true 11 | confirm_delete=true 12 | confirm_overwrite=true 13 | confirm_execute=false 14 | confirm_history_cleanup=true 15 | confirm_exit=true 16 | confirm_directory_hotlist_delete=true 17 | safe_delete=false 18 | mouse_repeat_rate=100 19 | double_click_speed=250 20 | use_8th_bit_as_meta=false 21 | confirm_view_dir=false 22 | mouse_move_pages_viewer=true 23 | mouse_close_dialog=false 24 | fast_refresh=false 25 | drop_menus=false 26 | wrap_mode=true 27 | old_esc_mode=false 28 | old_esc_mode_timeout=1000000 29 | cd_symlinks=true 30 | show_all_if_ambiguous=false 31 | max_dirt_limit=10 32 | use_file_to_guess_type=true 33 | alternate_plus_minus=false 34 | only_leading_plus_minus=true 35 | show_output_starts_shell=false 36 | xtree_mode=false 37 | num_history_items_recorded=60 38 | file_op_compute_totals=true 39 | classic_progressbar=true 40 | vfs_timeout=60 41 | ftpfs_directory_timeout=900 42 | use_netrc=true 43 | ftpfs_retry_seconds=30 44 | ftpfs_always_use_proxy=false 45 | ftpfs_use_passive_connections=true 46 | ftpfs_use_passive_connections_over_proxy=false 47 | ftpfs_use_unix_list_options=true 48 | ftpfs_first_cd_then_ls=true 49 | fish_directory_timeout=900 50 | editor_tab_spacing=8 51 | editor_word_wrap_line_length=72 52 | editor_fill_tabs_with_spaces=false 53 | editor_return_does_auto_indent=false 54 | editor_backspace_through_tabs=false 55 | editor_fake_half_tabs=true 56 | editor_option_save_mode=0 57 | editor_option_save_position=true 58 | editor_option_auto_para_formatting=false 59 | editor_option_typewriter_wrap=false 60 | editor_edit_confirm_save=true 61 | editor_syntax_highlighting=true 62 | editor_persistent_selections=true 63 | editor_cursor_beyond_eol=false 64 | editor_cursor_after_inserted_block=false 65 | editor_visible_tabs=true 66 | editor_visible_spaces=true 67 | editor_line_state=false 68 | editor_simple_statusbar=false 69 | editor_check_new_line=false 70 | editor_show_right_margin=false 71 | editor_group_undo=true 72 | editor_ask_filename_before_edit=false 73 | nice_rotating_dash=true 74 | mcview_remember_file_position=false 75 | auto_fill_mkdir_name=true 76 | copymove_persistent_attr=true 77 | select_flags=6 78 | editor_backup_extension=~ 79 | editor_filesize_threshold=64M 80 | mcview_eof= 81 | ignore_ftp_chattr_errors=true 82 | skin=yadt256-defbg 83 | safe_overwrite=false 84 | editor_drop_selection_on_copy=true 85 | editor_state_full_filename=false 86 | shadows=true 87 | shell_directory_timeout=900 88 | editor_stop_format_chars=-+*\\,.;:&> 89 | 90 | [Layout] 91 | message_visible=true 92 | keybar_visible=true 93 | xterm_title=true 94 | output_lines=0 95 | command_prompt=true 96 | menubar_visible=true 97 | free_space=true 98 | horizontal_split=false 99 | vertical_equal=true 100 | left_panel_size=70 101 | horizontal_equal=true 102 | top_panel_size=17 103 | 104 | [Misc] 105 | timeformat_recent=%b %e %H:%M 106 | timeformat_old=%b %e %Y 107 | ftp_proxy_host=gate 108 | ftpfs_password=anonymous@ 109 | display_codepage=UTF-8 110 | source_codepage=Other_8_bit 111 | autodetect_codeset= 112 | spell_language=en 113 | clipboard_store= 114 | clipboard_paste= 115 | 116 | [Colors] 117 | base_color= 118 | screen-256color= 119 | color_terminals= 120 | tmux-256color= 121 | 122 | [Panels] 123 | show_mini_info=true 124 | kilobyte_si=false 125 | mix_all_files=false 126 | show_backups=true 127 | show_dot_files=true 128 | fast_reload=false 129 | fast_reload_msg_shown=false 130 | mark_moves_down=true 131 | reverse_files_only=true 132 | auto_save_setup_panels=false 133 | navigate_with_arrows=false 134 | panel_scroll_pages=true 135 | mouse_move_pages=true 136 | filetype_mode=true 137 | permission_mode=true 138 | torben_fj_mode=false 139 | quick_search_mode=2 140 | panel_scroll_center=false 141 | select_flags=6 142 | simple_swap=false 143 | 144 | [Panelize] 145 | Modified git files=git ls-files --modified 146 | Find *.orig after patching=find . -name \\*.orig -print 147 | Find rejects after patching=find . -name \\*.rej -print 148 | Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm /011 \\) -o \\( -perm -02000 -a -perm /01 \\) \\) -print 149 | -------------------------------------------------------------------------------- /sshrc/.config/sshrc/rc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Bootstrap login environment 4 | # Clone dotfiles repos, and stow as needed 5 | 6 | set -euo pipefail 7 | shopt -s failglob 8 | 9 | function mkdir_if_not_exist { 10 | if [[ ! -d "${*:$#}" ]]; then 11 | mkdir "$@" 12 | fi 13 | } 14 | 15 | function clone_if_not_dir { 16 | local dir known_hosts_quoted 17 | known_hosts_quoted=$(printf "%q/known_hosts" "$files_dir") 18 | dir=${*:$#} 19 | echo pull into: "$dir" 20 | if [[ ! -d "$dir" ]]; then 21 | # printf "%q " GIT_SSH_COMMAND="ssh -i $ssh_pull_key" git clone "$@" 22 | GIT_SSH_COMMAND="ssh -Ci $ssh_pull_key -o UserKnownHostsFile=$known_hosts_quoted" git clone -v "$@" 23 | elif [[ ! -d "$dir/.git" ]]; then 24 | printf "Warning: %s is a directory but %s/.git doesn't exist\n" "$dir" "$dir" >&2 25 | return 1 26 | fi 27 | } 28 | 29 | function symlink_if_not_exist { 30 | local target=${*:$#} 31 | if [[ -e $target && ! -h $target ]]; then 32 | printf "Warning: %s exists but is not a symbolic link\n" "$target" >&2 33 | return 1 34 | fi 35 | if [[ ! -h $target ]]; then 36 | echo ln -sL "$@" 37 | ln -sL "$@" 38 | else 39 | echo not linking $target 40 | fi 41 | } 42 | 43 | function confirm_yes { 44 | local reply 45 | while IFS= read -rn1 -p "$* [Y/n]? " reply; do 46 | [ ! "$reply" = '' ] && printf '\n' 47 | case "$reply" in 48 | # See https://unix.stackexchange.com/q/383197/143394 regarding '\n' -> '' 49 | [Yy\ ]|'' ) return 0;; 50 | N|n ) return 1;; 51 | esac 52 | done 53 | } 54 | 55 | function setup_ssh_pull_key { 56 | # Store ssh key for repo pulling 57 | mkdir_if_not_exist -m 0700 "$HOME/.ssh" 58 | cp "$files_dir/id_ed25519_dotfiles_pull" "$HOME/.ssh" 59 | ssh_pull_key=$HOME/.ssh/id_ed25519_dotfiles_pull 60 | } 61 | 62 | function clone_repos { 63 | mkdir_if_not_exist "$code_dir" 64 | ( 65 | cd "$code_dir" 66 | clone_if_not_dir --depth 3 git@bitbucket.org:HaleTom/scripts.git bin 67 | clone_if_not_dir --depth 3 git@bitbucket.org:HaleTom/ravi-personal.git ravi-personal 68 | clone_if_not_dir --depth 3 --recursive -j8 git@github.com:HaleTom/dotfiles.git dotfiles 69 | ) 70 | } 71 | 72 | function link_repos { 73 | echo symlink_if_not_exist "$code_dir/dotfiles" "$HOME/.dotfiles" 74 | symlink_if_not_exist "$code_dir/dotfiles" "$HOME/.dotfiles" 75 | echo "$code_dir/ravi-personal" "$HOME/.dotfiles/PERSONAL" 76 | rm -v "$HOME/.dotfiles/PERSONAL" 77 | symlink_if_not_exist "$code_dir/ravi-personal" "$HOME/.dotfiles/PERSONAL" 78 | symlink_if_not_exist "$code_dir/bin" "$HOME/bin" 79 | } 80 | 81 | function has_stow { 82 | command -v stow >& /dev/null 83 | } 84 | 85 | function maybe_install_stow { 86 | if ! has_stow; then 87 | if confirm_yes "stow is not installed. Install"; then 88 | install_cmds stow 89 | fi 90 | fi 91 | } 92 | 93 | function install_cmds { 94 | if ! groups | grep -Eq '[^[:alpha:]]wheel[^[:alpha:]]'; then 95 | echo "Not in wheel group, can't install anything :(" >&2 96 | return 1 97 | fi 98 | os_type=$(lsb_release -is) 99 | case "$os_type" in 100 | Manjaro*|Arch*) 101 | sudo pacman -Sy --noconfirm "$@" ;; 102 | *) 103 | printf "Don't know how to install packages on %s\n" "$os_type" >&2 ;; 104 | esac 105 | } 106 | 107 | function stow_files { 108 | # "$HOME/.dotfiles/PERSONAL/install" # Stow into ~/.dotfiles 109 | "$HOME/code/ravi-personal/install" # Stow into ~/.dotfiles 110 | "$HOME/.dotfiles/restow" # Stow into $HOME 111 | } 112 | 113 | function maybe_exec_zsh { 114 | # Change shell to zsh if possible 115 | zsh=$(chsh -l | grep zsh | head -n 1) 116 | if command -v "$zsh" >& /dev/null; then 117 | passwd_shell=$(awk -F: -v u="$USER" '$1 == u {sub(/\/(.*\/)+/, "", $NF); print $NF}' /etc/passwd) 118 | [[ $passwd_shell != zsh ]] && echo "Login shell not zsh. Suggested: chsh -s $zsh" 119 | echo "Exec login zsh." 120 | exec "$zsh" -l 121 | else 122 | exec "$SHELL" -l 123 | fi 124 | } 125 | 126 | function symlink_files { 127 | local config_dir=$HOME/.config 128 | mkdir_if_not_exist "$config_dir" 129 | ln -s ../.dotfiles/zsh/.config/zsh/ "$config_dir/zsh" 130 | ls -l "$config_dir/zsh/" 131 | ln -s ../.dotfiles/bash/.config/bash/ "$config_dir/bash" 132 | ls -l "$config_dir/bash/" 133 | ln -s ../.dotfiles/tmux/.config/tmux/ "$config_dir/tmux" 134 | ls -l "$config_dir/tmux/" 135 | ln -s ../.dotfiles/vim/.config/vim/ "$config_dir/vim" 136 | ls -l "$config_dir/vim/" 137 | } 138 | 139 | function stow_or_symlink { 140 | maybe_install_stow 141 | if has_stow; then 142 | stow_files 143 | else 144 | symlink_files 145 | fi 146 | } 147 | 148 | function main { 149 | files_dir=$SSHHOME/sshrc.d 150 | code_dir=$HOME/code 151 | echo in main 152 | setup_ssh_pull_key 153 | clone_repos 154 | link_repos 155 | stow_or_symlink 156 | maybe_exec_zsh 157 | exit 0 158 | } 159 | 160 | main "$@" 161 | 162 | -------------------------------------------------------------------------------- /misc/.config/pipewire/media-session.d/bluez-monitor.conf: -------------------------------------------------------------------------------- 1 | # HFP vs HSP: https://stackoverflow.com/a/32048080/5353461 2 | # HFP is a superset of HSP, and v1.6 has optional support for mSBC: 3 | # https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles 4 | 5 | # Bluez monitor config file for PipeWire version 0.4.1 # 6 | # 7 | # Copy and edit this file in /etc/pipewire/media-session.d/ 8 | # for system-wide changes or in 9 | # ~/.config/pipewire/media-session.d/ for local changes. 10 | 11 | properties = { 12 | # These features do not work on all headsets, so they are enabled 13 | # by default based on the hardware database. They can also be 14 | # forced on/off for all devices by the following options: 15 | 16 | #bluez5.enable-sbc-xq = true 17 | #bluez5.enable-msbc = true 18 | #bluez5.enable-hw-volume = true 19 | #bluez5.enable-faststream = true 20 | 21 | # See bluez-hardware.conf for the hardware database. 22 | 23 | # Enabled headset roles (default: [ hsp_hs hfp_ag ]), this 24 | # property only applies to native backend. Currently some headsets 25 | # (Sony WH-1000XM3) are not working with both hsp_ag and hfp_ag 26 | # enabled, disable either hsp_ag or hfp_ag to work around it. 27 | # 28 | # Supported headset roles: hsp_hs (HSP Headset), 29 | # hsp_ag (HSP Audio Gateway), 30 | # hfp_hf (HFP Hands-Free), 31 | # hfp_ag (HFP Audio Gateway) 32 | #bluez5.headset-roles = [ hsp_hs hsp_ag hfp_hf hfp_ag ] 33 | 34 | # Enabled A2DP codecs (default: all). 35 | #bluez5.codecs = [ sbc sbc_xq aac ldac aptx aptx_hd aptx_ll aptx_ll_duplex faststream faststream_duplex ] 36 | 37 | # HFP/HSP backend (default: native). 38 | # Available values: any, none, hsphfpd, ofono, native 39 | #bluez5.hfphsp-backend = native 40 | 41 | # Properties for the A2DP codec configuration 42 | #bluez5.default.rate = 48000 43 | #bluez5.default.channels = 2 44 | 45 | # Register dummy AVRCP player, required for AVRCP volume function. 46 | # Disable if you are running mpris-proxy or equivalent. 47 | #bluez5.dummy-avrcp-player = true 48 | } 49 | 50 | rules = [ 51 | # An array of matches/actions to evaluate. 52 | { 53 | # Rules for matching a device or node. It is an array of 54 | # properties that all need to match the regexp. If any of the 55 | # matches work, the actions are executed for the object. 56 | matches = [ 57 | { 58 | # This matches all cards. 59 | device.name = "~bluez_card.*" 60 | } 61 | ] 62 | actions = { 63 | # Actions can update properties on the matched object. 64 | update-props = { 65 | 66 | # Auto-connect device profiles on start up or when only partial 67 | # profiles have connected. Disabled by default if the property 68 | # is not specified. 69 | #bluez5.auto-connect = [ 70 | # hfp_hf 71 | # hsp_hs 72 | # a2dp_sink 73 | # hfp_ag 74 | # hsp_ag 75 | # a2dp_source 76 | #] 77 | bluez5.auto-connect = [ hfp_hf hsp_hs a2dp_sink ] 78 | 79 | # Hardware volume control (default: all) 80 | #bluez5.hw-volume = [ 81 | # hfp_hf 82 | # hsp_hs 83 | # a2dp_sink 84 | # hfp_ag 85 | # hsp_ag 86 | # a2dp_source 87 | #] 88 | 89 | # LDAC encoding quality 90 | # Available values: auto (Adaptive Bitrate, default) 91 | # hq (High Quality, 990/909kbps) 92 | # sq (Standard Quality, 660/606kbps) 93 | # mq (Mobile use Quality, 330/303kbps) 94 | #bluez5.a2dp.ldac.quality = auto 95 | 96 | # AAC variable bitrate mode 97 | # Available values: 0 (cbr, default), 1-5 (quality level) 98 | #bluez5.a2dp.aac.bitratemode = 0 99 | 100 | # Profile connected first 101 | # Available values: a2dp-sink (default), headset-head-unit 102 | #bluez5.profile = a2dp-sink 103 | 104 | # A2DP <-> HFP profile auto-switching (when device is default output) 105 | # Available values: false, role (default), true 106 | # 'role' will switch the profile if the recording application 107 | # specifies Communication (or "phone" in PA) as the stream role. 108 | #bluez5.autoswitch-profile = role 109 | } 110 | } 111 | } 112 | { 113 | matches = [ 114 | { 115 | # Matches all sources. 116 | node.name = "~bluez_input.*" 117 | } 118 | { 119 | # Matches all sinks. 120 | node.name = "~bluez_output.*" 121 | } 122 | ] 123 | actions = { 124 | update-props = { 125 | #node.nick = "My Node" 126 | #node.nick = null 127 | #priority.driver = 100 128 | #priority.session = 100 129 | node.pause-on-idle = false 130 | #resample.quality = 4 131 | #channelmix.normalize = false 132 | #channelmix.mix-lfe = false 133 | #session.suspend-timeout-seconds = 5 # 0 disables suspend 134 | #monitor.channel-volumes = false 135 | 136 | # A2DP source role, "input" or "playback" 137 | # Defaults to "playback", playing stream to speakers 138 | # Set to "input" to use as an input for apps 139 | #bluez5.a2dp-source-role = input 140 | } 141 | } 142 | } 143 | ] 144 | -------------------------------------------------------------------------------- /misc/.config/topgrade.d/topgrade.toml: -------------------------------------------------------------------------------- 1 | # https://github.com/topgrade-rs/topgrade/blob/main/config.example.toml 2 | 3 | # Include any additional configuration file(s) 4 | # [include] sections are processed in the order you write them 5 | # Files in $CONFIG_DIR/topgrade.d/ are automatically included before this file 6 | [include] 7 | # paths = ["/etc/topgrade.toml"] 8 | 9 | 10 | [misc] 11 | # Run `sudo -v` to cache credentials at the start of the run 12 | # This avoids a blocking password prompt in the middle of an unattended run 13 | # (default: false) 14 | # pre_sudo = false 15 | 16 | # Sudo command to be used 17 | # sudo_command = "sudo" 18 | 19 | # Disable specific steps - same options as the command line flag 20 | # disable = ["system", "emacs"] 21 | 22 | # Ignore failures for these steps 23 | # ignore_failures = ["powershell"] 24 | 25 | # List of remote machines with Topgrade installed on them 26 | # remote_topgrades = ["toothless", "pi", "parnas"] 27 | 28 | # Path to Topgrade executable on remote machines 29 | # remote_topgrade_path = ".cargo/bin/topgrade" 30 | 31 | # Arguments to pass to SSH when upgrading remote systems 32 | # ssh_arguments = "-o ConnectTimeout=2" 33 | 34 | # Arguments to pass tmux when pulling Repositories 35 | # tmux_arguments = "-S /var/tmux.sock" 36 | 37 | # Do not set the terminal title (default: true) 38 | # set_title = true 39 | 40 | # Display the time in step titles (default: true) 41 | # display_time = true 42 | 43 | # Don't ask for confirmations (no default value) 44 | # assume_yes = true 45 | 46 | # Do not ask to retry failed steps (default: false) 47 | # no_retry = true 48 | 49 | # Run inside tmux (default: false) 50 | # run_in_tmux = true 51 | 52 | # Cleanup temporary or old files (default: false) 53 | # cleanup = true 54 | 55 | # Send a notification for every step (default: false) 56 | # notify_each_step = false 57 | 58 | # Skip sending a notification at the end of a run (default: false) 59 | # skip_notify = true 60 | 61 | # The Bash-it branch to update (default: "stable") 62 | # bashit_branch = "stable" 63 | 64 | # Run specific steps - same options as the command line flag 65 | # only = ["system", "emacs"] 66 | 67 | # Whether to self update 68 | # 69 | # this will be ignored if the binary is built without self update support 70 | # 71 | # available also via setting the environment variable TOPGRADE_NO_SELF_UPGRADE) 72 | # no_self_update = true 73 | 74 | # Extra tracing filter directives 75 | # These are prepended to the `--log-filter` argument 76 | # See: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives 77 | # log_filters = ["topgrade::command=debug", "warn"] 78 | 79 | 80 | # Commands to run before anything 81 | [pre_commands] 82 | # "Emacs Snapshot" = "rm -rf ~/.emacs.d/elpa.bak && cp -rl ~/.emacs.d/elpa ~/.emacs.d/elpa.bak" 83 | 84 | 85 | # Commands to run after anything 86 | [post_commands] 87 | # "Emacs Snapshot" = "rm -rf ~/.emacs.d/elpa.bak && cp -rl ~/.emacs.d/elpa ~/.emacs.d/elpa.bak" 88 | 89 | 90 | # Custom commands 91 | [commands] 92 | # "Python Environment" = "~/dev/.env/bin/pip install -i https://pypi.python.org/simple -U --upgrade-strategy eager jupyter" 93 | # "Custom command using interactive shell (unix)" = "-i vim_upgrade" 94 | 95 | 96 | [python] 97 | # enable_pip_review = true ###disabled by default 98 | # enable_pip_review_local = true ###disabled by default 99 | # enable_pipupgrade = true ###disabled by default 100 | # pipupgrade_arguments = "-y -u --pip-path pip" ###disabled by default 101 | 102 | 103 | [composer] 104 | # self_update = true 105 | 106 | 107 | [brew] 108 | # greedy_cask = true 109 | # autoremove = true 110 | 111 | 112 | [linux] 113 | # Arch Package Manager to use. 114 | # Allowed values: 115 | # autodetect, aura, garuda_update, pacman, pamac, paru, pikaur, trizen, yay 116 | arch_package_manager = "paru" 117 | 118 | # Arguments to pass yay (or paru) when updating packages 119 | # yay_arguments = "--nodevel" 120 | 121 | # Arguments to pass dnf when updating packages 122 | # dnf_arguments = "--refresh" 123 | 124 | # aura_aur_arguments = "-kx" 125 | 126 | # aura_pacman_arguments = "" 127 | # garuda_update_arguments = "" 128 | 129 | # show_arch_news = true 130 | 131 | # trizen_arguments = "--devel" 132 | 133 | # pikaur_arguments = "" 134 | 135 | # pamac_arguments = "--no-devel" 136 | 137 | # enable_tlmgr = true 138 | 139 | # emerge_sync_flags = "-q" 140 | 141 | # emerge_update_flags = "-uDNa --with-bdeps=y world" 142 | 143 | # redhat_distro_sync = false 144 | 145 | # suse_dup = false 146 | 147 | # rpm_ostree = false 148 | 149 | # nix_arguments = "--flake" 150 | 151 | # nix_env_arguments = "--prebuilt-only" 152 | 153 | # Extra Home Manager arguments 154 | # home_manager_arguments = ["--flake", "file"] 155 | 156 | 157 | [git] 158 | # How many repos to pull at max in parallel 159 | # max_concurrency = 5 160 | 161 | # Additional git repositories to pull 162 | # repos = [ 163 | # "~/src/*/", 164 | # "~/.config/something" 165 | # ] 166 | 167 | # Don't pull the predefined git repos 168 | # pull_predefined = false 169 | 170 | # Arguments to pass Git when pulling Repositories 171 | # arguments = "--rebase --autostash" 172 | 173 | 174 | [windows] 175 | # Manually select Windows updates 176 | # accept_all_updates = false 177 | 178 | # open_remotes_in_new_terminal = true 179 | 180 | # wsl_update_pre_release = true 181 | 182 | # wsl_update_use_web_download = true 183 | 184 | # Causes Topgrade to rename itself during the run to allow package managers 185 | # to upgrade it. Use this only if you installed Topgrade by using a package 186 | # manager such as Scoop or Cargo 187 | # self_rename = true 188 | 189 | # Enable WinGet upgrade 190 | # enable_winget = true 191 | 192 | 193 | [npm] 194 | # Use sudo if the NPM directory isn't owned by the current user 195 | # use_sudo = true 196 | 197 | 198 | [yarn] 199 | # Run `yarn global upgrade` with `sudo` 200 | # use_sudo = true 201 | 202 | 203 | [vim] 204 | # For `vim-plug`, execute `PlugUpdate!` instead of `PlugUpdate` 205 | # force_plug_update = true 206 | 207 | 208 | [firmware] 209 | # Offer to update firmware; if false just check for and display available updates 210 | # upgrade = true 211 | 212 | 213 | [vagrant] 214 | # Vagrant directories 215 | # directories = [] 216 | 217 | # power on vagrant boxes if needed 218 | # power_on = true 219 | 220 | # Always suspend vagrant boxes instead of powering off 221 | # always_suspend = true 222 | 223 | 224 | [flatpak] 225 | # Use sudo for updating the system-wide installation 226 | # use_sudo = true 227 | 228 | 229 | [distrobox] 230 | # use_root = false 231 | 232 | # containers = ["archlinux-latest"] 233 | [containers] 234 | # Specify the containers to ignore while updating (Wildcard supported) 235 | # ignored_containers = ["ghcr.io/rancher-sandbox/rancher-desktop/rdx-proxy:latest", "docker.io*"] 236 | -------------------------------------------------------------------------------- /mimeapps.list/.config/mimeapps.list: -------------------------------------------------------------------------------- 1 | # https://standards.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html 2 | # See also: https://www.freedesktop.org/wiki/Specifications/mime-apps-spec/ 3 | 4 | [Default Applications] 5 | text/plain=nvim.desktop; 6 | text/html=google-chrome.desktop;firefox.desktop 7 | text/mml=google-chrome.desktop;firefox.desktop 8 | 9 | application/doc=wps-office-wps.desktop 10 | application/docx=wps-office-wps.desktop 11 | application/pdf=wps-office-pdf.desktop 12 | application/xls=wps-office-wps.desktop 13 | application/xlsx=wps-office-wps.desktop 14 | application/xml=nvim.desktop 15 | application/xhtml+xml=google-chrome.desktop;firefox.desktop 16 | 17 | application/x-cd-image=open-fuse-iso.desktop 18 | application/x-raw-disk-image=open-fuse-iso.desktop 19 | application/x-bittorrent=qbittorrent.desktop 20 | 21 | # Images 22 | image/jpeg=viewnior.desktop 23 | image/png=viewnior.desktop 24 | image/gif=viewnior.desktop 25 | image/bmp=viewnior.desktop 26 | 27 | # Audio 28 | audio/mp4=smplayer.desktop;vlc.desktop; 29 | audio/x-ms-wma=smplayer.desktop;vlc.desktop;picard.desktop; 30 | 31 | # Video 32 | video/mp4=smplayer.desktop;vlc.desktop; 33 | video/ogg=smplayer.desktop;vlc.desktop; 34 | video/x-flv=smplayer.desktop;vlc.desktop; 35 | video/x-matroska=smplayer.desktop;vlc.desktop; 36 | video/x-ms-wmv=smplayer.desktop;vlc.desktop; 37 | video/x-msvideo=smplayer.desktop;vlc.desktop; 38 | video/x-ogm+ogg=smplayer.desktop;vlc.desktop; 39 | video/x-theora+ogg=smplayer.desktop;vlc.desktop; 40 | 41 | 42 | # Hypertext 43 | 44 | application/x-extension-htm=google-chrome.desktop;firefox.desktop 45 | application/x-extension-html=google-chrome.desktop;firefox.desktop 46 | application/x-extension-shtml=google-chrome.desktop;firefox.desktop 47 | application/x-extension-xhtml=google-chrome.desktop;firefox.desktop 48 | application/x-extension-xht=google-chrome.desktop;firefox.desktop 49 | 50 | 51 | application/wps-office.pptx=wps-office-wpp.desktop 52 | application/wps-office.ppt=wps-office-wpp.desktop 53 | application/wps-office.pot=wps-office-wpp.desktop 54 | application/wps-office.potx=wps-office-wpp.desktop 55 | application/wps-office.dps=wps-office-wpp.desktop 56 | application/wps-office.dpt=wps-office-wpp.desktop 57 | application/wps-office.dpss=wps-office-wpp.desktop 58 | application/wps-office.dpso=wps-office-wpp.desktop 59 | 60 | application/wps-office.xlsx=wps-office-et.desktop 61 | application/wps-office.xls=wps-office-et.desktop 62 | application/wps-office.xlt=wps-office-et.desktop 63 | application/wps-office.xltx=wps-office-et.desktop 64 | application/wps-office.et=wps-office-et.desktop 65 | application/wps-office.ett=wps-office-et.desktop 66 | application/wps-office.ets=wps-office-et.desktop 67 | application/wps-office.eto=wps-office-et.desktop 68 | 69 | application/wps-office.docx=wps-office-wps.desktop 70 | application/wps-office.doc=wps-office-wps.desktop 71 | application/wps-office.dot=wps-office-wps.desktop 72 | application/wps-office.dotx=wps-office-wps.desktop 73 | application/wps-office.wps=wps-office-wps.desktop 74 | application/wps-office.wpss=wps-office-wps.desktop 75 | application/wps-office.wpso=wps-office-wps.desktop 76 | application/wps-office.wpt=wps-office-wps.desktop 77 | 78 | x-scheme-handler/chrome=google-chrome.desktop 79 | x-scheme-handler/tg=org.telegram.desktop.desktop 80 | x-scheme-handler/tonsite=org.telegram.desktop.desktop 81 | x-scheme-handler/magnet=qbittorrent.desktop 82 | x-scheme-handler/fdm=freedownloadmanager_fdm_up.desktop 83 | x-scheme-handler/http=google-chrome.desktop;firefox.desktop 84 | x-scheme-handler/https=google-chrome.desktop;firefox.desktop 85 | x-scheme-handler/ftp=google-chrome.desktop;firefox.desktop 86 | 87 | 88 | ## 89 | ## The [Added Associations] group defines additional associations of applications with mimetypes, as if the .desktop file was listing this mimetype in the first place. 90 | ## 91 | 92 | [Added Associations] 93 | text/plain=nvim.desktop;vim.desktop;wps-office-wps.desktop;mousepad.desktop; 94 | text/csv=wps-office-et.desktop;nvim.desktop;libreoffice-calc.desktop; 95 | text/html=google-chrome.desktop; 96 | application/octet-stream=uget-gtk.desktop;deluge.desktop;qpdfview.desktop;mousepad.desktop; 97 | application/pdf=wps-office-pdf.desktop;org.gnome.Evince.desktop;google-chrome.desktop;chromium.desktop;qpdfview.desktop;org.pwmt.zathura-pdf-mupdf.desktop;libreoffice-draw.desktop;zathura-pdf-mupdf.desktop; 98 | application/x-gettext-translation=mousepad.desktop; 99 | application/x-wine-extension-ini=mousepad.desktop; 100 | application/epub+zip=calibre-ebook-viewer.desktop;calibre-gui.desktop;engrampa.desktop; 101 | application/x-mobipocket-ebook=calibre-ebook-viewer.desktop;calibre-gui.desktop;libreoffice-writer.desktop; 102 | application/x-shellscript=gvim.desktop;nvim.desktop; 103 | application/x-xpinstall=thunderbird.desktop;firefox.desktop; 104 | 105 | # Office 106 | application/wps-office.doc=wps-office-wps.desktop; 107 | application/wps-office.docx=wps-office-wps.desktop; 108 | application/wps-office.xls=wps-office-et.desktop; 109 | application/wps-office.xlsx=wps-office-et.desktop; 110 | 111 | image/gif=viewnior.desktop;gimp.desktop; 112 | image/jpeg=viewnior.desktop; 113 | image/vnd.microsoft.icon=viewnior.desktop; 114 | 115 | inode/directory=exo-file-manager.desktop 116 | 117 | x-scheme-handler/trash=exo-file-manager.desktop 118 | x-scheme-handler/http=exo-web-browser.desktop 119 | x-scheme-handler/https=exo-web-browser.desktop 120 | audio/mpeg=smplayer.desktop;vlc.desktop;gmp3info.desktop;audacity.desktop; 121 | 122 | 123 | # Video 124 | 125 | 126 | # Archives 127 | application/x-compressed-tar=userapp-peazip"-96IAZZ.desktop;userapp-"peazip"-5VXWYZ.desktop; 128 | application/x-tar=uget-gtk.desktop;userapp-peazip"-96IAZZ.desktop; 129 | application/x-cd-image=open-fuse-iso.desktop; 130 | application/wps-office.pdf=qpdfview.desktop;org.pwmt.zathura-pdf-mupdf.desktop; 131 | application/vnd.openxmlformats-officedocument.wordprocessingml.document=wps-office-wps.desktop;libreoffice-writer.desktop; 132 | application/vnd.openxmlformats-officedocument.presentationml.presentation=wps-office-wpp.desktop; 133 | image/png=pinta.desktop; 134 | application/wps-office.potx=wps-office-wpp.desktop; 135 | application/wps-office.dpss=wps-office-wpp.desktop; 136 | application/wps-office.dpso=wps-office-wpp.desktop; 137 | application/wps-office.xltx=wps-office-et.desktop; 138 | application/wps-office.ets=wps-office-et.desktop; 139 | application/wps-office.eto=wps-office-et.desktop; 140 | application/wps-office.dotx=wps-office-wps.desktop; 141 | application/wps-office.wpss=wps-office-wps.desktop; 142 | application/wps-office.wpso=wps-office-wps.desktop; 143 | x-scheme-handler/tg=userapp-Telegram Desktop-QNO4X0.desktop;org.telegram.desktop.desktop; 144 | application/javascript=visual-studio-code.desktop; 145 | text/x-nfo=nvim.desktop; 146 | application/wps-office.xls=nvim.desktop; 147 | application/json=nvim.desktop; 148 | image/bmp=viewnior.desktop; 149 | x-scheme-handler/tonsite=org.telegram.desktop.desktop; 150 | x-scheme-handler/sms=org.gnome.Shell.Extensions.GSConnect.desktop; 151 | x-scheme-handler/tel=org.gnome.Shell.Extensions.GSConnect.desktop; 152 | 153 | ## 154 | ## The [Removed Associations] group removes associations of applications with mimetypes, as if the .desktop file was NOT listing this mimetype in the first place. 155 | ## 156 | -------------------------------------------------------------------------------- /shell/.config/shell/xdg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # shellcheck disable=1090 3 | # ^ don't try to check variable-named sourced files 4 | # ^ keep shell-check happy 5 | 6 | 7 | # NOTE: Add any new files to the random spot-check list at the end 8 | # https://wiki.archlinux.org/title/XDG_Base_Directory is your friend. 9 | 10 | # XDG - set defaults as they may not be set (eg Ubuntu 14.04 LTS) 11 | # See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables 12 | # and https://wiki.archlinux.org/index.php/XDG_Base_Directory_support 13 | export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}" 14 | export XDG_DATA_HOME="${XDG_DATA_HOME:=$HOME/.local/share}" 15 | export XDG_CACHE_HOME="${XDG_CACHE_HOME:=$HOME/.cache}" 16 | export XDG_STATE_HOME="${XDG_STATE_HOME:=$HOME/.local/state}" 17 | 18 | # Create directories if needed 19 | for var in XDG_CONFIG_HOME XDG_DATA_HOME XDG_STATE_HOME XDG_CACHE_HOME; do 20 | if sh_is_bash; then 21 | dir=${!var} 22 | elif sh_is_zsh; then 23 | # shellcheck disable=2296 # zsh syntax ${(P)} - Parameter expansions can't start with (. Double check syntax. 24 | dir=${(P)var} 25 | else 26 | dir=$(eval "echo \"\$$var\"") 27 | fi 28 | if [ ! -d "${dir}" ]; then 29 | printf "Creating $%s directory: %s\n" "$var" "${dir}" 30 | mkdir -p "${dir}" 31 | fi 32 | done 33 | 34 | export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:=/etc/xdg}" 35 | export XDG_DATA_DIRS="${XDG_DATA_DIRS:=/usr/local/share:/usr/share}" 36 | 37 | # $XDG_RUNTIME_DIR 38 | # https://unix.stackexchange.com/a/580757/143394 # My Q&A 39 | if [ -z "$XDG_RUNTIME_DIR" ]; then # It's not already set 40 | XDG_RUNTIME_DIR=/run/user/$UID # Try systemd created path 41 | if [ ! -d "$XDG_RUNTIME_DIR" ]; then 42 | # systemd-created directory doesn't exist 43 | XDG_RUNTIME_DIR=/tmp/$USER-runtime 44 | [ ! -d "$XDG_RUNTIME_DIR" ] && mkdir -m 0700 "$XDG_RUNTIME_DIR" 45 | fi 46 | fi 47 | 48 | _get_octal_perms() { 49 | case $OSTYPE in 50 | darwin*) # macOS 51 | stat -f %A "$@" ;; 52 | *) # Assume Linux 53 | stat -c %a "$@" 54 | esac 55 | } 56 | 57 | # Check dir has got the correct type, ownership, and permissions 58 | if ! [[ -d "$XDG_RUNTIME_DIR"/ && -O "$XDG_RUNTIME_DIR"/ && 59 | $(_get_octal_perms "$XDG_RUNTIME_DIR") = 700 ]]; then 60 | echo "\$XDG_RUNTIME_DIR: permissions problem with $XDG_RUNTIME_DIR:" >&2 61 | ls -ld "$XDG_RUNTIME_DIR" >&2 62 | XDG_RUNTIME_DIR=$(mktemp -d /tmp/"$USER"-runtime-XXXXXX) 63 | echo "Set \$XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" >&2 64 | fi 65 | export XDG_RUNTIME_DIR 66 | unset -f _get_octal_perms 67 | 68 | # Export the XDG user directories 69 | if [ -f "$XDG_CONFIG_HOME/user-dirs.dirs" ]; then 70 | # shellcheck disable=1091 # Can't follow - file doesn't exist 71 | . "$XDG_CONFIG_HOME/user-dirs.dirs" 72 | export XDG_DESKTOP_DIR XDG_DOWNLOAD_DIR XDG_TEMPLATES_DIR XDG_PUBLICSHARE_DIR XDG_DOCUMENTS_DIR XDG_MUSIC_DIR XDG_PICTURES_DIR XDG_VIDEOS_DIR 73 | fi 74 | 75 | 76 | # Tell programs to look for files in $XDG_* directories 77 | # When adding a file here, ensure its $HOME/.* location is added 78 | # to the XDGFILES "here" string below 79 | 80 | 81 | # Single-line config 82 | export GNUPGHOME="$XDG_DATA_HOME/gnupg" 83 | export ICEAUTHORITY="$XDG_CACHE_HOME/ICEauthority" 84 | export INPUTRC="$XDG_CONFIG_HOME/readline/inputrc" 85 | export MOST_INITFILE="$XDG_CONFIG_HOME/most/config" 86 | export PARALLEL_HOME="$XDG_CONFIG_HOME/parallel" 87 | export WGETRC="$XDG_CONFIG_HOME/wgetrc" 88 | 89 | # export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority 90 | # LightDM does not allow you to change this variable: 91 | # https://wiki.archlinux.org/title/XDG_Base_Directory#:~:text=XDG_CONFIG_HOME%22/xbindkeys/config-,xorg%2Dxauth,-~/.Xauthority 92 | # user-authority-in-system-dir=true causes symlink in XAUTHORITY #151 93 | # https://github.com/canonical/lightdm/issues/151 94 | 95 | # # Uncommenting breaks Manjaro login 96 | # X11 97 | # export XAUTHORITY="$XDG_CACHE_HOME/Xauthority" 98 | # mkdir -p "$XDG_RUNTIME_DIR/X11" 99 | # export ICEAUTHORITY="$XDG_RUNTIME_DIR/X11/ICEauthority" 100 | # export XAUTHORITY="$XDG_RUNTIME_DIR/X11/Xauthority" 101 | 102 | 103 | # 104 | # Begin multi-line config 105 | # 106 | 107 | export LESSKEY=$XDG_CONFIG_HOME/less/keys 108 | export LESSHISTFILE=$XDG_CACHE_HOME/less/history 109 | 110 | export VIMPERATOR_INIT=":source $XDG_CONFIG_HOME/vimperator/vimperatorrc" 111 | export VIMPERATOR_RUNTIME=$XDG_CONFIG_HOME/vimperator 112 | 113 | # Ruby 114 | export GEM_HOME=$XDG_DATA_HOME/gem GEM_SPEC_CACHE=$XDG_CACHE_HOME/gem 115 | export BUNDLE_USER_CONFIG=$XDG_CONFIG_HOME/bundle 116 | export BUNDLE_USER_CACHE=$XDG_CACHE_HOME/bundle 117 | export BUNDLE_USER_PLUGIN=$XDG_DATA_HOME/bundle 118 | 119 | # Rust 120 | export RUSTUP_HOME="$XDG_DATA_HOME"/rustup 121 | export CARGO_HOME="$XDG_DATA_HOME"/cargo 122 | 123 | # Node.js / npm 124 | # Check config with: npm config ls -l | grep / | grep -v '^;' 125 | # More XDG config is inside the config file itself: 126 | export NODE_REPL_HISTORY="$XDG_DATA_HOME/node_repl_history" 127 | export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc" 128 | # export NPM_CONFIG_PREFIX=${XDG_DATA_HOME}/npm # nvm removes from npmrc and complains at shell startup 129 | # This seems to get unset, setting in /home/ravi/.config/npm/npmrc instead: 130 | # export NPM_CONFIG_PREFIX=$XDG_DATA_HOME/npm 131 | 132 | # Bun 133 | export BUN_INSTALL="$XDG_STATE_HOME/bun" 134 | export BUN_INSTALL_CACHE_DIR="$XDG_CACHE_HOME/bun" 135 | 136 | # A function so that it can be run in the background immediately after declaration 137 | function check_shadowed_files { 138 | # Only warn that symlinks are shadowed on the odd occasion 139 | # Set XDG_CHECK=1 to force the check 140 | if ((RANDOM % 100 == 0)) || [[ $XDG_CHECK ]]; then 141 | echo "Running random spot check of XDG shadowed symlinks" 142 | local print_symlinks=true 143 | fi 144 | 145 | # Check that only one version of files exist 146 | # Ignore the file if it is a symlink, unless print_symlinks is set 147 | while read -r file; do # HERE doc at end 148 | case "$file" in 149 | "") ;& 150 | \#*) continue # Allow for blank and commened out files 151 | esac 152 | if [[ -e $file ]]; then { # bracket for STDERR 153 | [[ -L $file && -z ${print_symlinks-} ]] && continue 154 | printf "%s" "Warning: XDG shadowed " 155 | # shellcheck disable=SC2015 # A && B || C is not if-then-else. C may run when A is true. [SC2015] 156 | [ -L $file ] && printf "symlink" || { # symlinks are "both" 157 | [ -S $file ] && printf "socket" 158 | [ -d $file ] && printf "directory" 159 | [ -f $file ] && printf "file"; 160 | } 161 | printf ': %s\n' "$file" 162 | } >&2 163 | fi 164 | done < 100. xdpyinfo | grep resolution svelte was 96 x 96 102 | config.freetype_load_target = 'Light' -- https://wezfurlong.org/wezterm/config/lua/config/freetype_load_target.html 103 | config.freetype_render_target = 'HorizontalLcd' -- https://wezterm.org/config/lua/config/freetype_render_target.html 104 | -- NB: Cannot set alpha channel for the text foreground color when using using subpixel-rendering. 105 | -- See https://wezterm.org/config/lua/config/freetype_load_target.html 106 | 107 | --Unicode version (width of emojis) 108 | -- https://wezfurlong.org/wezterm/config/lua/config/unicode_version.html 109 | -- Version 14 allows emojis take up more than one cell 110 | config.unicode_version = 14 111 | config.allow_square_glyphs_to_overflow_width = 'WhenFollowedBySpace' -- https://wezterm.org/config/lua/config/allow_square_glyphs_to_overflow_width.html 112 | -- Wezterm overwrites certain font block characters by default 113 | config.custom_block_glyphs = true -- https://wezterm.org/config/lua/config/custom_block_glyphs.html#custom_block_glyphs-true 114 | 115 | config.underline_position = '200%' 116 | config.underline_thickness = '2px' 117 | 118 | -- Monaspace: https://monaspace.githubnext.com/ 119 | -- Based upon, contributed to: https://gist.github.com/ErebusBat/9744f25f3735c1e0491f6ef7f3a9ddc3 120 | config.font = wezterm.font( 121 | { -- Normal text 122 | family='Monaspace Neon', 123 | harfbuzz_features={ 'calt', 'liga', 'dlig', 'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08' }, 124 | stretch='UltraCondensed', -- This doesn't seem to do anything 125 | }) 126 | 127 | config.font_rules = { 128 | { -- Italic 129 | intensity = 'Normal', 130 | italic = true, 131 | font = wezterm.font({ 132 | -- family="Monaspace Radon", -- script style 133 | family='Monaspace Xenon', -- courier-like 134 | style = 'Italic', 135 | }) 136 | }, 137 | 138 | { -- Bold 139 | intensity = 'Bold', 140 | italic = false, 141 | font = wezterm.font( { 142 | family='Monaspace Krypton', 143 | -- weight='ExtraBold', 144 | weight='DemiBold', 145 | }) 146 | }, 147 | 148 | { -- Bold Italic 149 | intensity = 'Bold', 150 | italic = true, 151 | font = wezterm.font( { 152 | family='Monaspace Xenon', 153 | style='Italic', 154 | weight='DemiBold', 155 | } 156 | ) 157 | }, 158 | } 159 | 160 | -- 161 | -- Bell 162 | -- 163 | -- Enable the visual bell to briefly change the background color 164 | config.visual_bell = { 165 | -- Duration for the color to fade in (set to 0 for an instant flash) 166 | fade_in_duration_ms = 0, 167 | -- Duration for the color to fade out 168 | fade_out_duration_ms = 150, 169 | -- The easing function for the fade-in effect 170 | fade_in_function = "EaseIn", 171 | -- The easing function for the fade-out effect 172 | fade_out_function = "EaseOut", 173 | -- The target to flash, which can be "BackgroundColor" or "CursorColor" 174 | target = "BackgroundColor", 175 | } 176 | config.colors = { 177 | visual_bell = '#808080', 178 | } 179 | 180 | -- From: https://stackoverflow.com/a/7470789/5353461 181 | function merge_tables(t1, t2) 182 | for k, v in pairs(t2) do 183 | if (type(v) == "table") and (type(t1[k] or false) == "table") then 184 | merge_tables(t1[k], t2[k]) 185 | else 186 | t1[k] = v 187 | end 188 | end 189 | return t1 190 | end 191 | -- config = merge_tables(config, font_config) 192 | 193 | return config 194 | -------------------------------------------------------------------------------- /zsh/.config/zsh/zle: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^----- get shellcheck hints based on bash 3 | # https://github.com/koalaman/shellcheck/issues/809 4 | 5 | # shellcheck disable=SC1090 # sourced files with variables 6 | # shut up shellcheck use before assign 7 | 8 | # Setup $keys array and bind sensible things to special keys 9 | # shellcheck disable=SC2296,SC2298 # zsh parameter expansion 10 | source "${${(%):-%x}:h}/keyboard" # file in the same directory as this one 11 | 12 | # TODO: add more from: 13 | # https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/key-bindings.zsh 14 | 15 | # The time the shell waits, in hundredths of seconds, for another key to be pressed when reading bound multi-character sequences. 16 | KEYTIMEOUT=35 # Default == 40 or 0.4 seconds. 17 | # 18 | # Have word movement commands stop at a '/' 19 | WORDCHARS=$WORDCHARS:s:/: 20 | 21 | bindkey ' ' magic-space # Perform history expansion 22 | 23 | bindkey jk vi-cmd-mode 24 | bindkey kj vi-cmd-mode 25 | 26 | bindkey '\C-p' history-beginning-search-backward 27 | bindkey '\C-n' history-beginning-search-forward 28 | 29 | 30 | ## Cycle through history based on characters already typed on the line 31 | ## https://unix.stackexchange.com/a/285151/143394 32 | # autoload -U up-line-or-beginning-search 33 | # autoload -U down-line-or-beginning-search 34 | # zle -N up-line-or-beginning-search 35 | # zle -N down-line-or-beginning-search 36 | # bindkey "$terminfo[kcuu1]" up-line-or-beginning-search 37 | # bindkey "$terminfo[kcud1]" down-line-or-beginning-search 38 | 39 | autoload -Uz select-word-style 40 | select-word-style shell # Eg with ^W # XXX Test me 41 | 42 | # Auto-quote URLs 43 | autoload -Uz url-quote-magic 44 | zle -N self-insert url-quote-magic 45 | 46 | # vi keymap - allow for cases where $VISUAL or $EDITOR doesn't contain 'vi' 47 | # Select keymap `viins' for operations. Also link `viins' to `main' so that it is selected by default 48 | bindkey -v 49 | 50 | # Why aren't these working? 51 | bindkey -a '^_' undo 52 | bindkey -a '^Y' redo 53 | bindkey -a '^Q' push-input # https://stackoverflow.com/a/11690592/5353461 54 | 55 | # Tested OK below here 56 | bindkey -a '^K' kill-line 57 | bindkey -a '\e.' insert-last-word # Insert $! repeating back through history 58 | bindkey -a '^[[3~' delete-char # Del key works as expected 59 | bindkey -a '^[[1;5C' forward-word 60 | bindkey -a '^[[1;5D' backward-word 61 | 62 | # Better searching in command mode 63 | bindkey -M vicmd '?' history-incremental-search-backward 64 | bindkey -M vicmd '/' history-incremental-search-forward 65 | 66 | # Beginning search with arrow keys 67 | bindkey "^[OA" up-line-or-beginning-search 68 | bindkey "^[OB" down-line-or-beginning-search 69 | bindkey -M vicmd "k" up-line-or-beginning-search 70 | bindkey -M vicmd "j" down-line-or-beginning-search 71 | 72 | 73 | # bindkey from man zshzle: 74 | # -m Add the built-in set of meta-key bindings to the selected 75 | # keymap. Only keys that are unbound or bound to self-insert 76 | # are affected. 77 | 78 | 79 | # Expand aliases 80 | # https://unix.stackexchange.com/a/150737/143394 81 | # Doesn't expand aliases where the expansion would have syntax issues, eg `% C` 82 | # Doesn't handle quoting correctly in some instances: 83 | # https://unix.stackexchange.com/questions/150649/resolve-all-aliases-in-a-zsh-command-line/150737#comment823235_150737 84 | expand-aliases() { 85 | unset 'functions[_expand-aliases]' 86 | # shellcheck disable=SC2154 # Use of _expand and aliases 87 | functions[_expand-aliases]=$BUFFER 88 | (($+functions[_expand-aliases])) && 89 | BUFFER=${functions[_expand-aliases]#$'\t'} && 90 | CURSOR=$#BUFFER 91 | } 92 | 93 | zle -N expand-aliases 94 | bindkey '\e^E' expand-aliases 95 | 96 | 97 | # Allow Meta- keys in viins mode without moving to vicmd 98 | # https://www.perplexity.ai/search/improve-this-code-so-as-to-all-I_KYRsJDQsmI7i2GxG_ORg 99 | 100 | # Custom numeric argument handler that returns to insert mode 101 | digit-argument-viins() { zle reset-prompt; zle .digit-argument; zle .vi-insert; } 102 | 103 | # Custom minus argument handler 104 | neg-argument-viins() { zle reset-prompt; zle .neg-argument; zle .vi-insert; } 105 | 106 | # Safely display the message in $1 107 | zle-message() { 108 | zle -I # Invalidate display before output 109 | zle -M "$1" 110 | zle -R # Force redisplay 111 | } 112 | 113 | # ESC cancellation handlers 114 | esc-or-cancel-numeric() { 115 | if [[ $NUMERIC ]]; then 116 | zle-message "Cancelled digit argument" 117 | # This is not needed - it seems the digit argument "consumed" anyway 118 | # unset NUMERIC 119 | else 120 | # Process the event as a normal Esc key 121 | zle reset-prompt # Clear any "Cancelled" message 122 | if [[ $KEYMAP == vicmd ]]; then 123 | zle .beep 124 | else 125 | zle .vi-cmd-mode 126 | fi 127 | fi 128 | } 129 | 130 | # Register widgets 131 | zle -N digit-argument-viins 132 | zle -N neg-argument-viins 133 | zle -N esc-or-cancel-numeric 134 | 135 | # Bind Alt+ and Alt+ in insert mode 136 | for i in {0..9}; do 137 | bindkey -M viins "^[$i" digit-argument-viins 138 | done 139 | bindkey -M viins "^[-" neg-argument-viins 140 | 141 | # ESC cancellation 142 | bindkey -M viins "^[" esc-or-cancel-numeric # Esc 143 | bindkey -M viins "^[^[" esc-or-cancel-numeric # Meta-Esc 144 | bindkey -M vicmd "^[" esc-or-cancel-numeric # Esc 145 | bindkey -M vicmd "^[^[" esc-or-cancel-numeric # Meta-Esc 146 | 147 | 148 | # ---------------------- 149 | # Todo: get latest code from: 150 | # https://www.google.com/search?q=zsh+expansion%3A+any+way+to+avoid+the+eval%3F+eval+%22new_word%3D%5C%24%7Bword%3A%24%7Bexpansion_flag%7D%7D%22+eg%2C+expn_flag%3D%22f%22&udm=50&mtid=SGm0aKH_IMXR1e8P9f3K2QE&mstk=AUtExfBgZo_QjwV7CSQFqLHFQULi9gXdNg4-KN4caT_GT0t7oP9EbKz34P9wZmkBsj737zIe8aKWQVxKjH8mxS-eH9h_ZmJgRUfhtkrr2rdiykzYNUQtV11Wtv4N_1yy7kohvkGHGAenKM3cPUxSDboKUwzHp3HwN2qIFDWzdrApTuSC8hG7KsLkTdQicWIUAOeN8szgRzRhQTeu_gbfPuI5Jl6FMhJfJ6jvBUkE9aoUieE3hlbo6EyrCt6_rhM7oyiNZ1XNxM4nhxT9FA&csuir=1 151 | # Also: 152 | # GhatGPT 5 thinking: https://www.google.com/maps/place/Zen+Beach+Parking/@9.7574482,99.9606893,576m/data=!3m1!1e3!4m22!1m15!4m14!1m6!1m2!1s0x305501defe526ac7:0x9f6e3db8717f2f0e!2sQX58%2B79C+Srithanu+Kitchen,+Tambon+Ko+Pha-ngan,+Amphoe+Ko+Pha-ngan,+Chang+Wat+Surat+Thani+84280,+Thailand!2m2!1d99.9659016!2d9.7581895!1m6!1m2!1s0x305501aae64a6f11:0xf4add31f0151d4e!2sTRIBAL+OASIS+Camp,+50,+Srithanu,+15,+Tambon+Ko+Pha-ngan,+Koh+Phangan,+Surat+Thani+84280!2m2!1d99.9627408!2d9.7618869!3m5!1s0x30550111cec25825:0x34e1f184c8943f92!8m2!3d9.7574482!4d99.962358!16s%2Fg%2F11j7xlpp0b?entry=ttu&g_ep=EgoyMDI1MDgyNS4wIKXMDSoASAFQAw%3D%3D 153 | # Claude 4 think: https://www.perplexity.ai/search/give-zsh-zle-code-for-taking-t-ex6GKWkUSvyJnjP_qZNq5A 154 | # This one doesn't work right if in whitespace before a word 155 | # ---------------------- 156 | 157 | # Pass a path modifier as the first argument, e.g., ":h". 158 | expand_word_under_cursor() { 159 | local expansion_flag="$1" 160 | local -a words 161 | local word 162 | local start_index end_index 163 | 164 | # Get the words from the buffer, respecting quotes and escapes. 165 | # shellcheck disable=SC2296,SC2298 # zsh parameter expansion 166 | words=("${(z)BUFFER}") 167 | 168 | # Find the index of the word under the cursor. 169 | local word_index=0 170 | local char_count=0 171 | 172 | # Loop through the words to find the one at the cursor position. 173 | while (( word_index < ${#words} )); do 174 | local current_word="${words[$word_index+1]}" 175 | local word_len="${#current_word}" 176 | 177 | # Check if cursor is exactly at the end of a word or within the next whitespace. 178 | # In these cases, we want to operate on the previous word. 179 | if (( char_count + word_len == CURSOR && CURSOR > 0 )); then 180 | break 181 | fi 182 | 183 | # If the cursor position is inside the current word, break the loop. 184 | if (( char_count + word_len >= CURSOR )); then 185 | break 186 | fi 187 | 188 | # Move to the next word. Add 1 for the space separator. 189 | (( char_count += word_len + 1 )) 190 | (( word_index++ )) 191 | done 192 | 193 | # The word we need is at `word_index` + 1 (because `words` is 1-indexed). 194 | word="${words[$((word_index+1))]}" 195 | start_index=$(( char_count )) 196 | end_index=$(( char_count + ${#word} )) 197 | 198 | # Perform the expansion if a word was found. 199 | if [[ -n "$word" ]]; then 200 | # shellcheck disable=SC2016 # Expressions don't expand in single quotes, use double quotes for that. 201 | local expansion_expression='${word'"$expansion_flag"'}' 202 | local new_word=${(e)expansion_expression} 203 | 204 | # Replace the word in the buffer with the expanded result. 205 | BUFFER="${BUFFER:0:$start_index}${new_word}${BUFFER:$end_index}" 206 | 207 | # Adjust the cursor to the end of the new word. 208 | CURSOR=$(( start_index + ${#new_word} )) 209 | fi 210 | } 211 | 212 | # ---------------------------------------------------------------------- 213 | # Example widgets that use the helper function 214 | # ---------------------------------------------------------------------- 215 | 216 | # Widget to get the basename of the word under the cursor 217 | get-basename() { 218 | expand_word_under_cursor ":t" # :t for tail 219 | } 220 | 221 | # Widget to get the dirname of the word under the cursor 222 | get-dirname() { 223 | expand_word_under_cursor ":h" # :h for head 224 | } 225 | 226 | # Register the new widgets with ZLE 227 | zle -N get-basename 228 | zle -N get-dirname 229 | 230 | # Bind the widgets to a key combination 231 | # e.g., to bind `Alt-b` for basename and `Alt-d` for dirname 232 | bindkey '^xb' get-basename 233 | bindkey '^xp' get-dirname 234 | 235 | 236 | return; return; return; return; return; return; return; return; return; return 237 | ## 238 | ## Null code and comments only beyond here 239 | ## 240 | 241 | # For shell-check to see variables used 242 | # shellcheck disable=SC2128 # Arrays without indexing 243 | cat < /dev/null 244 | 245 | $KEYTIMEOUT $CURSOR 246 | 247 | END 248 | -------------------------------------------------------------------------------- /ranger/.config/ranger/scope.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o noclobber -o noglob -o nounset -o pipefail 4 | IFS=$'\n' 5 | 6 | # If the option `use_preview_script` is set to `true`, 7 | # then this script will be called and its output will be displayed in ranger. 8 | # ANSI color codes are supported. 9 | # STDIN is disabled, so interactive scripts won't work properly 10 | 11 | # This script is considered a configuration file and must be updated manually. 12 | # It will be left untouched if you upgrade ranger. 13 | 14 | # Meanings of exit codes: 15 | # code | meaning | action of ranger 16 | # -----+------------+------------------------------------------- 17 | # 0 | success | Display stdout as preview 18 | # 1 | no preview | Display no preview at all 19 | # 2 | plain text | Display the plain content of the file 20 | # 3 | fix width | Don't reload when width changes 21 | # 4 | fix height | Don't reload when height changes 22 | # 5 | fix both | Don't ever reload 23 | # 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview 24 | # 7 | image | Display the file directly as an image 25 | 26 | # Script arguments 27 | FILE_PATH="${1}" # Full path of the highlighted file 28 | PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters) 29 | PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters) 30 | IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview 31 | PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise. 32 | 33 | FILE_EXTENSION="${FILE_PATH##*.}" 34 | FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')" 35 | 36 | # Settings 37 | HIGHLIGHT_SIZE_MAX=262143 # 256KiB 38 | HIGHLIGHT_TABWIDTH=8 39 | HIGHLIGHT_STYLE='pablo' 40 | PYGMENTIZE_STYLE='autumn' 41 | 42 | 43 | handle_extension() { 44 | case "${FILE_EXTENSION_LOWER}" in 45 | # Archive 46 | a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\ 47 | rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip) 48 | atool --list -- "${FILE_PATH}" && exit 5 49 | bsdtar --list --file "${FILE_PATH}" && exit 5 50 | exit 1;; 51 | rar) 52 | # Avoid password prompt by providing empty password 53 | unrar lt -p- -- "${FILE_PATH}" && exit 5 54 | exit 1;; 55 | 7z) 56 | # Avoid password prompt by providing empty password 57 | 7z l -p -- "${FILE_PATH}" && exit 5 58 | exit 1;; 59 | 60 | # PDF 61 | pdf) 62 | # Preview as text conversion 63 | pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | fmt -w ${PV_WIDTH} && exit 5 64 | mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | fmt -w ${PV_WIDTH} && exit 5 65 | exiftool "${FILE_PATH}" && exit 5 66 | exit 1;; 67 | 68 | # BitTorrent 69 | torrent) 70 | transmission-show -- "${FILE_PATH}" && exit 5 71 | exit 1;; 72 | 73 | # OpenDocument 74 | odt|ods|odp|sxw) 75 | # Preview as text conversion 76 | odt2txt "${FILE_PATH}" && exit 5 77 | exit 1;; 78 | 79 | # HTML 80 | htm|html|xhtml) 81 | # Preview as text conversion 82 | w3m -dump "${FILE_PATH}" && exit 5 83 | lynx -dump -- "${FILE_PATH}" && exit 5 84 | elinks -dump "${FILE_PATH}" && exit 5 85 | ;; # Continue with next handler on failure 86 | # JSON 87 | json) 88 | jq --color-output . "${FILE_PATH}" && exit 5 89 | python -m json.tool -- "${FILE_PATH}" && exit 5 90 | ;; 91 | esac 92 | } 93 | 94 | handle_image() { 95 | # Size of the preview if there are multiple options or it has to be rendered 96 | # from vector graphics. If the conversion program allows specifying only one 97 | # dimension while keeping the aspect ratio, the width will be used. 98 | local DEFAULT_SIZE="1920x1080" 99 | 100 | local mimetype="${1}" 101 | case "${mimetype}" in 102 | # SVG 103 | # image/svg+xml) 104 | # convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6 105 | # exit 1;; 106 | 107 | # DjVu 108 | # image/vnd.djvu) 109 | # ddjvu -format=tiff -quality=90 -page=1 -size="${DEFAULT_SIZE}" \ 110 | # - "${IMAGE_CACHE_PATH}" < "${FILE_PATH}" \ 111 | # && exit 6 || exit 1;; 112 | 113 | # Image 114 | image/*) 115 | local orientation 116 | orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )" 117 | # If orientation data is present and the image actually 118 | # needs rotating ("1" means no rotation)... 119 | if [[ -n "$orientation" && "$orientation" != 1 ]]; then 120 | # ...auto-rotate the image according to the EXIF data. 121 | convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6 122 | fi 123 | 124 | # `w3mimgdisplay` will be called for all images (unless overridden as above), 125 | # but might fail for unsupported types. 126 | exit 7;; 127 | 128 | # Video 129 | # video/*) 130 | # # Thumbnail 131 | # ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6 132 | # exit 1;; 133 | 134 | # PDF 135 | # application/pdf) 136 | # pdftoppm -f 1 -l 1 \ 137 | # -scale-to-x "${DEFAULT_SIZE%x*}" \ 138 | # -scale-to-y -1 \ 139 | # -singlefile \ 140 | # -jpeg -tiffcompression jpeg \ 141 | # -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \ 142 | # && exit 6 || exit 1;; 143 | 144 | # ePub, MOBI, FB2 (using Calibre) 145 | # application/epub+zip|application/x-mobipocket-ebook|application/x-fictionbook+xml) 146 | # ebook-meta --get-cover="${IMAGE_CACHE_PATH}" -- "${FILE_PATH}" > /dev/null \ 147 | # && exit 6 || exit 1;; 148 | 149 | # ePub (using ) 150 | # application/epub+zip) 151 | # epub-thumbnailer \ 152 | # "${FILE_PATH}" "${IMAGE_CACHE_PATH}" "${DEFAULT_SIZE%x*}" \ 153 | # && exit 6 || exit 1;; 154 | 155 | # Font 156 | application/font*|application/*opentype) 157 | preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png" 158 | if fontimage -o "${preview_png}" \ 159 | --pixelsize "120" \ 160 | --fontname \ 161 | --pixelsize "80" \ 162 | --text " ABCDEFGHIJKLMNOPQRSTUVWXYZ " \ 163 | --text " abcdefghijklmnopqrstuvwxyz " \ 164 | --text " 0123456789.:,;(*!?') ff fl fi ffi ffl " \ 165 | --text " The quick brown fox jumps over the lazy dog. " \ 166 | "${FILE_PATH}"; 167 | then 168 | convert -- "${preview_png}" "${IMAGE_CACHE_PATH}" \ 169 | && rm "${preview_png}" \ 170 | && exit 6 171 | else 172 | exit 1 173 | fi 174 | ;; 175 | 176 | # Preview archives using the first image inside. 177 | # (Very useful for comic book collections for example.) 178 | # application/zip|application/x-rar|application/x-7z-compressed|\ 179 | # application/x-xz|application/x-bzip2|application/x-gzip|application/x-tar) 180 | # local fn=""; local fe="" 181 | # local zip=""; local rar=""; local tar=""; local bsd="" 182 | # case "${mimetype}" in 183 | # application/zip) zip=1 ;; 184 | # application/x-rar) rar=1 ;; 185 | # application/x-7z-compressed) ;; 186 | # *) tar=1 ;; 187 | # esac 188 | # { [ "$tar" ] && fn=$(tar --list --file "${FILE_PATH}"); } || \ 189 | # { fn=$(bsdtar --list --file "${FILE_PATH}") && bsd=1 && tar=""; } || \ 190 | # { [ "$rar" ] && fn=$(unrar lb -p- -- "${FILE_PATH}"); } || \ 191 | # { [ "$zip" ] && fn=$(zipinfo -1 -- "${FILE_PATH}"); } || return 192 | # 193 | # fn=$(echo "$fn" | python -c "import sys; import mimetypes as m; \ 194 | # [ print(l, end='') for l in sys.stdin if \ 195 | # (m.guess_type(l[:-1])[0] or '').startswith('image/') ]" |\ 196 | # sort -V | head -n 1) 197 | # [ "$fn" = "" ] && return 198 | # [ "$bsd" ] && fn=$(printf '%b' "$fn") 199 | # 200 | # [ "$tar" ] && tar --extract --to-stdout \ 201 | # --file "${FILE_PATH}" -- "$fn" > "${IMAGE_CACHE_PATH}" && exit 6 202 | # fe=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g') 203 | # [ "$bsd" ] && bsdtar --extract --to-stdout \ 204 | # --file "${FILE_PATH}" -- "$fe" > "${IMAGE_CACHE_PATH}" && exit 6 205 | # [ "$bsd" ] || [ "$tar" ] && rm -- "${IMAGE_CACHE_PATH}" 206 | # [ "$rar" ] && unrar p -p- -inul -- "${FILE_PATH}" "$fn" > \ 207 | # "${IMAGE_CACHE_PATH}" && exit 6 208 | # [ "$zip" ] && unzip -pP "" -- "${FILE_PATH}" "$fe" > \ 209 | # "${IMAGE_CACHE_PATH}" && exit 6 210 | # [ "$rar" ] || [ "$zip" ] && rm -- "${IMAGE_CACHE_PATH}" 211 | # ;; 212 | esac 213 | } 214 | 215 | handle_mime() { 216 | local mimetype="${1}" 217 | case "${mimetype}" in 218 | # Text 219 | text/* | */xml) 220 | # Syntax highlight 221 | if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then 222 | exit 2 223 | fi 224 | if [[ "$( tput colors )" -ge 256 ]]; then 225 | local pygmentize_format='terminal256' 226 | local highlight_format='xterm256' 227 | else 228 | local pygmentize_format='terminal' 229 | local highlight_format='ansi' 230 | fi 231 | highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \ 232 | --style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" && exit 5 233 | # pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}" -- "${FILE_PATH}" && exit 5 234 | exit 2;; 235 | 236 | # DjVu 237 | image/vnd.djvu) 238 | # Preview as text conversion (requires djvulibre) 239 | djvutxt "${FILE_PATH}" | fmt -w ${PV_WIDTH} && exit 5 240 | exiftool "${FILE_PATH}" && exit 5 241 | exit 1;; 242 | 243 | # Image 244 | image/*) 245 | # Preview as text conversion 246 | # img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4 247 | exiftool "${FILE_PATH}" && exit 5 248 | exit 1;; 249 | 250 | # Video and audio 251 | video/* | audio/*) 252 | mediainfo "${FILE_PATH}" && exit 5 253 | exiftool "${FILE_PATH}" && exit 5 254 | exit 1;; 255 | esac 256 | } 257 | 258 | handle_fallback() { 259 | echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5 260 | exit 1 261 | } 262 | 263 | 264 | MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )" 265 | if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then 266 | handle_image "${MIMETYPE}" 267 | fi 268 | handle_extension 269 | handle_mime "${MIMETYPE}" 270 | handle_fallback 271 | 272 | exit 1 273 | -------------------------------------------------------------------------------- /ranger/.config/ranger/rifle.conf: -------------------------------------------------------------------------------- 1 | # vim: ft=cfg 2 | # 3 | # This is the configuration file of "rifle", ranger's file executor/opener. 4 | # Each line consists of conditions and a command. For each line the conditions 5 | # are checked and if they are met, the respective command is run. 6 | # 7 | # Syntax: 8 | # , , ... = command 9 | # 10 | # The command can contain these environment variables: 11 | # $1-$9 | The n-th selected file 12 | # $@ | All selected files 13 | # 14 | # If you use the special command "ask", rifle will ask you what program to run. 15 | # 16 | # Prefixing a condition with "!" will negate its result. 17 | # These conditions are currently supported: 18 | # match | The regexp matches $1 19 | # ext | The regexp matches the extension of $1 20 | # mime | The regexp matches the mime type of $1 21 | # name | The regexp matches the basename of $1 22 | # path | The regexp matches the absolute path of $1 23 | # has | The program is installed (i.e. located in $PATH) 24 | # env | The environment variable "variable" is non-empty 25 | # file | $1 is a file 26 | # directory | $1 is a directory 27 | # number | change the number of this command to n 28 | # terminal | stdin, stderr and stdout are connected to a terminal 29 | # X | $DISPLAY is not empty (i.e. Xorg runs) 30 | # 31 | # There are also pseudo-conditions which have a "side effect": 32 | # flag | Change how the program is run. See below. 33 | # label