Repository: bresilla/dotfiles Branch: master Commit: 65400b277a82 Files: 459 Total size: 3.2 MB Directory structure: gitextract_kumaxq2x/ ├── .bashrc ├── .config/ │ ├── alacritty/ │ │ └── alacritty.yml │ ├── boomer/ │ │ └── config │ ├── bspwm/ │ │ ├── bspwmrc │ │ └── scripts/ │ │ ├── deskmenu │ │ ├── focus │ │ ├── move │ │ ├── resize │ │ ├── scratch │ │ ├── select │ │ ├── split │ │ └── windmenu │ ├── cheat/ │ │ └── cheatrc.yaml │ ├── color/ │ │ ├── bloks │ │ ├── colorz │ │ ├── pipes │ │ └── skull │ ├── compton/ │ │ └── compton │ ├── conky/ │ │ └── conky │ ├── cool-retro-term/ │ │ └── TRIM.json │ ├── direnv/ │ │ └── direnvrc │ ├── fish/ │ │ ├── completions/ │ │ │ └── fisher.fish │ │ ├── conf.d/ │ │ │ └── done.fish │ │ ├── config.fish │ │ ├── fish_variables │ │ ├── fishfile │ │ └── functions/ │ │ ├── :q.fish │ │ ├── __bass.py │ │ ├── ari.fish │ │ ├── asci.fish │ │ ├── bass.fish │ │ ├── bax.fish │ │ ├── class.fish │ │ ├── copy.fish │ │ ├── cp.fish │ │ ├── dev.fish │ │ ├── df.fish │ │ ├── doc.fish │ │ ├── docker.fish │ │ ├── dotfile.fish │ │ ├── dxe.fish │ │ ├── exe.fish │ │ ├── fisher.fish │ │ ├── g.fish │ │ ├── git.fish │ │ ├── humanize_duration.fish │ │ ├── la.fish │ │ ├── ll.fish │ │ ├── ls.fish │ │ ├── lt.fish │ │ ├── lu.fish │ │ ├── md.fish │ │ ├── mf.fish │ │ ├── mirror.fish │ │ ├── mutt.fish │ │ ├── mv.fish │ │ ├── one.fish │ │ ├── own.fish │ │ ├── pack.fish │ │ ├── pro.fish │ │ ├── q.fish │ │ ├── refresh.fish │ │ ├── rm.fish │ │ ├── s.fish │ │ ├── six.fish │ │ ├── speed.fish │ │ ├── sudo.fish │ │ ├── suspend.fish │ │ ├── sys.fish │ │ ├── up.fish │ │ ├── v.fish │ │ ├── vim.fish │ │ ├── virsh.fish │ │ ├── x.fish │ │ └── z.fish │ ├── fontconfig/ │ │ └── fonts.conf │ ├── gitstatus/ │ │ ├── bin/ │ │ │ ├── gitstatusd-linux-aarch64 │ │ │ ├── gitstatusd-linux-x86_64 │ │ │ └── gitstatusd-linux-x86_64-static │ │ ├── gitstatus.plugin.sh │ │ ├── gitstatus.plugin.zsh │ │ ├── gitstatus.prompt.sh │ │ └── gitstatus.prompt.zsh │ ├── i3/ │ │ └── config │ ├── kitty/ │ │ └── kitty.conf │ ├── mutt/ │ │ ├── aliases │ │ ├── colors │ │ └── muttrc │ ├── neofetch/ │ │ └── config.conf │ ├── nixpkgs/ │ │ └── config.nix │ ├── nvim/ │ │ ├── bookmarks │ │ └── init.vim │ ├── pet/ │ │ ├── config.toml │ │ └── snippet.toml │ ├── polybar/ │ │ ├── center │ │ ├── main │ │ ├── scripts/ │ │ │ ├── hotspot │ │ │ ├── netwidth │ │ │ └── spotify │ │ └── side │ ├── proji/ │ │ ├── config.toml │ │ ├── db/ │ │ │ └── proji.sqlite3 │ │ ├── examples/ │ │ │ ├── default.toml │ │ │ └── proji-class.toml │ │ ├── scripts/ │ │ │ ├── anaconda.sh │ │ │ ├── direnv.sh │ │ │ └── init_git.sh │ │ └── templates/ │ │ ├── AUTHORS.md │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── cmake/ │ │ │ ├── .clang-format │ │ │ ├── .clang-tidy │ │ │ ├── .editorconfig │ │ │ ├── .envrc │ │ │ ├── .github/ │ │ │ │ └── workflows/ │ │ │ │ └── main.yml │ │ │ ├── .gitignore │ │ │ ├── .gitmodules │ │ │ ├── .travis.yml │ │ │ ├── .vscode/ │ │ │ │ └── c_cpp_properties.json │ │ │ ├── CMakeLists.txt │ │ │ ├── cmake/ │ │ │ │ ├── ExternalProject.cmake │ │ │ │ ├── HunterGate.cmake │ │ │ │ ├── LTO.cmake │ │ │ │ ├── Packaging.cmake │ │ │ │ ├── Uninstall.cmake │ │ │ │ └── Warnings.cmake │ │ │ ├── external/ │ │ │ │ └── headers/ │ │ │ │ ├── args.hpp │ │ │ │ ├── crypt.hpp │ │ │ │ ├── doctest.hpp │ │ │ │ ├── json.hpp │ │ │ │ ├── rang.hpp │ │ │ │ └── utils.hpp │ │ │ ├── include/ │ │ │ │ ├── cplate/ │ │ │ │ │ └── classic.h │ │ │ │ └── second/ │ │ │ │ └── classic.h │ │ │ ├── shell.nix │ │ │ ├── source/ │ │ │ │ ├── cplate/ │ │ │ │ │ └── classic.cpp │ │ │ │ ├── main.cpp │ │ │ │ └── second/ │ │ │ │ └── classic.cpp │ │ │ └── tests/ │ │ │ └── test_one.cpp │ │ ├── dev/ │ │ │ ├── .envrc │ │ │ └── shell.nix │ │ ├── py/ │ │ │ ├── .envrc │ │ │ ├── .gitignore │ │ │ └── shell.nix │ │ ├── ros/ │ │ │ └── CMakeLists.txt │ │ └── tex/ │ │ ├── .envrc │ │ ├── .gitignore │ │ ├── article.tex │ │ └── bibliography.bib │ ├── promptline │ ├── qutebrowser/ │ │ ├── autoconfig.yml │ │ ├── bookmarks/ │ │ │ └── urls │ │ ├── config.py │ │ ├── iqutefy.py │ │ ├── quickmarks │ │ └── qutewal.py │ ├── rofi/ │ │ ├── menu/ │ │ │ ├── BROWSE │ │ │ ├── CONFIG │ │ │ ├── buku │ │ │ ├── contacts │ │ │ ├── locate │ │ │ ├── marks │ │ │ ├── monitors │ │ │ ├── mount │ │ │ ├── note │ │ │ ├── pass │ │ │ ├── rofis │ │ │ ├── screenshot │ │ │ ├── task │ │ │ └── uplay │ │ ├── rofi_bar │ │ ├── rofi_full │ │ ├── rofi_fuzzy │ │ └── rofi_icon │ ├── searcher │ ├── slop/ │ │ ├── blur1.frag │ │ ├── blur1.vert │ │ ├── blur2.frag │ │ ├── blur2.vert │ │ ├── boxzoom.frag │ │ ├── boxzoom.vert │ │ ├── crosshair.frag │ │ ├── crosshair.vert │ │ ├── hippie.frag │ │ ├── hippie.vert │ │ ├── invert.frag │ │ ├── invert.vert │ │ ├── refract.frag │ │ ├── refract.vert │ │ ├── wiggle.frag │ │ └── wiggle.vert │ ├── sxhkd/ │ │ └── sxhkdrc │ ├── tmux/ │ │ ├── COOL.yml │ │ ├── MAIN.yml │ │ ├── NOTE.yml │ │ ├── PRO.yml │ │ ├── PROT.yml │ │ ├── VOLT.yml │ │ └── modules/ │ │ ├── STATUS │ │ ├── battery │ │ ├── borderland │ │ ├── cpu-stat │ │ ├── directory │ │ ├── netwidth │ │ └── powerdraw │ ├── vim/ │ │ └── theme/ │ │ └── jellybeans.vim │ ├── wal/ │ │ └── templates/ │ │ └── colors-dunst │ ├── xfce4/ │ │ ├── desktop/ │ │ │ ├── icons.screen0-1175x884.rc │ │ │ ├── icons.screen0-1224x884.rc │ │ │ ├── icons.screen0-3735x2100.rc │ │ │ ├── icons.screen0-3752x2100.rc │ │ │ ├── icons.screen0-3784x2020.rc │ │ │ └── icons.screen0-3784x2100.rc │ │ ├── panel/ │ │ │ └── whiskermenu-7.rc │ │ ├── terminal/ │ │ │ └── accels.scm │ │ └── xfconf/ │ │ └── xfce-perchannel-xml/ │ │ ├── keyboards.xml │ │ ├── ristretto.xml │ │ ├── thunar.xml │ │ ├── xfce4-desktop.xml │ │ ├── xfce4-keyboard-shortcuts.xml │ │ ├── xfce4-panel.xml │ │ ├── xfce4-session.xml │ │ ├── xfce4-settings-manager.xml │ │ ├── xfwm4.xml │ │ └── xsettings.xml │ ├── zathura/ │ │ ├── genzathrc │ │ └── zathurarc │ └── zsh/ │ ├── almostontop/ │ │ ├── _almostontop │ │ └── almostontop.plugin.zsh │ ├── async │ ├── autopair/ │ │ └── autopair.zh │ ├── autosuggestions/ │ │ ├── src/ │ │ │ ├── async.zsh │ │ │ ├── bind.zsh │ │ │ ├── config.zsh │ │ │ ├── features.zsh │ │ │ ├── highlight.zsh │ │ │ ├── setup.zsh │ │ │ ├── start.zsh │ │ │ ├── strategies/ │ │ │ │ ├── default.zsh │ │ │ │ └── match_prev_cmd.zsh │ │ │ ├── util.zsh │ │ │ └── widgets.zsh │ │ └── zsh-autosuggestions.zsh │ ├── cmdtime/ │ │ └── zsh-command-time.zsh │ ├── completions/ │ │ ├── src/ │ │ │ ├── _ack │ │ │ ├── _afew │ │ │ ├── _android │ │ │ ├── _ansible │ │ │ ├── _ansible-galaxy │ │ │ ├── _ansible-playbook │ │ │ ├── _ansible-vault │ │ │ ├── _archlinux-java │ │ │ ├── _artisan │ │ │ ├── _atach │ │ │ ├── _bitcoin-cli │ │ │ ├── _bower │ │ │ ├── _bundle │ │ │ ├── _caffeinate │ │ │ ├── _cap │ │ │ ├── _cask │ │ │ ├── _cf │ │ │ ├── _chattr │ │ │ ├── _cheat │ │ │ ├── _choc │ │ │ ├── _cmake │ │ │ ├── _coffee │ │ │ ├── _column │ │ │ ├── _composer │ │ │ ├── _console │ │ │ ├── _dad │ │ │ ├── _debuild │ │ │ ├── _dget │ │ │ ├── _dhcpcd │ │ │ ├── _diana │ │ │ ├── _docpad │ │ │ ├── _drush │ │ │ ├── _emulator │ │ │ ├── _envdir │ │ │ ├── _exportfs │ │ │ ├── _fab │ │ │ ├── _ffind │ │ │ ├── _fleetctl │ │ │ ├── _force │ │ │ ├── _gas │ │ │ ├── _geany │ │ │ ├── _ghc │ │ │ ├── _gist │ │ │ ├── _git-flow │ │ │ ├── _git-journal │ │ │ ├── _git-pulls │ │ │ ├── _git-wtf │ │ │ ├── _glances │ │ │ ├── _golang │ │ │ ├── _google │ │ │ ├── _gtk-launch │ │ │ ├── _homestead │ │ │ ├── _httpie │ │ │ ├── _ibus │ │ │ ├── _jmeter │ │ │ ├── _jmeter-plugins │ │ │ ├── _jonas │ │ │ ├── _jq │ │ │ ├── _jrnl │ │ │ ├── _kak │ │ │ ├── _kitchen │ │ │ ├── _knife │ │ │ ├── _language_codes │ │ │ ├── _lsattr │ │ │ ├── _lsblk │ │ │ ├── _lunchy │ │ │ ├── _middleman │ │ │ ├── _mina │ │ │ ├── _mix │ │ │ ├── _multirust │ │ │ ├── _mussh │ │ │ ├── _mvn │ │ │ ├── _node │ │ │ ├── _nvm │ │ │ ├── _openssl │ │ │ ├── _optirun │ │ │ ├── _paste │ │ │ ├── _patool │ │ │ ├── _perf │ │ │ ├── _periscope │ │ │ ├── _pgsql_utils │ │ │ ├── _phing │ │ │ ├── _pixz │ │ │ ├── _pkcon │ │ │ ├── _play │ │ │ ├── _port │ │ │ ├── _pygmentize │ │ │ ├── _rails │ │ │ ├── _ralio │ │ │ ├── _rclone │ │ │ ├── _redis-cli │ │ │ ├── _rfkill │ │ │ ├── _rkt │ │ │ ├── _rslsync │ │ │ ├── _rspec │ │ │ ├── _rsvm │ │ │ ├── _rubocop │ │ │ ├── _rvm │ │ │ ├── _sbt │ │ │ ├── _scala │ │ │ ├── _scl │ │ │ ├── _scons │ │ │ ├── _scrub │ │ │ ├── _sdd │ │ │ ├── _setcap │ │ │ ├── _setup.py │ │ │ ├── _showoff │ │ │ ├── _shutdown │ │ │ ├── _smartmontools │ │ │ ├── _srm │ │ │ ├── _ssh-copy-id │ │ │ ├── _stack │ │ │ ├── _subl │ │ │ ├── _subliminal │ │ │ ├── _supervisorctl │ │ │ ├── _svm │ │ │ ├── _tarsnap │ │ │ ├── _teamocil │ │ │ ├── _thor │ │ │ ├── _tmuxinator │ │ │ ├── _tmuxp │ │ │ ├── _trash-empty │ │ │ ├── _trash-list │ │ │ ├── _trash-put │ │ │ ├── _trash-restore │ │ │ ├── _udisksctl │ │ │ ├── _ufw │ │ │ ├── _vagrant │ │ │ ├── _virsh │ │ │ ├── _virtualbox │ │ │ ├── _vnstat │ │ │ ├── _vpnc │ │ │ ├── _wemux │ │ │ ├── _xinput │ │ │ ├── _xsel │ │ │ ├── _yaourt │ │ │ ├── _yarn │ │ │ └── _zcash-cli │ │ └── zsh-completions.zsh │ ├── enhancd/ │ │ ├── enhancd.log │ │ ├── init.sh │ │ └── src/ │ │ ├── arguments.sh │ │ ├── cd.sh │ │ ├── custom/ │ │ │ ├── config.ltsv │ │ │ ├── options/ │ │ │ │ ├── help.sh │ │ │ │ ├── number.sh │ │ │ │ └── version.sh │ │ │ └── sources/ │ │ │ └── ghq.sh │ │ ├── filter.sh │ │ ├── history.sh │ │ ├── path.sh │ │ ├── share/ │ │ │ ├── fuzzy.awk │ │ │ ├── has_dup_lines.awk │ │ │ ├── reverse.awk │ │ │ ├── split.awk │ │ │ ├── step_by_step.awk │ │ │ └── to_abspath.awk │ │ └── utils.sh │ ├── fz/ │ │ ├── fz.zsh │ │ ├── icd.zsh │ │ └── z.zsh │ ├── fzf/ │ │ ├── completion.bash │ │ ├── completion.zsh │ │ ├── key-bindings.bash │ │ ├── key-bindings.fish │ │ └── key-bindings.zsh │ ├── goto/ │ │ ├── goto.sh │ │ └── gotodb │ ├── insult │ ├── notfound/ │ │ ├── notfound │ │ └── notfound.zsh │ ├── syntax/ │ │ ├── .revision-hash │ │ ├── .version │ │ ├── highlighters/ │ │ │ ├── brackets/ │ │ │ │ └── brackets-highlighter.zsh │ │ │ ├── cursor/ │ │ │ │ └── cursor-highlighter.zsh │ │ │ ├── line/ │ │ │ │ └── line-highlighter.zsh │ │ │ ├── main/ │ │ │ │ └── main-highlighter.zsh │ │ │ ├── pattern/ │ │ │ │ └── pattern-highlighter.zsh │ │ │ └── root/ │ │ │ └── root-highlighter.zsh │ │ └── zsh-syntax-highlighting.zsh │ ├── upsearch/ │ │ ├── zsh-history-substring-search.zsh │ │ └── zsh-miscellaneous.zsh │ └── visualvi/ │ └── zsh-vimode-visual.zsh ├── .func/ │ ├── article │ ├── code │ ├── docker │ ├── media │ ├── network │ ├── robot │ └── system ├── .gitconfig ├── .gitignore ├── .profile ├── .sbin/ │ ├── adblock │ ├── askpass │ ├── biblio │ ├── checkinstall │ ├── con │ ├── cornera │ ├── hotspot │ ├── loopwall │ ├── pipes │ ├── play │ ├── recffm │ ├── ship │ ├── tdrop │ ├── termop │ ├── tux │ ├── wispot │ └── zathura ├── .startup ├── .tmux.conf ├── .zshrc ├── README.md └── run_me.sh ================================================ FILE CONTENTS ================================================ ================================================ FILE: .bashrc ================================================ #!/usr/bin/env bash #-------------------------------------------------------------------------------------------------------------------- ###WAL COLORS (cat ~/.cache/wal/sequences &) source ~/.cache/wal/colors.sh #-------------------------------------------------------------------------------------------------------------------- ###FUNCTIONS [ -d ~/.func ] && for file in ~/.func/*; do source "$file" ; done ###PROFILE [[ -e ~/.profile ]] && source ~/.profile ###DIRENV eval "$(direnv hook bash)" ###LAUNCHER if [[ -n ${LAUNCHER} ]]; then PS1="> " bind 'RETURN: "\e[4~ & \n exit \n"' return fi #-------------------------------------------------------------------------------------------------------------------- ###SETTINGS [[ $- != *i* ]] && return [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion use_color=true [[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" [[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(/dev/null && match_lhs=$(dircolors --print-database) [[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true xhost +local:root > /dev/null 2>&1 complete -cf sudo shopt -s checkwinsize shopt -s expand_aliases shopt -s histappend #-------------------------------------------------------------------------------------------------------------------- ###THEME source ~/.config/promptline #-------------------------------------------------------------------------------------------------------------------- source /home/bresilla/.config/broot/launcher/bash/br [[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc [[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh ================================================ FILE: .config/alacritty/alacritty.yml ================================================ # Configuration for Alacritty, the GPU enhanced terminal emulator. # Any items in the `env` entry below will be added as # environment variables. Some entries may override variables # set by alacritty itself. #env: # TERM variable # # This value is used to set the `$TERM` environment variable for # each instance of Alacritty. If it is not present, alacritty will # check the local terminfo database and use `alacritty` if it is # available, otherwise `xterm-256color` is used. #TERM: xterm-256color window: # Window dimensions (changes require restart) # # Specified in number of columns/lines, not pixels. # If both are `0`, this setting is ignored. dimensions: columns: 0 lines: 0 # Window position (changes require restart) # # Specified in number of pixels. # If the position is not set, the window manager will handle the placement. #position: # x: 0 # y: 0 # Window padding (changes require restart) # # Blank space added around the window in pixels. This padding is scaled # by DPI and the specified value is always added at both opposing sides. padding: x: 5 y: 5 # Spread additional padding evenly around the terminal content. dynamic_padding: true # Display tabs using this many cells (changes require restart) tabspaces: 4 # When true, bold text is drawn using the bright variant of colors. draw_bold_text_with_bright_colors: true # Font configuration (changes require restart) font: # The normal (roman) font face to use. normal: family: Iosevka Term SS01 style: Regular # The bold font face bold: family: Iosevka Term SS01 style: Bold # The italic font face italic: family: Iosevka Term SS01 style: Italic # Point size of the font size: 6.0 # Offset is the extra space around each character. offset.y can be thought of # as modifying the linespacing, and offset.x as modifying the letter spacing. offset: x: 0 y: 0 # OS X only: use thin stroke font rendering. Thin strokes are suitable # for retina displays, but for non-retina you probably want this set to # false. use_thin_strokes: true # Colors (Tomorrow Night Bright) colors: # Default colors primary: background: '0x000000' foreground: '0xeaeaea' # Normal colors normal: black: '0x000000' red: '0xd54e53' green: '0xb9ca4a' yellow: '0xe6c547' blue: '0x7aa6da' magenta: '0xc397d8' cyan: '0x70c0ba' white: '0x424242' # Bright colors bright: black: '0x666666' red: '0xff3334' green: '0x9ec400' yellow: '0xe7c547' blue: '0x7aa6da' magenta: '0xb77ee0' cyan: '0x54ced6' white: '0x2a2a2a' # Visual Bell # # Any time the BEL code is received, Alacritty "rings" the visual bell. Once # rung, the terminal background will be set to white and transition back to the # default background color. You can control the rate of this transition by # setting the `duration` property (represented in milliseconds). You can also # configure the transition function by setting the `animation` property. # # Possible values for `animation` # `Ease` # `EaseOut` # `EaseOutSine` # `EaseOutQuad` # `EaseOutCubic` # `EaseOutQuart` # `EaseOutQuint` # `EaseOutExpo` # `EaseOutCirc` # `Linear` # # To completely disable the visual bell, set its duration to 0. visual_bell: animation: EaseOutCubic duration: 200 # Key bindings # # Each binding is defined as an object with some properties. Most of the # properties are optional. All of the alphabetical keys should have a letter for # the `key` value such as `V`. Function keys are probably what you would expect # as well (F1, F2, ..). The number keys above the main keyboard are encoded as # `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`, # etc. These all match the glutin::VirtualKeyCode variants. # # Possible values for `mods` # `Command`, `Super` refer to the super/command/windows key # `Control` for the control key # `Shift` for the Shift key # `Alt` and `Option` refer to alt/option # # mods may be combined with a `|`. For example, requiring control and shift # looks like: # # mods: Control|Shift # # The parser is currently quite sensitive to whitespace and capitalization - # capitalization must match exactly, and piped items must not have whitespace # around them. # # Either an `action` or `chars` field must be present. `chars` writes the # specified string every time that binding is activated. These should generally # be escape sequences, but they can be configured to send arbitrary strings of # bytes. Possible values of `action` include `Paste` and `PasteSelection`. key_bindings: - { key: V, mods: Control|Shift, action: Paste } - { key: C, mods: Control|Shift, action: Copy } - { key: Q, mods: Command, action: Quit } - { key: W, mods: Command, action: Quit } - { key: PageUp, mods: Shift, action: ScrollPageUp } - { key: PageDown, mods: Shift, action: ScrollPageDown } - { key: End, mods: Shift, action: ScrollToBottom } - { key: Home, mods: Shift, action: ScrollToTop } - { key: Home, chars: "\x1b[H", mode: ~AppCursor } - { key: Home, chars: "\x1b[1~", mode: AppCursor } - { key: End, chars: "\x1b[F", mode: ~AppCursor } - { key: End, chars: "\x1b[4~", mode: AppCursor } - { key: PageUp, chars: "\x1b[5~" } - { key: PageDown, chars: "\x1b[6~" } - { key: Left, mods: Shift, chars: "\x1b[1;2D" } - { key: Left, mods: Control, chars: "\x1b[1;5D" } - { key: Left, mods: Alt, chars: "\x1b[1;3D" } - { key: Left, chars: "\x1b[D", mode: ~AppCursor } - { key: Left, chars: "\x1bOD", mode: AppCursor } - { key: Right, mods: Shift, chars: "\x1b[1;2C" } - { key: Right, mods: Control, chars: "\x1b[1;5C" } - { key: Right, mods: Alt, chars: "\x1b[1;3C" } - { key: Right, chars: "\x1b[C", mode: ~AppCursor } - { key: Right, chars: "\x1bOC", mode: AppCursor } - { key: Up, mods: Shift, chars: "\x1b[1;2A" } - { key: Up, mods: Control, chars: "\x1b[1;5A" } - { key: Up, mods: Alt, chars: "\x1b[1;3A" } - { key: Up, chars: "\x1b[A", mode: ~AppCursor } - { key: Up, chars: "\x1bOA", mode: AppCursor } - { key: Down, mods: Shift, chars: "\x1b[1;2B" } - { key: Down, mods: Control, chars: "\x1b[1;5B" } - { key: Down, mods: Alt, chars: "\x1b[1;3B" } - { key: Down, chars: "\x1b[B", mode: ~AppCursor } - { key: Down, chars: "\x1bOB", mode: AppCursor } - { key: Tab, mods: Shift, chars: "\x1b[Z" } - { key: F1, chars: "\x1bOP" } - { key: F2, chars: "\x1bOQ" } - { key: F3, chars: "\x1bOR" } - { key: F4, chars: "\x1bOS" } - { key: F5, chars: "\x1b[15~" } - { key: F6, chars: "\x1b[17~" } - { key: F7, chars: "\x1b[18~" } - { key: F8, chars: "\x1b[19~" } - { key: F9, chars: "\x1b[20~" } - { key: F10, chars: "\x1b[21~" } - { key: F11, chars: "\x1b[23~" } - { key: F12, chars: "\x1b[24~" } - { key: Back, chars: "\x7f" } - { key: Delete, chars: "\x1b[3~", mode: AppKeypad } - { key: Delete, chars: "\x1b[P", mode: ~AppKeypad } # Mouse bindings # # Currently doesn't support modifiers. Both the `mouse` and `action` fields must # be specified. # # Values for `mouse`: # - Middle # - Left # - Right # - Numeric identifier such as `5` # # Values for `action`: # - Paste # - PasteSelection # - Copy (TODO) mouse_bindings: - { mouse: Middle, action: PasteSelection } scrolling: # How many lines of scrollback to keep, # '0' will disable scrolling. history: 10000 # Number of lines the viewport will move for every line # scrolled when scrollback is enabled (history > 0). multiplier: 3 # Faux Scrolling # # The `faux_multiplier` setting controls the number # of lines the terminal should scroll when the alternate # screen buffer is active. This is used to allow mouse # scrolling for applications like `man`. # # To disable this completely, set `faux_multiplier` to 0. faux_multiplier: 3 # Automatically scroll to the bottom when new text is written # to the terminal. auto_scroll: false # Live config reload (changes require restart) live_config_reload: true ================================================ FILE: .config/boomer/config ================================================ ================================================ FILE: .config/bspwm/bspwmrc ================================================ #! /bin/sh monitor1=eDP1 monitor2=DP1 sxhkd -c /home/bresilla/.config/sxhkd/sxhkdrc & btops & ############################################################################################################################### #||| SETTINGS ############################################################################################################################### bspc config border_width 0 bspc config normal_border_color "#000000" bspc config focused_border_color "#000000" bspc config presel_feedback_color "#000000" bspc config window_gap 14 bspc config split_ratio 0.51 bspc config borderless_monocle true bspc config gapless_monocle true bspc config focus_follows_pointer true bspc config pointer_follows_focus true bspc config pointer_follows_monitor true bspc config auto_alternate true bspc config pointer_action1 move bspc config remove_unplugged_monitors true bspc config remove_disabled_monitors true ############################################################################################################################### #||| WORKSPACES & MONITORS ############################################################################################################################### # bspc monitor $monitor1 -d 1 2 3 4 5 # bspc monitor $monitor2 -d 1 2 3 4 5 ############################################################################################################################### #||| ASSIGNMENTS ############################################################################################################################### bspc rule -a kitty state=floating sticky bspc rule -a cool-retro-term state=floating sticky bspc rule -a til state=tiled bspc rule -a feh state=floating bspc rule -a sxiv state=floating bspc rule -a mpv state=floating bspc rule -a MPlayer state=floating bspc rule -a matplotlib state=floating bspc rule -a URxvt state=floating bspc rule -a Oblogout state=fullscreen bspc rule -a Zathura state=tiled bspc rule -a URxvt:launcher state=floating center sticky bspc rule -a LAUNCHER state=floating center sticky bspc rule -a Boomer state=fullscreen sticky bspc rule -a Screenkey manage=off ############################################################################################################################### #||| SCRIPTS ############################################################################################################################### bash ~/.startup & bash ~/.startup -r & ================================================ FILE: .config/bspwm/scripts/deskmenu ================================================ #!/bin/sh . "${HOME}/.cache/wal/colors.sh" [[ $BROWSER && ${BROWSER-x} ]] && browser=$BROWSER || browser='firefox' [[ $GUI_EDITOR && ${GUI_EDITOR-x} ]] && gui_editor=$GUI_EDITOR || gui_editor='nvim' DMENU_FN="Monoid-16" DMENU_NB="$color0" DMENU_NF="$color6" DMENU_SB="$color6" DMENU_SF="$color0" DMENU_OPTIONS="-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB" eval $(xdotool getmouselocation --shell) menu_widht=400 monitor_widht=$(wattr w $(lsw -r)) monitor_height=$(wattr h $(lsw -r)) lines=14 menu_height=$(( $lines * 23 )) maxx=$(( $monitor_widht - $menu_widht )) miny=$PANEL_HEIGHT maxy=$(( $monitor_height - $menu_height )) XP=$X [[ $XP -gt $maxx ]] && XP=$maxx YP=$Y [[ $YP -lt $miny ]] && YP=$miny [[ $YP -gt $maxy ]] && YP=$maxy #DMENU='dmenu $DMENU_OPTIONS' if [[ "$@" == "" ]]; then choice=$(echo -e "Flip\nRotate\nBalance windows\nEqualize windows\nRename desktop\nAdd desktop\nRemove desktop\nShow hidden windows\nEnable autogap" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB) else case $@ in Flip) choice=$(echo -e "Vertically\nHorizontally" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB) ;; Rotate) choice=$(echo -e "Right\nLeft\nFull turn" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB) ;; esac fi desktop2add(){ name="$(echo " " | dmenu -i -l 10 -y $PANEL_HEIGHT -w 500 $DMENU_OPTIONS -p 'Name new workspace:')"; bspc monitor -a "$name"; } desktop2remove(){ name="$(bspc query -D | dmenu -i -l 10 -y $PANEL_HEIGHT -w 500 $DMENU_OPTIONS -p 'Remove workspace:')"; bspc monitor -r "$name"; } desktop2rename(){ name="$(dmenu -i -l 10 -y $PANEL_HEIGHT -w 500 $DMENU_OPTIONS -p 'Rename workspace to:')"; bspc desktop -n "$name"; } case "$choice" in Flip) $0 Flip & ;; Rotate) $0 Rotate & ;; "Balance windows") bspc node @/ -B & ;; "Equalize windows") bspc node @/ -E & ;; "Rename desktop") desktop2rename & ;; "Add desktop") desktop2add & ;; "Remove desktop") desktop2remove & ;; "Focus follows pointer") toggle-focus-follows-pointer & ;; "Pointer follows focus") toggle-pointer-follows-focus & ;; "Show hidden windows") whid dmenu & ;; "Enable autogap") autogap & ;; "Left") bspc node @/ -R -90 & ;; "Right") bspc node @/ -R 90 & ;; "Full turn") bspc node @/ -R 180 & ;; "Vertically") bspc node @/ -F vertical & ;; "Horizontally") bspc node @/ -F horizontal & ;; esac ================================================ FILE: .config/bspwm/scripts/focus ================================================ #!/usr/bin/env bash dir=$1 node=$(bspc query -N -n) node=${node^^} target=$(bspc query -N -n $dir) # if there are any floating windows, use an edge of that if it overlaps into us node_dir=$1 case $node_dir in east) dir=x; sign=-lt;; west) dir=x; sign=-gt;; north) dir=y; sign=-gt;; south) dir=y; sign=-lt;; esac floating_windows=$(bspc query -N -d -n .window.local.floating) declare -A winmap=(); while read wid x y w h; do wid="${wid^^}" # capture window corners, abcd clockwise from top left winmap["${wid}_a_x"]=$x winmap["${wid}_a_y"]=$y winmap["${wid}_b_x"]=$((x+w)) winmap["${wid}_b_y"]=$y winmap["${wid}_c_x"]=$((x+w)) winmap["${wid}_c_y"]=$((y + h)) winmap["${wid}_d_x"]=$x winmap["${wid}_d_y"]=$((y+h)) done < <(wattr ixywh $floating_windows $node $og_target) inside_node() { x=$1 y=$2 ax="${winmap["${node}_a_x"]}" ay="${winmap["${node}_a_y"]}" bx="${winmap["${node}_b_x"]}" by="${winmap["${node}_b_y"]}" dx="${winmap["${node}_d_x"]}" dy="${winmap["${node}_d_y"]}" bax=$((bx - ax)) bay=$((by - ay)) dax=$((dx - ax)) day=$((dy - ay)) [ $(( (x - ax) * bax + (y - ay) * bay )) -lt "0" ] && return 1 [ $(( (x - bx) * bax + (y - by) * bay )) -gt "0" ] && return 1 [ $(( (x - ax) * dax + (y - ay) * day )) -lt "0" ] && return 1 [ $(( (x - dx) * dax + (y - dy) * day )) -gt "0" ] && return 1 return 0; } check_corner() { for c in $*; do x=${winmap["${wid}_${c}_x"]} y=${winmap["${wid}_${c}_y"]} if ! inside_node $x $y; then return 1 fi done return 0 } check_corners() { wid="$1" # if they are all inside node, we don't care # turns out this meant we couldn't grab floaters in certain situations # if check_corner a b c d; then # return 0; # fi case $node_dir in east) corners="a d";; west) corners="b c";; north) corners="c d";; south) corners="a b";; esac if check_corner $corners; then target_corners $corners fi if check_corner a b c d; then target_corners $corners fi # make a check-corner for the left or right half of node, allow matching one } target_corners() { for c in $*; do x=${winmap["${wid}_${c}_x"]} y=${winmap["${wid}_${c}_y"]} if [ -z "$target_x" ]; then target_x=$x target_y=$y target="$wid" fi # bias towards close corners val=${winmap["${wid}_${c}_${dir}"]} if [ "$val" "$sign" "$(eval echo \$target_$dir)" ]; then target=$wid target_x=$x target_y=$y fi done } # if any corner falls in us, use that, biased to higher values if [ ! -z "$floating_windows" ]; then for wid in $floating_windows; do wid="${wid^^}" [ "$wid" = "$node" ] && continue check_corners "$wid" done fi bspc config pointer_follows_focus true bspc node -f $target bspc config pointer_follows_focus false ================================================ FILE: .config/bspwm/scripts/move ================================================ #!/bin/sh bspc config pointer_follows_focus true dir=$1 node=$(bspc query -N -n) case $dir in west) fdim=width; tdim=height; sign=-;; east) fdim=width; tdim=height;; north) fdim=height; tdim=width; sign=-;; south) fdim=height; tdim=width;; esac floating_move() { percent=5 moveArgs="$sign$(echo "$percent/100*$(bspc query -T -m | jq .rectangle.$fdim)" | bc -l)" [ $fdim = "height" ] && moveArgs="0 $moveArgs" || moveArgs="$moveArgs 0" bspc node -v $moveArgs } tiled_move() { (bspc node -n $dir.\!automatic || bspc node -s "$dir") && return # compare height or width to parent self_measure="$(bspc query -T -n "$node" | jq .rectangle.$tdim)" parent_measure="$(bspc query -T -n "${node}#@parent" | jq .rectangle.$tdim)" if [ "$parent_measure" -gt "$self_measure" ]; then bspc node "${node}#@parent" -p $dir bspc node "${node}#@parent" -i receptacle_id="$(bspc query -N "${node}#@parent#@parent" -n '.descendant_of.leaf.!window')" bspc node $node -n $receptacle_id bspc node "${node}#@parent" -B else node="$(bspc query -N -n "${node}#@parent")" [ ! -z "$node" ] && tiled_move fi } $(bspc query -T -n | jq -r .client.state)_move bspc config pointer_follows_focus false ================================================ FILE: .config/bspwm/scripts/resize ================================================ #!/bin/sh dir=$2; if [ $1 == b ]; then if [ $dir == Left ]; then bspc node -z left -20 0 || bspc node -z right -20 0; elif [ $dir == Right ]; then bspc node -z right 20 0 || bspc node -z left 20 0; elif [ $dir == Up ]; then bspc node -z top 0 -20 || bspc node -z bottom 0 -20; elif [ $dir == Down ]; then bspc node -z bottom 0 20 || bspc node -z top 0 20; else exit 1 fi; elif [ $1 == s ]; then if [ $dir == Left ]; then bspc node -z right -20 0; elif [ $dir == Right ]; then bspc node -z left 20 0; elif [ $dir == Up ]; then bspc node -z bottom 0 -20; elif [ $dir == Down ]; then bspc node -z top 0 20; else exit 1 fi; else exit 1 fi; ================================================ FILE: .config/bspwm/scripts/scratch ================================================ #!/usr/bin/env bash id=$(xdotool search --class $1) if [ "$id" != "" ] then bspc node "$id" --flag hidden -f fi ================================================ FILE: .config/bspwm/scripts/select ================================================ #!/usr/bin/env bash read -r X Y W H < <(slop -f "%x %y %w %h" -b 1 -t 0 -q) # Width and Height in px need to be converted to columns/rows # To get these magic values, make a fullscreen st, and divide your screen width by ${tput cols}, height by ${tput lines} (( W /= 18 )) (( H /= 32 )) g=${W}x${H}+${X}+${Y} bspc rule -a urxvt -o state=floating urxvt -g $g ================================================ FILE: .config/bspwm/scripts/split ================================================ #!/bin/bash # needs https://github.com/wmutils/core for wattr eval $(xdotool getmouselocation --shell) IFS=" " read -a window <<< $(wattr whxy $(bspc query -N -n focused)) north=$(( Y - window[3])) west=$(( X - window[2])) width=${window[0]} height=${window[1]} if [ "$1" = "right" ]; then ratio=$(echo "$west / $width" | bc -l) bspc node -p east -o $ratio elif [ "$1" = "left" ]; then ratio=$(echo "$west / $width" | bc -l) bspc node -p west -o $ratio elif [ "$1" = "up" ]; then ratio=$(echo "$north / $height" | bc -l) bspc node -p north -o $ratio elif [ "$1" = "down" ]; then ratio=$(echo "$north / $height" | bc -l) bspc node -p south -o $ratio fi terminal bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel ================================================ FILE: .config/bspwm/scripts/windmenu ================================================ #!/bin/sh . "${HOME}/.cache/wal/colors.sh" [[ $BROWSER && ${BROWSER-x} ]] && browser=$BROWSER || browser='firefox' [[ $GUI_EDITOR && ${GUI_EDITOR-x} ]] && gui_editor=$GUI_EDITOR || gui_editor='nvim' DMENU_FN="Monoid-16" DMENU_NB="$color0" DMENU_NF="$color6" DMENU_SB="$color6" DMENU_SF="$color0" DMENU_OPTIONS="-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB" eval $(xdotool getmouselocation --shell) menu_widht=400 monitor_widht=$(wattr w $(lsw -r)) monitor_height=$(wattr h $(lsw -r)) lines=14 menu_height=$(( $lines * 23 )) maxx=$(( $monitor_widht - $menu_widht )) miny=$PANEL_HEIGHT maxy=$(( $monitor_height - $menu_height )) XP=$X [[ $XP -gt $maxx ]] && XP=$maxx YP=$Y [[ $YP -lt $miny ]] && YP=$miny [[ $YP -gt $maxy ]] && YP=$maxy #DMENU='dmenu $DMENU_OPTIONS' if [[ "$@" == "" ]]; then choice=$(echo -e "Window\nMove\nSplit\nClose\nHide\nUrgent" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB) else case $@ in Window) choice=$(echo -e "Floating\nMonocle\nFullscreen\nSticky\nPrivate\nLock" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB) ;; Split) choice=$(echo -e "Split up\nSplit down\nSplit left\nSplit right\nSplit 25%\nSplit 50%\nSplit 75%\nMove to split" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB) ;; "Move to") choice=$(echo -e "Desktop...\nNext free desktop\nLast focused desktop\nPromote" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB) ;; esac fi move2desktop(){ name="$(bspc query -D | dmenu -i -l 10 -y $PANEL_HEIGHT -w 500 $DMENU_OPTIONS -p 'Move to workspace:')"; bspc node -d "$name"; } case "$choice" in Window) $0 Window & ;; "Move to") $0 Move to & ;; Split) $0 Split & ;; Close) bspc node -c & ;; "Close windo class") xdo close -cd & ;; Hide) whid hide & ;; Urgent) bspc node -f next.urgent & ;; Floating) bspc node -t '~floating' & ;; Monocle) bspc desktop -l next & ;; Fullscreen) bspc node -t '~fullscreen' & ;; Private) bspc node -g private & ;; Lock) bspc node -g lock & ;; Desktop...) move2desktop & ;; "Next free desktop") bspc node -d next.free & ;; "Last focused desktop") bspc node -d last & ;; Promote) bspc node -w biggest.local & ;; "Split up") bspc node -p north & ;; "Split down") bspc node -p south & ;; "Split left") bspc node -p west & ;; "Split right") bspc node -p east & ;; "Split 25%") bspc node -o 0.25 & ;; "Split 50%") bspc node -o 0.5 & ;; "Split 75%") bspc node -o 0.75 & ;; "Move to split") bspc node -n last.\!automatic & ;; esac ================================================ FILE: .config/cheat/cheatrc.yaml ================================================ database: /home/bresilla/.local/share/cheat/cheatsheet.db ================================================ FILE: .config/color/bloks ================================================ #!/usr/bin/env bash # ANSI Color -- use these variables to easily have different color # and format output. Make sure to output the reset sequence after # colors (f = foreground, b = background), and use the 'off' # feature for anything you turn on. initializeANSI() { esc="" blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m" yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m" cyanf="${esc}[36m"; whitef="${esc}[37m" blackb="${esc}[1;30m"; redb="${esc}[1;31m"; greenb="${esc}[1;32m" yellowb="${esc}[1;33m" blueb="${esc}[1;34m"; purpleb="${esc}[1;35m" cyanb="${esc}[1;36m"; whiteb="${esc}[1;37m" boldon="${esc}[1m"; boldoff="${esc}[22m" italicson="${esc}[3m"; italicsoff="${esc}[23m" ulon="${esc}[4m"; uloff="${esc}[24m" invon="${esc}[7m"; invoff="${esc}[27m" reset="${esc}[0m" } # note in this first use that switching colors doesn't require a reset # first - the new color overrides the old one. numbers (){ initializeANSI cat << EOF ${blackf}11111111${reset} ${redf}22222222${reset} ${greenf}33333333${reset} ${yellowf}44444444${reset} ${bluef}55555555${reset} ${purplef}66666666${reset} ${cyanf}77777777${reset} ${whitef}88888888${reset} ${blackb}11111111${reset} ${redb}22222222${reset} ${greenb}33333333${reset} ${yellowb}44444444${reset} ${blueb}55555555${reset} ${purpleb}66666666${reset} ${cyanb}77777777${reset} ${whiteb}88888888${reset} EOF } blocks (){ initializeANSI cat << EOF ${blackf}████${reset}${blackb}████${reset} ${redf}████${reset}${redb}████${reset} ${greenf}████${reset}${greenb}████${reset} ${yellowf}████${reset}${yellowb}████${reset} ${bluef}████${reset}${blueb}████${reset} ${purplef}████${reset}${purpleb}████${reset} ${cyanf}████${reset}${cyanb}████${reset} ${whitef}████${reset}${whiteb}████${reset} ${blackf}████${reset}${blackb}████${reset} ${redf}████${reset}${redb}████${reset} ${greenf}████${reset}${greenb}████${reset} ${yellowf}████${reset}${yellowb}████${reset} ${bluef}████${reset}${blueb}████${reset} ${purplef}████${reset}${purpleb}████${reset} ${cyanf}████${reset}${cyanb}████${reset} ${whitef}████${reset}${whiteb}████${reset} ${blackf}████${reset}${blackb}████${reset} ${redf}████${reset}${redb}████${reset} ${greenf}████${reset}${greenb}████${reset} ${yellowf}████${reset}${yellowb}████${reset} ${bluef}████${reset}${blueb}████${reset} ${purplef}████${reset}${purpleb}████${reset} ${cyanf}████${reset}${cyanb}████${reset} ${whitef}████${reset}${whiteb}████${reset} EOF } case $1 in b) blocks;; n) numbers;; a) blocks && numbers;; *) blocks && numbers;; esac ================================================ FILE: .config/color/colorz ================================================ #!/usr/bin/env bash # Daniel Crisman's ANSI color chart script from # The Bash Prompt HOWTO: 6.1. Colours # http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html # # This function echoes a bunch of color codes to the # terminal to demonstrate what's available. Each # line is the color code of one forground color, # out of 17 (default + 16 escapes), followed by a # test use of that color on all nine background # colors (default + 8 escapes). T='•••' # The text for the color test echo -e "\n def 40m 41m 42m 43m 44m 45m 46m 47m"; for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \ '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \ ' 36m' '1;36m' ' 37m' '1;37m'; do FG=${FGs// /} echo -en " $FGs \033[$FG $T " for BG in 40m 41m 42m 43m 44m 45m 46m 47m; do echo -en "$EINS \033[$FG\033[$BG $T \033[0m"; done echo; done echo ================================================ FILE: .config/color/pipes ================================================ #!/usr/bin/env bash declare -i f=75 s=13 r=2000 t=0 c=1 n=0 l=0 declare -ir w=$(tput cols) h=$(tput lines) declare -i x=$((w/2)) y=$((h/2)) declare -ar v=( [00]="\x83" [01]="\x8f" [03]="\x93" [10]="\x9b" [11]="\x81" [12]="\x93" [21]="\x97" [22]="\x83" [23]="\x9b" [30]="\x97" [32]="\x8f" [33]="\x81" ) OPTIND=1 while getopts "f:s:r:h" arg; do case $arg in f) ((f=($OPTARG>19 && $OPTARG<101)?$OPTARG:$f));; s) ((s=($OPTARG>4 && $OPTARG<16 )?$OPTARG:$s));; r) ((r=($OPTARG>0)?$OPTARG:$r));; h) echo -e "Usage: pipes [OPTION]..." echo -e "Animated pipes terminal screensaver.\n" echo -e " -f [20-100]\tframerate (D=75)." echo -e " -s [5-15]\tprobability of a straight fitting (D=13)." echo -e " -r LIMIT\treset after x characters (D=2000)." echo -e " -h\t\thelp (this screen).\n" exit 0;; esac done tput smcup tput reset tput civis while ! read -t0.0$((1000/$f)) -n1; do # New position: (($l%2)) && ((x+=($l==1)?1:-1)) ((!($l%2))) && ((y+=($l==2)?1:-1)) # Loop on edges (change color on loop): ((c=($x>$w || $x<0 || $y>$h || $y<0)?($RANDOM%7-1):$c)) ((x=($x>$w)?0:(($x<0)?$w:$x))) ((y=($y>$h)?0:(($y<0)?$h:$y))) # New random direction: ((n=$RANDOM%$s-1)) ((n=($n>1||$n==0)?$l:$l+$n)) ((n=($n<0)?3:$n%4)) # Print: tput cup $y $x echo -ne "\033[1;3${c}m\xe2\x94${v[$l$n]}" (($t>$r)) && tput reset && tput civis && t=0 || ((t++)) l=$n done tput rmcup ================================================ FILE: .config/color/skull ================================================ #!/bin/sh # ┳━┓┳━┓0┏┓┓┳━┓┏━┓┓ ┳ # ┃┳┛┃━┫┃┃┃┃┃━┃┃ ┃┃┃┃ # ┃┗┛┛ ┃┃┃┗┛┻━┛┛━┛┗┻┛ # ┳━┓┳ ┓┳┏ ┳━┓ # ┃━┛┃ ┃┣┻┓┣━ # ┇ ┗━┛┃ ┛┻━┛ # ┓━┓┳┏ ┳ ┓┳ ┳ # ┗━┓┣┻┓┃ ┃┃ ┃ # ━━┛┇ ┛┗━┛┗━┛┗━┛ # # the worst color script # by xero cat << 'EOF'  .................  .syhhso++++++++/++osyyhys+.  -oddyo+o+++++++++++++++o+oo+osdms:  :dmyo++oosssssssssssssssooooooo+/+ymm+`  hmyo++ossyyhhddddddddddddhyyyssss+//+ymd-  -mho+oosyhhhddmmmmmmmmmmmmmmddhhyyyso+//+hN+  my+++syhhhhdmmNNNNNNNNNNNNmmmmmdhhyyyyo//+sd:  hs//+oyhhhhdmNNNNNNNNNNNNNNNNNNmmdhyhhhyo//++y  s+++shddhhdmmNNNNNNNNNNNNNNNNNNNNmdhhhdhyo/++/  'hs+shmmmddmNNNNNNNNNNNNNNNNNNNNNmddddddhs+oh/  shsshdmmmmmNNMMMMMMMMMMMNNNNNNNNmmmmmmdhssdh-  +ssohdmmmmNNNNNMMMMMMMMNNNNNNmmmmmNNmdhhhs:`  -+oo++////++sydmNNNNNNNNNNNNNNNNNNNdyyys/--://+//:  d/+hmNNNmmdddhhhdmNNNNNNNNNNNNNNNmdhyyyhhhddmmNmdyd-  ++--+ymNMMNNNNNNmmmmNNNNNNNNNNNmdhddmNNMMMMMMNmhyss  /d+` -+ydmNMMMMMMNNmNMMMMMMMmmmmNNMMMMMNNmh- :sdo  sNo ` /ohdmNNMMMMNNMMMMMNNNMMMMMNmdyo/ ` hNh  M+' ``-/oyhmNNMNhNMNhNMMMMNmho/ ` 'MN/  d+' `-+osydh0w.nzmNNmho: 'mN:  +o/ ` :oo+:s :+o/-` -dds  :hdo x `-/ooss:':+ooo: ` 0 :sdm+  +dNNNh+ :ydmNNm' `sddmyo +hmNmds  dhNMMNNNNmddhsyhdmmNNNM: NNmNmhyo+oyyyhmNMMNmysd  ydNNNNNh+/++ohmMMMMNMNh oNNNNNNNmho++++yddhyssy  `:sNMMMMN' `mNMNNNd/` XXXXXXXXX y/hMMNm/ .dXb. -hdmdy: ` XXXXXXX XXXXXXXX `o+hNNds. -ymNNy- .yhys+/`` XXXXXX XXXXXXXX +-+//o/+odMNMMMNdmh++////-/s XXXXXX XXXXXXX mhNd -+d/+myo++ysy/hs -mNsdh/ XXXXXX XXXXXXXX mhMN+ dMm-/-smy-::dMN/sMMmdo XXXXXX XXXXXXXXXX NMy+NMMh oMMMs yMMMyNMMs+ XXXXXXX XXXXXXXXXXX dy-hMMm+dMMMdoNMMh ydo XXXXXXXXX XXXXXXXXXXXXX  smm 'NMMy dms sm XXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXER0 EOF ================================================ FILE: .config/compton/compton ================================================ # Shadow shadow = true; shadow-radius = 15; shadow-offset-x = -5; shadow-offset-y = -5; shadow-opacity = 0.6; shadow-exclude = [ "! name~=''", "class_g = 'Conky'", "class_g = 'Dunst'" ]; # Opacity inactive-opacity = 1.0; blur-background = false; blur-kern = "3x3box"; blur-background-fixed = false; blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ]; # Fading fading = true; fade-delta = 5; fade-in-step = 0.03; fade-out-step = 0.03; fade-exclude = [ ]; # Other backend = "glx"; mark-wmwin-focused = true; mark-ovredir-focused = true; use-ewmh-active-win = false; detect-rounded-corners = true; detect-client-opacity = true; refresh-rate = 0; vsync = true; sw-opti = false; unredir-if-possible = false; focus-exclude = [ ]; detect-transient = true; detect-client-leader = true; invert-color-include = [ ]; # GLX backend glx-no-stencil = true; glx-no-rebind-pixmap = false; use-damage = true; # Window type settings wintypes: { tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; } dock = { shadow = false; } dnd = { shadow = false; } popup_menu = { opacity = 1.0; } dropdown_menu = { opacity = 1.0; } }; ================================================ FILE: .config/conky/conky ================================================ conky.config = { alignment = 'top_left', background = false, border_width = 0, color0 = 'white', color1 = 'black', color5 = '#F69CDA', --cpu_avg_samples = 2, --default_color = 'white', --default_bar_height = 6, --default_bar_width = 0, --default_gauge_height = 25, --default_gauge_width = 40, --default_graph_height = 25, --default_graph_width = , --default_outline_color = 'white', --default_shade_color = 'white', --disable_auto_reload = true, diskio_avg_samples = 3, --display = , --xinerama_head = , double_buffer = true, --draw_borders = false, --draw_graph_borders = true, --draw_outline = false, --draw_shades = false, --extra_newline = false, font = 'Iosevka Term SS01:size=12', gap_x = 3285, gap_y = 80, --http_refresh = false, if_up_strictness = 'link', --max_text_width = 0, --max_user_text = 16384, --maximum_width = , --minimum_height = 5, --minimum_width = 5, net_avg_samples = 4, --no_buffers = true, --nvidia_display = , --out_to_console = false, --out_to_http = false, --out_to_ncurses = false, --out_to_stderr = false, --out_to_x = true, --override_utf8_locale = true, own_window = true, --own_window_class = 'Conky', --own_window_title = 'conky0 ()' own_window_argb_visual = true, own_window_argb_value = 0, --own_window_transparent = yes, own_window_type = 'override', --short_units = true, --show_graph_scale = false, --show_graph_range = false, --stippled_borders = 0, --text_buffer_size = 256, --top_cpu_separate = true, --top_name_verbose = true, --top_name_width = 15, --total_run_times = 0, update_interval = 0.5, update_interval_on_battery = 1, use_spacer = 'none', use_xft = true } conky.text = [[ $color5${hr 2} ${alignc}${color0}${font ChessType:pixelsize=80}${time %I:%M}$font ${alignc}${time %d}$color ${time %B} ${time %Y} ${alignc}${color5}${font ChessType:pixelsize=80}BRESILLA$font ${color0} Hostname: $alignr$nodename Processor: ${alignr}${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 1-27} #Graphics: ${alignr}${exec nvidia-smi --query-gpu=name --format=csv,noheader} Kernel: $alignr$kernel Battery: ${battery_percent BAT0}% ${battery_bar 12 BAT0} Volume: ${exec amixer -c 0 get Master | grep Mono: | cut -d " " -f6} ${goto 200}\ Brightness: ${exec cat /sys/class/backlight/intel*/brightness} ${alignr}Uptime: $alignr$uptime $color5${hr 2} ${color0}${goto 50}$cpu% ${goto 90}${freq}mHz ${goto 180}${color0}${acpitemp}℃\ ${alignr 40}${color0}$memperc% = $mem / $memmax ${color0}${cpugraph 120,250 00ffff 00ff00} \ ${color0}${memgraph 120,250 00ffff 00ff00} ${color0}CPU 1 : $color0${cpu cpu1}% ${goto 100}${cpubar cpu1 12,150} \ ${color0}CPU 5 : ${alignr 5}$color0${cpu cpu5}% ${cpubar cpu5 12,150} ${color0}CPU 2 : $color0${cpu cpu2}% ${goto 100}${cpubar cpu2 12,150} \ ${color0}CPU 6 : ${alignr 5}$color0${cpu cpu6}% ${cpubar cpu6 12,150} ${color0}CPU 3 : $color0${cpu cpu3}% ${goto 100}${cpubar cpu3 12,150} \ ${color0}CPU 7 : ${alignr 5}$color0${cpu cpu7}% ${cpubar cpu7 12,150} ${color0}CPU 4 : $color0${cpu cpu4}% ${goto 100}${cpubar cpu4 12,150} \ ${color0}CPU 8 : ${alignr 5}$color0${cpu cpu8}% ${cpubar cpu8 12,150} #GPU:${alignr}${exec nvidia-smi --query-gpu=memory.used --format=csv,noheader} / ${exec nvidia-smi --query-gpu=memory.total --format=csv,noheader} ${color0}Swap memory: $swapperc% = $swap/$swapmax \ ${color0} ${swapbar 12 00ff00 ff0000} $color5${hr 2} ${color0}Highest CPU PID CPU% | \ ${color0}Highest MEM PID MEM% ${color0} ${top name 1} ${top pid 1} ${top cpu 1} | \ ${color0} ${top_mem name 1} ${top_mem pid 1} ${top_mem mem 1} ${color0} ${top name 2} ${top pid 2} ${top cpu 2} | \ ${color0} ${top_mem name 2} ${top_mem pid 2} ${top_mem mem 2} ${color0} ${top name 3} ${top pid 3} ${top cpu 3} | \ ${color0} ${top_mem name 3} ${top_mem pid 3} ${top_mem mem 3} ${color0} ${top name 4} ${top pid 4} ${top cpu 4} | \ ${color0} ${top_mem name 4} ${top_mem pid 4} ${top_mem mem 4} ${color0} ${top name 5} ${top pid 5} ${top cpu 5} | \ ${color0} ${top_mem name 5} ${top_mem pid 5} ${top_mem mem 5} ${color0} ${top name 6} ${top pid 6} ${top cpu 6} | \ ${color0} ${top_mem name 6} ${top_mem pid 6} ${top_mem mem 6} ${color0} ${top name 7} ${top pid 7} ${top cpu 7} | \ ${color0} ${top_mem name 7} ${top_mem pid 7} ${top_mem mem 7} ${color0} ${top name 8} ${top pid 8} ${top cpu 8} | \ ${color0} ${top_mem name 8} ${top_mem pid 8} ${top_mem mem 8} $color5${hr 2} ${color0}/dev/sda1\ ${goto 160}${color0}${diskio_read sda1}\ ${goto 242}${color0}R|${color0}|W\ ${goto 320}${color0}${diskio_write sda1} ${color0}${diskiograph_read 60,250 00ffff 00ff00} \ ${color0}${diskiograph_write 60,250 00ffff 00ff00} ${color0}${fs_used /} /\ ${color0}${fs_size /} \ ${color0}${fs_bar 12 /} ${color0}/dev/nvme0n1\ ${goto 160}${color0}${diskio_read nvme0n1}\ ${goto 242}${color0}R|${color0}|W\ ${goto 320}${color0}${diskio_write nvme0n1} ${color0}${diskiograph_read 60,250 00ffff 00ff00} \ ${color0}${diskiograph_write 60,250 00ffff 00ff00} ${color0}${fs_used /home/bresilla/DATA} /\ ${color0}${fs_size /home/bresilla/DATA} \ ${color0}${fs_bar 12 /home/bresilla/DATA} $color5${hr 2} ${if_up wlp2s0}\ ${goto 80}${color0}T:${totaldown wlp2s0} \ ${goto 180}${color0}${downspeed wlp2s0}\ ${goto 245}↓${color0}↑ ${upspeed wlp2s0}\ ${goto 350}${color0}T:${totalup wlp2s0} ${color0}${downspeedgraph wlp2s0 90,250 00ffff 00ff00} \ ${color0}${upspeedgraph wlp2s0 90,250 00ffff 00ff00} ${color0}ID: ${color0}wlp2s0 \ ${goto 150}${color0}MAC: ${color0}${wireless_ap wlp2s0} \ ${alignr}${color0}IP: ${addr wlp2s0} ${color0}CHN: ${color0}${wireless_channel wlp2s0} \ ${goto 150}${color0} FRQ: ${color0}${wireless_freq wlp2s0} \ ${alignr}${color0}ESSID: ${color0}${wireless_essid wlp2s0} ${endif}\ $color5${hr 2} ${color0}Outbound Connection ${alignr} Remote Service/Port${color} ${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0} ${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1} ${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2} ${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3} ${color0}Inbound Connection ${alignr} Local Service/Port${color} ${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0} ${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1} $color5${hr 2} ]] ================================================ FILE: .config/cool-retro-term/TRIM.json ================================================ { "backgroundColor": "#000000", "fontColor": "#edfff1", "flickering": 0.2997, "horizontalSync": 0.2962, "staticNoise": 0.2038, "chromaColor": 0.399, "saturationColor": 0.5017, "screenCurvature": 0, "glowingLine": 0.0976, "burnIn": 0.5976, "bloom": 0.7962, "rasterization": 0, "jitter": 0.0976, "rbgShift": 0.1045, "brightness": 0.2963, "contrast": 1, "ambientLight": 0, "windowOpacity": 0.795, "fontName": "System: Iosevka Term SS01", "fontWidth": 1, "margin": 0.7533, "name": "TRIM", "version": 2 } ================================================ FILE: .config/direnv/direnvrc ================================================ export INDIRENV=true; use_ros(){ _CATKIN_SETUP_DIR=/opt/ubuntu/opt/ros/install export PYTHONPATH=/opt/ubuntu/usr/lib/python3/dist-packages ROSPATH="$_CATKIN_SETUP_DIR/bin" && [[ -d "$ROSPATH" ]] && PATH="$ROSPATH:$PATH" || exit 1 if [[ -n ${ZSH_VERSION-} ]]; then echo "sourcing $_CATKIN_SETUP_DIR/setup.zsh"; source $_CATKIN_SETUP_DIR/setup.zsh; elif [[ -n ${BASH_VERSION-} ]]; then echo "sourcing $_CATKIN_SETUP_DIR/setup.bash"; source $_CATKIN_SETUP_DIR/setup.bash; else echo "sourcing $_CATKIN_SETUP_DIR/setup.sh"; source $_CATKIN_SETUP_DIR/setup.sh; fi } use_docker(){ if [[ -n $(awk -F/ '$2 == "docker"' /proc/self/cgroup) ]]; then echo "ALREADY INSIDE DOCKER"; else docker run -v $PWD/:/$(basename $PWD)/ -w /$( basename $PWD)/ --rm -it $@; fi } layout_viper() { local BLUE='\033[0;34m';local GREEN='\033[0;32m';local RED='\033[0;31m';local NC='\033[0m' CONDAPATH="/opt/conda/bin" && [[ -d "$CONDAPATH" ]] && PATH="$CONDAPATH:$PATH" || exit 1 if [ -f environment.yml ]; then local env_name =$(grep name: environment.yml | sed -e 's/name: //' | cut -d "'" -f 2 | cut -d '"' -f 2) source activate ${env_name} PATH="/opt/conda/envs/${env_name}/bin:$PATH" printf "\n${GREEN}environment specified${NC}\nusing environment: ${BLUE}${conda_env}${NC}\n\n"; else CONDALOC="$PWD/.direnv/bin" conda_env=$(conda info | sed -n '3p' | cut -d: -f2) if [[ -d "$CONDALOC" ]]; then source activate $PWD/.direnv # PATH="$CONDALOC:$PATH" conda_env=$(conda info | sed -n '3p' | cut -d: -f2) printf "\n${GREEN}environment specified${NC}\nusing environment: ${BLUE}${conda_env}${NC}\n\n"; else conda create -p $PWD/.direnv python=${1:-3.7} source activate $PWD/.direnv # PATH="$CONDALOC:$PATH" fi fi; } layout_conda() { local BLUE='\033[0;34m';local GREEN='\033[0;32m';local RED='\033[0;31m';local NC='\033[0m' CONDAPATH="/opt/conda/bin" && [[ -d "$CONDAPATH" ]] && PATH="$CONDAPATH:$PATH" || exit 1 if [ -n "$1" ]; then local env_name="$1" source activate ${env_name} conda_env=$(conda info | sed -n '3p' | cut -d: -f2) if [ $? == 1 ]; then printf "\n${RED}no environment specified${NC}\nusing environment: ${BLUE}${conda_env}${NC}\n\n"; else printf "\n${GREEN}environment specified${NC}\nusing environment: ${BLUE}${conda_env}${NC}\n\n"; fi elif [ -f environment.yml ]; then local env_name =$(grep name: environment.yml | sed -e 's/name: //' | cut -d "'" -f 2 | cut -d '"' -f 2) source activate ${env_name} printf "\n${GREEN}environment specified${NC}\nusing environment: ${BLUE}${conda_env}${NC}\n\n"; else printf "\n${RED}no environment specified${NC}\nusing base environment\n\n"; fi; } export_function() { local name=$1 local alias_dir=$PWD/.direnv/functions mkdir -p "$alias_dir" PATH_add "$alias_dir" local target="$alias_dir/$name" if declare -f "$name" >/dev/null; then echo "#!$SHELL" > "$target" declare -f "$name" >> "$target" 2>/dev/null # Notice that we add shell variables to the function trigger. echo "$name \$*" >> "$target" chmod +x "$target" fi } # EXAMPLE # woot() { # echo woot # } # export_function woot export_alias() { local name=$1 shift local alias_dir=$PWD/.direnv/aliases local target="$alias_dir/$name" mkdir -p "$alias_dir" PATH_add "$alias_dir" echo "#!/usr/bin/env bash -e" > "$target" echo "$@" >> "$target" chmod +x "$target" } # EXAMPLE # export_alias piuu "ls -la" tidyup(){ [[ -d "$PWD/.direnv/functions" ]] && rm -r $PWD/.direnv/functions [[ -d "$PWD/.direnv/aliases" ]] && rm -r $PWD/.direnv/aliases } ================================================ FILE: .config/fish/completions/fisher.fish ================================================ fisher complete ================================================ FILE: .config/fish/conf.d/done.fish ================================================ # MIT License # Copyright (c) 2016 Francisco Lourenço & Daniel Wehner # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. set -g __done_version 1.12.0 function __done_get_focused_window_id if type -q lsappinfo lsappinfo info -only bundleID (lsappinfo front) | cut -d '"' -f4 else if test -n "$SWAYSOCK" and type -q jq swaymsg --type get_tree | jq '.. | objects | select(.focused == true) | .id' else if type -q xprop and test -n "$DISPLAY" xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2 else if uname -a | string match --quiet --regex Microsoft echo 12345 # dummy value since cannot get window state info under WSL end end function __done_is_tmux_window_active set -q fish_pid; or set -l fish_pid %self # If tmux is set to not run as a login shell, # e.g. `set -g default-command "${SHELL}"` in tmux config, # then the pane_pid will be parent pid of the current fish shell. if status is-login set tmux_fish_pid $fish_pid else set tmux_fish_pid (ps -o ppid= -p $fish_pid) end # tmux session attached and window is active -> no notification # all other combinations -> send notification tmux list-panes -a -F "#{session_attached} #{window_active} #{pane_pid}" | string match -q "1 1 $tmux_fish_pid" end function __done_is_screen_window_active string match --quiet --regex "$STY\s+\(Attached" (screen -ls) end function __done_is_process_window_focused # Return false if the window is not focused set __done_focused_window_id (__done_get_focused_window_id) if test "$__done_initial_window_id" != "$__done_focused_window_id" return 1 end # If inside a tmux session, check if the tmux window is focused if type -q tmux and test -n "$TMUX" __done_is_tmux_window_active return $status end # If inside a screen session, check if the screen window is focused if type -q screen and test -n "$STY" __done_is_screen_window_active return $status end return 0 end # verify that the system has graphical capabilities before initializing if test -z "$SSH_CLIENT" # not over ssh and count (__done_get_focused_window_id) >/dev/null # is able to get window id set -g __done_initial_window_id '' set -q __done_min_cmd_duration; or set -g __done_min_cmd_duration 5000 set -q __done_exclude; or set -g __done_exclude 'git (?!push|pull)' set -q __done_notify_sound; or set -g __done_notify_sound 0 function __done_started --on-event fish_preexec set __done_initial_window_id (__done_get_focused_window_id) end function __done_ended --on-event fish_prompt set -l exit_status $status # backwards compatibility for fish < v3.0 set -q cmd_duration; or set -l cmd_duration $CMD_DURATION if test $cmd_duration and test $cmd_duration -gt $__done_min_cmd_duration # longer than notify_duration and not __done_is_process_window_focused # process pane or window not focused and not string match -qr $__done_exclude $history[1] # don't notify on git commands which might wait external editor # Store duration of last command set -l humanized_duration (echo "$cmd_duration" | humanize_duration) set -l title "Done in $humanized_duration" set -l wd (pwd | sed "s,^$HOME,~,") set -l message "$wd/ $history[1]" set -l sender $__done_initial_window_id if test $exit_status -ne 0 set title "Failed ($exit_status) after $humanized_duration" end if set -q __done_notification_command eval $__done_notification_command if test "$__done_notify_sound" -eq 1 echo -e "\a" # bell sound end else if type -q terminal-notifier # https://github.com/julienXX/terminal-notifier if test "$__done_notify_sound" -eq 1 terminal-notifier -message "$message" -title "$title" -sender "$__done_initial_window_id" -sound default else terminal-notifier -message "$message" -title "$title" -sender "$__done_initial_window_id" end else if type -q osascript # AppleScript osascript -e "display notification \"$message\" with title \"$title\"" if test "$__done_notify_sound" -eq 1 echo -e "\a" # bell sound end else if type -q notify-send # Linux notify-send set -l urgency if test $exit_status -ne 0 set urgency "--urgency=critical" end notify-send $urgency --icon=terminal --app-name=fish "$title" "$message" if test "$__done_notify_sound" -eq 1 echo -e "\a" # bell sound end else if type -q notify-desktop # Linux notify-desktop set -l urgency if test $exit_status -ne 0 set urgency "--urgency=critical" end notify-desktop $urgency --icon=terminal --app-name=fish "$title" "$message" if test "$__done_notify_sound" -eq 1 echo -e "\a" # bell sound end else if uname -a | string match --quiet --regex Microsoft if powershell.exe -command "Import-Module -Name BurntToast" 2>/dev/null if test "$__done_notify_sound" -eq 1 set soundopt "-Sound Default" end powershell.exe -command New-BurntToastNotification -Text \""$title"\",\""$message"\" $soundopt end else # anything else echo -e "\a" # bell sound end end end end function __done_uninstall -e done_uninstall # Erase all __done_* functions functions -e __done_ended functions -e __done_started functions -e __done_get_focused_window_id functions -e __done_is_tmux_window_active functions -e __done_is_screen_window_active functions -e __done_is_process_window_focused # Erase __done variables set -e __done_version end ================================================ FILE: .config/fish/config.fish ================================================ function fish_mode_prompt; end function fish_greeting; end function fish_prompt env FISH_VERSION=$FISH_VERSION PROMPTLINE_LAST_EXIT_CODE=$status bash ~/.config/promptline left $fish_bind_modea (__fish_git_prompt) end function fish_right_prompt env FISH_VERSION=$FISH_VERSION PROMPTLINE_LAST_EXIT_CODE=$status bash ~/.config/promptline right $fish_bind_mode (__fish_git_prompt) end set -g __fish_git_prompt_show_informative_status 1 set -g __fish_git_prompt_hide_untrackedfiles 1 set -g __fish_git_prompt_color_branch magenta set -g __fish_git_prompt_showupstream "informative" set -g __fish_git_prompt_char_upstream_ahead "↑" set -g __fish_git_prompt_char_upstream_behind "↓" set -g __fish_git_prompt_char_upstream_prefix "" set -g __fish_git_prompt_char_stagedstate "●" set -g __fish_git_prompt_char_dirtystate "✚" set -g __fish_git_prompt_char_untrackedfiles "-" set -g __fish_git_prompt_char_conflictedstate "✖" set -g __fish_git_prompt_char_cleanstate "✔" set -g __fish_git_prompt_color_dirtystate blue set -g __fish_git_prompt_color_stagedstate yellow set -g __fish_git_prompt_color_invalidstate red set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal set -g __fish_git_prompt_color_cleanstate green set -g __fish_prompt_normal (set_color normal) function sh_aliases \ --description 'import bash aliases to .fish function files.' for file in ~/.func/* for a in (cat $file | grep "^alias") set aname (echo $a | sed 's/alias \(.*\)=\(\'\|\"\).*/\1/') set command (echo $a | sed 's/alias \(.*\)=\(\'\|\"\)\(.*\)\2/\3/') if test -f ~/.config/fish/functions2/$aname.fish echo "Overwriting alias $aname as $command" else echo "Creating alias $aname as $command" end alias $aname $command funcsave $aname end end end ###DIRENV # direnv hook fish | source ================================================ FILE: .config/fish/fish_variables ================================================ # This file contains fish universal variable definitions. # VERSION: 3.0 SETUVAR __fish_init_2_39_8:\x1d SETUVAR __fish_init_2_3_0:\x1d SETUVAR __fish_init_3_x:\x1d SETUVAR fish_color_autosuggestion:555\x1ebrblack SETUVAR fish_color_cancel:\x2dr SETUVAR fish_color_command:005fd7 SETUVAR fish_color_comment:990000 SETUVAR fish_color_cwd:green SETUVAR fish_color_cwd_root:red SETUVAR fish_color_end:009900 SETUVAR fish_color_error:ff0000 SETUVAR fish_color_escape:00a6b2 SETUVAR fish_color_history_current:\x2d\x2dbold SETUVAR fish_color_host:normal SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue SETUVAR fish_color_normal:normal SETUVAR fish_color_operator:00a6b2 SETUVAR fish_color_param:00afff SETUVAR fish_color_quote:999900 SETUVAR fish_color_redirection:00afff SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack SETUVAR fish_color_status:red SETUVAR fish_color_user:brgreen SETUVAR fish_color_valid_path:\x2d\x2dunderline SETUVAR fish_greeting:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell SETUVAR fish_key_bindings:fish_vi_key_bindings SETUVAR fish_pager_color_completion:\x1d SETUVAR fish_pager_color_description:B3A06D\x1eyellow SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan ================================================ FILE: .config/fish/fishfile ================================================ edc/bass jorgebucaran/fish-bax franciscolourenco/done ================================================ FILE: .config/fish/functions/:q.fish ================================================ # Defined in - @ line 1 function :q --description 'alias :q exit' exit $argv; end ================================================ FILE: .config/fish/functions/__bass.py ================================================ """ To be used with a companion fish function like this: function refish set -l _x (python /tmp/bass.py source ~/.nvm/nvim.sh ';' nvm use iojs); source $_x; and rm -f $_x end """ from __future__ import print_function import json import os import signal import subprocess import sys import traceback BASH = 'bash' FISH_READONLY = [ 'PWD', 'SHLVL', 'history', 'pipestatus', 'status', 'version', 'FISH_VERSION', 'fish_pid', 'hostname', '_', 'fish_private_mode' ] IGNORED = [ 'PS1', 'XPC_SERVICE_NAME' ] def ignored(name): if name == 'PWD': # this is read only, but has special handling return False # ignore other read only variables if name in FISH_READONLY: return True if name in IGNORED or name.startswith("BASH_FUNC"): return True return False def escape(string): # use json.dumps to reliably escape quotes and backslashes return json.dumps(string).replace(r'$', r'\$') def comment(string): return '\n'.join(['# ' + line for line in string.split('\n')]) def gen_script(): # Use the following instead of /usr/bin/env to read environment so we can # deal with multi-line environment variables (and other odd cases). env_reader = "python -c 'import os,json; print(json.dumps({k:v for k,v in os.environ.items()}))'" args = [BASH, '-c', env_reader] output = subprocess.check_output(args, universal_newlines=True) old_env = output.strip() pipe_r, pipe_w = os.pipe() if sys.version_info >= (3, 4): os.set_inheritable(pipe_w, True) command = 'eval $1 && ({}; alias) >&{}'.format( env_reader, pipe_w ) args = [BASH, '-c', command, 'bass', ' '.join(sys.argv[1:])] subprocess.check_call(args, universal_newlines=True, close_fds=False) os.close(pipe_w) with os.fdopen(pipe_r) as f: new_env = f.readline() alias = f.read() new_env = new_env.strip() old_env = json.loads(old_env) new_env = json.loads(new_env) script_lines = [] for k, v in new_env.items(): if ignored(k): continue v1 = old_env.get(k) if not v1: script_lines.append(comment('adding %s=%s' % (k, v))) elif v1 != v: script_lines.append(comment('updating %s=%s -> %s' % (k, v1, v))) # process special variables if k == 'PWD': script_lines.append('cd %s' % escape(v)) continue else: continue if k == 'PATH': value = ' '.join([escape(directory) for directory in v.split(':')]) else: value = escape(v) script_lines.append('set -g -x %s %s' % (k, value)) for var in set(old_env.keys()) - set(new_env.keys()): script_lines.append(comment('removing %s' % var)) script_lines.append('set -e %s' % var) script = '\n'.join(script_lines) return script + '\n' + alias script_file = os.fdopen(3, 'w') if not sys.argv[1:]: print('__bass_usage', file=script_file, end='') sys.exit(0) try: script = gen_script() except subprocess.CalledProcessError as e: sys.exit(e.returncode) except Exception: print('Bass internal error!', file=sys.stderr) raise # traceback will output to stderr except KeyboardInterrupt: signal.signal(signal.SIGINT, signal.SIG_DFL) os.kill(os.getpid(), signal.SIGINT) else: script_file.write(script) ================================================ FILE: .config/fish/functions/ari.fish ================================================ # Defined in - @ line 1 function ari --description 'alias ari aria2c' aria2c $argv; end ================================================ FILE: .config/fish/functions/asci.fish ================================================ # Defined in - @ line 1 function asci --description 'alias asci asciinema' asciinema $argv; end ================================================ FILE: .config/fish/functions/bass.fish ================================================ function bass set -l bash_args $argv set -l bass_debug if test "$bash_args[1]_" = '-d_' set bass_debug true set -e bash_args[1] end set -l script_file (mktemp) python (dirname (status -f))/__bass.py $bash_args 3>$script_file set -l bass_status $status if test $bass_status -ne 0 return $bass_status end if test -n "$bass_debug" cat $script_file end source $script_file /bin/rm $script_file end function __bass_usage echo "Usage: bass [-d] " end ================================================ FILE: .config/fish/functions/bax.fish ================================================ set -g bax_version 1.0.0 complete -xc bax -n __fish_use_subcommand -a --help -d "Show usage help" complete -xc bax -n __fish_use_subcommand -a --version -d "$bax_version" function bax switch "$argv" case {,-}-h{elp,} "" echo "usage: bax Run a bash command" echo " bax --help Show this help" echo " bax --version Show the current version" case {,-}-v{ersion,} echo "bax version $bax_version" case \* set -l delim "@@@@bax@@@@" command bash -c " $argv status=\$? [ \$status -eq 0 ] && echo $delim && alias && echo $delim && command awk ' BEGIN { for (k in ENVIRON) if (gsub(/\n/, \"\\\n\", ENVIRON[k]) >= 0) print k, ENVIRON[k] } ' || echo $delim \$status " | command awk -v delim="$delim" ' $0 != delim || !++i { if ($1 == delim) exit $2 else if (i < 2) print (i ? $0 : gsub(/\$/, "\\\$") >= 0 ? "echo \"" $0 "\"" : "") else env[$1] = (gsub(/\\\n/, "\n") >= 0 ? substr($0, length($1) + 2) : "") } END { for (k in env) if (len++ && k !~ /^(_|SHLVL|PS1|XPC_SERVICE_NAME|AWK(LIB)?PATH)$|^BASH_FUNC/\ && !(k in ENVIRON && ENVIRON[k] == env[k])) print (\ k == "PATH" && gsub(/:/, "\" \"", env[k]) >= 0\ ? "set PATH \"" env[k] "\"" : k == "PWD"\ ? "cd \"" env[k] "\"" : "set -gx " k " \"" env[k] "\""\ ) if (!len) print "exit " $2 else for (k in ENVIRON) if (!(k in env)) print "set -e " k } ' | source end end ================================================ FILE: .config/fish/functions/class.fish ================================================ # Defined in - @ line 1 function class --description alias\ class\ xprop\ \|awk\ \'/WM_CLASS/\{print\ \$4\}\' xprop |awk '/WM_CLASS/{print $4}' $argv; end ================================================ FILE: .config/fish/functions/copy.fish ================================================ # Defined in - @ line 1 function copy --description 'alias copy xclip -sel clip' xclip -sel clip $argv; end ================================================ FILE: .config/fish/functions/cp.fish ================================================ # Defined in - @ line 1 function cp --description 'alias cp acp -g -r' acp -g -r $argv; end ================================================ FILE: .config/fish/functions/dev.fish ================================================ # Defined in - @ line 1 function dev --description 'alias dev devenv' devenv $argv; end ================================================ FILE: .config/fish/functions/df.fish ================================================ # Defined in - @ line 1 function df --description 'alias df dfc -w' dfc -w $argv; end ================================================ FILE: .config/fish/functions/doc.fish ================================================ # Defined in - @ line 1 function doc --description 'alias doc docker' docker $argv; end ================================================ FILE: .config/fish/functions/docker.fish ================================================ # Defined in - @ line 1 function docker --description 'alias docker supdock' supdock $argv; end ================================================ FILE: .config/fish/functions/dotfile.fish ================================================ # Defined in - @ line 1 function dotfile --description 'alias dotfile /usr/bin/git --git-dir=$HOME/Dots --work-tree=$HOME' /usr/bin/git --git-dir=$HOME/Dots --work-tree=$HOME $argv; end ================================================ FILE: .config/fish/functions/dxe.fish ================================================ # Defined in - @ line 1 function dxe --description 'alias dxe chmod -x' chmod -x $argv; end ================================================ FILE: .config/fish/functions/exe.fish ================================================ # Defined in - @ line 1 function exe --description 'alias exe chmod +x' chmod +x $argv; end ================================================ FILE: .config/fish/functions/fisher.fish ================================================ set -g fisher_version 3.2.10 function fisher -a cmd -d "fish package manager" set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config set -g fish_config $XDG_CONFIG_HOME/fish set -g fisher_cache $XDG_CACHE_HOME/fisher set -g fisher_config $XDG_CONFIG_HOME/fisher set -q fisher_path; or set -g fisher_path $fish_config set -g fishfile $fish_config/fishfile for path in {$fish_config,$fisher_path}/{functions,completions,conf.d} $fisher_cache if test ! -d $path command mkdir -p $path end end if test ! -e $fisher_path/completions/fisher.fish echo "fisher complete" >$fisher_path/completions/fisher.fish _fisher_complete end if test -e $fisher_path/conf.d/fisher.fish switch "$version" case \*-\* command rm -f $fisher_path/conf.d/fisher.fish case 2\* case \* command rm -f $fisher_path/conf.d/fisher.fish end else switch "$version" case \*-\* case 2\* echo "fisher copy-user-key-bindings" >$fisher_path/conf.d/fisher.fish end end # 2019-10-22: temp code, migrates fishfile from old path back to $fish_config if test -e "$fisher_path/fishfile"; and test ! -e "$fishfile" command mv -f "$fisher_path/fishfile" "$fishfile" end switch "$cmd" case {,self-}complete _fisher_complete case copy-user-key-bindings _fisher_copy_user_key_bindings case ls set -e argv[1] if test -s "$fishfile" set -l file (_fisher_fmt <$fishfile | _fisher_parse -R | command sed "s|@.*||") _fisher_ls | _fisher_fmt | command awk -v FILE="$file" " BEGIN { for (n = split(FILE, f); ++i <= n;) file[f[i]] } \$0 in file && /$argv[1]/ " | command sed "s|^$HOME|~|" end case self-update _fisher_self_update (status -f) case self-uninstall _fisher_self_uninstall case {,-}-v{ersion,} echo "fisher version $fisher_version" (status -f | command sed "s|^$HOME|~|") case {,-}-h{elp,} _fisher_help case "" _fisher_commit -- case add rm if not isatty while read -l arg set argv $argv $arg end end if test (count $argv) = 1 echo "fisher: invalid number of arguments" >&2 _fisher_help >&2 return 1 end _fisher_commit $argv case \* echo "fisher: unknown flag or command \"$cmd\"" >&2 _fisher_help >&2 return 1 end end function _fisher_complete complete -ec fisher complete -xc fisher -n __fish_use_subcommand -a add -d "Add packages" complete -xc fisher -n __fish_use_subcommand -a rm -d "Remove packages" complete -xc fisher -n __fish_use_subcommand -a ls -d "List installed packages matching REGEX" complete -xc fisher -n __fish_use_subcommand -a --help -d "Show usage help" complete -xc fisher -n __fish_use_subcommand -a --version -d "$fisher_version" complete -xc fisher -n __fish_use_subcommand -a self-update -d "Update to the latest version" for pkg in (fisher ls) complete -xc fisher -n "__fish_seen_subcommand_from rm" -a $pkg end end function _fisher_copy_user_key_bindings if functions -q fish_user_key_bindings functions -c fish_user_key_bindings fish_user_key_bindings_copy end function fish_user_key_bindings for file in $fisher_path/conf.d/*_key_bindings.fish source $file >/dev/null 2>/dev/null end if functions -q fish_user_key_bindings_copy fish_user_key_bindings_copy end end end function _fisher_ls for pkg in $fisher_config/*/*/* command readlink $pkg; or echo $pkg end end function _fisher_fmt command sed "s|^[[:space:]]*||;s|^$fisher_config/||;s|^~|$HOME|;s|^\.\/*|$PWD/|;s|^https*:/*||;s|^github\.com/||;s|/*\$||" end function _fisher_help echo "usage: fisher add Add packages" echo " fisher rm Remove packages" echo " fisher Update all packages" echo " fisher ls [] List installed packages matching " echo " fisher --help Show this help" echo " fisher --version Show the current version" echo " fisher self-update Update to the latest version" echo " fisher self-uninstall Uninstall from your system" echo "examples:" echo " fisher add jethrokuan/z rafaelrinaldi/pure" echo " fisher add gitlab.com/foo/bar@v2" echo " fisher add ~/path/to/local/pkg" echo " fisher add &2 command curl -s "$url?nocache" >$file. set -l next_version (command awk '{ print $4 } { exit }' <$file.) switch "$next_version" case "" $fisher_version command rm -f $file. if test -z "$next_version" echo "fisher: cannot update fisher -- are you offline?" >&2 return 1 end echo "fisher is already up-to-date" >&2 case \* echo "linking $file" | command sed "s|$HOME|~|" >&2 command mv -f $file. $file source $file echo "updated to fisher $fisher_version -- hooray!" >&2 _fisher_complete end end function _fisher_self_uninstall for pkg in (_fisher_ls) _fisher_rm $pkg end for file in $fisher_cache $fisher_config $fisher_path/{functions,completions,conf.d}/fisher.fish $fishfile echo "removing $file" command rm -Rf $file 2>/dev/null end | command sed "s|$HOME|~|" >&2 for name in (set -n | command awk '/^fisher_/') set -e "$name" end functions -e (functions -a | command awk '/^_fisher/') fisher complete -c fisher --erase end function _fisher_commit -a cmd set -e argv[1] set -l elapsed (_fisher_now) if test ! -e "$fishfile" command touch $fishfile echo "created new fishfile in $fishfile" | command sed "s|$HOME|~|" >&2 end set -l old_pkgs (_fisher_ls | _fisher_fmt) for pkg in (_fisher_ls) _fisher_rm $pkg end command rm -Rf $fisher_config command mkdir -p $fisher_config set -l next_pkgs (_fisher_fmt <$fishfile | _fisher_parse -R $cmd (printf "%s\n" $argv | _fisher_fmt)) set -l actual_pkgs (_fisher_fetch $next_pkgs) set -l updated_pkgs for pkg in $old_pkgs if contains -- $pkg $actual_pkgs set updated_pkgs $updated_pkgs $pkg end end if test -z "$actual_pkgs$updated_pkgs$old_pkgs$next_pkgs" echo "fisher: nothing to commit -- try adding some packages" >&2 return 1 end set -l out_pkgs if test "$cmd" = "rm" set out_pkgs $next_pkgs else for pkg in $next_pkgs if contains -- (echo $pkg | command sed "s|@.*||") $actual_pkgs set out_pkgs $out_pkgs $pkg end end end printf "%s\n" (_fisher_fmt <$fishfile | _fisher_parse -W $cmd $out_pkgs | command sed "s|^$HOME|~|") >$fishfile _fisher_complete command awk -v A=(count $actual_pkgs) -v U=(count $updated_pkgs) -v O=(count $old_pkgs) -v E=(_fisher_now $elapsed) ' BEGIN { res = fmt("removed", O - U, fmt("updated", U, fmt("added", A - U))) printf((res ? res : "done") " in %.2fs\n", E / 1000) } function fmt(action, n, s) { return n ? (s ? s ", " : s) action " " n " package" (n > 1 ? "s" : "") : s } ' >&2 end function _fisher_parse -a mode cmd set -e argv[1..2] command awk -v FS="[[:space:]]*#+" -v MODE="$mode" -v CMD="$cmd" -v ARGSTR="$argv" ' BEGIN { for (n = split(ARGSTR, a, " "); i++ < n;) pkgs[getkey(a[i])] = a[i] } !NF { next } { k = getkey($1) } MODE == "-R" && !(k in pkgs) && $0 = $1 MODE == "-W" && (/^#/ || k in pkgs || CMD != "rm") { print pkgs[k] (sub($1, "") ? $0 : "") } MODE == "-W" || CMD == "rm" { delete pkgs[k] } END { for (k in pkgs) { if (CMD != "rm" || MODE == "-W") print pkgs[k] else print "fisher: cannot remove \""k"\" -- package is not in fishfile" > "/dev/stderr" } } function getkey(s, a) { return (split(s, a, /@+|:/) > 2) ? a[2]"/"a[1]"/"a[3] : a[1] } ' end function _fisher_fetch set -l pkg_jobs set -l out_pkgs set -l next_pkgs set -l local_pkgs set -q fisher_user_api_token; and set -l curl_opts -u $fisher_user_api_token for pkg in $argv switch $pkg case \~\* /\* set -l path (echo "$pkg" | command sed "s|^~|$HOME|") if test -e "$path" set local_pkgs $local_pkgs $path else echo "fisher: cannot add \"$pkg\" -- is this a valid file?" >&2 end continue end command awk -v PKG="$pkg" -v FS=/ ' BEGIN { if (split(PKG, tmp, /@+|:/) > 2) { if (tmp[4]) sub("@"tmp[4], "", PKG) print PKG "\t" tmp[2]"/"tmp[1]"/"tmp[3] "\t" (tmp[4] ? tmp[4] : "master") } else { pkg = split(PKG, _, "/") <= 2 ? "github.com/"tmp[1] : tmp[1] tag = tmp[2] ? tmp[2] : "master" print (\ pkg ~ /^github/ ? "https://codeload."pkg"/tar.gz/"tag : \ pkg ~ /^gitlab/ ? "https://"pkg"/-/archive/"tag"/"tmp[split(pkg, tmp, "/")]"-"tag".tar.gz" : \ pkg ~ /^bitbucket/ ? "https://"pkg"/get/"tag".tar.gz" : pkg \ ) "\t" pkg } } ' | read -l url pkg branch if test ! -d "$fisher_config/$pkg" fish -c " echo fetching $url >&2 command mkdir -p $fisher_config/$pkg $fisher_cache/(command dirname $pkg) if test ! -z \"$branch\" command git clone $url $fisher_config/$pkg --branch $branch --depth 1 2>/dev/null or echo fisher: cannot clone \"$url\" -- is this a valid url\? >&2 else if command curl $curl_opts -Ss -w \"\" $url 2>&1 | command tar -xzf- -C $fisher_config/$pkg 2>/dev/null command rm -Rf $fisher_cache/$pkg command mv -f $fisher_config/$pkg/* $fisher_cache/$pkg command rm -Rf $fisher_config/$pkg command cp -Rf {$fisher_cache,$fisher_config}/$pkg else if test -d \"$fisher_cache/$pkg\" echo fisher: cannot connect to server -- looking in \"$fisher_cache/$pkg\" | command sed 's|$HOME|~|' >&2 command cp -Rf $fisher_cache/$pkg $fisher_config/$pkg/.. else command rm -Rf $fisher_config/$pkg echo fisher: cannot add \"$pkg\" -- is this a valid package\? >&2 end " >/dev/null & set pkg_jobs $pkg_jobs (_fisher_jobs --last) set next_pkgs $next_pkgs "$fisher_config/$pkg" end end if set -q pkg_jobs[1] while for job in $pkg_jobs contains -- $job (_fisher_jobs); and break end end for pkg in $next_pkgs if test -d "$pkg" set out_pkgs $out_pkgs $pkg _fisher_add $pkg end end end set -l local_prefix $fisher_config/local/$USER if test ! -d "$local_prefix" command mkdir -p $local_prefix end for pkg in $local_pkgs set -l target $local_prefix/(command basename $pkg) if test ! -L "$target" command ln -sf $pkg $target set out_pkgs $out_pkgs $pkg _fisher_add $pkg --link end end if set -q out_pkgs[1] _fisher_fetch ( for pkg in $out_pkgs if test -s "$pkg/fishfile" _fisher_fmt <$pkg/fishfile | _fisher_parse -R end end) printf "%s\n" $out_pkgs | _fisher_fmt end end function _fisher_add -a pkg opts for src in $pkg/{functions,completions,conf.d}/**.* $pkg/*.fish set -l target (command basename $src) switch $src case $pkg/conf.d\* set target $fisher_path/conf.d/$target case $pkg/completions\* set target $fisher_path/completions/$target case $pkg/{functions,}\* switch $target case uninstall.fish continue case {init,key_bindings}.fish set target $fisher_path/conf.d/(command basename $pkg)\_$target case \* set target $fisher_path/functions/$target end end echo "linking $target" | command sed "s|$HOME|~|" >&2 if set -q opts[1] command ln -sf $src $target else command cp -f $src $target end switch $target case \*.fish source $target >/dev/null 2>/dev/null end end end function _fisher_rm -a pkg for src in $pkg/{conf.d,completions,functions}/**.* $pkg/*.fish set -l target (command basename $src) set -l filename (command basename $target .fish) switch $src case $pkg/conf.d\* test "$filename.fish" = "$target"; and emit "$filename"_uninstall set target conf.d/$target case $pkg/completions\* test "$filename.fish" = "$target"; and complete -ec $filename set target completions/$target case $pkg/{,functions}\* test "$filename.fish" = "$target"; and functions -e $filename switch $target case uninstall.fish source $src continue case {init,key_bindings}.fish set target conf.d/(command basename $pkg)\_$target case \* set target functions/$target end end command rm -f $fisher_path/$target end if not functions -q fish_prompt source "$__fish_datadir$__fish_data_dir/functions/fish_prompt.fish" end end function _fisher_jobs jobs $argv | command awk '/^[0-9]+\t/ { print $1 }' end function _fisher_now -a elapsed switch (command uname) case Darwin \*BSD command perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - $ARGV[0])' $elapsed case \* math (command date "+%s%3N") - "0$elapsed" end end ================================================ FILE: .config/fish/functions/g.fish ================================================ # Defined in - @ line 1 function g --description 'alias g rg -i' rg -i $argv; end ================================================ FILE: .config/fish/functions/git.fish ================================================ # Defined in - @ line 1 function git --description 'alias git hub' hub $argv; end ================================================ FILE: .config/fish/functions/humanize_duration.fish ================================================ function humanize_duration -d "Make a time interval human readable" command awk ' function hmTime(time, stamp) { split("h:m:s:ms", units, ":") for (i = 2; i >= -1; i--) { if (t = int( i < 0 ? time % 1000 : time / (60 ^ i * 1000) % 60 )) { stamp = stamp t units[sqrt((i - 2) ^ 2) + 1] " " } } if (stamp ~ /^ *$/) { return "0ms" } return substr(stamp, 1, length(stamp) - 1) } { print hmTime($0) } ' end ================================================ FILE: .config/fish/functions/la.fish ================================================ # Defined in - @ line 1 function la --description 'alias la exa -laiSHF --header --git --group-directories-first --tree -L1' exa -laiSHF --header --git --group-directories-first --tree -L1 $argv; end ================================================ FILE: .config/fish/functions/ll.fish ================================================ # Defined in - @ line 1 function ll --description 'alias ll exa -liSHF --header --git --group-directories-first --tree -L1' exa -liSHF --header --git --group-directories-first --tree -L1 $argv; end ================================================ FILE: .config/fish/functions/ls.fish ================================================ # Defined in - @ line 1 function ls --description 'alias ls exa -F' exa -F $argv; end ================================================ FILE: .config/fish/functions/lt.fish ================================================ # Defined in - @ line 1 function lt --description 'alias lt exa -liSHF --header --git --tree -L2' exa -liSHF --header --git --tree -L2 $argv; end ================================================ FILE: .config/fish/functions/lu.fish ================================================ # Defined in - @ line 1 function lu --description 'alias lu dutree -d1 --usage -x .git -x .direnv' dutree -d1 --usage -x .git -x .direnv $argv; end ================================================ FILE: .config/fish/functions/md.fish ================================================ # Defined in - @ line 1 function md --description 'alias md mkdir -p' mkdir -p $argv; end ================================================ FILE: .config/fish/functions/mf.fish ================================================ # Defined in - @ line 1 function mf --description 'alias mf touch' touch $argv; end ================================================ FILE: .config/fish/functions/mirror.fish ================================================ # Defined in - @ line 1 function mirror --description 'alias mirror sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu' sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu $argv; end ================================================ FILE: .config/fish/functions/mutt.fish ================================================ # Defined in - @ line 1 function mutt --description 'alias mutt neomutt' neomutt $argv; end ================================================ FILE: .config/fish/functions/mv.fish ================================================ # Defined in - @ line 1 function mv --description 'alias mv amv -g -u' amv -g -u $argv; end ================================================ FILE: .config/fish/functions/one.fish ================================================ # Defined in - @ line 1 function one --description 'alias one nix-shell --command zsh' nix-shell --command zsh $argv; end ================================================ FILE: .config/fish/functions/own.fish ================================================ # Defined in - @ line 1 function own --description 'alias own sudo chown -R $USER' sudo chown -R $USER $argv; end ================================================ FILE: .config/fish/functions/pack.fish ================================================ # Defined in - @ line 1 function pack --description 'alias pack yay' yay $argv; end ================================================ FILE: .config/fish/functions/pro.fish ================================================ # Defined in - @ line 1 function pro --description 'alias pro proji' proji $argv; end ================================================ FILE: .config/fish/functions/q.fish ================================================ # Defined in - @ line 1 function q --description 'alias q exit' exit $argv; end ================================================ FILE: .config/fish/functions/refresh.fish ================================================ # Defined in - @ line 1 function refresh --description 'alias refresh pkill -USR1 -x sxhkd && bash ~/.startup -r' pkill -USR1 -x sxhkd && bash ~/.startup -r $argv; end ================================================ FILE: .config/fish/functions/rm.fish ================================================ # Defined in - @ line 1 function rm --description 'alias rm rm -rf' command rm -rf $argv; end ================================================ FILE: .config/fish/functions/s.fish ================================================ # Defined in /home/bresilla/.config/fish/functions/s.fish @ line 2 function s --description 'alias s=shko -c --short && cd (cat ~/.config/shko/settings/chdir)' shko -c --short && cd (cat ~/.config/shko/settings/chdir) $argv; end ================================================ FILE: .config/fish/functions/six.fish ================================================ # Defined in - @ line 1 function six --description 'alias six nix-shell --command zsh support/shell.nix' nix-shell --command zsh support/shell.nix $argv; end ================================================ FILE: .config/fish/functions/speed.fish ================================================ # Defined in - @ line 1 function speed --description 'alias speed wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip' wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip $argv; end ================================================ FILE: .config/fish/functions/sudo.fish ================================================ # Defined in - @ line 1 function sudo --description 'alias sudo sudo -E ' command sudo -E $argv; end ================================================ FILE: .config/fish/functions/suspend.fish ================================================ # Defined in - @ line 1 function suspend --description 'alias suspend systemctl suspend' systemctl suspend $argv; end ================================================ FILE: .config/fish/functions/sys.fish ================================================ # Defined in - @ line 1 function sys --description 'alias sys optirun inxi -Fxxxz' optirun inxi -Fxxxz $argv; end ================================================ FILE: .config/fish/functions/up.fish ================================================ # Defined in - @ line 1 function up --description 'alias up sudo -S systemctl' sudo -S systemctl $argv; end ================================================ FILE: .config/fish/functions/v.fish ================================================ # Defined in - @ line 1 function v --description 'alias v nvim' nvim $argv; end ================================================ FILE: .config/fish/functions/vim.fish ================================================ # Defined in - @ line 1 function vim --description 'alias vim nvim' nvim $argv; end ================================================ FILE: .config/fish/functions/virsh.fish ================================================ # Defined in - @ line 1 function virsh --description 'alias virsh sudo virsh' sudo virsh $argv; end ================================================ FILE: .config/fish/functions/x.fish ================================================ # Defined in - @ line 1 function x --description 'alias x dtrx --one-entry=rename' dtrx --one-entry=rename $argv; end ================================================ FILE: .config/fish/functions/z.fish ================================================ # Defined in - @ line 1 function z --description 'alias z sudo ncdu --color=dark --exclude /home/bresilla/DATA' sudo ncdu --color=dark --exclude /home/bresilla/DATA $argv; end ================================================ FILE: .config/fontconfig/fonts.conf ================================================ true true hintfull lcddefault rgb /usr/share/fonts ================================================ FILE: .config/gitstatus/gitstatus.plugin.sh ================================================ # Copyright 2019 Roman Perepelitsa. # # This file is part of GitStatus. It provides Bash bindings. # # GitStatus is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # GitStatus is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GitStatus. If not, see . [[ $- == *i* ]] || return # non-interactive shell # Starts gitstatusd in the background. Does nothing and succeeds if gitstatusd # is already running. # # Usage: gitstatus_start [OPTION]... # # -t FLOAT Fail the self-check on initialization if not getting a response from # gitstatusd for this this many seconds. Defaults to 5. # # -s INT Report at most this many staged changes; negative value means infinity. # Defaults to 1. # # -u INT Report at most this many unstaged changes; negative value means infinity. # Defaults to 1. # # -c INT Report at most this many conflicted changes; negative value means infinity. # Defaults to 1. # # -d INT Report at most this many untracked files; negative value means infinity. # Defaults to 1. # # -m INT Report -1 unstaged and untracked if there are more than this many files # in the index. Negative value means infinity. Defaults to -1. # # -e Count files within untracked directories like `git status --untracked-files`. function gitstatus_start() { unset OPTIND local opt timeout=5 max_dirty=-1 recurse_untracked_dirs local max_num_staged=1 max_num_unstaged=1 max_num_conflicted=1 max_num_untracked=1 while getopts "t:s:u:c:d:m:e" opt; do case "$opt" in t) timeout=$OPTARG;; s) max_num_staged=$OPTARG;; u) max_num_unstaged=$OPTARG;; c) max_num_conflicted=$OPTARG;; d) max_num_untracked=$OPTARG;; m) max_dirty=$OPTARG;; e) recurse_untracked_dirs='--recurse-untracked-dirs';; *) return 1;; esac done (( OPTIND == $# + 1 )) || { echo "usage: gitstatus_start [OPTION]..." >&2; return 1; } [[ -z "${GITSTATUS_DAEMON_PID:-}" ]] || return 0 # already started local req_fifo resp_fifo function gitstatus_start_impl() { local log_level="${GITSTATUS_LOG_LEVEL:-}" [[ -n "$log_level" || "${GITSTATUS_ENABLE_LOGGING:-0}" != 1 ]] || log_level=INFO local daemon="${GITSTATUS_DAEMON:-}" if [[ -z "$daemon" ]]; then local os && os=$(uname -s) || return local arch && arch=$(uname -m) || return local dir && dir=$(dirname "${BASH_SOURCE[0]}") || return [[ "$os" != Linux || "$(uname -o)" != Android ]] || os=Android daemon="$dir/bin/gitstatusd-${os,,}-${arch,,}" fi local threads="${GITSTATUS_NUM_THREADS:-0}" if (( threads <= 0 )); then case "$(uname -s)" in FreeBSD) threads=$(sysctl -n hw.ncpu) || return;; *) threads=$(getconf _NPROCESSORS_ONLN) || return;; esac (( threads *= 2 )) (( threads >= 2 )) || threads=2 (( threads <= 32 )) || threads=32 fi req_fifo=$(mktemp -u "${TMPDIR:-/tmp}"/gitstatus.$$.pipe.req.XXXXXXXXXX) || return resp_fifo=$(mktemp -u "${TMPDIR:-/tmp}"/gitstatus.$$.pipe.resp.XXXXXXXXXX) || return mkfifo "$req_fifo" "$resp_fifo" || return exec {_GITSTATUS_REQ_FD}<>"$req_fifo" {_GITSTATUS_RESP_FD}<>"$resp_fifo" || return command rm "$req_fifo" "$resp_fifo" || return local d="${GITSTATUS_DAEMON:-}" local daemon_args=( --parent-pid="$$" --num-threads="$threads" --max-num-staged="$max_num_staged" --max-num-unstaged="$max_num_unstaged" --max-num-conflicted="$max_num_conflicted" --max-num-untracked="$max_num_untracked" --dirty-max-index-size="$max_dirty" $recurse_untracked_dirs) if [[ -n "$log_level" ]]; then GITSTATUS_DAEMON_LOG=$(mktemp "${TMPDIR:-/tmp}"/gitstatus.$$.log.XXXXXXXXXX) || return [[ "$log_level" == INFO ]] || daemon_args+=(--log-level="$log_level") else GITSTATUS_DAEMON_LOG=/dev/null fi local IFS= [[ "${daemon_args[*]}" =~ ^[a-z0-9=-]*$ ]] || return IFS=' ' { <&$_GITSTATUS_REQ_FD >&$_GITSTATUS_RESP_FD 2>"$GITSTATUS_DAEMON_LOG" \ _gitstatus_daemon="$daemon" bash -cx " trap 'kill %1 &>/dev/null' SIGINT SIGTERM EXIT \"\$_gitstatus_daemon\" ${daemon_args[*]} 0<&0 1>&1 2>&2 & wait %1 if [[ \$? != 0 && \$? != 10 && \$? -le 128 && -f \"\$_gitstatus_daemon\"-static ]]; then \"\$_gitstatus_daemon\"-static ${daemon_args[*]} 0<&0 1>&1 2>&2 & wait %1 fi echo -nE $'bye\x1f0\x1e'" & } 2>/dev/null disown GITSTATUS_DAEMON_PID=$! local reply echo -nE $'hello\x1f\x1e' >&$_GITSTATUS_REQ_FD || return IFS='' read -rd $'\x1e' -u $_GITSTATUS_RESP_FD -t "$timeout" reply || return [[ "$reply" == $'hello\x1f0' ]] || return _GITSTATUS_DIRTY_MAX_INDEX_SIZE=$max_dirty } if ! gitstatus_start_impl; then echo "gitstatus_start: failed to start gitstatusd" >&2 [[ -z "${req_fifo:-}" ]] || command rm -f "$req_fifo" [[ -z "${resp_fifo:-}" ]] || command rm -f "$resp_fifo" unset -f gitstatus_start_impl gitstatus_stop return 1 fi unset -f gitstatus_start_impl if [[ "${GITSTATUS_STOP_ON_EXEC:-1}" == 1 ]]; then type -t _gitstatus_exec &>/dev/null || function _gitstatus_exec() { exec "$@"; } type -t _gitstatus_builtin &>/dev/null || function _gitstatus_builtin() { builtin "$@"; } function _gitstatus_exec_wrapper() { (( ! $# )) || gitstatus_stop local ret=0 _gitstatus_exec "$@" || ret=$? [[ -n "${GITSTATUS_DAEMON_PID:-}" ]] || gitstatus_start || true return $ret } function _gitstatus_builtin_wrapper() { while [[ "${1:-}" == builtin ]]; do shift; done if [[ "${1:-}" == exec ]]; then _gitstatus_exec_wrapper "${@:2}" else _gitstatus_builtin "$@" fi } alias exec=_gitstatus_exec_wrapper alias builtin=_gitstatus_builtin_wrapper _GITSTATUS_EXEC_HOOK=1 else unset _GITSTATUS_EXEC_HOOK fi } # Stops gitstatusd if it's running. function gitstatus_stop() { [[ -z "${_GITSTATUS_REQ_FD:-}" ]] || exec {_GITSTATUS_REQ_FD}>&- || true [[ -z "${_GITSTATUS_RESP_FD:-}" ]] || exec {_GITSTATUS_RESP_FD}>&- || true [[ -z "${GITSTATUS_DAEMON_PID:-}" ]] || kill "$GITSTATUS_DAEMON_PID" &>/dev/null || true if [[ -n "${_GITSTATUS_EXEC_HOOK:-}" ]]; then unalias exec builtin &>/dev/null || true function _gitstatus_exec_wrapper() { _gitstatus_exec "$@"; } function _gitstatus_builtin_wrapper() { _gitstatus_builtin "$@"; } fi unset _GITSTATUS_REQ_FD _GITSTATUS_RESP_FD GITSTATUS_DAEMON_PID _GITSTATUS_EXEC_HOOK unset _GITSTATUS_DIRTY_MAX_INDEX_SIZE } # Retrives status of a git repository from a directory under its working tree. # # Usage: gitstatus_query [OPTION]... # # -d STR Directory to query. Defaults to ${GIT_DIR:-$PWD}. # -t FLOAT Timeout in seconds. Will block for at most this long. If no results # are available by then, will return error. # # On success sets VCS_STATUS_RESULT to one of the following values: # # norepo-sync The directory doesn't belong to a git repository. # ok-sync The directory belongs to a git repository. # # If VCS_STATUS_RESULT is ok-sync, additional variables are set: # # VCS_STATUS_WORKDIR Git repo working directory. Not empty. # VCS_STATUS_COMMIT Commit hash that HEAD is pointing to. Either 40 hex digits or # empty if there is no HEAD (empty repo). # VCS_STATUS_LOCAL_BRANCH Local branch name or empty if not on a branch. # VCS_STATUS_REMOTE_NAME The remote name, e.g. "upstream" or "origin". # VCS_STATUS_REMOTE_BRANCH Upstream branch name. Can be empty. # VCS_STATUS_REMOTE_URL Remote URL. Can be empty. # VCS_STATUS_ACTION Repository state, A.K.A. action. Can be empty. # VCS_STATUS_INDEX_SIZE The number of files in the index. # VCS_STATUS_NUM_STAGED The number of staged changes. # VCS_STATUS_NUM_CONFLICTED The number of conflicted changes. # VCS_STATUS_NUM_UNSTAGED The number of unstaged changes. # VCS_STATUS_NUM_UNTRACKED The number of untracked files. # VCS_STATUS_HAS_STAGED 1 if there are staged changes, 0 otherwise. # VCS_STATUS_HAS_CONFLICTED 1 if there are conflicted changes, 0 otherwise. # VCS_STATUS_HAS_UNSTAGED 1 if there are unstaged changes, 0 if there aren't, -1 if # unknown. # VCS_STATUS_NUM_UNSTAGED_DELETED The number of unstaged deleted files. Note that renamed files # are reported as deleted plus added. # VCS_STATUS_HAS_UNTRACKED 1 if there are untracked files, 0 if there aren't, -1 if # unknown. # VCS_STATUS_COMMITS_AHEAD Number of commits the current branch is ahead of upstream. # Non-negative integer. # VCS_STATUS_COMMITS_BEHIND Number of commits the current branch is behind upstream. # Non-negative integer. # VCS_STATUS_STASHES Number of stashes. Non-negative integer. # VCS_STATUS_TAG The last tag (in lexicographical order) that points to the same # commit as HEAD. # # The point of reporting -1 via VCS_STATUS_HAS_* is to allow the command to skip scanning files in # large repos. See -m flag of gitstatus_start. # # gitstatus_query returns an error if gitstatus_start hasn't been called in the same # shell or the call had failed. function gitstatus_query() { unset OPTIND local opt dir="${GIT_DIR:-}" timeout=() while getopts "d:c:t:" opt "$@"; do case "$opt" in d) dir=$OPTARG;; t) timeout=(-t "$OPTARG");; *) return 1;; esac done (( OPTIND == $# + 1 )) || { echo "usage: gitstatus_query [OPTION]..." >&2; return 1; } [[ -n "$GITSTATUS_DAEMON_PID" ]] || return # not started local req_id="$RANDOM.$RANDOM.$RANDOM.$RANDOM" [[ "$dir" == /* ]] || dir="$(pwd -P)/$dir" || return echo -nE "$req_id"$'\x1f'"$dir"$'\x1e' >&$_GITSTATUS_REQ_FD || return local -a resp while true; do IFS=$'\x1f' read -rd $'\x1e' -a resp -u $_GITSTATUS_RESP_FD "${timeout[@]}" || return [[ "${resp[0]}" == "$req_id" ]] && break done if [[ "${resp[1]}" == 1 ]]; then VCS_STATUS_RESULT=ok-sync VCS_STATUS_WORKDIR="${resp[2]}" VCS_STATUS_COMMIT="${resp[3]}" VCS_STATUS_LOCAL_BRANCH="${resp[4]}" VCS_STATUS_REMOTE_BRANCH="${resp[5]}" VCS_STATUS_REMOTE_NAME="${resp[6]}" VCS_STATUS_REMOTE_URL="${resp[7]}" VCS_STATUS_ACTION="${resp[8]}" VCS_STATUS_INDEX_SIZE="${resp[9]}" VCS_STATUS_NUM_STAGED="${resp[10]}" VCS_STATUS_NUM_UNSTAGED="${resp[11]}" VCS_STATUS_NUM_CONFLICTED="${resp[12]}" VCS_STATUS_NUM_UNTRACKED="${resp[13]}" VCS_STATUS_COMMITS_AHEAD="${resp[14]}" VCS_STATUS_COMMITS_BEHIND="${resp[15]}" VCS_STATUS_STASHES="${resp[16]}" VCS_STATUS_TAG="${resp[17]:-}" VCS_STATUS_NUM_UNSTAGED_DELETED="${resp[18]:-0}" VCS_STATUS_HAS_STAGED=$((VCS_STATUS_NUM_STAGED > 0)) if (( _GITSTATUS_DIRTY_MAX_INDEX_SIZE >= 0 && VCS_STATUS_INDEX_SIZE > _GITSTATUS_DIRTY_MAX_INDEX_SIZE_ )); then VCS_STATUS_HAS_UNSTAGED=-1 VCS_STATUS_HAS_CONFLICTED=-1 VCS_STATUS_HAS_UNTRACKED=-1 else VCS_STATUS_HAS_UNSTAGED=$((VCS_STATUS_NUM_UNSTAGED > 0)) VCS_STATUS_HAS_CONFLICTED=$((VCS_STATUS_NUM_CONFLICTED > 0)) VCS_STATUS_HAS_UNTRACKED=$((VCS_STATUS_NUM_UNTRACKED > 0)) fi else VCS_STATUS_RESULT=norepo-sync unset VCS_STATUS_WORKDIR unset VCS_STATUS_COMMIT unset VCS_STATUS_LOCAL_BRANCH unset VCS_STATUS_REMOTE_BRANCH unset VCS_STATUS_REMOTE_NAME unset VCS_STATUS_REMOTE_URL unset VCS_STATUS_ACTION unset VCS_STATUS_INDEX_SIZE unset VCS_STATUS_NUM_STAGED unset VCS_STATUS_NUM_UNSTAGED unset VCS_STATUS_NUM_CONFLICTED unset VCS_STATUS_NUM_UNTRACKED unset VCS_STATUS_HAS_STAGED unset VCS_STATUS_HAS_UNSTAGED unset VCS_STATUS_HAS_CONFLICTED unset VCS_STATUS_HAS_UNTRACKED unset VCS_STATUS_COMMITS_AHEAD unset VCS_STATUS_COMMITS_BEHIND unset VCS_STATUS_STASHES unset VCS_STATUS_TAG unset VCS_STATUS_NUM_UNSTAGED_DELETED fi } # Usage: gitstatus_check. # # Returns 0 if and only if gitstatus_start has succeeded previously. # If it returns non-zero, gitstatus_query is guaranteed to return non-zero. function gitstatus_check() { [[ -n "$GITSTATUS_DAEMON_PID" ]] } ================================================ FILE: .config/gitstatus/gitstatus.plugin.zsh ================================================ # Copyright 2019 Roman Perepelitsa. # # This file is part of GitStatus. It provides ZSH bindings. # # GitStatus is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # GitStatus is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GitStatus. If not, see . # # ------------------------------------------------------------------ # # Example: Start gitstatusd, send it a request, wait for response and print it. # # source ~/gitstatus/gitstatus.plugin.zsh # gitstatus_start MY # gitstatus_query -d $PWD MY # typeset -m 'VCS_STATUS_*' # # Output: # # VCS_STATUS_ACTION='' # VCS_STATUS_COMMIT=c000eddcff0fb38df2d0137efe24d9d2d900f209 # VCS_STATUS_COMMITS_AHEAD=0 # VCS_STATUS_COMMITS_BEHIND=0 # VCS_STATUS_HAS_CONFLICTED=0 # VCS_STATUS_HAS_STAGED=0 # VCS_STATUS_HAS_UNSTAGED=1 # VCS_STATUS_HAS_UNTRACKED=1 # VCS_STATUS_INDEX_SIZE=33 # VCS_STATUS_LOCAL_BRANCH=master # VCS_STATUS_NUM_CONFLICTED=0 # VCS_STATUS_NUM_STAGED=0 # VCS_STATUS_NUM_UNSTAGED=1 # VCS_STATUS_NUM_UNSTAGED_DELETED=0 # VCS_STATUS_NUM_UNTRACKED=1 # VCS_STATUS_REMOTE_BRANCH=master # VCS_STATUS_REMOTE_NAME=origin # VCS_STATUS_REMOTE_URL=git@github.com:romkatv/powerlevel10k.git # VCS_STATUS_RESULT=ok-sync # VCS_STATUS_STASHES=0 # VCS_STATUS_TAG='' # VCS_STATUS_WORKDIR=/home/romka/powerlevel10k [[ -o 'interactive' ]] || 'return' # Temporarily change options. 'builtin' 'local' '-a' '_gitstatus_opts' [[ ! -o 'aliases' ]] || _gitstatus_opts+=('aliases') [[ ! -o 'sh_glob' ]] || _gitstatus_opts+=('sh_glob') [[ ! -o 'no_brace_expand' ]] || _gitstatus_opts+=('no_brace_expand') 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' autoload -Uz add-zsh-hook zmodload zsh/datetime zsh/system typeset -g _gitstatus_plugin_dir=${${(%):-%x}:A:h} # Retrives status of a git repo from a directory under its working tree. # ## Usage: gitstatus_query [OPTION]... NAME # # -d STR Directory to query. Must be absolute. Defaults to $GIT_DIR or the current # directory if GIT_DIR is not set. # -c STR Callback function to call once the results are available. Called only after # gitstatus_query returns 0 with VCS_STATUS_RESULT=tout. # -t FLOAT Timeout in seconds. Will block for at most this long. If no results are # available by then: if -c isn't specified, will return 1; otherwise will set # VCS_STATUS_RESULT=tout and return 0. # -p Don't compute anything that requires reading Git index. If this option is used, # the following parameters will be 0: VCS_STATUS_INDEX_SIZE, # VCS_STATUS_{NUM,HAS}_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED}. # # On success sets VCS_STATUS_RESULT to one of the following values: # # tout Timed out waiting for data; will call the user-specified callback later. # norepo-sync The directory isn't a git repo. # ok-sync The directory is a git repo. # # When the callback is called VCS_STATUS_RESULT is set to one of the following values: # # norepo-async The directory isn't a git repo. # ok-async The directory is a git repo. # # If VCS_STATUS_RESULT is ok-sync or ok-async, additional variables are set: # # VCS_STATUS_WORKDIR Git repo working directory. Not empty. # VCS_STATUS_COMMIT Commit hash that HEAD is pointing to. Either 40 hex digits or # empty if there is no HEAD (empty repo). # VCS_STATUS_LOCAL_BRANCH Local branch name or empty if not on a branch. # VCS_STATUS_REMOTE_NAME The remote name, e.g. "upstream" or "origin". # VCS_STATUS_REMOTE_BRANCH Upstream branch name. Can be empty. # VCS_STATUS_REMOTE_URL Remote URL. Can be empty. # VCS_STATUS_ACTION Repository state, A.K.A. action. Can be empty. # VCS_STATUS_INDEX_SIZE The number of files in the index. # VCS_STATUS_NUM_STAGED The number of staged changes. # VCS_STATUS_NUM_CONFLICTED The number of conflicted changes. # VCS_STATUS_NUM_UNSTAGED The number of unstaged changes. # VCS_STATUS_NUM_UNTRACKED The number of untracked files. # VCS_STATUS_HAS_STAGED 1 if there are staged changes, 0 otherwise. # VCS_STATUS_HAS_CONFLICTED 1 if there are conflicted changes, 0 otherwise. # VCS_STATUS_HAS_UNSTAGED 1 if there are unstaged changes, 0 if there aren't, -1 if # unknown. # VCS_STATUS_NUM_UNSTAGED_DELETED The number of unstaged deleted files. Note that renamed files # are reported as deleted plus added. # VCS_STATUS_HAS_UNTRACKED 1 if there are untracked files, 0 if there aren't, -1 if # unknown. # VCS_STATUS_COMMITS_AHEAD Number of commits the current branch is ahead of upstream. # Non-negative integer. # VCS_STATUS_COMMITS_BEHIND Number of commits the current branch is behind upstream. # Non-negative integer. # VCS_STATUS_STASHES Number of stashes. Non-negative integer. # VCS_STATUS_TAG The last tag (in lexicographical order) that points to the same # commit as HEAD. # # The point of reporting -1 via VCS_STATUS_HAS_* is to allow the command to skip scanning files in # large repos. See -m flag of gitstatus_start. # # gitstatus_query returns an error if gitstatus_start hasn't been called in the same shell or # the call had failed. # # !!!!! WARNING: CONCURRENT CALLS WITH THE SAME NAME ARE NOT ALLOWED !!!!! # # It's illegal to call gitstatus_query if the last asynchronous call with the same NAME hasn't # completed yet. If you need to issue concurrent requests, use different NAME arguments. function gitstatus_query() { emulate -L zsh setopt err_return no_unset local opt local dir=${GIT_DIR:-} local callback local -F timeout=-1 local no_diff=0 while true; do getopts "d:c:t:p" opt || break case $opt in d) dir=$OPTARG;; c) callback=$OPTARG;; t) timeout=$OPTARG;; p) no_diff=1;; ?) return 1;; done) break;; esac done (( OPTIND == ARGC )) || { echo "usage: gitstatus_query [OPTION]... NAME" >&2; return 1 } local name=${*[$OPTIND]} local daemon_pid_var=GITSTATUS_DAEMON_PID_${name} (( ${(P)daemon_pid_var:-0} > 0 )) # Verify that gitstatus_query is running in the same process that ran gitstatus_start. local client_pid_var=_GITSTATUS_CLIENT_PID_${name} [[ ${(P)client_pid_var} == $$ ]] [[ $dir == /* ]] || dir=${(%):-%/}/$dir local req_fd_var=_GITSTATUS_REQ_FD_${name} local -i req_fd=${(P)req_fd_var} local -r req_id="$EPOCHREALTIME" echo -nE $req_id' '$callback$'\x1f'$dir$'\x1f'$no_diff$'\x1e' >&$req_fd while true; do _gitstatus_process_response $name $timeout $req_id [[ $VCS_STATUS_RESULT == *-async ]] || break done [[ $VCS_STATUS_RESULT != tout || -n $callback ]] } function _gitstatus_process_response() { emulate -L zsh setopt err_return no_unset local name=$1 local -F timeout=$2 local req_id=$3 local resp_fd_var=_GITSTATUS_RESP_FD_${name} local -i dirty_max_index_size=_GITSTATUS_DIRTY_MAX_INDEX_SIZE_${name} typeset -g VCS_STATUS_RESULT (( timeout >= 0 )) && local -a t=(-t $timeout) || local -a t=() local -a resp local IFS=$'\x1f' read -rd $'\x1e' -u ${(P)resp_fd_var} $t -A resp || { VCS_STATUS_RESULT=tout return } local -a header=("${(@Q)${(z)resp[1]}}") [[ ${header[1]} == $req_id ]] && local -i ours=1 || local -i ours=0 shift header [[ ${resp[2]} == 1 ]] && { (( ours )) && VCS_STATUS_RESULT=ok-sync || VCS_STATUS_RESULT=ok-async typeset -g VCS_STATUS_WORKDIR="${resp[3]}" typeset -g VCS_STATUS_COMMIT="${resp[4]}" typeset -g VCS_STATUS_LOCAL_BRANCH="${resp[5]}" typeset -g VCS_STATUS_REMOTE_BRANCH="${resp[6]}" typeset -g VCS_STATUS_REMOTE_NAME="${resp[7]}" typeset -g VCS_STATUS_REMOTE_URL="${resp[8]}" typeset -g VCS_STATUS_ACTION="${resp[9]}" typeset -gi VCS_STATUS_INDEX_SIZE="${resp[10]}" typeset -gi VCS_STATUS_NUM_STAGED="${resp[11]}" typeset -gi VCS_STATUS_NUM_UNSTAGED="${resp[12]}" typeset -gi VCS_STATUS_NUM_CONFLICTED="${resp[13]}" typeset -gi VCS_STATUS_NUM_UNTRACKED="${resp[14]}" typeset -gi VCS_STATUS_COMMITS_AHEAD="${resp[15]}" typeset -gi VCS_STATUS_COMMITS_BEHIND="${resp[16]}" typeset -gi VCS_STATUS_STASHES="${resp[17]}" typeset -g VCS_STATUS_TAG="${resp[18]}" typeset -gi VCS_STATUS_NUM_UNSTAGED_DELETED="${resp[19]:-0}" typeset -gi VCS_STATUS_HAS_STAGED=$((VCS_STATUS_NUM_STAGED > 0)) (( dirty_max_index_size >= 0 && VCS_STATUS_INDEX_SIZE > dirty_max_index_size )) && { typeset -gi VCS_STATUS_HAS_UNSTAGED=-1 typeset -gi VCS_STATUS_HAS_CONFLICTED=-1 typeset -gi VCS_STATUS_HAS_UNTRACKED=-1 } || { typeset -gi VCS_STATUS_HAS_UNSTAGED=$((VCS_STATUS_NUM_UNSTAGED > 0)) typeset -gi VCS_STATUS_HAS_CONFLICTED=$((VCS_STATUS_NUM_CONFLICTED > 0)) typeset -gi VCS_STATUS_HAS_UNTRACKED=$((VCS_STATUS_NUM_UNTRACKED > 0)) } } || { (( ours )) && VCS_STATUS_RESULT=norepo-sync || VCS_STATUS_RESULT=norepo-async unset VCS_STATUS_WORKDIR unset VCS_STATUS_COMMIT unset VCS_STATUS_LOCAL_BRANCH unset VCS_STATUS_REMOTE_BRANCH unset VCS_STATUS_REMOTE_NAME unset VCS_STATUS_REMOTE_URL unset VCS_STATUS_ACTION unset VCS_STATUS_INDEX_SIZE unset VCS_STATUS_NUM_STAGED unset VCS_STATUS_NUM_UNSTAGED unset VCS_STATUS_NUM_CONFLICTED unset VCS_STATUS_NUM_UNTRACKED unset VCS_STATUS_HAS_STAGED unset VCS_STATUS_HAS_UNSTAGED unset VCS_STATUS_HAS_CONFLICTED unset VCS_STATUS_HAS_UNTRACKED unset VCS_STATUS_COMMITS_AHEAD unset VCS_STATUS_COMMITS_BEHIND unset VCS_STATUS_STASHES unset VCS_STATUS_TAG unset VCS_STATUS_NUM_UNSTAGED_DELETED } (( ! ours )) && (( #header )) && emulate -L zsh && "${header[@]}" || true } # Starts gitstatusd in the background. Does nothing and succeeds if gitstatusd is already running. # # Usage: gitstatus_start [OPTION]... NAME # # -t FLOAT Fail the self-check on initialization if not getting a response from gitstatusd for # this this many seconds. Defaults to 5. # # -s INT Report at most this many staged changes; negative value means infinity. # Defaults to 1. # # -u INT Report at most this many unstaged changes; negative value means infinity. # Defaults to 1. # # -c INT Report at most this many conflicted changes; negative value means infinity. # Defaults to 1. # # -d INT Report at most this many untracked files; negative value means infinity. # Defaults to 1. # # -m INT If a repo has more files in its index than this, override -u and -d (but not -s) # with zeros. Negative value means infinity. Defaults to -1. # # -e Count files within untracked directories like `git status --untracked-files`. function gitstatus_start() { emulate -L zsh setopt err_return no_unset no_bg_nice local opt local -F timeout=5 local -i max_num_staged=1 local -i max_num_unstaged=1 local -i max_num_conflicted=1 local -i max_num_untracked=1 local -i dirty_max_index_size=-1 local -i async local recurse_untracked_dirs while true; do getopts "t:s:u:c:d:m:ea" opt || break case $opt in a) async=1;; t) timeout=$OPTARG;; s) max_num_staged=$OPTARG;; u) max_num_unstaged=$OPTARG;; c) max_num_conflicted=$OPTARG;; d) max_num_untracked=$OPTARG;; m) dirty_max_index_size=$OPTARG;; e) recurse_untracked_dirs='--recurse-untracked-dirs';; +e) recurse_untracked_dirs=;; ?) return 1;; esac done (( timeout > 0 )) || { echo "invalid -t: $timeout" >&2; return 1 } (( OPTIND == ARGC )) || { echo "usage: gitstatus_start [OPTION]... NAME" >&2; return 1 } local name=${*[$OPTIND]} local lock_file req_fifo resp_fifo log_level local log_file=/dev/null xtrace_file=/dev/null local -i stderr_fd lock_fd req_fd resp_fd daemon_pid local daemon_pid_var=GITSTATUS_DAEMON_PID_${name} (( $+parameters[$daemon_pid_var] )) && { (( ! async )) || return 0 daemon_pid=${(P)daemon_pid_var} (( daemon_pid == -1 )) || return 0 local resp_fd_var=_GITSTATUS_RESP_FD_${name} local log_file_var=GITSTATUS_DAEMON_LOG_${name} local xtrace_file_var=GITSTATUS_XTRACE_${name} resp_fd=${(P)resp_fd_var} log_file=${(P)log_file_var} xtrace_file=${(P)xtrace_file_var} } || { log_level=${GITSTATUS_LOG_LEVEL:-} [[ -n $log_level || ${GITSTATUS_ENABLE_LOGGING:-0} != 1 ]] || log_level=INFO [[ -z $log_level ]] || { log_file=${TMPDIR:-/tmp}/gitstatus.$$.daemon-log.$EPOCHREALTIME.$RANDOM xtrace_file=${TMPDIR:-/tmp}/gitstatus.$$.xtrace.$EPOCHREALTIME.$RANDOM } typeset -g GITSTATUS_DAEMON_LOG_${name}=$log_file typeset -g GITSTATUS_XTRACE_${name}=$xtrace_file } function gitstatus_start_impl() { [[ $xtrace_file == /dev/null ]] || { exec {stderr_fd}>&2 2>>$xtrace_file setopt xtrace } (( daemon_pid == -1 )) || { local daemon=${GITSTATUS_DAEMON:-} os [[ -n $daemon ]] || { os="$(uname -s)" && [[ -n $os ]] [[ $os != Linux || "$(uname -o)" != Android ]] || os=Android local arch && arch="$(uname -m)" && [[ -n $arch ]] daemon=$_gitstatus_plugin_dir/bin/gitstatusd-${os:l}-${arch:l} } [[ -x $daemon ]] lock_file=${TMPDIR:-/tmp}/gitstatus.$$.lock.$EPOCHREALTIME.$RANDOM echo -n >$lock_file zsystem flock -f lock_fd $lock_file req_fifo=${TMPDIR:-/tmp}/gitstatus.$$.req.$EPOCHREALTIME.$RANDOM resp_fifo=${TMPDIR:-/tmp}/gitstatus.$$.resp.$EPOCHREALTIME.$RANDOM mkfifo $req_fifo $resp_fifo local -i threads=${GITSTATUS_NUM_THREADS:-0} (( threads > 0)) || { threads=8 [[ -n $os ]] || { os="$(uname -s)" && [[ -n $os ]] } case $os in FreeBSD) (( ! $+commands[sysctl] )) || threads=$(( 2 * $(sysctl -n hw.ncpu) ));; *) (( ! $+commands[getconf] )) || threads=$(( 2 * $(getconf _NPROCESSORS_ONLN) ));; esac (( threads <= 32 )) || threads=32 } local -a daemon_args=( --lock-fd=3 --parent-pid=${(q)$} --num-threads=${(q)threads} --max-num-staged=${(q)max_num_staged} --max-num-unstaged=${(q)max_num_unstaged} --max-num-conflicted=${(q)max_num_conflicted} --max-num-untracked=${(q)max_num_untracked} --dirty-max-index-size=${(q)dirty_max_index_size} --log-level=${(q)log_level:-INFO} $recurse_untracked_dirs) local cmd=" exec >&4 echo \$\$ ${(q)daemon} $daemon_args if [[ \$? != (0|10) && \$? -le 128 && -f ${(q)daemon}-static ]]; then ${(q)daemon}-static $daemon_args fi echo -nE $'bye\x1f0\x1e'" local setsid=${commands[setsid]:-/usr/local/opt/util-linux/bin/setsid} [[ -x $setsid ]] && setsid=${(q)setsid} || setsid= cmd="cd /; read; $setsid zsh -dfxc ${(q)cmd} &!; rm -f ${(q)req_fifo} ${(q)resp_fifo} ${(q)lock_file}" # We use `zsh -c` instead of plain {} or () to work around bugs in zplug (it hangs on # startup). Double fork is to daemonize, and so is `setsid`. Note that on macOS `setsid` has # to be installed manually by running `brew install util-linux`. zsh -dfmxc $cmd <$req_fifo >$log_file 2>&1 3<$lock_file 4>$resp_fifo &! sysopen -w -o cloexec,sync -u req_fd $req_fifo sysopen -r -o cloexec -u resp_fd $resp_fifo echo -nE $'0\nhello\x1f\x1e' >&$req_fd } (( async )) && { daemon_pid=-1 } || { local reply IFS='' read -ru $resp_fd reply [[ $reply == <1-> ]] daemon_pid=reply function _gitstatus_process_response_${name}() { local name=${${(%):-%N}#_gitstatus_process_response_} (( ARGC == 1 )) && { _gitstatus_process_response $name 0 '' true } || { gitstatus_stop $name } } zle -F $resp_fd _gitstatus_process_response_${name} read -r -d $'\x1e' -u $resp_fd -t $timeout reply [[ $reply == $'hello\x1f0' ]] function _gitstatus_cleanup_$$_${ZSH_SUBSHELL}_${daemon_pid}() { emulate -L zsh setopt err_return no_unset local fname=${(%):-%N} local prefix=_gitstatus_cleanup_$$_${ZSH_SUBSHELL}_ [[ $fname == ${prefix}* ]] || return 0 local -i daemon_pid=${fname#$prefix} kill -- -$daemon_pid &>/dev/null || true } add-zsh-hook zshexit _gitstatus_cleanup_$$_${ZSH_SUBSHELL}_${daemon_pid} } (( ! stderr_fd )) || { unsetopt xtrace exec 2>&$stderr_fd {stderr_fd}>&- stderr_fd=0 } } gitstatus_start_impl && { typeset -gi GITSTATUS_DAEMON_PID_${name}=$daemon_pid (( ! req_fd )) || { typeset -gi _GITSTATUS_REQ_FD_${name}=$req_fd typeset -gi _GITSTATUS_RESP_FD_${name}=$resp_fd typeset -gi _GITSTATUS_LOCK_FD_${name}=$lock_fd typeset -gi _GITSTATUS_CLIENT_PID_${name}=$$ typeset -gi _GITSTATUS_DIRTY_MAX_INDEX_SIZE_${name}=$dirty_max_index_size } unset -f gitstatus_start_impl } || { unsetopt err_return add-zsh-hook -d zshexit _gitstatus_cleanup_$$_${ZSH_SUBSHELL}_${daemon_pid} (( $+functions[_gitstatus_process_response_${name}] )) && { zle -F $resp_fd unfunction _gitstatus_process_response_${name} } (( resp_fd )) && exec {resp_fd}>&- (( req_fd )) && exec {req_fd}>&- (( lock_fd )) && zsystem flock -u $lock_fd (( stderr_fd )) && { exec 2>&$stderr_fd {stderr_fd}>&- } (( daemon_pid > 0 )) && kill -- -$daemon_pid &>/dev/null rm -f $lock_file $req_fifo $resp_fifo unset -f gitstatus_start_impl unset GITSTATUS_DAEMON_PID_${name} unset _GITSTATUS_REQ_FD_${name} unset _GITSTATUS_RESP_FD_${name} unset _GITSTATUS_LOCK_FD_${name} unset _GITSTATUS_CLIENT_PID_${name} unset _GITSTATUS_DIRTY_MAX_INDEX_SIZE_${name} >&2 print -P '[%F{red}ERROR%f]: gitstatus failed to initialize.' >&2 echo -E '' >&2 echo -E ' Your git prompt may disappear or become slow.' if [[ -s $xtrace_file ]]; then >&2 echo -E '' >&2 echo -E " The content of ${(q-)xtrace_file} (gitstatus_start_impl xtrace):" >&2 print -P '%F{yellow}' >&2 awk '{print " " $0}' <$xtrace_file >&2 print -P '%F{red} ^ this command failed%f' fi if [[ -s $log_file ]]; then >&2 echo -E '' >&2 echo -E " The content of ${(q-)log_file} (gitstatus daemon log):" >&2 print -P '%F{yellow}' >&2 awk '{print " " $0}' <$log_file >&2 print -nP '%f' fi if [[ ${GITSTATUS_LOG_LEVEL:-} == DEBUG ]]; then >&2 echo -E '' >&2 echo -E ' Your system information:' >&2 print -P '%F{yellow}' >&2 echo -E " zsh: $ZSH_VERSION" >&2 echo -E " uname -a: $(uname -a)" >&2 print -P '%f' >&2 echo -E ' If you need help, open an issue and attach this whole error message to it:' >&2 echo -E '' >&2 print -P ' %F{green}https://github.com/romkatv/gitstatus/issues/new%f' else >&2 echo -E '' >&2 echo -E ' Run the following command to retry with extra diagnostics:' >&2 print -P '%F{green}' >&2 echo -E " GITSTATUS_LOG_LEVEL=DEBUG gitstatus_start ${(@q-)*}" >&2 print -nP '%f' fi return 1 } } # Stops gitstatusd if it's running. # # Usage: gitstatus_stop NAME. function gitstatus_stop() { emulate -L zsh setopt no_unset (( ARGC == 1 )) || { echo "usage: gitstatus_stop NAME" >&2; return 1 } local name=$1 local req_fd_var=_GITSTATUS_REQ_FD_${name} local resp_fd_var=_GITSTATUS_RESP_FD_${name} local lock_fd_var=_GITSTATUS_LOCK_FD_${name} local daemon_pid_var=GITSTATUS_DAEMON_PID_${name} local client_pid_var=_GITSTATUS_CLIENT_PID_${name} local dirty_size_var=_GITSTATUS_DIRTY_MAX_INDEX_SIZE_${name} [[ ${(P)daemon_pid_var:-} != -1 ]] || gitstatus_start -t 0 "$name" 2>/dev/null local req_fd=${(P)req_fd_var:-} local resp_fd=${(P)resp_fd_var:-} local lock_fd=${(P)lock_fd_var:-} local daemon_pid=${(P)daemon_pid_var:-0} local cleanup_func=_gitstatus_cleanup_$$_${ZSH_SUBSHELL}_${daemon_pid} (( $+functions[_gitstatus_process_response_${name}] )) && { zle -F $resp_fd unfunction _gitstatus_process_response_${name} } (( resp_fd )) && exec {resp_fd}>&- (( req_fd )) && exec {req_fd}>&- (( lock_fd )) && zsystem flock -u $lock_fd (( daemon_pid > 0 )) && kill -- -$daemon_pid &>/dev/null unset $req_fd_var $resp_fd_var $lock_fd_var $daemon_pid_var $client_pid_var $dirty_size_var if (( $+functions[$cleanup_func] )); then add-zsh-hook -d zshexit $cleanup_func unfunction $cleanup_func fi return 0 } # Usage: gitstatus_check NAME. # # Returns 0 if and only if `gitstatus_start NAME` has succeeded previously. # If it returns non-zero, gitstatus_query NAME is guaranteed to return non-zero. function gitstatus_check() { emulate -L zsh (( ARGC == 1 )) || { echo "usage: gitstatus_check NAME" >&2; return 1 } local daemon_pid_var=GITSTATUS_DAEMON_PID_${1} (( ${(P)daemon_pid_var:-0} > 0 )) } (( ${#_gitstatus_opts} )) && setopt ${_gitstatus_opts[@]} 'builtin' 'unset' '_gitstatus_opts' ================================================ FILE: .config/gitstatus/gitstatus.prompt.sh ================================================ # Copyright 2019 Roman Perepelitsa. # # This file is part of GitStatus. It sets Bash PS1 parameter to reflect git status. # # GitStatus is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # GitStatus is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GitStatus. If not, see . # Source gitstatus.plugin.sh from $GITSTATUS_DIR or from the same directory # in which the current script resides if the variable isn't set. GITSTATUS_DIR="/home/$USER/.config/gitstatus" source "${GITSTATUS_DIR:-${BASH_SOURCE[0]%/*}}/gitstatus.plugin.sh" || exit # Sets GITSTATUS_PROMPT to reflect the state of the current git repository. # The value is empty if not in a git repository. Forwards all arguments to # gitstatus_query. # # Example value of GITSTATUS_PROMPT: # # master+!? ⇡2 ⇣3 *4 # # Meaning: # # master current branch # + git repo has changes staged for commit # ! git repo has unstaged changes # ? git repo has untracked files # ⇡2 local branch is ahead of origin by 2 commits # ⇣3 local branch is behind origin by 3 commits # *4 git repo has 4 stashes function gitstatus_prompt_update() { GITSTATUS_PROMPT="" gitstatus_query "$@" || return 1 # error [[ "$VCS_STATUS_RESULT" == ok-sync ]] || return 0 # not a git repo local reset=$'\e[0m' # no color local clean=$'\e[38;5;076m' # green foreground local untracked=$'\e[38;5;014m' # teal foreground local modified=$'\e[38;5;011m' # yellow foreground local conflicted=$'\e[38;5;196m' # red foreground local p local where # branch name, tag or commit if [[ -n "$VCS_STATUS_LOCAL_BRANCH" ]]; then where="$VCS_STATUS_LOCAL_BRANCH" elif [[ -n "$VCS_STATUS_TAG" ]]; then p+="${reset}#" where="$VCS_STATUS_TAG" else p+="${reset}@" where="${VCS_STATUS_COMMIT:0:8}" fi (( ${#where} > 32 )) && where="${where:0:12}…${where: -12}" # truncate long branch names and tags p+="${clean}${where}" # ⇣42 if behind the remote. (( VCS_STATUS_COMMITS_BEHIND )) && p+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && p+=" " (( VCS_STATUS_COMMITS_AHEAD )) && p+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" # *42 if have stashes. (( VCS_STATUS_STASHES )) && p+=" ${clean}*${VCS_STATUS_STASHES}" # 'merge' if the repo is in an unusual state. [[ -n "$VCS_STATUS_ACTION" ]] && p+=" ${conflicted}${VCS_STATUS_ACTION}" # ~42 if have merge conflicts. (( VCS_STATUS_NUM_CONFLICTED )) && p+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" # +42 if have staged changes. (( VCS_STATUS_NUM_STAGED )) && p+=" ${modified}+${VCS_STATUS_NUM_STAGED}" # !42 if have unstaged changes. (( VCS_STATUS_NUM_UNSTAGED )) && p+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" # ?42 if have untracked files. It's really a question mark, your font isn't broken. (( VCS_STATUS_NUM_UNTRACKED )) && p+=" ${untracked}?${VCS_STATUS_NUM_UNTRACKED}" GITSTATUS_PROMPT="${p}${reset}" } # Start gitstatusd in the background. gitstatus_stop && gitstatus_start # On every prompt, fetch git status and set GITSTATUS_PROMPT. PROMPT_COMMAND=gitstatus_prompt_update # Enable promptvars so that ${GITSTATUS_PROMPT} in PS1 is expanded. shopt -s promptvars ================================================ FILE: .config/gitstatus/gitstatus.prompt.zsh ================================================ # Copyright 2019 Roman Perepelitsa. # # This file is part of GitStatus. It sets ZSH PROMPT parameter to reflect git status. # # GitStatus is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # GitStatus is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GitStatus. If not, see . # Source gitstatus.plugin.zsh from $GITSTATUS_DIR or from the same directory # in which the current script resides if the variable isn't set. source "${GITSTATUS_DIR:-${${(%):-%x}:h}}/gitstatus.plugin.zsh" || return # Sets GITSTATUS_PROMPT to reflect the state of the current git repository. Empty if not # in a git repository. In addition, sets GITSTATUS_PROMPT_LEN to the number of columns # $GITSTATUS_PROMPT will occupy when printed. # # Example: # # GITSTATUS_PROMPT='master ⇣42⇡42 *42 merge ~42 +42 !42 ?42' # GITSTATUS_PROMPT_LEN=39 # # master current branch # ⇣42 local branch is 42 commits behind the remote # ⇡42 local branch is 42 commits ahead of the remote # *42 42 stashes # merge merge in progress # ~42 42 merge conflicts # +42 42 staged changes # !42 42 unstaged changes # ?42 42 untracked files # function gitstatus_prompt_update() { emulate -L zsh typeset -g GITSTATUS_PROMPT='' typeset -gi GITSTATUS_PROMPT_LEN=0 # Call gitstatus_query synchronously. Note that gitstatus_query can also be called # asynchronously; see documentation in gitstatus.plugin.zsh. gitstatus_query 'MY' || return 1 # error [[ $VCS_STATUS_RESULT == 'ok-sync' ]] || return 0 # not a git repo local clean='%76F' # green foreground local modified='%178F' # yellow foreground local untracked='%39F' # blue foreground local black='%59F' # black foreground local conflicted='%196F' # red foreground local branch=" " local p p+=$branch local where # branch name, tag or commit if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then where=$VCS_STATUS_LOCAL_BRANCH elif [[ -n $VCS_STATUS_TAG ]]; then p+='%f#' where=$VCS_STATUS_TAG else p+='%f@' where=${VCS_STATUS_COMMIT[1,8]} fi (( $#where > 32 )) && where[13,-13]="…" # truncate long branch names and tags p+="${where//\%/%%}" # escape % # ⇣42 if behind the remote. (( VCS_STATUS_COMMITS_BEHIND )) && p+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && p+=" " (( VCS_STATUS_COMMITS_AHEAD )) && p+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" # *42 if have stashes. (( VCS_STATUS_STASHES )) && p+=" ${clean}*${VCS_STATUS_STASHES}" # 'merge' if the repo is in an unusual state. [[ -n $VCS_STATUS_ACTION ]] && p+=" ${conflicted}${VCS_STATUS_ACTION}" # ~42 if have merge conflicts. (( VCS_STATUS_NUM_CONFLICTED )) && p+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" # +42 if have staged changes. (( VCS_STATUS_NUM_STAGED )) && p+=" ${modified}+${VCS_STATUS_NUM_STAGED}" # !42 if have unstaged changes. (( VCS_STATUS_NUM_UNSTAGED )) && p+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" # ?42 if have untracked files. It's really a question mark, your font isn't broken. (( VCS_STATUS_NUM_UNTRACKED )) && p+=" ${untracked}?${VCS_STATUS_NUM_UNTRACKED}" GITSTATUS_PROMPT="${p}%f" # The length of GITSTATUS_PROMPT after removing %f and %F. GITSTATUS_PROMPT_LEN="${(m)#${${GITSTATUS_PROMPT//\%\%/x}//\%(f|<->F)}}" } # Start gitstatusd instance with name "MY". The same name is passed to # gitstatus_query in gitstatus_prompt_update. The flags with -1 as values # enable staged, unstaged, conflicted and untracked counters. gitstatus_stop 'MY' && gitstatus_start -s -1 -u -1 -c -1 -d -1 'MY' # On every prompt, fetch git status and set GITSTATUS_PROMPT. autoload -Uz add-zsh-hook add-zsh-hook precmd gitstatus_prompt_update # Enable/disable the right prompt options. setopt no_prompt_bang prompt_percent prompt_subst # Customize prompt. Put $GITSTATUS_PROMPT in it to reflect git status. # # Example: # # user@host ~/projects/skynet master ⇡42 # % █ # # The current directory gets truncated from the left if the whole prompt doesn't fit on the line. PROMPT='%70F%n@%m%f ' # green user@host PROMPT+='%39F%$((-GITSTATUS_PROMPT_LEN-1))<…<%~%<<%f' # blue current working directory PROMPT+='${GITSTATUS_PROMPT:+ $GITSTATUS_PROMPT}' # git status PROMPT+=$'\n' # new line PROMPT+='%F{%(?.76.196)}%#%f ' # %/# (normal/root); green/red (ok/error) ================================================ FILE: .config/i3/config ================================================ ######################################################################################################################################### #||| SETTINGS ######################################################################################################################################### gaps inner 10 gaps outer 5 workspace_auto_back_and_forth yes popup_during_fullscreen smart focus_follows_mouse yes focus_on_window_activation focus focus_wrapping yes floating_minimum_size 1600x900 for_window [class=.*] border pixel 0 font pango:Monoid 12px floating_modifier mod4 bindsym mod4+e layout toggle split bindsym F12 exec "bash ~/.config/rofi/menu/SEARCH" bindsym F11 exec "bash ~/.config/rofi/menu/SYSTEM" ######################################################################################################################################### #||| WORKSPACES & MONITORS ######################################################################################################################################### workspace 001 output eDP1 workspace 002 output eDP1 workspace 003 output eDP1 workspace 004 output eDP1 workspace 005 output DP1 workspace 006 output DP1 workspace 007 output DP1 workspace 008 output DP1 workspace 009 output DP1 ######################################################################################################################################### #||| ASSIGNMENTS ######################################################################################################################################### assign [class="Firefox"] "009" assign [class="Code"] "002" assign [class="Nautilus"] "001" for_window [class="MPlayer"] floating enable, move position center for_window [class="URxvt"] floating enable, move position center for_window [class="kitty"] floating enable, move position center for_window [class="mpv"] floating enable, move scratchpad, scratchpad show for_window [class="matplotlib"] floating enable, move position center, fullscreen enable ######################################################################################################################################### #||| KICKSTART ######################################################################################################################################### exec bash ~/.startup exec_always bash ~/.startup -r ================================================ FILE: .config/kitty/kitty.conf ================================================ #foreground #EAEAEA #background #121212 #color0 #000000 #color8 #4D4D4D #color1 #FF5555 #color9 #FF6E67 #color2 #50FA7B #color10 #5AF78E #color3 #F1FA8C #color11 #F4F99D #color4 #BD93F9 #color12 #CAA9FA #color5 #FF79C6 #color13 #FF92D0 #color6 #8BE9FD #color14 #9AEDFE #color7 #BFBFBF #color15 #E6E6E6 include ~/.cache/wal/colors-kitty.conf font_family Iosevka Term SS01 bold_font Iosevka Term SS01 italic_font Iosevka Term SS01 bold_italic_font Iosevka Term SS01 # font_family Input Mono Compressed # bold_font Input Mono Compressed # italic_font Input Mono Compressed # bold_italic_font Input Mono Compressed font_size 16.0 adjust_line_height 0 adjust_column_width 0 box_drawing_scale 0.001, 1, 1.5, 2 cursor_shape block cursor_blink_interval 0.5 cursor_stop_blinking_after 15.0 scrollback_lines 10000 scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER wheel_scroll_multiplier 2.0 cursor #ddff6c url_color #0087BD url_style curly open_url_modifiers kitty_mod open_url_with default copy_on_select yes rectangle_select_modifiers ctrl+alt select_by_word_characters :@-./_~?&=%+# click_interval 0.5 mouse_hide_wait 3.0 focus_follows_mouse no repaint_delay 10 input_delay 3 sync_to_monitor yes remember_window_size yes initial_window_width 640 initial_window_height 400 enabled_layouts * window_resize_step_cells 2 window_resize_step_lines 2 window_border_width 1.0 draw_minimal_borders yes window_margin_width 0.0 single_window_margin_width -1000.0 window_padding_width 30.0 active_border_color #00ff00 inactive_border_color #cccccc bell_border_color #ff5a00 inactive_text_alpha 1.0 tab_bar_edge bottom tab_bar_margin_width 0.0 tab_bar_style fade tab_fade 0.25 0.5 0.75 1 tab_separator " ┇" active_tab_foreground #000 active_tab_background #eee active_tab_font_style bold-italic inactive_tab_foreground #444 inactive_tab_background #999 inactive_tab_font_style normal background_opacity 1.0 dynamic_background_opacity no dim_opacity 1 selection_foreground #000000 selection_background #FFFACD shell . editor . close_on_child_death no allow_remote_control no startup_session none clipboard_control write-clipboard read-clipboard write-primary read-primary term xterm-kitty x11_hide_window_decorations yes map ctrl+0x2b change_font_size all +0.5 map ctrl+0x2d change_font_size all -0.5 kitty_mod ctrl+shift map kitty_mod+c copy_to_clipboard map kitty_mod+v paste_from_clipboard map kitty_mod+s paste_from_selection map shift+insert paste_from_selection map kitty_mod+o pass_selection_to_program enable_audio_bell no ================================================ FILE: .config/mutt/aliases ================================================ # vim: filetype=neomuttrc # A file for aliases ================================================ FILE: .config/mutt/colors ================================================ # vim: filetype=neomuttrc # Default index colors: color index yellow default '.*' color index_author red default '.*' color index_number blue default color index_subject cyan default '.*' # For new mail: color index brightyellow black "~N" color index_author brightred black "~N" color index_subject brightcyan black "~N" # Header colors: color header blue default ".*" color header brightmagenta default "^(From)" color header brightcyan default "^(Subject)" color header brightwhite default "^(CC|BCC)" mono bold bold mono underline underline mono indicator reverse mono error bold color normal default default color indicator brightblack white color sidebar_highlight red default color sidebar_divider brightblack black color sidebar_flagged red black color sidebar_new green black color normal brightyellow default color error red default color tilde black default color message cyan default color markers red white color attachment white default color search brightmagenta default color status brightyellow black color hdrdefault brightgreen default color quoted green default color quoted1 blue default color quoted2 cyan default color quoted3 yellow default color quoted4 red default color quoted5 brightred default color signature brightgreen default color bold black default color underline black default color normal default default color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL color body green default "\`[^\`]*\`" # Green text between ` and ` color body brightblue default "^# \.*" # Headings as bold blue color body brightcyan default "^## \.*" # Subheadings as bold cyan color body brightgreen default "^### \.*" # Subsubheadings as bold green color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow color body brightcyan default "[;:][-o][)/(|]" # emoticons color body brightcyan default "[;:][)(|]" # emoticons color body brightcyan default "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\ |FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\ |IRL|RTFM|ROTFL|ROFL|YMMV)[*]?" color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon? color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon? color body red default "(BAD signature)" color body cyan default "(Good signature)" color body brightblack default "^gpg: Good signature .*" color body brightyellow default "^gpg: " color body brightyellow red "^gpg: BAD signature from.*" mono body bold "^gpg: Good signature" mono body bold "^gpg: BAD signature from.*" color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" ================================================ FILE: .config/mutt/muttrc ================================================ # Folder hooks folder-hook 'account.com.gmail.kushtrim' 'source ~/.config/mutt/account.com.gmail.kushtrim' folder-hook 'account.com.yahoo.kushtrim' 'source ~/.config/mutt/account.com.yahoo.kushtrim' folder-hook 'account.com.hotmail.kushtrim' 'source ~/.config/mutt/account.com.hotmail.kushtrim' folder-hook 'account.com.unibo.kushtrim' 'source ~/.config/mutt/account.com.unibo.kushtrim' # Default account source ~/.config/mutt/account.com.gmail.kushtrim # Macros for switching accounts macro index 'source ~/.config/mutt/account.com.gmail.kushtrim!' macro index 'source ~/.config/mutt/account.com.hotmail.kushtrim!' macro index 'source ~/.config/mutt/account.com.yahoo.kushtrim!' macro index 'source ~/.config/mutt/account.com.unibo.kushtrim!' # vim: filetype=neomuttrc # This is the general mutt config which has the settings that all accounts use. bind index,pager i noop bind index,pager g noop bind index \Cf noop source ~/.config/mutt/colors source ~/.config/mutt/aliases set sleep_time = 0 set sort = 'reverse-date' set editor = $EDITOR #set copy = no set timeout = "5" set mail_check = "10" set mailcap_path = ~/.config/mutt/etc/mailcap set date_format="%y/%m/%d %I:%M" set index_format="%2C %zs %?X?A& ? %D %-15.15F %s (%-4.4c)" set markers = no set mark_old = no set mime_forward = yes set smtp_authenticators = 'gssapi:login' set wait_key = no auto_view text/html auto_view application/pgp-encrypted alternative_order text/plain text/enriched text/html set rfc2047_parameters = yes # General remappings bind editor noop bind index G last-entry bind index gg first-entry bind pager j next-line bind pager k previous-line bind pager gg top bind pager G bottom bind index d half-down bind index u half-up bind index D delete-message bind index U undelete-message bind index F search bind index,pager R group-reply bind index,pager \031 previous-undeleted # Mouse wheel bind index,pager \005 next-undeleted # Mouse wheel macro index,pager S macro index,pager \Cu |urlscan\n macro index,pager ,, |urlscan\n # View attachments properly. bind attach view-mailcap set fast_reply # skip to compose when replying set fcc_attach # save attachments with the body unset mime_forward # forward attachments as part of body set forward_format = "Fwd: %s" # format of subject when forwarding set forward_decode # decode when forwarding set forward_quote # include message in forwards set reverse_name # reply as whomever it was to set include # include message in replies #Ctrl-R to mark all as read macro index \Cr "T~UN." "mark all messages as read" #sync email macro index O "$HOME/.config/mutt/etc/mailsync.sh" "run offlineimap to sync all mail" macro index o "$HOME/.config/mutt/etc/mailsync.sh -qf INBOX" "run offlineimap to sync inbox" #copy/move dialogs macro index C "?" "copy a message to a mailbox" macro index M "?" "move a message to a mailbox" # Notmuch searching macro index \Cf "unset wait_keyread -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;$,=\"|\";print@a'\`\"" "show only messages matching a notmuch pattern" macro index A "all\n" "show all messages (undo limit)" # Sidebar mappings set sidebar_visible = yes set sidebar_width = 20 set sidebar_short_path = yes set sidebar_next_new_wrap = yes set mail_check_stats set sidebar_format = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?' bind index,pager \Ck sidebar-prev bind index,pager \Cj sidebar-next bind index,pager \Co sidebar-open bind index,pager \Cp sidebar-prev-new bind index,pager \Cn sidebar-next-new bind index,pager B sidebar-toggle-visible ================================================ FILE: .config/neofetch/config.conf ================================================ # See this wiki page for more info: # https://github.com/dylanaraps/neofetch/wiki/Customizing-Info print_info() { info title info underline info "OS" distro info "Host" model info "Kernel" kernel info "Uptime" uptime info "Packages" packages info "Shell" shell info "Resolution" resolution info "DE" de info "WM" wm info "WM Theme" wm_theme info "Theme" theme info "Icons" icons info "Terminal" term info "Terminal Font" term_font info "CPU" cpu info "GPU" gpu info "Memory" memory # info "GPU Driver" gpu_driver # Linux/macOS only # info "CPU Usage" cpu_usage # info "Disk" disk # info "Battery" battery # info "Font" font # info "Song" song # info "Local IP" local_ip # info "Public IP" public_ip # info "Users" users # info "Locale" locale # This only works on glibc systems. info line_break info cols info line_break } # Kernel # Shorten the output of the kernel function. # # Default: 'on' # Values: 'on', 'off' # Flag: --kernel_shorthand # Supports: Everything except *BSDs (except PacBSD and PC-BSD) # # Example: # on: '4.8.9-1-ARCH' # off: 'Linux 4.8.9-1-ARCH' kernel_shorthand="on" # Distro # Shorten the output of the distro function # # Default: 'off' # Values: 'on', 'off', 'tiny' # Flag: --distro_shorthand # Supports: Everything except Windows and Haiku distro_shorthand="off" # Show/Hide OS Architecture. # Show 'x86_64', 'x86' and etc in 'Distro:' output. # # Default: 'on' # Values: 'on', 'off' # Flag: --os_arch # # Example: # on: 'Arch Linux x86_64' # off: 'Arch Linux' os_arch="on" # Uptime # Shorten the output of the uptime function # # Default: 'on' # Values: 'on', 'off', 'tiny' # Flag: --uptime_shorthand # # Example: # on: '2 days, 10 hours, 3 mins' # off: '2 days, 10 hours, 3 minutes' # tiny: '2d 10h 3m' uptime_shorthand="on" # Packages # Show/Hide Package Manager names. # # Default: 'tiny' # Values: 'on', 'tiny' 'off' # Flag: --package_managers # # Example: # on: '998 (pacman), 8 (flatpak), 4 (snap)' # tiny: '908 (pacman, flatpak, snap)' # off: '908' package_managers="on" # Shell # Show the path to $SHELL # # Default: 'off' # Values: 'on', 'off' # Flag: --shell_path # # Example: # on: '/bin/bash' # off: 'bash' shell_path="off" # Show $SHELL version # # Default: 'on' # Values: 'on', 'off' # Flag: --shell_version # # Example: # on: 'bash 4.4.5' # off: 'bash' shell_version="on" # CPU # CPU speed type # # Default: 'bios_limit' # Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'. # Flag: --speed_type # Supports: Linux with 'cpufreq' # NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value. speed_type="bios_limit" # CPU speed shorthand # # Default: 'off' # Values: 'on', 'off'. # Flag: --speed_shorthand. # NOTE: This flag is not supported in systems with CPU speed less than 1 GHz # # Example: # on: 'i7-6500U (4) @ 3.1GHz' # off: 'i7-6500U (4) @ 3.100GHz' speed_shorthand="off" # Enable/Disable CPU brand in output. # # Default: 'on' # Values: 'on', 'off' # Flag: --cpu_brand # # Example: # on: 'Intel i7-6500U' # off: 'i7-6500U (4)' cpu_brand="on" # CPU Speed # Hide/Show CPU speed. # # Default: 'on' # Values: 'on', 'off' # Flag: --cpu_speed # # Example: # on: 'Intel i7-6500U (4) @ 3.1GHz' # off: 'Intel i7-6500U (4)' cpu_speed="on" # CPU Cores # Display CPU cores in output # # Default: 'logical' # Values: 'logical', 'physical', 'off' # Flag: --cpu_cores # Support: 'physical' doesn't work on BSD. # # Example: # logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores) # physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores) # off: 'Intel i7-6500U @ 3.1GHz' cpu_cores="logical" # CPU Temperature # Hide/Show CPU temperature. # Note the temperature is added to the regular CPU function. # # Default: 'off' # Values: 'C', 'F', 'off' # Flag: --cpu_temp # Supports: Linux, BSD # NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable # coretemp kernel module. This only supports newer Intel processors. # # Example: # C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]' # F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]' # off: 'Intel i7-6500U (4) @ 3.1GHz' cpu_temp="off" # GPU # Enable/Disable GPU Brand # # Default: 'on' # Values: 'on', 'off' # Flag: --gpu_brand # # Example: # on: 'AMD HD 7950' # off: 'HD 7950' gpu_brand="on" # Which GPU to display # # Default: 'all' # Values: 'all', 'dedicated', 'integrated' # Flag: --gpu_type # Supports: Linux # # Example: # all: # GPU1: AMD HD 7950 # GPU2: Intel Integrated Graphics # # dedicated: # GPU1: AMD HD 7950 # # integrated: # GPU1: Intel Integrated Graphics gpu_type="all" # Resolution # Display refresh rate next to each monitor # Default: 'off' # Values: 'on', 'off' # Flag: --refresh_rate # Supports: Doesn't work on Windows. # # Example: # on: '1920x1080 @ 60Hz' # off: '1920x1080' refresh_rate="off" # Gtk Theme / Icons / Font # Shorten output of GTK Theme / Icons / Font # # Default: 'off' # Values: 'on', 'off' # Flag: --gtk_shorthand # # Example: # on: 'Numix, Adwaita' # off: 'Numix [GTK2], Adwaita [GTK3]' gtk_shorthand="off" # Enable/Disable gtk2 Theme / Icons / Font # # Default: 'on' # Values: 'on', 'off' # Flag: --gtk2 # # Example: # on: 'Numix [GTK2], Adwaita [GTK3]' # off: 'Adwaita [GTK3]' gtk2="on" # Enable/Disable gtk3 Theme / Icons / Font # # Default: 'on' # Values: 'on', 'off' # Flag: --gtk3 # # Example: # on: 'Numix [GTK2], Adwaita [GTK3]' # off: 'Numix [GTK2]' gtk3="on" # IP Address # Website to ping for the public IP # # Default: 'http://ident.me' # Values: 'url' # Flag: --ip_host public_ip_host="http://ident.me" # Disk # Which disks to display. # The values can be any /dev/sdXX, mount point or directory. # NOTE: By default we only show the disk info for '/'. # # Default: '/' # Values: '/', '/dev/sdXX', '/path/to/drive'. # Flag: --disk_show # # Example: # disk_show=('/' '/dev/sdb1'): # 'Disk (/): 74G / 118G (66%)' # 'Disk (/mnt/Videos): 823G / 893G (93%)' # # disk_show=('/'): # 'Disk (/): 74G / 118G (66%)' # disk_show=('/') # Disk subtitle. # What to append to the Disk subtitle. # # Default: 'mount' # Values: 'mount', 'name', 'dir' # Flag: --disk_subtitle # # Example: # name: 'Disk (/dev/sda1): 74G / 118G (66%)' # 'Disk (/dev/sdb2): 74G / 118G (66%)' # # mount: 'Disk (/): 74G / 118G (66%)' # 'Disk (/mnt/Local Disk): 74G / 118G (66%)' # 'Disk (/mnt/Videos): 74G / 118G (66%)' # # dir: 'Disk (/): 74G / 118G (66%)' # 'Disk (Local Disk): 74G / 118G (66%)' # 'Disk (Videos): 74G / 118G (66%)' disk_subtitle="mount" # Song # Manually specify a music player. # # Default: 'auto' # Values: 'auto', 'player-name' # Flag: --music_player # # Available values for 'player-name': # # amarok # audacious # banshee # bluemindo # clementine # cmus # deadbeef # deepin-music # dragon # elisa # exaile # gnome-music # gmusicbrowser # Google Play # guayadeque # iTunes # juk # lollypop # mocp # mopidy # mpd # pogo # pragha # qmmp # quodlibet # rhythmbox # sayonara # smplayer # spotify # Spotify # tomahawk # vlc # xmms2d # yarock music_player="auto" # Format to display song information. # # Default: '%artist% - %album% - %title%' # Values: '%artist%', '%album%', '%title%' # Flag: --song_format # # Example: # default: 'Song: Jet - Get Born - Sgt Major' song_format="%artist% - %album% - %title%" # Print the Artist, Album and Title on separate lines # # Default: 'off' # Values: 'on', 'off' # Flag: --song_shorthand # # Example: # on: 'Artist: The Fratellis' # 'Album: Costello Music' # 'Song: Chelsea Dagger' # # off: 'Song: The Fratellis - Costello Music - Chelsea Dagger' song_shorthand="off" # 'mpc' arguments (specify a host, password etc). # # Default: '' # Example: mpc_args=(-h HOST -P PASSWORD) mpc_args=() # Text Colors # Text Colors # # Default: 'distro' # Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' # Flag: --colors # # Each number represents a different part of the text in # this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info' # # Example: # colors=(distro) - Text is colored based on Distro colors. # colors=(4 6 1 8 8 6) - Text is colored in the order above. colors=(distro) # Text Options # Toggle bold text # # Default: 'on' # Values: 'on', 'off' # Flag: --bold bold="on" # Enable/Disable Underline # # Default: 'on' # Values: 'on', 'off' # Flag: --underline underline_enabled="on" # Underline character # # Default: '-' # Values: 'string' # Flag: --underline_char underline_char="-" # Color Blocks # Color block range # The range of colors to print. # # Default: '0', '7' # Values: 'num' # Flag: --block_range # # Example: # # Display colors 0-7 in the blocks. (8 colors) # neofetch --block_range 0 7 # # Display colors 0-15 in the blocks. (16 colors) # neofetch --block_range 0 15 block_range=(0 7) # Toggle color blocks # # Default: 'on' # Values: 'on', 'off' # Flag: --color_blocks color_blocks="on" # Color block width in spaces # # Default: '3' # Values: 'num' # Flag: --block_width block_width=3 # Color block height in lines # # Default: '1' # Values: 'num' # Flag: --block_height block_height=1 # Progress Bars # Bar characters # # Default: '-', '=' # Values: 'string', 'string' # Flag: --bar_char # # Example: # neofetch --bar_char 'elapsed' 'total' # neofetch --bar_char '-' '=' bar_char_elapsed="-" bar_char_total="=" # Toggle Bar border # # Default: 'on' # Values: 'on', 'off' # Flag: --bar_border bar_border="on" # Progress bar length in spaces # Number of chars long to make the progress bars. # # Default: '15' # Values: 'num' # Flag: --bar_length bar_length=15 # Progress bar colors # When set to distro, uses your distro's logo colors. # # Default: 'distro', 'distro' # Values: 'distro', 'num' # Flag: --bar_colors # # Example: # neofetch --bar_colors 3 4 # neofetch --bar_colors distro 5 bar_color_elapsed="distro" bar_color_total="distro" # Info display # Display a bar with the info. # # Default: 'off' # Values: 'bar', 'infobar', 'barinfo', 'off' # Flags: --cpu_display # --memory_display # --battery_display # --disk_display # # Example: # bar: '[---=======]' # infobar: 'info [---=======]' # barinfo: '[---=======] info' # off: 'info' cpu_display="off" memory_display="off" battery_display="off" disk_display="off" # Backend Settings # Image backend. # # Default: 'ascii' # Values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off', 'termpix', 'pixterm', 'tycat', 'w3m' # Flag: --backend image_backend="ascii" # Image Source # # Which image or ascii file to display. # # Default: 'auto' # Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' # Flag: --source # # NOTE: 'auto' will pick the best image source for whatever image backend is used. # In ascii mode, distro ascii art will be used and in an image mode, your # wallpaper will be used. image_source="auto" # Ascii Options # Ascii distro # Which distro's ascii art to display. # # Default: 'auto' # Values: 'auto', 'distro_name' # Flag: --ascii_distro # # NOTE: Arch and Ubuntu have 'old' logo variants. # Change this to 'arch_old' or 'ubuntu_old' to use the old logos. # NOTE: Ubuntu has flavor variants. # Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors. # NOTE: Arch, Crux and Gentoo have a smaller logo variant. # Change this to 'arch_small', 'crux_small' or 'gentoo_small' to use the small logos. ascii_distro="auto" # Ascii Colors # # Default: 'distro' # Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' # Flag: --ascii_colors # # Example: # ascii_colors=(distro) - Ascii is colored based on Distro colors. # ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors. ascii_colors=(distro) # Bold ascii logo # Whether or not to bold the ascii logo. # # Default: 'on' # Values: 'on', 'off' # Flag: --ascii_bold ascii_bold="on" # Image Options # Image loop # Setting this to on will make neofetch redraw the image constantly until # Ctrl+C is pressed. This fixes display issues in some terminal emulators. # # Default: 'off' # Values: 'on', 'off' # Flag: --loop image_loop="off" # Thumbnail directory # # Default: '~/.cache/thumbnails/neofetch' # Values: 'dir' thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch" # Crop mode # # Default: 'normal' # Values: 'normal', 'fit', 'fill' # Flag: --crop_mode # # See this wiki page to learn about the fit and fill options. # https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F crop_mode="normal" # Crop offset # Note: Only affects 'normal' crop mode. # # Default: 'center' # Values: 'northwest', 'north', 'northeast', 'west', 'center' # 'east', 'southwest', 'south', 'southeast' # Flag: --crop_offset crop_offset="center" # Image size # The image is half the terminal width by default. # # Default: 'auto' # Values: 'auto', '00px', '00%', 'none' # Flags: --image_size # --size image_size="auto" # Gap between image and text # # Default: '3' # Values: 'num', '-num' # Flag: --gap gap=3 # Image offsets # Only works with the w3m backend. # # Default: '0' # Values: 'px' # Flags: --xoffset # --yoffset yoffset=0 xoffset=0 # Image background color # Only works with the w3m backend. # # Default: '' # Values: 'color', 'blue' # Flag: --bg_color background_color= # Misc Options # Stdout mode # Turn off all colors and disables image backend (ASCII/Image). # Useful for piping into another command. # Default: 'off' # Values: 'on', 'off' stdout="off" ================================================ FILE: .config/nixpkgs/config.nix ================================================ { packageOverrides = pkgs: { nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { inherit pkgs; }; }; } ================================================ FILE: .config/nvim/bookmarks ================================================ let l:bm_file_version = 1 let l:bm_sessions = {'default': {'/home/bresilla/WORK/data_structures/ControlP': [{'sign_idx': 9500, 'line_nr': 10, 'content': '> bin/main', 'annotation': 'n'},],'/home/bresilla/DATA/DOTFILES/Dots/.config/tmux/modules/STATUS': [{'sign_idx': 9500, 'line_nr': 62, 'content': 'cdr="$sealTX"'},],}} let l:bm_current_session = 'default' ================================================ FILE: .config/nvim/init.vim ================================================ call plug#begin() "SYNTAX Plug 'autozimu/LanguageClient-neovim', {'branch': 'next', 'do': 'bash install.sh'} Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins'} Plug 'ncm2/float-preview.nvim' Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' } Plug 'sheerun/vim-polyglot' "A collection of language packs for Vim Plug 'w0rp/ale' "syntax checker for vim Plug 'SirVer/ultisnips' "snipets engine Plug 'honza/vim-snippets' "snippets collection Plug 'ntpeters/vim-better-whitespace' "whitespace detection Plug 'lfilho/cosco.vim' "add semicolon or comma n the end Plug 'lilydjwg/colorizer' "show hex colors "WORKSPACE Plug 'vim-ctrlspace/vim-ctrlspace' "a better workspace manager Plug 'benmills/vimux' "run shell comands in a tmux pane Plug 'christoomey/vim-tmux-navigator' Plug 'voldikss/vim-floaterm' "terminal Plug 'ingolemo/vim-bufferclose' Plug '907th/vim-auto-save' "vim autsave plugin Plug 'editorconfig/editorconfig-vim' "EDITOR-CONFIG settings "THEME Plug 'vim-airline/vim-airline-themes' Plug 'vim-airline/vim-airline' Plug 'edkolev/promptline.vim' Plug 'powerline/fonts' "patched powerline-fonts Plug 'rakr/vim-one' "Atom ONE theme "NAVIGATION Plug 'easymotion/vim-easymotion' "jump to any location Plug 'matze/vim-move' "move lines with alt-arrow Plug 'yuttie/comfortable-motion.vim' "comfortable scroll Plug 'tpope/vim-repeat' " '.' for better repeat functioalities "VIEWS Plug 'scrooloose/nerdtree' "side-bar file manager Plug 'ryanoasis/vim-devicons' "icons for nerdtree Plug 'zgpio/tree.nvim' "better file browser Plug 'mcchrish/nnn.vim' Plug 'junegunn/goyo.vim' Plug 'mox-mox/vim-localsearch' "vim localsearch Plug 'ctrlpvim/ctrlp.vim' "fuzzy searcher Plug 'liuchengxu/vim-clap' "interactive floating finder and dispatcher Plug 'dyng/ctrlsf.vim' "grep search withind directory Plug 'majutsushi/tagbar' "methods viever Plug 'mbbill/undotree' "show a tree of undos Plug 'gcavallanti/vim-noscrollbar' "scrollbar-like for statusline "TOOLS Plug 'terryma/vim-multiple-cursors' "some multiple cursor things Plug 'scrooloose/nerdcommenter' "commenter Plug 'tpope/vim-abolish' "better renamer substituter Plug 'svermeulen/vim-subversive' "subsiitute motion Plug 'yggdroot/indentline' "indentation (characters) Plug 'rrethy/vim-illuminate' "highlightusert same words as cursor Plug 'wellle/targets.vim' "more objects to operate functions Plug 'jiangmiao/auto-pairs' "auto close brackets and parenthesis Plug 'luochen1990/rainbow' "colored brackets Plug 'godlygeek/tabular' "text aligner Plug 'haya14busa/incsearch.vim' Plug 'mattesgroeger/vim-bookmarks' "bookmarks per line Plug 'kana/vim-fakeclip' "better clipboard "GIT Plug 'airblade/vim-gitgutter' "show differences (GIT) Plug 'whiteinge/diffconflicts' Plug 'tpope/vim-fugitive' "git wrapper "BUILD Plug 'sakhnik/nvim-gdb' "GDB, LLVM wrapper Plug 'puremourning/vimspector' "VIM DEBUGGER " Plug 'strottos/vim-padre', { 'dir': '~/.config/nvim/plugged/vim-padre', 'do': 'make' } "OTHER " Plug 'wakatime/vim-wakatime' "coding time tracker plugin Plug 'duggiefresh/vim-easydir' "create new files and folders easily Plug 'wincent/terminus' "integration with terminal functioalities Plug 'othree/xml.vim' Plug 'reedes/vim-pencil' Plug 'tpope/vim-markdown' Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() } } Plug 'lervag/vimtex' " LATEX for vim call plug#end() let g:python_host_prog='/usr/bin/python' let g:python3_host_prog='/usr/bin/python3' syntax on filetype on filetype indent on filetype plugin on filetype plugin indent on let &t_SI = "\e[6 q" let &t_EI = "\e[3 q" let mapleader = "\" set nocompatible set hidden set encoding=utf8 set guifont=Monoisome\ 12 set t_Co=256 set laststatus=2 set clipboard+=unnamedplus " system clipboard set viminfo="" set noswapfile set nobackup set nowritebackup set autoread set mouse=a "let vim mouse scroll set sidescroll=1 set scrollopt+=hor set showbreak=↪\ set ruler set showcmd " display incomplete commands set showmode " display current modes set number " show numbers set relativenumber set display+=lastline set shiftround set hlsearch set incsearch set ignorecase set smartcase "folding things... set foldmethod=indent set foldnestmax=10 set foldlevel=2 set nofoldenable "tab settings function! UseTabs() set tabstop=4 " Size of a hard tabstop (ts). set shiftwidth=4 " Size of an indentation (sw). set noexpandtab " Always uses tabs instead of space characters (noet). set autoindent " Copy indent from current line when starting a new line (ai). set list lcs=tab:\|\ " show line indentation when tabs endfunction function! UseSpaces() set tabstop=4 " Size of a hard tabstop (ts). set shiftwidth=4 " Size of an indentation (sw). set expandtab " Always uses spaces instead of tab characters (et). set softtabstop=0 " Number of spaces a counts for. When 0, featuer is off (sts). set autoindent " Copy indent from current line when starting a new line. set smarttab " Inserts blanks on a key (as per sw, ts and sts). set list lcs=tab:\|\ " show line indentation when tabs :retab endfunction call UseSpaces() set completeopt=longest,menuone,preview set wildmenu " show a navigable menu for tab completion set wildmode=longest,list,full set wildignore=*.o,*~,*.pyc,*.class,*.so,*.zip,*.a,*/tmp/* set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1 set backspace=indent,eol,start " make that backspace key work the way it should set whichwrap+=<,>,h,l set listchars=extends:›,precedes:‹,nbsp:␣,trail:·,tab:→\ ,eol:¬ set iskeyword-=_,.,=,-,:, " specify what e word is set scrolloff=10 " Leave 10 lines of buffer when scrolling set sidescrolloff=10 " Leave 10 characters of horizontal buffer when scrolling set cursorline set cursorcolumn " column before numbers set signcolumn="yes" " === WHERE YOU LEFT ==="" "go to last position you were editing au BufWinLeave * silent! mkview au BufWinEnter * silent! loadview " === GOYO ===" function! s:goyo_enter() silent !tmux set status off silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z :SoftPencil set noshowmode set nonumber endfunction function! s:goyo_leave() silent !tmux set status on silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z :NoPencil set showmode set number silent! call s:highlightuser() endfunction autocmd! User GoyoEnter nested call goyo_enter() autocmd! User GoyoLeave nested call goyo_leave() noremap :Goyo let g:goyo_width = 90 " === SEARCH SETTINGS === " let g:better_whitespace_enabled=1 let g:incsearch#auto_nohlsearch = 1 map / (incsearch-forward) nmap / localsearch_toggle nnoremap * *`` "substitute normal "nnoremap + :%s/\<\>//g "substitute with subversive + abolish nmap s (SubversiveSubstituteRangeConfirm) nmap + (SubversiveSubstituteWordRangeConfirm) " === FILEMANAGER === " "nerdtree noremap :NERDTreeToggle let NERDTreeQuitOnOpen=1 "automatically clone nerd tre after open let NERDTreeShowHidden=1 let g:NERDTreeMinimalUI = 1 autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif au VimEnter * NERDTreeRefreshRoot " === OUTLINE BAR === " "tagbar noremap t :TagbarToggle let g:tagbar_compact = 1 let g:tagbar_sort = 0 " autocmd FileType cpp silent! :call tagbar#autoopen(0) " === INDENTATION LINES === " let g:indentLine_char_list = ['|', '¦', '┆', '┊'] let g:indentLine_color_term = 236 let g:indentLine_setConceal = 2 " default ''. " n for Normal mode " v for Visual mode " i for Insert mode " c for Command line editing, for 'incsearch' let g:indentLine_concealcursor = "" " === EASY MOTION === " nnoremap (easymotion-overwin-w) hi EasyMotionTarget ctermfg=15 cterm=bold,underline hi link EasyMotionTarget2First EasyMotionTarget hi EasyMotionTarget2Second ctermfg=2 cterm=underline " === WORKSPACE === " " ctrlspace set showtabline=0 nnoremap :CtrlSpaceSaveWorkspace let g:CtrlSpaceDefaultMappingKey = " " let g:CtrlSpaceLoadLastWorkspaceOnStart = 1 " let g:CtrlSpaceSaveWorkspaceOnSwitch = 1 " let g:CtrlSpaceSaveWorkspaceOnExit = 1 hi link CtrlSpaceNormal Normal hi link CtrlSpaceSelected PMenu hi link CtrlSpaceSearch Search hi link CtrlSpaceStatus StatusLine if executable("ag") let g:CtrlSpaceGlobCommand = 'ag -l --nocolor -g ""' endif let g:CtrlSpaceSymbols = { "File": "◯", "CTab": "▣", "Tabs": "▢" } let g:CtrlSpaceUseArrowsInTerm = 1 " === CTRLP === " let g:ctrlp_map = '' let g:ctrlp_custom_ignore = { \ 'dir': '\v[\/]\.(git|hg|svn)$', \ 'file': '\v\.(exe|so|dll)$', \ 'link': 'some_bad_symbolic_links', \ } let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] " === CTRLF === " nmap f CtrlSFPrompt " === FLOAT-TERM === " noremap :FloatermTogglei noremap! :FloatermTogglei tnoremap :FloatermToggle let g:floaterm_position = 'center' let g:floaterm_width = float2nr(&columns/1.5) let g:floaterm_height = float2nr(winheight(0)/1.5) " === NEOGDB === " let g:gdb_keymap_continue = '' let g:gdb_keymap_next = '' let g:gdb_keymap_step = '' " Usually, F23 is just Shift+F11 let g:gdb_keymap_finish = '' let g:gdb_keymap_toggle_break = '' " Usually, F33 is just Ctrl+F9 let g:gdb_keymap_toggle_break_all = '' let g:gdb_keymap_frame_up = '' let g:gdb_keymap_frame_down = '' " Usually, F21 is just Shift+F9 let g:gdb_keymap_clear_break = '' " Usually, F17 is just Shift+F5 let g:gdb_keymap_debug_stop = '' " === MOCELINES === " nmap MoveLineDown nmap MoveLineUp vmap MoveBlockDown vmap MoveBlockUp " === NAVIGATION === " "navigation panes imap :CtrlSpaceGoDown imap :CtrlSpaceGoUp map :CtrlSpaceGoDown map :CtrlSpaceGoUp map :tabn map :tabp map v :vnew map b :new map n :enew nmap - :e # map map map map "move vertically on soft lines nnoremap j gj nnoremap k gk vnoremap j gj vnoremap k gk nnoremap gj nnoremap gk vnoremap gj vnoremap gk inoremap gj inoremap gk "move horizontally map ^ map $ "exit cmap Q quitall cmap W write " === COMFORTABLE SCROLLING === " let g:comfortable_motion_no_default_key_mappings = 1 map :call comfortable_motion#flick(40) imap map :call comfortable_motion#flick(-40) imap let g:comfortable_motion_impulse_multiplier = 2 map :call comfortable_motion#flick(g:comfortable_motion_impulse_multiplier * winheight(0)) imap map :call comfortable_motion#flick(g:comfortable_motion_impulse_multiplier * -winheight(0)) imap let g:comfortable_motion_friction = 60.0 let g:comfortable_motion_air_drag = 4.0 let g:comfortable_motion_interval = 1000.0 / 60 " ===RUN === " " asyncrun let g:asyncrun_rootmarks = ['.svn', '.git', '.root', '_darcs', 'build.xml'] let g:asyncrun_open = 8 "cmakerun map :!cmake --build build/ --target map :!rm -rf build/*:!cmake -H. -Bbuild -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Debug map :!rm -rf build/*:!cmake -H. -Bbuild -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=FastDebug map :!ninja -C build map :!rm -rf build/*:!cmake -H. -Bbuild -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Debug -GNinja map :!rm -rf build/*:!cmake -H. -Bbuild -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=FastDebug -GNinja " === ALE === " let g:ale_sign_error = '×' let g:ale_sign_warning = '!' highlight ALEWarning ctermbg=0 ctermfg=220 cterm=bold highlight ALEWarningSign ctermbg=220 ctermfg=231 cterm=bold highlight ALEError ctermbg=0 ctermfg=196 cterm=bold highlight ALEErrorSign ctermbg=196 ctermfg=231 cterm=bold let g:airline#extensions#ale#enabled = 1 let g:ale_linters = { \ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'], \ 'go': ['~/.go/bin/gopls'], \ 'nim': ['~/.nimble/bin/nimlsp'], \ 'cpp': ['clangtidy'], \ 'python': ['/usr/local/bin/pyls'] \ } let g:ale_fixers = { \ 'cpp': ['clang-format'], \ } let g:ale_lint_on_save = 1 let g:ale_lint_on_text_changed = 1 " let g:ale_fix_on_save = 1 nmap (ale_fix) au TabLeave * silent! (ale_fix) au BufLeave * silent! (ale_fix) " === LANGUAGE SERVER === " let g:LanguageClient_autoStart = 1 let g:LanguageClient_useFloatingHover = 1 let g:LanguageClient_hoverPreview = "Never" let g:LanguageClient_serverCommands = { \ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'], \ 'go': ['~/.go/bin/gopls'], \ 'nim': ['~/.nimble/bin/nimlsp'], \ 'python': ['/usr/local/bin/pyls'], \ 'c': ['clangd', '-compile-commands-dir=' . getcwd() . '/build'], \ 'cpp': ['clangd', '-compile-commands-dir=' . getcwd() . '/build'], \ 'julia': ['julia', '--startup-file=no', '--history-file=no', '-e', ' \ using LanguageServer; \ using Pkg; \ import StaticLint; \ import SymbolServer; \ env_path = dirname(Pkg.Types.Context().env.project_file); \ debug = false; \ server = LanguageServer.LanguageServerInstance(stdin, stdout, debug, env_path, "", Dict()); \ server.runlinter = true; \ run(server);'] \ } " \ 'cpp': ['cquery', '--log-file=/tmp/cq.log'], nnoremap :call LanguageClient_textDocument_definition() nnoremap :call LanguageClient#textDocument_hover() nnoremap :call LanguageClient_textDocument_rename() nnoremap :call LanguageClient_textDocument_rename() " markdown let g:markdown_syntax_conceal = 0 " === DEOPLETE === " let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_smart_case = 1 " let g:deoplete#sources._ = ['buffer', 'member', 'tag', 'file', 'omni', 'ultisnips'] call deoplete#custom#source('LanguageClient', 'min_pattern_length', 2) call deoplete#custom#var('tabnine',{'line_limit': 500,'max_num_results': 5}) call deoplete#custom#option('auto_complete_delay', 200) "autocomplete popup - nvigation keys and enter to select inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" "floating window let g:float_preview#docked = 0 let g:float_preview#auto_close = 1 function! DisableExtras() call nvim_win_set_option(g:float_preview#win, 'number', v:false) call nvim_win_set_option(g:float_preview#win, 'relativenumber', v:false) call nvim_win_set_option(g:float_preview#win, 'cursorline', v:false) endfunction autocmd User FloatPreviewWinOpen call DisableExtras() " === ULTISNIPS === " let g:UltiSnipsExpandTrigger = "" let g:UltiSnipsJumpForwardTrigger = "" let g:UltiSnipsJumpBackwardTrigger = "" " === COMMENTER === " let g:NERDCompactSexyComs = 1 let g:NERDSpaceDelims = 1 map # NERDCommenterToggle " === GIT GUTTER & FUGITIVE === " highlight GitGutterAdd ctermfg=2 ctermbg=1 highlight GitGutterChange ctermfg=3 ctermbg=2 highlight GitGutterDelete ctermfg=1 ctermbg=3 " === VIMTEX === " let g:tex_flavor='latex' let g:vimtex_view_method='zathura' let g:vimtex_quickfix_mode=0 set conceallevel=1 let g:tex_conceal='abdmg' " === OTHER SHORTCUTS === " "undo and undotree nnoremap U :redo nnoremap :UndotreeToggle :UndotreeFocus "rainbow brackets let g:rainbow_active = 1 "bookmarks let g:bookmark_auto_save_file = $HOME .'/.config/nvim/bookmarks' "semicolons autocmd FileType cpp nmap , (cosco-commaOrSemiColon) " === AUTOSAVE === " autocmd FileType cpp let b:auto_save = 1 autocmd FileType hpp let b:auto_save = 1 autocmd FileType h let b:auto_save = 1 autocmd FileType cmake let b:auto_save = 1 let g:auto_save_events = ["InsertLeave", "TextChanged", "FocusLost", "FocusGained"] let g:auto_save_write_all_buffers = 1 " let g:auto_save_presave_hook = 'call AbortIfNotGitDirectory()' " function! AbortIfNotGitDirectory() " if ... " let g:auto_save_abort = 0 " else " let g:auto_save_abort = 1 " endif " endfunction " === FOLDING === " if has('folding') set foldenable set foldmethod=syntax set foldlevelstart=99 set foldtext=FoldText() endif function! FoldText() " Get first non-blank line let fs = v:foldstart while getline(fs) =~? '^\s*$' | let fs = nextnonblank(fs + 1) endwhile if fs > v:foldend let line = getline(v:foldstart) else let line = substitute(getline(fs), '\t', repeat(' ', &tabstop), 'g') endif let w = winwidth(0) - &foldcolumn - (&number ? 8 : 0) let foldSize = 1 + v:foldend - v:foldstart let foldSizeStr = ' ' . foldSize . ' lines ' let foldLevelStr = repeat('+--', v:foldlevel) let lineCount = line('$') let foldPercentage = printf('[%.1f', (foldSize*1.0)/lineCount*100) . '%] ' let expansionString = repeat('.', w - strwidth(foldSizeStr.line.foldLevelStr.foldPercentage)) return line . expansionString . foldSizeStr . foldPercentage . foldLevelStr endfunction " === HIGHLIGHTS === " function! s:highlightuser() "background highlight Normal ctermbg=0 "visual select highlight Visual ctermbg=236 cterm=bold "cursor highlight Search ctermfg=231 ctermbg=9 highlight CursorLine ctermbg=16 cterm=bold highlight CursorColumn ctermbg=16 cterm=bold highlight Cursor ctermfg=7 ctermbg=7 "similar words highlight illuminatedWord ctermbg=16 cterm=bold,underline "squicky lines "~" hide highlight EndOfBuffer ctermfg=0 ctermbg=0 "splits and number backgrounds highlight VertSplit ctermbg=black ctermfg=16 "vertical split colorscheme highlight foldcolumn ctermbg=0 " colum before numbers highlight LineNr ctermbg=0 ctermfg=1 highlight CursorLineNR ctermbg=16 ctermfg=1 cterm=bold "special characters of endline highlight NonText ctermfg=236 "completion menu highlight Pmenu ctermbg=16 ctermfg=231 highlight PmenuSel ctermbg=0 ctermfg=9 cterm=bold highlight PmenuSbar ctermbg=0 highlight PmenuThumb ctermbg=0 "other highlight MatchParen ctermfg=231 ctermbg=1 cterm=bold endfunction " === FOCUS === " "change color on focus lost function! s:beactive() highlight CursorLine ctermbg=16 highlight CursorColumn ctermbg=16 highlight CursorLineNR ctermbg=16 " set number highlight LineNr ctermfg=1 highlight CursorLineNR ctermfg=1 highlight NonText ctermfg=236 "syntax on endfunction function! s:bepassive() highlight CursorLine ctermbg=NONE highlight CursorColumn ctermbg=NONE highlight CursorLineNR ctermbg=NONE " set nonumber highlight LineNr ctermfg=0 highlight CursorLineNR ctermfg=0 highlight NonText ctermfg=0 "syntax off endfunction au FocusLost * silent! call s:bepassive() au FocusGained * silent! call s:beactive() " === AIRLINE THEME === " let g:airline_powerline_fonts=1 let g:airline_theme='deus' let g:airline#extensions#tabline#enabled = 1 " set tabs/buffers in the top let g:airline_section_z=airline#section#create(['%{noscrollbar#statusline(15,"─","■")} ']) "Ø ×⊙ let g:airline_exclude_preview = 1 " === SYNTAX === " function! s:syntaxuser() highlight Normal ctermfg=231 ctermbg=16 cterm=NONE highlight Boolean ctermfg=219 ctermbg=NONE cterm=NONE highlight Character ctermfg=219 ctermbg=NONE cterm=NONE highlight Comment ctermfg=103 ctermbg=NONE cterm=NONE highlight Conditional ctermfg=203 ctermbg=NONE cterm=NONE highlight Constant ctermfg=NONE ctermbg=NONE cterm=NONE highlight Define ctermfg=203 ctermbg=NONE cterm=NONE highlight DiffAdd ctermfg=231 ctermbg=64 cterm=bold highlight DiffDelete ctermfg=88 ctermbg=NONE cterm=NONE highlight DiffChange ctermfg=231 ctermbg=23 cterm=NONE highlight DiffText ctermfg=231 ctermbg=24 cterm=bold highlight ErrorMsg ctermfg=231 ctermbg=203 cterm=NONE highlight WarningMsg ctermfg=231 ctermbg=203 cterm=NONE highlight Float ctermfg=219 ctermbg=NONE cterm=NONE highlight Function ctermfg=203 ctermbg=NONE cterm=NONE highlight Identifier ctermfg=51 ctermbg=NONE cterm=NONE highlight Keyword ctermfg=203 ctermbg=NONE cterm=NONE highlight Label ctermfg=111 ctermbg=NONE cterm=NONE highlight NonText ctermfg=60 ctermbg=17 cterm=NONE highlight Number ctermfg=219 ctermbg=NONE cterm=NONE highlight Operator ctermfg=203 ctermbg=NONE cterm=NONE highlight PreProc ctermfg=203 ctermbg=NONE cterm=NONE highlight Special ctermfg=231 ctermbg=NONE cterm=NONE highlight SpecialKey ctermfg=60 ctermbg=23 cterm=NONE highlight Statement ctermfg=203 ctermbg=NONE cterm=NONE highlight StorageClass ctermfg=51 ctermbg=NONE cterm=NONE highlight String ctermfg=111 ctermbg=NONE cterm=NONE highlight Tag ctermfg=203 ctermbg=NONE cterm=NONE highlight Title ctermfg=231 ctermbg=NONE cterm=bold highlight Todo ctermfg=103 ctermbg=NONE cterm=inverse,bold highlight Type ctermfg=NONE ctermbg=NONE cterm=NONE highlight Underlined ctermfg=NONE ctermbg=NONE cterm=underline endfunction " === THEME === " colorscheme one call s:highlightuser() " === REMOVE HABITS === " nnoremap d "_d vnoremap d "_d map map ================================================ FILE: .config/pet/config.toml ================================================ [General] snippetfile = "/home/bresilla/.config/pet/snippet.toml" editor = "nvim" column = 40 selectcmd = "fzf" backend = "gist" sortby = "" [Gist] file_name = "pet-snippet.toml" access_token = "" gist_id = "" public = false auto_sync = false [GitLab] file_name = "pet-snippet.toml" access_token = "" url = "" id = "" visibility = "private" auto_sync = false ================================================ FILE: .config/pet/snippet.toml ================================================ [[snippets]] description = "run personal container" command = "con start --user=bresilla --volume=\"/home/bresilla:/home/bresilla\"" output = "" [[snippets]] description = "one drive sync locally" command = "rclone --vfs-cache-mode writes mount one: ~/DATA/ONEDRIVE" output = "" [[snippets]] description = "git password cache" command = "git config --global credential.helper 'cache --timeout=10000'" output = "" [[snippets]] description = "battery status" command = "upower -i /org/freedesktop/UPower/devices/battery_BAT0" output = "" ================================================ FILE: .config/polybar/center ================================================ [colors] accent = #EDD080 bckgrd = #121212 select = #161A1B background = #66000000 background-alt = ${self.select} foreground = ${xrdb:color6:#A5ffffff} foreground-alt = ${xrdb:color7:#222} primary = ${xrdb:color1:self.accent} secondary = ${xrdb:color2:#222} alert = ${xrdb:color3:#bd2c40} light = ${xrdb:color15:#ffffff} white = #FFFFFF grey = #AAAAAA transparent = #00000000 [global/wm] margin-top = 0 margin-bottom = 0 [settings] throttle-output = 5 throttle-output-for = 10 throttle-input-for = 30 screenchange-reload = true font = Iosevka Term SS01:size=12;4 bargapp= 10 radius = 14 barwidth = 100% barheigh = 48 [bar/main] monitor = ${env:MONITOR} monitor-strict = true fixed-center = true dpi = 96 bottom = false width = ${settings.barwidth} height = ${settings.barheigh} offset-x = 0 offset-y = 0 background = ${colors.background} foreground = ${colors.light} overline-size = 0 overline-color = #f00 underline-size = 2 underline-color = #00f border-top-size = ${settings.bargapp} border-left-size = ${settings.bargapp} border-right-size = ${settings.bargapp} border-bottom-size = 0 border-color = ${colors.transparent} radius-top = ${settings.radius} radius-bottom = ${settings.radius} spacing = 2 padding-left = 2 padding-right = 2 module-margin-left = 2 module-margin-right = 2 font-0 = ${settings.font} font-1 = unifont:size=12;1 font-2 = FontAwesome:size=12;3 font-3 = NotoSans-Regular:size=12;-1 font-4 = MaterialIcons:size=16;5 tray-position = right tray-padding = 4 modules-center = mpd [bar/workspaces] monitor = ${env:MONITOR} monitor-strict = true dpi = 96 bottom = true width = ${settings.barwidth} height = 4 background = ${colors.transparent} foreground = ${colors.foreground} border-top-size = 0 border-bottom-size = 0 border-color = ${colors.transparent} font-0 = Monoisome:size=10;4 font-1 = FontAwesome:pixelsize=10;3 font-5 = unifont:size=14;1 modules-center = BSP [module/BSP] type = internal/bspwm pin-workspaces = true format = label-mode-background = ${colors.foreground} label-focused = "_" label-focused-background = ${colors.foreground} label-focused-padding = 3 label-occupied = "_" label-occupied-background = #808080 label-occupied-padding = 3 label-empty = "_" label-empty-background = #404040 label-empty-padding = 3 label-separator = "_" label-separator-background = ${colors.transparent} [module/mpd] type = internal/mpd host = 127.0.0.1 port = 6600 interval = 1 format-online = icon-play =  icon-pause =  icon-stop =  icon-prev =  icon-next =  icon-random =  icon-repeat =  toggle-on-foreground = toggle-off-foreground = #55 bar-progress-width = 30 bar-progress-format = %{A4:mpdseek+2: A5:mpdseek-2:}%fill%%indicator%%empty%%{A A} bar-progress-indicator = | bar-progress-indicator-foreground = #ff bar-progress-indicator-font = 3 bar-progress-fill = — bar-progress-fill-foreground = #bb bar-progress-fill-font = 3 bar-progress-empty = — bar-progress-empty-font = 3 bar-progress-empty-foreground = #44 ================================================ FILE: .config/polybar/main ================================================ [colors] accent = #EDD080 bckgrd = #121212 select = #161A1B background = ${self.bckgrd} background-alt = ${self.select} foreground = ${xrdb:color6:#A5ffffff} foreground-alt = ${xrdb:color7:#222} primary = ${xrdb:color1:self.accent} secondary = ${xrdb:color2:#222} alert = ${xrdb:color3:#bd2c40} light = ${xrdb:color15:#ffffff} white = #FFFFFF grey = #AAAAAA transparent = #00000000 [global/wm] margin-top = 0 margin-bottom = 0 [settings] throttle-output = 5 throttle-output-for = 10 throttle-input-for = 30 screenchange-reload = true font = Iosevka Term SS01:size=12;4 bargapp= 10 radius = 14 barwidth = 100% barheigh = 48 [bar/main] monitor = ${env:MONITOR} monitor-strict = true fixed-center = true dpi = 96 bottom = false width = ${settings.barwidth} height = ${settings.barheigh} offset-x = 0 offset-y = 0 background = ${colors.background} foreground = ${colors.light} overline-size = 0 overline-color = #f00 underline-size = 2 underline-color = #00f border-top-size = ${settings.bargapp} border-left-size = ${settings.bargapp} border-right-size = ${settings.bargapp} border-bottom-size = 0 border-color = ${colors.transparent} radius-top = ${settings.radius} radius-bottom = ${settings.radius} spacing = 2 padding-left = 5 padding-right = 5 module-margin-left = 2 module-margin-right = 2 font-0 = ${settings.font} font-1 = unifont:size=10;1 font-2 = FontAwesome:size=10;3 font-3 = FontAwesome Pro:size=10;3 font-4 = Iosevka Nerd Font:style=Medium:size=16;3 font-5 = MaterialIcons:size=16;5 tray-position = right tray-padding = 4 modules-left = time date pomo wlan signal speed hotspot wireguard modules-center = modules-right = audit gpu cpu memory sda1 sda2 nvme light battery volume [bar/workspaces] monitor = ${env:MONITOR} monitor-strict = true dpi = 96 bottom = true width = ${settings.barwidth} height = 4 background = ${colors.transparent} foreground = ${colors.foreground} border-top-size = 0 border-bottom-size = 0 border-color = ${colors.transparent} font-0 = Monoisome:size=10;4 font-1 = FontAwesome:pixelsize=10;3 font-5 = unifont:size=14;1 modules-center = BSP [module/BSP] type = internal/bspwm pin-workspaces = true format = label-mode-background = ${colors.foreground} label-focused = "_" label-focused-background = ${colors.foreground} label-focused-padding = 3 label-occupied = "_" label-occupied-background = #808080 label-occupied-padding = 3 label-empty = "_" label-empty-background = #404040 label-empty-padding = 3 label-separator = "_" label-separator-background = ${colors.transparent} [module/mpd] type = internal/mpd host = 127.0.0.1 port = 6600 interval = 1 format-online = icon-play =  icon-pause =  icon-stop =  icon-prev =  icon-next =  icon-random =  icon-repeat =  toggle-on-foreground = toggle-off-foreground = #55 bar-progress-width = 30 bar-progress-format = %{A4:mpdseek+2: A5:mpdseek-2:}%fill%%indicator%%empty%%{A A} bar-progress-indicator = | bar-progress-indicator-foreground = #ff bar-progress-indicator-font = 3 bar-progress-fill = — bar-progress-fill-foreground = #bb bar-progress-fill-font = 3 bar-progress-empty = — bar-progress-empty-font = 3 bar-progress-empty-foreground = #44 [module/title] type = internal/xwindow format =