dotfilesRepo

Dotfiles for use with Linux systems and programs.
Log | Files | Refs

commit 76ff0850c142c5233d39daae71f379178dd10be5
Author: RisingThumb <aaronleonard@risingthumb.xyz>
Date:   Fri, 22 May 2020 15:50:37 +0100

Config update

Diffstat:
.gitignore | 8++++++++
config/Xresources | 173+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/aliasrc | 45+++++++++++++++++++++++++++++++++++++++++++++
config/aseprite/extensions/monaki-theme/LICENSE.txt | 8++++++++
config/aseprite/extensions/monaki-theme/README.md | 29+++++++++++++++++++++++++++++
config/aseprite/extensions/monaki-theme/__info.json | 2++
config/aseprite/extensions/monaki-theme/package.json | 20++++++++++++++++++++
config/aseprite/extensions/monaki-theme/sheet.aseprite-data | 4++++
config/aseprite/extensions/monaki-theme/sheet.png | 0
config/aseprite/extensions/monaki-theme/theme.xml | 931+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/aseprite/palettes/default.ase | 0
config/directories | 11+++++++++++
config/dunst/dunstrc | 152+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/files | 11+++++++++++
config/fontconfig/fonts.conf | 36++++++++++++++++++++++++++++++++++++
config/godot/editor_settings-3.tres | 197+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/godot/script_templates/empty.gd | 2++
config/godot/script_templates/no_comments.gd | 5+++++
config/godot/text_editor_themes | 1+
config/gtk-2.0/gtkfilechooser.ini | 11+++++++++++
config/gtk-2.0/gtkrc-2.0 | 19+++++++++++++++++++
config/gtk-3.0/bookmarks | 2++
config/gtk-3.0/settings.ini | 16++++++++++++++++
config/inputrc | 19+++++++++++++++++++
config/mutt/.mailsynclastrun | 0
config/mutt/accounts/1-risingthumb.muttrc | 36++++++++++++++++++++++++++++++++++++
config/mutt/accounts/2-aaron-leonard.muttrc | 36++++++++++++++++++++++++++++++++++++
config/mutt/muttrc | 6++++++
config/neofetch/ascii | 25+++++++++++++++++++++++++
config/neofetch/config.conf | 849+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/newsboat/config | 39+++++++++++++++++++++++++++++++++++++++
config/newsboat/urls | 117+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/nvim/autoload/plug.vim | 2664+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/nvim/init.vim | 140+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/nvim/plugged/goyo.vim | 1+
config/nvim/plugged/i3-vim-syntax | 1+
config/nvim/plugged/nerdtree | 1+
config/nvim/plugged/sxhkd-vim | 1+
config/nvim/plugged/vim-airline | 1+
config/nvim/plugged/vim-commentary | 1+
config/nvim/plugged/vim-css-color | 1+
config/nvim/plugged/vim-surround | 1+
config/nvim/plugged/vimagit | 1+
config/nvim/plugged/vimling | 1+
config/nvim/plugged/vimwiki | 1+
config/qt5ct/qt5ct.conf | 28++++++++++++++++++++++++++++
config/ranger/commands.py | 208+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/ranger/luke_ranger_readme.md | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/ranger/rc.conf | 508+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/ranger/rifle.conf | 236+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/ranger/scope.sh | 120+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/ranger/shortcuts.conf | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
config/shortcutrc | 22++++++++++++++++++++++
config/sxiv/exec/key-handler | 34++++++++++++++++++++++++++++++++++
config/tmux/tmux.conf | 10++++++++++
config/user-dirs.dirs | 1+
config/xinitrc | 22++++++++++++++++++++++
config/xprofile | 21+++++++++++++++++++++
config/zsh/.zcompdump | 1790+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/zsh/.zshrc | 87+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
config/zshnameddirrc | 10++++++++++
description | 1+
local/bin/aseprite | 2++
local/bin/bandcamp-dl | 8++++++++
local/bin/compiler | 40++++++++++++++++++++++++++++++++++++++++
local/bin/countries | 365+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/bin/cron/IMPORTANT_NOTE.md | 11+++++++++++
local/bin/cron/checkup | 19+++++++++++++++++++
local/bin/cron/cronbat | 9+++++++++
local/bin/cron/crontog | 6++++++
local/bin/cron/newsup | 17+++++++++++++++++
local/bin/displayselect | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/bin/dmenuhandler | 16++++++++++++++++
local/bin/dmenumount | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/bin/dmenupass | 6++++++
local/bin/dmenurecord | 105+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/bin/dmenuumount | 44++++++++++++++++++++++++++++++++++++++++++++
local/bin/dmenuunicode | 18++++++++++++++++++
local/bin/ext | 44++++++++++++++++++++++++++++++++++++++++++++
local/bin/fixstatusfreeze | 3+++
local/bin/getkeys | 5+++++
local/bin/git-commit | 44++++++++++++++++++++++++++++++++++++++++++++
local/bin/gmodserver | 1+
local/bin/gmodserverkill | 1+
local/bin/hman | 2++
local/bin/i3cmds/ddspawn | 19+++++++++++++++++++
local/bin/i3cmds/dropdowncalc | 3+++
local/bin/i3cmds/hover | 15+++++++++++++++
local/bin/i3cmds/i3resize | 28++++++++++++++++++++++++++++
local/bin/i3cmds/tmuxdd | 5+++++
local/bin/i3cmds/toggle-welcome | 10++++++++++
local/bin/ifinstalled | 8++++++++
local/bin/img | 8++++++++
local/bin/jsonlint | 46++++++++++++++++++++++++++++++++++++++++++++++
local/bin/launch_polybar | 9+++++++++
local/bin/lf-select | 9+++++++++
local/bin/linkhandler | 22++++++++++++++++++++++
local/bin/lmc | 28++++++++++++++++++++++++++++
local/bin/maimpick | 14++++++++++++++
local/bin/mpd-module-update | 8++++++++
local/bin/opout | 13+++++++++++++
local/bin/pauseallmpv | 10++++++++++
local/bin/pausemusic | 3+++
local/bin/pip | 8++++++++
local/bin/pip3 | 8++++++++
local/bin/pip3.8 | 8++++++++
local/bin/pman | 2++
local/bin/podentr | 7+++++++
local/bin/pomodoro | 8++++++++
local/bin/prompt | 8++++++++
local/bin/qndl | 12++++++++++++
local/bin/queueandnotify | 14++++++++++++++
local/bin/random-file | 2++
local/bin/refbar | 5+++++
local/bin/remaps | 11+++++++++++
local/bin/rotdir | 12++++++++++++
local/bin/rssadd | 10++++++++++
local/bin/samedir | 8++++++++
local/bin/setbg | 21+++++++++++++++++++++
local/bin/shortcuts | 29+++++++++++++++++++++++++++++
local/bin/showclip | 10++++++++++
local/bin/statusbar/battery | 27+++++++++++++++++++++++++++
local/bin/statusbar/clock | 31+++++++++++++++++++++++++++++++
local/bin/statusbar/cpu | 11+++++++++++
local/bin/statusbar/disk | 22++++++++++++++++++++++
local/bin/statusbar/help-icon | 16++++++++++++++++
local/bin/statusbar/internet | 19+++++++++++++++++++
local/bin/statusbar/iplocate | 10++++++++++
local/bin/statusbar/mailbox | 20++++++++++++++++++++
local/bin/statusbar/memory | 11+++++++++++
local/bin/statusbar/moonphase | 25+++++++++++++++++++++++++
local/bin/statusbar/music | 26++++++++++++++++++++++++++
local/bin/statusbar/news | 16++++++++++++++++
local/bin/statusbar/pacpackages | 28++++++++++++++++++++++++++++
local/bin/statusbar/popupgrade | 9+++++++++
local/bin/statusbar/statusbarinfo | 32++++++++++++++++++++++++++++++++
local/bin/statusbar/torrent | 27+++++++++++++++++++++++++++
local/bin/statusbar/updatemusic | 2++
local/bin/statusbar/volume | 37+++++++++++++++++++++++++++++++++++++
local/bin/statusbar/vpn | 9+++++++++
local/bin/statusbar/weather | 35+++++++++++++++++++++++++++++++++++
local/bin/sysact | 15+++++++++++++++
local/bin/td-toggle | 12++++++++++++
local/bin/texclear | 14++++++++++++++
local/bin/tmux_start | 23+++++++++++++++++++++++
local/bin/tmuxact | 11+++++++++++
local/bin/torwrap | 7+++++++
local/bin/transadd | 9+++++++++
local/bin/tutorialvids | 20++++++++++++++++++++
local/bin/ueberzug | 8++++++++
local/bin/unidecode | 8++++++++
local/bin/unix | 26++++++++++++++++++++++++++
local/bin/unsplash-wallpaper | 4++++
local/bin/updateUTCNews | 3+++
local/bin/vifmimg | 14++++++++++++++
local/bin/vu | 18++++++++++++++++++
local/bin/wheel | 8++++++++
local/src/dmenu/LICENSE | 30++++++++++++++++++++++++++++++
local/src/dmenu/README.md | 16++++++++++++++++
local/src/dmenu/arg.h | 49+++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dmenu/config.h | 33+++++++++++++++++++++++++++++++++
local/src/dmenu/config.mk | 31+++++++++++++++++++++++++++++++
local/src/dmenu/dmenu | 0
local/src/dmenu/dmenu.1 | 200+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dmenu/dmenu.c | 990+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dmenu/dmenu.o | 0
local/src/dmenu/dmenu_path | 13+++++++++++++
local/src/dmenu/dmenu_run | 2++
local/src/dmenu/drw.c | 423+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dmenu/drw.h | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dmenu/drw.o | 0
local/src/dmenu/stest | 0
local/src/dmenu/stest.1 | 90+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dmenu/stest.c | 109+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dmenu/stest.o | 0
local/src/dmenu/util.c | 35+++++++++++++++++++++++++++++++++++
local/src/dmenu/util.h | 8++++++++
local/src/dmenu/util.o | 0
local/src/dwm/.gitignore | 4++++
local/src/dwm/LICENSE | 37+++++++++++++++++++++++++++++++++++++
local/src/dwm/README.md | 28++++++++++++++++++++++++++++
local/src/dwm/config.h | 296+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dwm/config.mk | 38++++++++++++++++++++++++++++++++++++++
local/src/dwm/drw.c | 422+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dwm/drw.h | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dwm/drw.o | 0
local/src/dwm/dwm | 0
local/src/dwm/dwm.1 | 181+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dwm/dwm.c | 2580+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dwm/dwm.o | 0
local/src/dwm/dwm.png | 0
local/src/dwm/larbs.mom | 2++
local/src/dwm/shiftview.c | 36++++++++++++++++++++++++++++++++++++
local/src/dwm/transient.c | 42++++++++++++++++++++++++++++++++++++++++++
local/src/dwm/util.c | 35+++++++++++++++++++++++++++++++++++
local/src/dwm/util.h | 8++++++++
local/src/dwm/util.o | 0
local/src/dwm/vanitygaps.c | 542+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dwmblocks/.gitignore | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dwmblocks/LICENSE | 339+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dwmblocks/README.md | 18++++++++++++++++++
local/src/dwmblocks/config.h | 30++++++++++++++++++++++++++++++
local/src/dwmblocks/dwmblocks.c | 232+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dwmblocks/dwmblocks.c.old | 226+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/dwmblocks/patches/dwmblocks-statuscmd-signal.diff | 93+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/neofetch/neofetch | 10100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/st/.Xdefaults | 124+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/st/.gitignore | 6++++++
local/src/st/.travis.yml | 11+++++++++++
local/src/st/LICENSE | 34++++++++++++++++++++++++++++++++++
local/src/st/PKGBUILD | 45+++++++++++++++++++++++++++++++++++++++++++++
local/src/st/README.md | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/st/arg.h | 50++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/st/config.h | 547+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/st/config.mk | 35+++++++++++++++++++++++++++++++++++
local/src/st/st-copyout | 13+++++++++++++
local/src/st/st-urlhandler | 15+++++++++++++++
local/src/st/st.1 | 194+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/st/st.c | 2764+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/st/st.h | 136+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/st/st.info | 222+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
local/src/st/win.h | 39+++++++++++++++++++++++++++++++++++++++
local/src/st/x.c | 2194+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
223 files changed, 34827 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,8 @@ +commit +file +atom.xml +files.html +log.html +refs.html +Makefile +style.css diff --git a/config/Xresources b/config/Xresources @@ -0,0 +1,173 @@ +!! Transparency (0-1): +*.alpha: 0.9 + +!! Set a default font and font size as below: +*.font: xos4 Terminus:size=16 + +/* name dark light */ +/* black 0 8 */ +/* red 1 9 */ +/* green 2 10 */ +/* yellow 3 11 */ +/* blue 4 12 */ +/* purple 5 13 */ +/* cyan 6 14 */ +/* white 7 15 */ + +/* !! gruvbox: */ +/* *.color0: #1d2021 */ +/* *.color1: #cc241d */ +/* *.color2: #98971a */ +/* *.color3: #d79921 */ +/* *.color4: #458588 */ +/* *.color5: #b16286 */ +/* *.color6: #689d6a */ +/* *.color7: #a89984 */ +/* *.color8: #928374 */ +/* *.color9: #fb4934 */ +/* *.color10: #b8bb26 */ +/* *.color11: #fabd2f */ +/* *.color12: #83a598 */ +/* *.color13: #d3869b */ +/* *.color14: #8ec07c */ +/* *.color15: #ebdbb2 */ +/* *.color256: #1d2021 */ +/* *.color257: #ebdbb2 */ + +/* !! gruvbox light: */ +/* *.color0: #fbf1c7 */ +/* *.color1: #cc241d */ +/* *.color2: #98971a */ +/* *.color3: #d79921 */ +/* *.color4: #458588 */ +/* *.color5: #b16286 */ +/* *.color6: #689d6a */ +/* *.color7: #7c6f64 */ +/* *.color8: #928374 */ +/* *.color9: #9d0006 */ +/* *.color10: #79740e */ +/* *.color11: #b57614 */ +/* *.color12: #076678 */ +/* *.color13: #8f3f71 */ +/* *.color14: #427b58 */ +/* *.color15: #3c3836 */ +/* *.background: #fbf1c7 */ +/* *.foreground: #282828 */ +/* st.alpha: 0.9 */ + +/* !! brogrammer: */ +/* *.foreground: #d6dbe5 */ +/* *.background: #131313 */ +/* *.color0: #1f1f1f */ +/* *.color8: #d6dbe5 */ +/* *.color1: #f81118 */ +/* *.color9: #de352e */ +/* *.color2: #2dc55e */ +/* *.color10: #1dd361 */ +/* *.color3: #ecba0f */ +/* *.color11: #f3bd09 */ +/* *.color4: #2a84d2 */ +/* *.color12: #1081d6 */ +/* *.color5: #4e5ab7 */ +/* *.color13: #5350b9 */ +/* *.color6: #1081d6 */ +/* *.color14: #0f7ddb */ +/* *.color7: #d6dbe5 */ +/* *.color15: #ffffff */ +/* *.colorBD: #d6dbe5 */ + +/* ! base16 */ +/* *.color0: #181818 */ +/* *.color1: #ab4642 */ +/* *.color2: #a1b56c */ +/* *.color3: #f7ca88 */ +/* *.color4: #7cafc2 */ +/* *.color5: #ba8baf */ +/* *.color6: #86c1b9 */ +/* *.color7: #d8d8d8 */ +/* *.color8: #585858 */ +/* *.color9: #ab4642 */ +/* *.color10: #a1b56c */ +/* *.color11: #f7ca88 */ +/* *.color12: #7cafc2 */ +/* *.color13: #ba8baf */ +/* *.color14: #86c1b9 */ +/* *.color15: #f8f8f8 */ + +/* !! solarized */ +/* *.color0: #073642 */ +/* *.color1: #dc322f */ +/* *.color2: #859900 */ +/* *.color3: #b58900 */ +/* *.color4: #268bd2 */ +/* *.color5: #d33682 */ +/* *.color6: #2aa198 */ +/* *.color7: #eee8d5 */ +/* *.color9: #cb4b16 */ +/* *.color8: #fdf6e3 */ +/* *.color10: #586e75 */ +/* *.color11: #657b83 */ +/* *.color12: #839496 */ +/* *.color13: #6c71c4 */ +/* *.color14: #93a1a1 */ +/* *.color15: #fdf6e3 */ + +/* !! xterm */ +/* *.color0: #000000 */ +/* *.color1: #cd0000 */ +/* *.color2: #00cd00 */ +/* *.color3: #cdcd00 */ +/* *.color4: #0000cd */ +/* *.color5: #cd00cd */ +/* *.color6: #00cdcd */ +/* *.color7: #e5e5e5 */ +/* *.color8: #4d4d4d */ +/* *.color9: #ff0000 */ +/* *.color10: #00ff00 */ +/* *.color11: #ffff00 */ +/* *.color12: #0000ff */ +/* *.color13: #ff00ff */ +/* *.color14: #00ffff */ +/* *.color15: #aabac8 */ +/* *.background: #000000 */ + +/* ! Dracula Xresources palette */ +# *.foreground: #F8F8F2 +# *.background: #282A36 +# *.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 + +/* Monokai */ +*foreground: #f8f8f2 +*background: #272822 +*cursorColor: #f8f8f2 +*color0: #272822 +*color1: #f92672 +*color2: #a6e22e +*color3: #f4bf75 +*color4: #66d9ef +*color5: #ae81ff +*color6: #a1efe4 +*color7: #f8f8f2 +*color8: #75715e +*color9: #fd971f +*color10: #383830 +*color11: #49483e +*color12: #a59f85 +*color13: #f5f4f1 +*color14: #cc6633 +*color15: #f9f8f5 diff --git a/config/aliasrc b/config/aliasrc @@ -0,0 +1,45 @@ +#!/bin/sh + +# Use neovim for vim if present. +command -v nvim >/dev/null && alias vim="nvim" vimdiff="nvim -d" + +# Verbosity and settings that you pretty much just always are going to want. +alias \ + bat="cat /sys/class/power_supply/BAT?/capacity" \ + cp="cp -iv" \ + mv="mv -iv" \ + rm="rm -v" \ + mkd="mkdir -pv" \ + yt="youtube-dl --add-metadata -i" \ + yta="yt -x -f bestaudio/best" \ + ffmpeg="ffmpeg -hide_banner" + +# Colorize commands when possible. +alias \ + ls="ls -hN --color=auto --group-directories-first" \ + grep="grep --color=auto" \ + diff="diff --color=auto" \ + ccat="highlight --out-format=ansi" + +# These common commands are just too long! Abbreviate them. +alias \ + ka="killall" \ + g="git" \ + trem="transmission-remote" \ + YT="youtube-viewer" \ + sdn="sudo shutdown -h now" \ + f="$FILE" \ + e="$EDITOR" \ + v="$EDITOR" \ + p="sudo pacman" \ + xi="sudo xbps-install" \ + xr="sudo xbps-remove -R" \ + xq="xbps-query" \ + z="zathura" + +# Some other stuff +alias \ + magit="nvim -c MagitOnly" \ + ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/zshnameddirrc" \ + weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \ + tmux="tmux -f ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf" diff --git a/config/aseprite/extensions/monaki-theme/LICENSE.txt b/config/aseprite/extensions/monaki-theme/LICENSE.txt @@ -0,0 +1,8 @@ +Monaki Theme +Copyright (C) 2017 eL-Falso +https://github.com/el-falso + +This work is licensed under the Creative Commons Attribution 4.0 +International License. To view a copy of this license, visit +http://creativecommons.org/licenses/by/4.0/ or send a letter to +Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. diff --git a/config/aseprite/extensions/monaki-theme/README.md b/config/aseprite/extensions/monaki-theme/README.md @@ -0,0 +1,29 @@ +# Aseprite Monaki Theme +This is a dark theme for the pixelart editor **Aseprite** using the Monokai palette extended by alpha colors. + +## Screenshots +![Aseprite Monaki Theme Screenshot 1](https://github.com/el-falso/monaki-theme/blob/gh-pages/screenshots/Screen01.png?raw=true "Screenshot 1") + +![Aseprite Monaki Theme Screenshot 2](https://github.com/el-falso/monaki-theme/blob/gh-pages/screenshots/Screen02.png?raw=true "Screenshot 2") + +## Installation +1. Download the Extension from [GitHub](https://github.com/el-falso/monaki-theme/releases/latest "Releases &#183; el-falso/monaki-theme") or if you want to support me from [itch.io](https://el-falso.itch.io/monaki-theme "Monaki Theme by eL-Falso") +2. Navigate to **Edit &#8658; Preferences... &#8658; Extensions** +3. Click **Add Extension** +4. Navigate to the downloaded Extension +5. Select it +6. Click **OK** +7. [Activate the theme](#activation) + +## Activation +1. Navigate to **Edit &#8658; Preferences... &#8658; Theme** +2. Select the theme from the list +3. Click **Select** +4. Theme will be applied immediately + +## Help +Not every subimage of the sheet was edited. You found anything which doesn't fit into the theme? Open an [Issue on GitHub](https://github.com/el-falso/monaki-theme/issues/new "New Issue &#183; el-falso/monaki-theme") or message me on [Twitter](https://twitter.com/not_Falso "eL-Falso (@not_Falso) | Twitter"). + +## License +This theme is based on the default theme of [Aseprite](http://aseprite.org "Aseprite - Animated sprite editor & pixel art tool") by Ilija Melentijevic & David Capello. +Therefore the [Aseprite Eula](https://github.com/aseprite/aseprite/blob/master/EULA.txt "aseprite/EULA.txt at master &#183; aseprite/aseprite") applies on this project, too. diff --git a/config/aseprite/extensions/monaki-theme/__info.json b/config/aseprite/extensions/monaki-theme/__info.json @@ -0,0 +1 @@ +{"installedFiles": ["LICENSE.txt", "README.md", "package.json", "sheet.aseprite-data", "sheet.png", "theme.xml"]}+ \ No newline at end of file diff --git a/config/aseprite/extensions/monaki-theme/package.json b/config/aseprite/extensions/monaki-theme/package.json @@ -0,0 +1,20 @@ +{ + "name": "monaki-theme", + "displayName": "Monaki Theme", + "description": "Theme for Aseprite using the Monokai palette", + "version": "1.3", + "author": { "name": "eL-Falso", "email": "test@test.com", "url": "https://github.com/el-falso/" }, + "contributors": [ + {} + ], + "publisher": "el-falso", + "license": "CC-BY-4.0", + "categories": [ + "Themes" + ], + "contributes": { + "themes": [ + { "id": "Monaki", "path": "." } + ] + } +} diff --git a/config/aseprite/extensions/monaki-theme/sheet.aseprite-data b/config/aseprite/extensions/monaki-theme/sheet.aseprite-data @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<sprite> + <slices theme="theme.xml" /> +</sprite> diff --git a/config/aseprite/extensions/monaki-theme/sheet.png b/config/aseprite/extensions/monaki-theme/sheet.png Binary files differ. diff --git a/config/aseprite/extensions/monaki-theme/theme.xml b/config/aseprite/extensions/monaki-theme/theme.xml @@ -0,0 +1,931 @@ +<?xml version="1.0" encoding="utf-8" ?> +<theme name="Monaki" screenscaling="2" uiscaling="1"> + <authors> + <author name="eL-Falso" url="https://github.com/el-falso/" /> + </authors> + <fonts> + <font id="default" font="Aseprite" /> + <font id="mini" font="Aseprite Mini" /> + </fonts> + <dimensions> + <dim id="scrollbar_size" value="12" /> + <dim id="mini_scrollbar_size" value="6" /> + <dim id="tabs_width" value="80" /> + <dim id="tabs_height" value="17" /> + <dim id="tabs_bottom_height" value="5" /> + <dim id="docked_tabs_height" value="12" /> + <dim id="tabs_close_icon_width" value="14" /> + <dim id="tabs_close_icon_height" value="12" /> + <dim id="tabs_icon_width" value="10" /> + <dim id="timeline_top_border" value="2" /> + <dim id="timeline_tags_area_height" value="4" /> + <dim id="timeline_outline_width" value="2" /> + <dim id="palette_outline_width" value="3" /> + <dim id="color_slider_height" value="14" /> + <dim id="timeline_base_size" value="12" /> + <dim id="color_bar_buttons_height" value="16" /> + <dim id="context_bar_height" value="18" /> + <dim id="brush_type_width" value="16" /> + <dim id="color_selector_bar_size" value="8" /> + </dimensions> + <colors> + <color id="text" value="#fd971f" /> + <color id="disabled" value="#75715e" /> + <color id="face" value="#272820" /> + <color id="hot_face" value="#faf0e6" /> + <color id="selected" value="#ff5555" /> + <color id="selected_text" value="#ffffff" /> + <color id="separator_label" value="#fd971f" /> + <color id="background" value="#272820" /> + <color id="textbox_text" value="#fd971f" /> + <color id="textbox_face" value="#f8f8f2" /> + <color id="textbox_code_face" value="#eeeeee" /> + <color id="entry_suffix" value="#e6db74" /> + <color id="link_text" value="#66d9ef" /> + <color id="link_hover" value="#a6e22e" /> + <color id="button_normal_text" value="#e6db74" /> + <color id="button_hot_text" value="#e6db74" /> + <color id="button_selected_text" value="#a6e22e" /> + <color id="check_hot_face" value="#f92672" /> + <color id="check_focus_face" value="#c6c6c6" /> + <color id="radio_hot_face" value="#f92672" /> + <color id="radio_focus_face" value="#c6c6c6" /> + <color id="menuitem_normal_text" value="#e6db74" /> + <color id="menuitem_normal_face" value="#1b1d1e" /> + <color id="menuitem_hot_text" value="#e6db74" /> + <color id="menuitem_hot_face" value="#f92672" /> + <color id="menuitem_highlight_text" value="#f8f8f2" /> + <color id="menuitem_highlight_face" value="#f92672" /> + <color id="window_face" value="#1b1d1e" /> + <color id="window_titlebar_text" value="#a6e22e" /> + <color id="window_titlebar_face" value="#202020" /> + <color id="editor_face" value="#3e3d32" /> + <color id="editor_sprite_border" value="#66d9ef" /> + <color id="editor_sprite_bottom_border" value="#41412c" /> + <color id="editor_view_face" value="#1b1d1e" /> + <color id="listitem_normal_text" value="#e6db74" /> + <color id="listitem_normal_face" value="#272820" /> + <color id="listitem_selected_text" value="#f8f8f2" /> + <color id="listitem_selected_face" value="#f92672" /> + <color id="slider_empty_text" value="#e6db74" /> + <color id="slider_full_text" value="#f8f8f2" /> + <color id="tab_normal_text" value="#e6db74" /> + <color id="tab_active_text" value="#f8f8f2" /> + <color id="tab_active_face" value="#1b1d1e" /> + <color id="popup_window_border" value="#e6db74" /> + <color id="tooltip_text" value="#e6db74" /> + <color id="tooltip_face" value="#75715e" /> + <color id="filelist_even_row_text" value="#e6db74" /> + <color id="filelist_even_row_face" value="#272820" /> + <color id="filelist_odd_row_text" value="#e6db74" /> + <color id="filelist_odd_row_face" value="#272820" /> + <color id="filelist_selected_row_text" value="#f8f8f2" /> + <color id="filelist_selected_row_face" value="#f92672" /> + <color id="filelist_disabled_row_text" value="#ffc8c8" /> + <color id="workspace" value="#1b1d1e" /> + <color id="workspace_text" value="#66d9ef" /> + <color id="workspace_link" value="#66d9ef" /> + <color id="workspace_link_hover" value="#a6e22e" /> + <color id="timeline_normal" value="#c6c6c6" /> + <color id="timeline_normal_text" value="#e6db74" /> + <color id="timeline_hover" value="#d9d9d9" /> + <color id="timeline_hover_text" value="#e6db74" /> + <color id="timeline_active" value="#1b1d1e" /> + <color id="timeline_active_text" value="#f8f8f2" /> + <color id="timeline_active_hover" value="#99b3c2" /> + <color id="timeline_active_hover_text" value="#f8f8f2" /> + <color id="timeline_clicked" value="#536069" /> + <color id="timeline_clicked_text" value="#f8f8f2" /> + <color id="timeline_focused_text" value="#ffffff" /> + <color id="timeline_padding" value="#1b1d1e" /> + <color id="timeline_band_highlight" value="#93adbb" /> + <color id="timeline_band_bg" value="#76858e" /> + <color id="status_bar_text" value="#fd971f" /> + <color id="status_bar_face" value="#1b1d1e" /> + <color id="flag_normal" value="#f8f8f2" /> + <color id="flag_active" value="#ff0000" /> + <color id="flag_clicked" value="#1b1d1e" /> + <color id="select_box_ruler" value="#0000ff" /> + <color id="select_box_grid" value="#64c864" /> + <color id="edit_pal_face" value="#272820" /> + </colors> + <parts> + <part id="cursor_normal" x="80" y="0" w="16" h="16" focusx="0" focusy="0" /> + <part id="cursor_normal_add" x="80" y="16" w="16" h="16" focusx="0" focusy="0" /> + <part id="cursor_crosshair" x="96" y="32" w="16" h="16" focusx="7" focusy="7" /> + <part id="cursor_forbidden" x="80" y="32" w="16" h="16" focusx="0" focusy="0" /> + <part id="cursor_hand" x="80" y="48" w="16" h="16" focusx="5" focusy="3" /> + <part id="cursor_scroll" x="80" y="64" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_move" x="80" y="80" w="16" h="16" focusx="0" focusy="0" /> + <part id="cursor_move_selection" x="96" y="80" w="16" h="16" focusx="0" focusy="0" /> + <part id="cursor_size_ns" x="80" y="112" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_size_we" x="80" y="144" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_size_n" x="80" y="112" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_size_ne" x="80" y="128" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_size_e" x="80" y="160" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_size_se" x="80" y="208" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_size_s" x="80" y="192" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_size_sw" x="80" y="176" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_size_w" x="80" y="144" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_size_nw" x="80" y="96" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_rotate_n" x="240" y="192" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_rotate_ne" x="256" y="160" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_rotate_e" x="256" y="176" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_rotate_se" x="256" y="208" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_rotate_s" x="256" y="192" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_rotate_sw" x="240" y="208" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_rotate_w" x="240" y="176" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_rotate_nw" x="240" y="160" w="16" h="16" focusx="8" focusy="8" /> + <part id="cursor_eyedropper" x="80" y="224" w="16" h="16" focusx="0" focusy="15" /> + <part id="cursor_magnifier" x="80" y="240" w="16" h="16" focusx="5" focusy="5" /> + <part id="radio_normal" x="64" y="64" w="8" h="8" /> + <part id="radio_selected" x="64" y="80" w="8" h="8" /> + <part id="radio_disabled" x="64" y="64" w="8" h="8" /> + <part id="check_normal" x="48" y="64" w="8" h="8" /> + <part id="check_selected" x="48" y="80" w="8" h="8" /> + <part id="check_disabled" x="48" y="64" w="8" h="8" /> + <part id="check_focus" x="32" y="64" w1="2" w2="6" w3="2" h1="2" h2="6" h3="2" /> + <part id="radio_focus" x="32" y="64" w1="2" w2="6" w3="2" h1="2" h2="6" h3="2" /> + <part id="button_normal" x="48" y="0" w1="4" w2="6" w3="4" h1="4" h2="6" h3="6" /> + <part id="button_hot" x="64" y="0" w1="4" w2="6" w3="4" h1="4" h2="6" h3="6" /> + <part id="button_focused" x="48" y="16" w1="4" w2="6" w3="4" h1="4" h2="6" h3="6" /> + <part id="button_selected" x="64" y="16" w1="4" w2="6" w3="4" h1="4" h2="6" h3="6" /> + <part id="sunken_normal" x="0" y="32" w1="4" w2="4" w3="4" h1="4" h2="4" h3="4" /> + <part id="sunken_focused" x="0" y="48" w1="4" w2="4" w3="4" h1="4" h2="4" h3="4" /> + <part id="sunken2_normal" x="0" y="64" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" /> + <part id="sunken2_focused" x="0" y="80" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" /> + <part id="sunken_mini_normal" x="16" y="64" w1="4" w2="4" w3="4" h1="3" h2="6" h3="3" /> + <part id="sunken_mini_focused" x="16" y="80" w1="4" w2="4" w3="4" h1="3" h2="6" h3="3" /> + <part id="window" x="0" y="0" w1="3" w2="7" w3="3" h1="15" h2="4" h3="5" /> + <part id="menu" x="0" y="96" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" /> + <part id="window_button_normal" x="16" y="0" w="9" h="11" /> + <part id="window_button_hot" x="25" y="0" w="9" h="11" /> + <part id="window_button_selected" x="34" y="0" w="9" h="11" /> + <part id="window_close_icon" x="16" y="11" w="5" h="6" /> + <part id="window_play_icon" x="21" y="11" w="5" h="6" /> + <part id="window_stop_icon" x="26" y="11" w="5" h="6" /> + <part id="window_center_icon" x="31" y="11" w="5" h="6" /> + <part id="slider_full" x="0" y="144" w1="5" w2="6" w3="5" h1="5" h2="5" h3="6" /> + <part id="slider_empty" x="16" y="144" w1="5" w2="6" w3="5" h1="5" h2="5" h3="6" /> + <part id="slider_full_focused" x="0" y="160" w1="5" w2="6" w3="5" h1="5" h2="5" h3="6" /> + <part id="slider_empty_focused" x="16" y="160" w1="5" w2="6" w3="5" h1="5" h2="5" h3="6" /> + <part id="mini_slider_full" x="32" y="144" w1="2" w2="12" w3="2" h1="2" h2="11" h3="3" /> + <part id="mini_slider_empty" x="48" y="144" w1="2" w2="12" w3="2" h1="2" h2="11" h3="3" /> + <part id="mini_slider_full_focused" x="32" y="160" w1="2" w2="12" w3="2" h1="2" h2="11" h3="3" /> + <part id="mini_slider_empty_focused" x="48" y="160" w1="2" w2="12" w3="2" h1="2" h2="11" h3="3" /> + <part id="mini_slider_thumb" x="32" y="176" w="5" h="4" /> + <part id="mini_slider_thumb_focused" x="48" y="176" w="5" h="4" /> + <part id="separator_horz" x="32" y="80" w="9" h="5" /> + <part id="separator_vert" x="32" y="96" w="5" h="9" /> + <part id="combobox_arrow_down" x="100" y="148" w="9" h="9" /> + <part id="combobox_arrow_down_selected" x="116" y="148" w="9" h="9" /> + <part id="combobox_arrow_down_disabled" x="132" y="148" w="9" h="9" /> + <part id="combobox_arrow_up" x="100" y="163" w="9" h="9" /> + <part id="combobox_arrow_up_selected" x="116" y="163" w="9" h="9" /> + <part id="combobox_arrow_up_disabled" x="132" y="163" w="9" h="9" /> + <part id="combobox_arrow_left" x="99" y="180" w="9" h="9" /> + <part id="combobox_arrow_left_selected" x="115" y="180" w="9" h="9" /> + <part id="combobox_arrow_left_disabled" x="131" y="180" w="9" h="9" /> + <part id="combobox_arrow_right" x="99" y="196" w="9" h="9" /> + <part id="combobox_arrow_right_selected" x="115" y="196" w="9" h="9" /> + <part id="combobox_arrow_right_disabled" x="131" y="196" w="9" h="9" /> + <part id="newfolder" x="99" y="211" w="9" h="9" /> + <part id="newfolder_selected" x="115" y="211" w="9" h="9" /> + <part id="toolbutton_normal" x="96" y="0" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" /> + <part id="toolbutton_hot" x="112" y="0" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" /> + <part id="toolbutton_last" x="96" y="16" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" /> + <part id="toolbutton_pushed" x="112" y="16" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" /> + <part id="buttonset_item_normal" x="96" y="16" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" /> + <part id="buttonset_item_hot" x="112" y="0" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" /> + <part id="buttonset_item_hot_focused" x="128" y="0" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" /> + <part id="buttonset_item_focused" x="128" y="16" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" /> + <part id="buttonset_item_pushed" x="112" y="16" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" /> + <part id="tab_normal" x="2" y="112" w1="4" w2="5" w3="5" h1="4" h2="6" h3="2" /> + <part id="tab_active" x="16" y="112" w1="4" w2="7" w3="5" h1="4" h2="6" h3="2" /> + <part id="tab_bottom_active" x="16" y="124" w1="4" w2="7" w3="5" h1="2" h2="1" h3="2" /> + <part id="tab_bottom_normal" x="2" y="124" w="12" h="5" /> + <part id="tab_filler" x="0" y="112" w="2" h="12" /> + <part id="tab_modified_icon_normal" x="32" y="112" w="5" h="5" /> + <part id="tab_modified_icon_active" x="32" y="117" w="5" h="5" /> + <part id="tab_close_icon_normal" x="37" y="112" w="5" h="5" /> + <part id="tab_close_icon_active" x="37" y="117" w="5" h="5" /> + <part id="tab_icon_bg_clicked" x="42" y="112" w="14" h="12" /> + <part id="tab_icon_bg_hover" x="56" y="112" w="14" h="12" /> + <part id="tab_home_icon_normal" x="32" y="240" w="7" h="8" /> + <part id="tab_home_icon_active" x="40" y="240" w="7" h="8" /> + <part id="editor_normal" x="40" y="96" w1="3" w2="10" w3="3" h1="3" h2="10" h3="3" /> + <part id="editor_selected" x="56" y="96" w1="3" w2="10" w3="3" h1="3" h2="10" h3="3" /> + <part id="colorbar_0" x="0" y="192" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" /> + <part id="colorbar_1" x="16" y="192" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" /> + <part id="colorbar_2" x="0" y="208" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" /> + <part id="colorbar_3" x="16" y="208" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" /> + <part id="colorbar_selection_hot" x="0" y="224" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" /> + <part id="colorbar_selection" x="16" y="224" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" /> + <part id="scrollbar_bg" x="64" y="144" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" /> + <part id="scrollbar_thumb" x="64" y="160" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" /> + <part id="mini_scrollbar_bg" x="64" y="176" w1="3" w2="2" w3="3" h1="3" h2="2" h3="3" /> + <part id="mini_scrollbar_thumb" x="72" y="176" w1="3" w2="2" w3="3" h1="3" h2="2" h3="3" /> + <part id="mini_scrollbar_bg_hot" x="64" y="184" w1="3" w2="2" w3="3" h1="3" h2="2" h3="3" /> + <part id="mini_scrollbar_thumb_hot" x="72" y="184" w1="3" w2="2" w3="3" h1="3" h2="2" h3="3" /> + <part id="transparent_scrollbar_bg" x="64" y="192" w1="3" w2="2" w3="3" h1="3" h2="2" h3="3" /> + <part id="transparent_scrollbar_thumb" x="72" y="192" w1="3" w2="2" w3="3" h1="3" h2="2" h3="3" /> + <part id="transparent_scrollbar_bg_hot" x="64" y="200" w1="3" w2="2" w3="3" h1="3" h2="2" h3="3" /> + <part id="transparent_scrollbar_thumb_hot" x="72" y="200" w1="3" w2="2" w3="3" h1="3" h2="2" h3="3" /> + <part id="tooltip" x="112" y="64" w1="5" w2="6" w3="5" h1="5" h2="5" h3="6" /> + <part id="tooltip_arrow" x="128" y="64" w1="5" w2="6" w3="5" h1="5" h2="5" h3="6" /> + <part id="ani_first" x="144" y="192" w="5" h="5" /> + <part id="ani_previous" x="152" y="192" w="5" h="5" /> + <part id="ani_play" x="160" y="192" w="5" h="5" /> + <part id="ani_stop" x="168" y="192" w="5" h="5" /> + <part id="ani_next" x="176" y="192" w="5" h="5" /> + <part id="ani_last" x="184" y="192" w="5" h="5" /> + <part id="pal_edit" x="144" y="200" w="5" h="5" /> + <part id="pal_sort" x="152" y="200" w="5" h="5" /> + <part id="pal_presets" x="160" y="200" w="5" h="5" /> + <part id="pal_options" x="168" y="200" w="5" h="5" /> + <part id="pal_resize" x="176" y="200" w="5" h="5" /> + <part id="selection_replace" x="176" y="160" w="7" h="7" /> + <part id="selection_add" x="184" y="160" w="7" h="7" /> + <part id="selection_subtract" x="192" y="160" w="7" h="7" /> + <part id="selection_intersect" x="200" y="160" w="7" h="7" /> + <part id="unpinned" x="192" y="144" w="8" h="8" /> + <part id="pinned" x="200" y="144" w="8" h="8" /> + <part id="drop_down_button_left_normal" x="48" y="32" w1="3" w2="2" w3="3" h1="4" h2="6" h3="6" /> + <part id="drop_down_button_left_hot" x="64" y="32" w1="3" w2="2" w3="3" h1="4" h2="6" h3="6" /> + <part id="drop_down_button_left_focused" x="48" y="48" w1="3" w2="2" w3="3" h1="4" h2="6" h3="6" /> + <part id="drop_down_button_left_selected" x="64" y="48" w1="3" w2="2" w3="3" h1="4" h2="6" h3="6" /> + <part id="drop_down_button_right_normal" x="56" y="32" w1="2" w2="1" w3="3" h1="4" h2="6" h3="6" /> + <part id="drop_down_button_right_hot" x="72" y="32" w1="2" w2="1" w3="3" h1="4" h2="6" h3="6" /> + <part id="drop_down_button_right_focused" x="55" y="48" w1="2" w2="2" w3="3" h1="4" h2="6" h3="6" /> + <part id="drop_down_button_right_selected" x="71" y="48" w1="2" w2="2" w3="3" h1="4" h2="6" h3="6" /> + <part id="transformation_handle" x="208" y="144" w="5" h="5" /> + <part id="pivot_handle" x="224" y="144" w="9" h="9" /> + <part id="timeline_none" x="228" y="0" w1="2" w2="8" w3="2" h1="2" h2="8" h3="2" /> + <part id="timeline_normal" x="240" y="0" w1="2" w2="8" w3="2" h1="2" h2="8" h3="2" /> + <part id="timeline_active" x="252" y="0" w1="2" w2="8" w3="2" h1="2" h2="8" h3="2" /> + <part id="timeline_hover" x="264" y="0" w1="2" w2="8" w3="2" h1="2" h2="8" h3="2" /> + <part id="timeline_active_hover" x="276" y="0" w1="2" w2="8" w3="2" h1="2" h2="8" h3="2" /> + <part id="timeline_clicked" x="288" y="0" w1="2" w2="8" w3="2" h1="2" h2="8" h3="2" /> + <part id="timeline_open_eye_normal" x="240" y="12" w="12" h="12" /> + <part id="timeline_open_eye_active" x="252" y="12" w="12" h="12" /> + <part id="timeline_closed_eye_normal" x="240" y="24" w="12" h="12" /> + <part id="timeline_closed_eye_active" x="252" y="24" w="12" h="12" /> + <part id="timeline_open_padlock_normal" x="240" y="36" w="12" h="12" /> + <part id="timeline_open_padlock_active" x="252" y="36" w="12" h="12" /> + <part id="timeline_closed_padlock_normal" x="240" y="48" w="12" h="12" /> + <part id="timeline_closed_padlock_active" x="252" y="48" w="12" h="12" /> + <part id="timeline_continuous_normal" x="276" y="36" w="12" h="12" /> + <part id="timeline_continuous_active" x="288" y="36" w="12" h="12" /> + <part id="timeline_discontinuous_normal" x="276" y="48" w="12" h="12" /> + <part id="timeline_discontinuous_active" x="288" y="48" w="12" h="12" /> + <part id="timeline_closed_group_normal" x="276" y="60" w="12" h="12" /> + <part id="timeline_closed_group_active" x="288" y="60" w="12" h="12" /> + <part id="timeline_open_group_normal" x="276" y="72" w="12" h="12" /> + <part id="timeline_open_group_active" x="288" y="72" w="12" h="12" /> + <part id="timeline_empty_frame_normal" x="240" y="60" w1="5" w2="3" w3="4" h1="5" h2="3" h3="4" /> + <part id="timeline_empty_frame_active" x="252" y="60" w1="5" w2="3" w3="4" h1="5" h2="3" h3="4" /> + <part id="timeline_keyframe_normal" x="240" y="72" w1="5" w2="3" w3="4" h1="5" h2="3" h3="4" /> + <part id="timeline_keyframe_active" x="252" y="72" w1="5" w2="3" w3="4" h1="5" h2="3" h3="4" /> + <part id="timeline_from_left_normal" x="240" y="84" w1="0" w2="8" w3="4" h1="5" h2="3" h3="4" /> + <part id="timeline_from_left_active" x="252" y="84" w1="0" w2="8" w3="4" h1="5" h2="3" h3="4" /> + <part id="timeline_from_right_normal" x="240" y="96" w1="5" w2="7" w3="0" h1="5" h2="3" h3="4" /> + <part id="timeline_from_right_active" x="252" y="96" w1="5" w2="7" w3="0" h1="5" h2="3" h3="4" /> + <part id="timeline_from_both_normal" x="240" y="108" w1="0" w2="12" w3="0" h1="5" h2="3" h3="4" /> + <part id="timeline_from_both_active" x="252" y="108" w1="0" w2="12" w3="0" h1="5" h2="3" h3="4" /> + <part id="timeline_left_link_active" x="264" y="84" w1="3" w2="9" w3="0" h1="4" h2="1" h3="7" /> + <part id="timeline_both_links_active" x="264" y="96" w1="0" w2="12" w3="0" h1="4" h2="1" h3="7" /> + <part id="timeline_right_link_active" x="264" y="108" w1="0" w2="9" w3="3" h1="4" h2="1" h3="7" /> + <part id="timeline_gear" x="264" y="12" w="12" h="12" /> + <part id="timeline_gear_active" x="264" y="24" w="12" h="12" /> + <part id="timeline_onionskin" x="264" y="36" w="12" h="12" /> + <part id="timeline_onionskin_active" x="264" y="48" w="12" h="12" /> + <part id="timeline_onionskin_range" x="240" y="120" w1="3" w2="6" w3="3" h1="3" h2="6" h3="3" /> + <part id="timeline_padding" x="276" y="12" w1="1" w2="10" w3="1" h1="1" h2="10" h3="1" /> + <part id="timeline_padding_tr" x="288" y="12" w1="1" w2="10" w3="1" h1="1" h2="10" h3="1" /> + <part id="timeline_padding_bl" x="276" y="24" w1="1" w2="10" w3="1" h1="1" h2="10" h3="1" /> + <part id="timeline_padding_br" x="288" y="24" w1="1" w2="10" w3="1" h1="1" h2="10" h3="1" /> + <part id="timeline_drop_layer_deco" x="252" y="127" w1="3" w2="1" w3="3" h1="2" h2="1" h3="2" /> + <part id="timeline_drop_frame_deco" x="252" y="120" w1="2" w2="1" w3="2" h1="3" h2="1" h3="3" /> + <part id="timeline_loop_range" x="240" y="132" w1="4" w2="4" w3="4" h1="3" h2="6" h3="3" /> + <part id="timeline_focused" x="228" y="12" w1="2" w2="8" w3="2" h1="2" h2="8" h3="2" /> + <part id="flag_normal" x="0" y="240" w="16" h="10" /> + <part id="flag_highlight" x="16" y="240" w="16" h="10" /> + <part id="drop_pixels_ok" x="176" y="176" w="7" h="8" /> + <part id="drop_pixels_ok_selected" x="176" y="184" w="7" h="8" /> + <part id="drop_pixels_cancel" x="192" y="176" w="7" h="8" /> + <part id="drop_pixels_cancel_selected" x="192" y="184" w="7" h="8" /> + <part id="warning_box" x="112" y="80" w="9" h="10" /> + <part id="canvas_nw" x="96" y="96" w="16" h="16" /> + <part id="canvas_n" x="112" y="96" w="16" h="16" /> + <part id="canvas_ne" x="128" y="96" w="16" h="16" /> + <part id="canvas_w" x="96" y="112" w="16" h="16" /> + <part id="canvas_c" x="112" y="112" w="16" h="16" /> + <part id="canvas_e" x="128" y="112" w="16" h="16" /> + <part id="canvas_sw" x="96" y="128" w="16" h="16" /> + <part id="canvas_s" x="112" y="128" w="16" h="16" /> + <part id="canvas_se" x="128" y="128" w="16" h="16" /> + <part id="canvas_empty" x="96" y="96" w="1" h="1" /> + <part id="ink_simple" x="144" y="144" w="16" h="16" /> + <part id="ink_alpha_compositing" x="160" y="144" w="16" h="16" /> + <part id="ink_copy_color" x="144" y="160" w="16" h="16" /> + <part id="ink_lock_alpha" x="160" y="160" w="16" h="16" /> + <part id="ink_shading" x="144" y="176" w="16" h="16" /> + <part id="selection_opaque" x="208" y="176" w="16" h="10" /> + <part id="selection_masked" x="224" y="176" w="16" h="10" /> + <part id="pivot_northwest" x="208" y="192" w="7" h="7" /> + <part id="pivot_north" x="216" y="192" w="7" h="7" /> + <part id="pivot_northeast" x="224" y="192" w="7" h="7" /> + <part id="pivot_west" x="208" y="200" w="7" h="7" /> + <part id="pivot_center" x="216" y="200" w="7" h="7" /> + <part id="pivot_east" x="224" y="200" w="7" h="7" /> + <part id="pivot_southwest" x="208" y="208" w="7" h="7" /> + <part id="pivot_south" x="216" y="208" w="7" h="7" /> + <part id="pivot_southeast" x="224" y="208" w="7" h="7" /> + <part id="icon_rgb" x="0" y="256" w="16" h="16" /> + <part id="icon_grayscale" x="16" y="256" w="16" h="16" /> + <part id="icon_indexed" x="32" y="256" w="16" h="16" /> + <part id="icon_black" x="48" y="256" w="16" h="16" /> + <part id="icon_white" x="64" y="256" w="16" h="16" /> + <part id="icon_transparent" x="80" y="256" w="16" h="16" /> + <part id="color_wheel_indicator" x="48" y="192" w="4" h="4" /> + <part id="no_symmetry" x="144" y="240" w="13" h="13" /> + <part id="horizontal_symmetry" x="160" y="240" w="13" h="13" /> + <part id="vertical_symmetry" x="176" y="240" w="13" h="13" /> + <part id="icon_arrow_down" x="144" y="256" w="7" h="4" /> + <part id="icon_close" x="152" y="256" w="7" h="7" /> + <part id="icon_search" x="160" y="256" w="8" h="8" /> + <part id="icon_user_data" x="168" y="256" w="8" h="8" /> + <part id="icon_pos" x="144" y="264" w="8" h="8" /> + <part id="icon_size" x="152" y="264" w="8" h="8" /> + <part id="icon_selsize" x="160" y="264" w="8" h="8" /> + <part id="icon_frame" x="168" y="264" w="8" h="8" /> + <part id="icon_clock" x="176" y="264" w="8" h="8" /> + <part id="icon_start" x="184" y="264" w="8" h="8" /> + <part id="icon_end" x="192" y="264" w="8" h="8" /> + <part id="icon_angle" x="200" y="264" w="8" h="8" /> + <part id="icon_key" x="208" y="264" w="8" h="8" /> + <part id="icon_distance" x="216" y="264" w="8" h="8" /> + <part id="icon_grid" x="224" y="264" w="8" h="8" /> + <part id="icon_save" x="232" y="264" w="8" h="8" /> + <part id="icon_save_small" x="240" y="264" w="8" h="8" /> + <part id="icon_slice" x="248" y="264" w="8" h="8" /> + <part id="tool_rectangular_marquee" x="144" y="0" w="16" h="16" /> + <part id="tool_elliptical_marquee" x="160" y="0" w="16" h="16" /> + <part id="tool_lasso" x="176" y="0" w="16" h="16" /> + <part id="tool_polygonal_lasso" x="192" y="0" w="16" h="16" /> + <part id="tool_magic_wand" x="208" y="0" w="16" h="16" /> + <part id="tool_pencil" x="144" y="16" w="16" h="16" /> + <part id="tool_spray" x="160" y="16" w="16" h="16" /> + <part id="tool_eraser" x="144" y="32" w="16" h="16" /> + <part id="tool_eyedropper" x="160" y="32" w="16" h="16" /> + <part id="tool_hand" x="176" y="32" w="16" h="16" /> + <part id="tool_move" x="192" y="32" w="16" h="16" /> + <part id="tool_zoom" x="208" y="32" w="16" h="16" /> + <part id="tool_slice" x="224" y="32" w="16" h="16" /> + <part id="tool_paint_bucket" x="144" y="48" w="16" h="16" /> + <part id="tool_gradient" x="160" y="48" w="16" h="16" /> + <part id="tool_line" x="144" y="64" w="16" h="16" /> + <part id="tool_curve" x="160" y="64" w="16" h="16" /> + <part id="tool_rectangle" x="144" y="80" w="16" h="16" /> + <part id="tool_filled_rectangle" x="160" y="80" w="16" h="16" /> + <part id="tool_ellipse" x="176" y="80" w="16" h="16" /> + <part id="tool_filled_ellipse" x="192" y="80" w="16" h="16" /> + <part id="tool_contour" x="144" y="96" w="16" h="16" /> + <part id="tool_polygon" x="160" y="96" w="16" h="16" /> + <part id="tool_blur" x="160" y="112" w="16" h="16" /> + <part id="tool_jumble" x="176" y="112" w="16" h="16" /> + <part id="tool_configuration" x="144" y="128" w="16" h="16" /> + <part id="tool_minieditor" x="160" y="128" w="16" h="16" /> + <part id="simple_color_border" x="16" y="32" w1="3" w2="6" w3="3" h1="3" h2="6" h3="3" /> + <part id="simple_color_selected" x="32" y="32" w1="3" w2="6" w3="3" h1="3" h2="6" h3="3" /> + <part id="aseprite_face" x="0" y="272" w="28" h="30" /> + <part id="aseprite_face_mouse" x="28" y="272" w="28" h="30" /> + <part id="aseprite_face_pushed" x="56" y="272" w="28" h="30" /> + </parts> + <styles> + <style id="box" /> + <style id="grid" /> + <style id="window_without_title" border="3"> + <background color="window_face" /> + <border part="menu" /> + </style> + <style id="window_with_title" border="6" border-top="17"> + <background color="window_face" /> + <border part="window" /> + </style> + <style id="window_title_label" margin-top="5" margin-left="5"> + <background color="window_titlebar_face" /> + <text color="window_titlebar_text" align="left middle" /> + </style> + <style id="window_button"> + <background color="window_titlebar_face" /> + <newlayer /> + <background part="window_button_normal" align="center middle" /> + <background part="window_button_hot" state="mouse" align="center middle" /> + <background part="window_button_selected" state="selected" align="center middle" /> + </style> + <style id="window_close_button" extends="window_button" margin-top="3" margin-right="3"> + <newlayer /> + <icon part="window_close_icon" color="button_normal_text" /> + <icon part="window_close_icon" color="button_hot_text" state="mouse" /> + <icon part="window_close_icon" color="button_selected_text" state="selected" /> + </style> + <style id="window_center_button" extends="window_button" margin-top="3" margin-right="2"> + <newlayer /> + <icon part="window_center_icon" color="button_normal_text" /> + <icon part="window_center_icon" color="button_hot_text" state="mouse" /> + <icon part="window_center_icon" color="button_selected_text" state="selected" /> + </style> + <style id="window_play_button" extends="window_button" margin-top="3" margin-right="2"> + <newlayer /> + <icon part="window_play_icon" color="button_normal_text" /> + <icon part="window_play_icon" color="button_hot_text" state="mouse" /> + <icon part="window_play_icon" color="button_selected_text" state="selected" /> + </style> + <style id="window_stop_button" extends="window_button" margin-top="3" margin-right="2"> + <newlayer /> + <icon part="window_stop_icon" color="button_normal_text" /> + <icon part="window_stop_icon" color="button_hot_text" state="mouse" /> + <icon part="window_stop_icon" color="button_selected_text" state="selected" /> + </style> + <style id="popup_window"> + <background color="window_face" /> + <border part="menu" /> + </style> + <style id="transparent_popup_window"> + <!-- nothing (transparent) --> + </style> + <style id="menu"> + <background color="window_face" /> + </style> + <style id="menubox" extends="menu" /> + <style id="menubar" extends="menubox" /> + <style id="desktop"> + <background color="window_face" /> + </style> + <style id="tooltip_window"> + <background part="tooltip" /> + </style> + <style id="tooltip_window_arrow"> + <background part="tooltip_arrow" /> + </style> + <style id="tooltip_face"> + <background color="tooltip_face" /> + </style> + <style id="tooltip_text"> + <background color="tooltip_face" /> + <text color="tooltip_text" align="left" /> + </style> + <style id="label" padding="1"> + <text color="text" align="left" /> + <text color="disabled" align="left" state="disabled" /> + </style> + <style id="mini_label" extends="label" font="mini" /> + <style id="list_header_label" padding="2"> + <text color="text" align="left" x="2" /> + </style> + <style id="link"> + <text color="link_text" align="left" /> + <text color="link_hover" align="left" state="mouse" /> + </style> + <style id="browser_link" extends="link" padding-top="1" /> + <style id="workspace_label"> + <text color="workspace_text" align="left" /> + </style> + <style id="workspace_link"> + <text color="workspace_link" align="left" /> + <text color="workspace_link_hover" align="left" state="mouse" /> + </style> + <style id="workspace_update_link"> + <background-border part="button_normal" /> + <background-border part="button_hot" state="mouse" /> + <background-border part="button_selected" state="selected" /> + <icon part="warning_box" align="right" /> + <text color="button_normal_text" align="left" /> + <text color="button_hot_text" align="left" state="mouse" /> + <text color="button_selected_text" align="left" state="selected" /> + </style> + <style id="view" border="3" border-top="4"> + <background color="window_face" /> + <border part="sunken_normal" /> + <border part="sunken_focused" state="focus" /> + </style> + <style id="editor_view"> + <background color="editor_view_face" /> + <border part="editor_normal" /> + <border part="editor_selected" state="selected" /> + </style> + <style id="workspace_view" border-top="4" extends="view"> + <border part="editor_normal" /> + <border part="editor_selected" state="focus" /> + </style> + <style id="colorbar_view"> + <border part="editor_normal" /> + <border part="editor_selected" state="focus" /> + </style> + <style id="top_shade_view" extends="editor_view" /> + <style id="normal_shade_view" extends="view" /> + <style id="menu_shade_view" extends="view"> + <background color="menuitem_hot_face" state="mouse" /> + </style> + <style id="button"> + <background-border part="button_normal" /> + <background-border part="button_hot" state="mouse" /> + <background-border part="button_focused" state="focus" /> + <background-border part="button_selected" state="selected" /> + <text color="button_normal_text" /> + <text color="button_hot_text" state="mouse" /> + <text color="button_selected_text" state="selected" /> + <text color="background" x="1" y="1" state="disabled" /> + <newlayer /> + <text color="disabled" state="disabled" /> + </style> + <style id="check_box" border="2"> + <background color="check_hot_face" state="mouse focus" /> + <background color="check_focus_face" state="focus" /> + <background color="check_hot_face" state="mouse" /> + <newlayer /> + <background part="check_focus" state="focus" /> + <text color="text" align="left middle" x="14" /> + <text color="disabled" align="left middle" x="14" state="disabled" /> + <icon part="check_normal" align="left middle" x="2" /> + <icon part="check_selected" align="left middle" x="2" state="selected" /> + <icon part="check_disabled" align="left middle" x="2" state="disabled" /> + <icon part="check_selected" align="left middle" x="2" state="disabled selected" /> + </style> + <style id="radio_button" border="2"> + <background color="radio_hot_face" state="mouse focus" /> + <background color="radio_focus_face" state="focus" /> + <background color="radio_hot_face" state="mouse" /> + <newlayer /> + <background part="radio_focus" state="focus" /> + <text color="text" align="left middle" x="14" /> + <text color="disabled" align="left middle" x="14" state="disabled" /> + <icon part="radio_normal" align="left middle" x="2" /> + <icon part="radio_selected" align="left middle" x="2" state="selected" /> + <icon part="radio_disabled" align="left middle" x="2" state="disabled" /> + </style> + <style id="mini_button"> + <background-border part="buttonset_item_normal" /> + <background-border part="buttonset_item_hot" state="mouse" /> + <background-border part="buttonset_item_hot" state="focus" /> + <background-border part="buttonset_item_pushed" state="selected" /> + <text color="button_normal_text" /> + <text color="button_hot_text" state="mouse" /> + <text color="button_selected_text" state="selected" /> + </style> + <style id="mini_check_box" extends="check_box" font="mini" /> + <style id="combobox_button" extends="mini_button"> + <icon part="combobox_arrow_down" /> + <icon part="combobox_arrow_down_selected" state="selected" /> + <icon part="combobox_arrow_down_disabled" state="disabled" /> + </style> + <style id="drop_down_button" extends="button"> + <background-border part="drop_down_button_left_normal" /> + <background-border part="drop_down_button_left_selected" state="selected" /> + <background-border part="drop_down_button_left_hot" state="mouse" /> + <background-border part="drop_down_button_left_focused" state="focus" /> + </style> + <style id="drop_down_expand_button" extends="button"> + <background-border part="drop_down_button_right_normal" /> + <background-border part="drop_down_button_right_selected" state="selected" /> + <background-border part="drop_down_button_right_hot" state="mouse" /> + <background-border part="drop_down_button_right_focused" state="focus" /> + <icon part="combobox_arrow_down" /> + <icon part="combobox_arrow_down_selected" state="selected" /> + <icon part="combobox_arrow_down_disabled" state="disabled" /> + </style> + <style id="go_back_button" extends="mini_button"> + <icon part="combobox_arrow_left" /> + <icon part="combobox_arrow_left_selected" state="selected" /> + <icon part="combobox_arrow_left_disabled" state="disabled" /> + </style> + <style id="go_forward_button" extends="mini_button"> + <icon part="combobox_arrow_right" /> + <icon part="combobox_arrow_right_selected" state="selected" /> + <icon part="combobox_arrow_right_disabled" state="disabled" /> + </style> + <style id="go_up_button" extends="mini_button"> + <icon part="combobox_arrow_up" /> + <icon part="combobox_arrow_up_selected" state="selected" /> + <icon part="combobox_arrow_up_disabled" state="disabled" /> + </style> + <style id="new_folder_button" extends="mini_button"> + <icon part="newfolder" /> + <icon part="newfolder_selected" state="selected" /> + </style> + <style id="color_wheel_options" border="1"> + <background color="editor_face" /> + <background color="check_hot_face" state="mouse" /> + <background color="check_hot_face" state="selected" /> + <icon part="pal_options" /> + </style> + <style id="recover_sprites_button" extends="button" border="0" padding="8" /> + <style id="new_frame_button" extends="mini_button" /> + <style id="color_button" extends="mini_button" border="5" font="mini" /> + <style id="splitter"> + <background color="face" /> + </style> + <style id="workspace_splitter"> + <background color="workspace" /> + </style> + <style id="horizontal_separator" border-left="2" border-top="4" border-right="2" border-bottom="0"> + <background color="window_face" /> + <background-border part="separator_horz" align="middle" /> + <text color="separator_label" x="4" align="left middle" /> + </style> + <style id="menu_separator" extends="horizontal_separator" /> + <style id="separator_in_view" extends="horizontal_separator"> + <background color="background" /> + <background-border part="separator_horz" align="middle" /> + </style> + <style id="vertical_separator" border-left="4" border-top="2" border-right="1" border-bottom="2"> + <background-border part="separator_vert" align="center" /> + </style> + <style id="recent_item" /> + <style id="recent_file" border="2"> + <background color="background" /> + <background color="menuitem_hot_face" state="mouse" /> + <background color="listitem_selected_face" state="selected" /> + <text color="text" align="left" x="2" /> + <text color="listitem_selected_text" align="left" x="2" state="selected" /> + </style> + <style id="recent_file_detail" border="2" border-left="0" extends="recent_file"> + <text color="disabled" align="left" x="2" /> + </style> + <style id="news_item" border="2"> + <background color="background" /> + <background color="menuitem_hot_face" state="mouse" /> + <background color="listitem_selected_face" state="selected" /> + <text color="text" align="left" x="2" /> + <text color="listitem_selected_text" align="left" x="2" state="selected" /> + </style> + <style id="news_item_detail" extends="news_item" border="2"> + <text color="disabled" align="left top wordwrap" x="2" /> + <text color="listitem_selected_text" align="left top wordwrap" x="2" state="selected" /> + </style> + <style id="scrollbar"> + <background part="scrollbar_bg" /> + </style> + <style id="scrollbar_thumb"> + <background part="scrollbar_thumb" /> + </style> + <style id="mini_scrollbar"> + <background part="mini_scrollbar_bg" /> + <background part="mini_scrollbar_bg_hot" state="mouse" /> + </style> + <style id="mini_scrollbar_thumb"> + <background part="mini_scrollbar_thumb" /> + <background part="mini_scrollbar_thumb_hot" state="mouse" /> + </style> + <style id="transparent_scrollbar"> + <background part="transparent_scrollbar_bg" /> + <background part="transparent_scrollbar_bg_hot" state="mouse" /> + </style> + <style id="transparent_scrollbar_thumb"> + <background part="transparent_scrollbar_thumb" /> + <background part="transparent_scrollbar_thumb_hot" state="mouse" /> + </style> + <style id="main_tabs"> + <background color="window_face" /> + </style> + <style id="workspace_tabs"> + <background color="workspace" /> + </style> + <style id="tab"> + <background part="tab_normal" align="middle" /> + <background part="tab_active" align="middle" state="focus" /> + <text color="tab_normal_text" align="left" valign="middle" /> + <text color="tab_active_text" state="focus" /> + </style> + <style id="tab_text"> + <text color="tab_normal_text" align="left middle" x="4" y="1" /> + <text color="tab_active_text" align="left middle" x="4" y="1" state="focus" /> + </style> + <style id="tab_bottom"> + <background color="tab_active_face" state="focus" /> + <newlayer /> + <background part="tab_bottom_normal" align="middle" /> + <background part="tab_bottom_active" state="focus" /> + </style> + <style id="tab_filler"> + <background part="tab_filler" align="middle" /> + </style> + <style id="tab_icon"> + <background part="tab_icon_bg_hover" state="mouse" /> + <background part="tab_icon_bg_clicked" state="selected" /> + </style> + <style id="tab_close_icon" extends="tab_icon"> + <icon part="tab_close_icon_normal" align="left middle" x="3" /> + <icon part="tab_close_icon_active" align="left middle" x="3" state="focus" /> + <icon part="tab_close_icon_normal" align="left middle" x="3" state="selected" /> + </style> + <style id="tab_modified_icon" extends="tab_icon"> + <icon part="tab_modified_icon_normal" align="left middle" x="3" /> + <icon part="tab_modified_icon_active" align="left middle" x="3" state="focus" /> + <icon part="tab_modified_icon_normal" align="left middle" x="3" state="selected" /> + </style> + <style id="tab_home"> + <icon part="tab_home_icon_normal" align="left middle" x="4" y="1" /> + <icon part="tab_home_icon_active" align="left middle" x="4" y="1" state="focus" /> + </style> + <style id="flag"> + <background color="flag_normal" /> + <background color="flag_active" state="focus" /> + <background color="flag_clicked" state="selected" /> + <newlayer /> + <background part="flag_normal" /> + <background part="flag_highlight" state="focus" /> + <background part="flag_highlight" state="selected" /> + </style> + <style id="warning_box" padding-left="2" padding-right="2"> + <background color="workspace" /> + <background color="hot_face" state="mouse" /> + <icon part="warning_box" align="center middle" /> + </style> + <style id="timeline"> + <background part="timeline_normal" /> + </style> + <style id="timeline_box"> + <background-border part="timeline_normal" /> + <background-border part="timeline_hover" state="mouse" /> + <background-border part="timeline_active" state="focus" /> + <background-border part="timeline_active_hover" state="focus mouse" /> + <background-border part="timeline_clicked" state="selected" /> + </style> + <style id="timeline_open_eye" extends="timeline_box"> + <icon part="timeline_open_eye_normal" /> + <icon part="timeline_open_eye_active" state="focus" /> + <icon part="timeline_open_eye_active" state="selected" /> + <icon part="timeline_open_eye_normal" color="disabled" state="disabled" /> + </style> + <style id="timeline_closed_eye" extends="timeline_box"> + <icon part="timeline_closed_eye_normal" /> + <icon part="timeline_closed_eye_active" state="focus" /> + <icon part="timeline_closed_eye_active" state="selected" /> + <icon part="timeline_closed_eye_normal" color="disabled" state="disabled" /> + </style> + <style id="timeline_open_padlock" extends="timeline_box"> + <icon part="timeline_open_padlock_normal" /> + <icon part="timeline_open_padlock_active" state="focus" /> + <icon part="timeline_open_padlock_active" state="selected" /> + <icon part="timeline_open_padlock_normal" color="disabled" state="disabled" /> + </style> + <style id="timeline_closed_padlock" extends="timeline_box"> + <icon part="timeline_closed_padlock_normal" /> + <icon part="timeline_closed_padlock_active" state="focus" /> + <icon part="timeline_closed_padlock_active" state="selected" /> + <icon part="timeline_closed_padlock_normal" color="disabled" state="disabled" /> + </style> + <style id="timeline_continuous" extends="timeline_box"> + <icon part="timeline_continuous_normal" /> + <icon part="timeline_continuous_active" state="focus" /> + <icon part="timeline_continuous_active" state="selected" /> + </style> + <style id="timeline_discontinuous" extends="timeline_box"> + <icon part="timeline_discontinuous_normal" /> + <icon part="timeline_discontinuous_active" state="focus" /> + <icon part="timeline_discontinuous_active" state="selected" /> + </style> + <style id="timeline_closed_group" extends="timeline_box"> + <icon part="timeline_closed_group_normal" /> + <icon part="timeline_closed_group_active" state="focus" /> + <icon part="timeline_closed_group_active" state="selected" /> + </style> + <style id="timeline_open_group" extends="timeline_box"> + <icon part="timeline_open_group_normal" /> + <icon part="timeline_open_group_active" state="focus" /> + <icon part="timeline_open_group_active" state="selected" /> + </style> + <style id="timeline_layer" extends="timeline_box"> + <text color="timeline_normal_text" align="left middle" x="2" /> + <text color="timeline_hover_text" align="left middle" x="2" state="mouse" /> + <text color="timeline_active_text" align="left middle" x="2" state="focus" /> + <text color="timeline_active_hover_text" align="left middle" x="2" state="focus mouse" /> + <text color="timeline_clicked_text" align="left middle" x="2" state="selected" /> + </style> + <style id="timeline_layer_text_only" extends="timeline_layer"> + <background-border part="timeline_none" /> + <background-border part="timeline_none" state="mouse" /> + <background-border part="timeline_none" state="focus" /> + <background-border part="timeline_none" state="focus mouse" /> + <background-border part="timeline_none" state="selected" /> + </style> + <style id="timeline_header_frame" extends="timeline_box" font="mini"> + <text color="timeline_normal_text" /> + <text color="timeline_hover_text" state="mouse" /> + <text color="timeline_active_text" state="focus" /> + <text color="timeline_active_hover_text" state="focus mouse" /> + <text color="timeline_clicked_text" state="selected" /> + </style> + <style id="timeline_selected_cel"> + <background part="timeline_clicked" /> + <background part="timeline_active" state="mouse" /> + <text color="timeline_clicked_text" /> + </style> + <style id="timeline_focused_cel"> + <background part="timeline_focused" /> + </style> + <style id="timeline_empty_frame"> + <background part="timeline_empty_frame_normal" /> + <background part="timeline_empty_frame_active" state="focus" /> + </style> + <style id="timeline_keyframe"> + <background part="timeline_keyframe_normal" /> + <background part="timeline_keyframe_active" state="focus" /> + </style> + <style id="timeline_from_left"> + <background part="timeline_from_left_normal" /> + <background part="timeline_from_left_active" state="focus" /> + </style> + <style id="timeline_from_right"> + <background part="timeline_from_right_normal" /> + <background part="timeline_from_right_active" state="focus" /> + </style> + <style id="timeline_from_both"> + <background part="timeline_from_both_normal" /> + <background part="timeline_from_both_active" state="focus" /> + </style> + <style id="timeline_left_link"> + <background part="timeline_left_link_active" /> + </style> + <style id="timeline_right_link"> + <background part="timeline_right_link_active" /> + </style> + <style id="timeline_both_links"> + <background part="timeline_both_links_active" /> + </style> + <style id="timeline_gear" extends="timeline_box"> + <icon part="timeline_gear" /> + <icon part="timeline_gear_active" state="focus" /> + <icon part="timeline_gear_active" state="selected" /> + </style> + <style id="timeline_onionskin" extends="timeline_box"> + <icon part="timeline_onionskin" /> + <icon part="timeline_onionskin_active" state="focus" /> + <icon part="timeline_onionskin_active" state="selected" /> + </style> + <style id="timeline_onionskin_range"> + <background part="timeline_onionskin_range" /> + </style> + <style id="timeline_padding"> + <background part="timeline_padding" /> + </style> + <style id="timeline_padding_tr"> + <background part="timeline_padding_tr" /> + </style> + <style id="timeline_padding_bl"> + <background part="timeline_padding_bl" /> + </style> + <style id="timeline_padding_br"> + <background part="timeline_padding_br" /> + </style> + <style id="timeline_range_outline"> + <background part="colorbar_selection" state="focus" /> + <background part="colorbar_selection_hot" state="focus mouse" /> + </style> + <style id="timeline_drop_layer_deco"> + <background part="timeline_drop_layer_deco" /> + </style> + <style id="timeline_drop_frame_deco"> + <background part="timeline_drop_frame_deco" /> + </style> + <style id="timeline_loop_range"> + <background part="timeline_loop_range" /> + </style> + <style id="timeline_switch_band_button" extends="window_button"> + <background color="none" /> + <newlayer /> + <icon part="window_center_icon" color="button_normal_text" /> + <icon part="window_center_icon" color="button_hot_text" state="mouse" /> + <icon part="window_center_icon" color="button_selected_text" state="selected" /> + </style> + <style id="shade_selection"> + <background part="colorbar_selection_hot" /> + </style> + <style id="colorbar_selection"> + <background part="colorbar_selection" /> + <background part="colorbar_selection_hot" state="mouse" /> + </style> + <style id="simple_color"> + <background color="face" /> + <background color="menuitem_hot_face" state="mouse" /> + <border part="simple_color_border" /> + <border part="simple_color_selected" state="selected" /> + </style> + <style id="list_item" border="1"> + <background color="listitem_normal_face" /> + <background color="listitem_selected_face" state="selected" /> + <background color="face" state="disabled" /> + <background color="listitem_selected_face" state="selected disabled" /> + <text color="listitem_normal_text" align="left middle" x="1" /> + <text color="listitem_selected_text" align="left middle" x="1" state="selected" /> + <text color="disabled" align="left middle" x="1" state="disabled" /> + </style> + <style id="aseprite_face"> + <icon part="aseprite_face" /> + <icon part="aseprite_face_mouse" state="mouse" /> + <icon part="aseprite_face_pushed" state="mouse selected" /> + </style> + </styles> +</theme> diff --git a/config/aseprite/palettes/default.ase b/config/aseprite/palettes/default.ase Binary files differ. diff --git a/config/directories b/config/directories @@ -0,0 +1,11 @@ +# You can add comments to these files with # +h ~/ +d ~/Documents +D ~/Downloads +m ~/Music +pp ~/Pictures +vv ~/Videos +cf ${XDG_CONFIG_HOME:-$HOME/.config} +cac ${XDG_CACHE_HOME:-$HOME/.cache} +sc ~/.local/bin +mn /mnt diff --git a/config/dunst/dunstrc b/config/dunst/dunstrc @@ -0,0 +1,152 @@ +[global] + monitor = 0 + follow = keyboard + geometry = "600x5-0+24" + indicate_hidden = yes + shrink = yes + transparency = 20 + notification_height = 0 + separator_height = 2 + padding = 0 + horizontal_padding = 8 + frame_width = 3 + frame_color = "#282828" + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = frame + + # Sort messages by urgency. + sort = yes + + idle_threshold = 120 + font = Monospace 27 + line_height = 0 + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + format = "<b>%s</b>\n%b" + + alignment = left + show_age_threshold = 60 + word_wrap = yes + ellipsize = middle + ignore_newline = no + stack_duplicates = true + hide_duplicate_count = true + show_indicators = yes + icon_position = left + max_icon_size = 40 + #icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/:/usr/share/icons/Adwaita/256x256/status/ + sticky_history = yes + history_length = 20 + dmenu = /usr/bin/dmenu -p dunst: + browser = /usr/bin/firefox -new-tab + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + title = Dunst + class = Dunst + startup_notification = false + force_xinerama = false +[experimental] + per_monitor_dpi = false + +[shortcuts] + close = ctrl+space + close_all = ctrl+shift+space + history = ctrl+grave + context = ctrl+shift+period + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#282828" + foreground = "#928374" + timeout = 5 + # Icon for notifications with low urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_normal] + background = "#458588" + foreground = "#ebdbb2" + timeout = 5 + +[urgency_critical] + background = "#cc2421" + foreground = "#ebdbb2" + frame_color = "#fabd2f" + timeout = 0 + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# Messages can be matched by "appname", "summary", "body", "icon", "category", +# "msg_urgency" and you can override the "timeout", "urgency", "foreground", +# "background", "new_icon" and "format". +# Shell-like globbing will get expanded. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +# vim: ft=cfg diff --git a/config/files b/config/files @@ -0,0 +1,11 @@ +bf ${XDG_CONFIG_HOME:-$HOME/.config}/files +bd ${XDG_CONFIG_HOME:-$HOME/.config}/directories +bw ${XDG_CONFIG_HOME:-$HOME/.config}/bookmarks +cfa ${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc +cfz $ZDOTDIR/.zshrc +cfv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim +cfm ${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc +cfx ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources +cfu ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls +cfn ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config +cfk ${XDG_CONFIG_HOME:-$HOME/.config}/sxhkd/sxhkdrc diff --git a/config/fontconfig/fonts.conf b/config/fontconfig/fonts.conf @@ -0,0 +1,36 @@ +<?xml version='1.0'?> +<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> +<fontconfig> + <alias> + <family>serif</family> + <prefer> + <family>Linux Libertine</family> + <family>Joy Pixels</family> + <family>Noto Color Emoji</family> + </prefer> + </alias> + <alias> + <family>sans-serif</family> + <prefer> + <family>Linux Biolinum</family> + <family>Joy Pixels</family> + <family>Noto Color Emoji</family> + </prefer> + </alias> + <alias> + <family>sans</family> + <prefer> + <family>Linux Biolinum</family> + <family>Joy Pixels</family> + <family>Noto Color Emoji</family> + </prefer> + </alias> + <alias> + <family>monospace</family> + <prefer> + <family>Terminus</family> + <family>Noto Sans Mono</family> + <family>Liberation Mono</family> + </prefer> + </alias> +</fontconfig> diff --git a/config/godot/editor_settings-3.tres b/config/godot/editor_settings-3.tres @@ -0,0 +1,197 @@ +[gd_resource type="EditorSettings" load_steps=13 format=2] + +[sub_resource type="InputEventKey" id=1] +control = true +command = true +scancode = 78 +unicode = 78 + +[sub_resource type="InputEventKey" id=2] +scancode = 16777224 +unicode = 16777224 + +[sub_resource type="InputEventKey" id=3] +control = true +command = true +scancode = 68 +unicode = 68 + +[sub_resource type="InputEventKey" id=4] +alt = true +scancode = 16777231 +unicode = 16777231 + +[sub_resource type="InputEventKey" id=5] +alt = true +scancode = 16777233 +unicode = 16777233 + +[sub_resource type="InputEventKey" id=6] +alt = true +scancode = 16777232 +unicode = 16777232 + +[sub_resource type="InputEventKey" id=7] +control = true +command = true +scancode = 16777234 +unicode = 16777234 + +[sub_resource type="InputEventKey" id=8] +control = true +command = true +scancode = 16777232 +unicode = 16777232 + +[sub_resource type="InputEventKey" id=9] +scancode = 16777248 +unicode = 16777248 + +[sub_resource type="InputEventKey" id=10] +alt = true +scancode = 70 +unicode = 70 + +[sub_resource type="InputEventKey" id=11] +control = true +command = true +scancode = 72 +unicode = 72 + +[sub_resource type="InputEventKey" id=12] +alt = true +scancode = 86 +unicode = 86 + +[resource] +interface/editor/main_font = "/usr/share/fonts/TTF/TerminusTTF.ttf" +interface/editor/main_font_bold = "/usr/share/fonts/TTF/TerminusTTF-Bold.ttf" +interface/editor/code_font = "/usr/share/fonts/TTF/TerminusTTF.ttf" +interface/theme/preset = "Custom" +interface/theme/base_color = Color( 0.156863, 0.156863, 0.156863, 1 ) +interface/theme/accent_color = Color( 0.992157, 0.592157, 0.121569, 1 ) +interface/theme/contrast = 0.5 +interface/theme/border_size = 0 +text_editor/theme/color_theme = "Custom" +text_editor/highlighting/symbol_color = Color( 0.972549, 0.972549, 0.94902, 1 ) +text_editor/highlighting/keyword_color = Color( 0.976471, 0.14902, 0.447059, 1 ) +text_editor/highlighting/base_type_color = Color( 0.65098, 0.886275, 0.180392, 1 ) +text_editor/highlighting/engine_type_color = Color( 0.682353, 0.505882, 1, 1 ) +text_editor/highlighting/user_type_color = Color( 0.778, 1, 0.928, 1 ) +text_editor/highlighting/comment_color = Color( 0.458824, 0.443137, 0.368627, 1 ) +text_editor/highlighting/string_color = Color( 0.901961, 0.858824, 0.454902, 1 ) +text_editor/highlighting/background_color = Color( 0.156863, 0.156863, 0.156863, 1 ) +text_editor/highlighting/completion_background_color = Color( 0.239216, 0.239216, 0.239216, 1 ) +text_editor/highlighting/completion_selected_color = Color( 1, 1, 1, 0.0666667 ) +text_editor/highlighting/completion_existing_color = Color( 1, 1, 1, 0.137255 ) +text_editor/highlighting/completion_scroll_color = Color( 1, 1, 1, 0.0666667 ) +text_editor/highlighting/completion_font_color = Color( 0.807843, 0.807843, 0.807843, 1 ) +text_editor/highlighting/text_color = Color( 0.972549, 0.972549, 0.94902, 1 ) +text_editor/highlighting/line_number_color = Color( 0.666667, 0.666667, 0.666667, 0.4 ) +text_editor/highlighting/safe_line_number_color = Color( 0.8, 0.969, 0.8275, 0.75 ) +text_editor/highlighting/caret_color = Color( 0.972549, 0.972549, 0.941176, 1 ) +text_editor/highlighting/text_selected_color = Color( 0.972549, 0.972549, 0.94902, 1 ) +text_editor/highlighting/selection_color = Color( 0.286275, 0.282353, 0.243137, 1 ) +text_editor/highlighting/current_line_color = Color( 0.196078, 0.196078, 0.196078, 1 ) +text_editor/highlighting/line_length_guideline_color = Color( 0.223529, 0.223529, 0.223529, 1 ) +text_editor/highlighting/word_highlighted_color = Color( 0.243137, 0.254902, 0.254902, 1 ) +text_editor/highlighting/number_color = Color( 0.682353, 0.505882, 1, 1 ) +text_editor/highlighting/function_color = Color( 0.4, 0.85098, 0.937255, 1 ) +text_editor/highlighting/member_variable_color = Color( 0.4, 0.85098, 0.937255, 1 ) +text_editor/highlighting/mark_color = Color( 1, 0.196078, 0.196078, 0.219608 ) +text_editor/highlighting/breakpoint_color = Color( 1, 0.301961, 0.337255, 1 ) +text_editor/highlighting/code_folding_color = Color( 0.501961, 0.501961, 0.501961, 1 ) +text_editor/highlighting/search_result_color = Color( 0.403922, 0.223529, 0.0901961, 1 ) +text_editor/highlighting/search_result_border_color = Color( 0, 0, 0, 0 ) +asset_library/use_threads = true +projects/::home::odst::Documents::TopDownAliensGame = "/home/odst/Documents/TopDownAliensGame" +export/android/adb = "" +export/android/jarsigner = "" +export/android/debug_keystore = "" +export/android/debug_keystore_user = "androiddebugkey" +export/android/debug_keystore_pass = "android" +export/android/force_system_user = false +export/android/custom_build_sdk_path = "" +export/android/timestamping_authority_url = "" +export/android/shutdown_adb_on_exit = true +export/web/http_host = "localhost" +export/web/http_port = 8060 +export/windows/rcedit = "" +export/windows/osslsigncode = "" +export/windows/wine = "" +interface/scene_tabs/always_show_close_button = false +interface/editor/show_update_spinner = false +interface/editor/update_continuously = false +interface/scene_tabs/restore_scenes_on_load = false +interface/inspector/capitalize_properties = true +interface/inspector/default_float_step = 0.001 +interface/inspector/disable_folding = false +interface/inspector/auto_unfold_foreign_scenes = true +interface/inspector/horizontal_vector2_editing = false +interface/inspector/horizontal_vector_types_editing = true +interface/inspector/open_resources_in_current_inspector = true +interface/inspector/resources_to_open_in_new_inspector = "SpatialMaterial,Script,MeshLibrary,TileSet" +interface/inspector/default_color_picker_mode = 0 +_default_feature_profile = "" +interface/editors/show_scene_tree_root_selection = true +interface/editors/derive_script_globals_by_name = true +_use_favorites_root_selection = false +filesystem/file_server/port = 6010 +filesystem/file_server/password = "" +editors/3d/manipulator_gizmo_size = 80 +editors/3d/manipulator_gizmo_opacity = 0.4 +debugger/auto_switch_to_remote_scene_tree = false +debugger/remote_scene_tree_refresh_interval = 1.0 +debugger/remote_inspect_refresh_interval = 0.2 +debugger/profiler_frame_history_size = 600 +debugger/profiler_frame_max_functions = 64 +text_editor/files/auto_reload_scripts_on_external_change = true +text_editor/files/auto_reload_and_parse_scripts_on_save = true +text_editor/files/open_dominant_script_on_scene_change = true +text_editor/external/use_external_editor = false +text_editor/external/exec_path = "" +text_editor/script_list/script_temperature_enabled = true +text_editor/script_list/highlight_current_script = true +text_editor/script_list/script_temperature_history_size = 15 +text_editor/script_list/current_script_background_color = Color( 1, 1, 1, 0.3 ) +text_editor/script_list/group_help_pages = true +text_editor/script_list/sort_scripts_by = 0 +text_editor/script_list/list_script_names_as = 0 +text_editor/external/exec_flags = "{file}" +editors/grid_map/preview_size = 64 +editors/tile_map/preview_size = 64 +editors/tile_map/palette_item_hseparation = 8 +editors/tile_map/show_tile_names = true +editors/tile_map/show_tile_ids = false +editors/tile_map/sort_tiles_by_name = true +editors/tile_map/bucket_fill_preview = true +editors/tile_map/editor_side = 1 +editors/tile_map/palette_min_width = 80 +editors/3d_gizmos/gizmo_colors/path = Color( 0.5, 0.5, 1, 0.8 ) +editors/3d_gizmos/gizmo_colors/instanced = Color( 0.7, 0.7, 0.7, 0.6 ) +editors/3d_gizmos/gizmo_colors/csg = Color( 0, 0.4, 1, 0.15 ) +editors/grid_map/editor_side = 1 +editors/grid_map/palette_min_width = 230 +network/language_server/remote_port = 6008 +network/language_server/enable_smart_resolve = true +network/language_server/show_native_symbols_in_editor = false +network/language_server/use_thread = false +editors/3d_gizmos/gizmo_colors/camera = Color( 0.8, 0.4, 0.8, 1 ) +editors/3d_gizmos/gizmo_colors/stream_player_3d = Color( 0.4, 0.8, 1, 1 ) +editors/3d_gizmos/gizmo_colors/shape = Color( 0.5, 0.7, 1, 1 ) +editors/3d_gizmos/gizmo_colors/skeleton = Color( 1, 0.8, 0.4, 1 ) +editors/3d_gizmos/gizmo_colors/visibility_notifier = Color( 0.8, 0.5, 0.7, 1 ) +editors/3d_gizmos/gizmo_colors/particles = Color( 0.8, 0.7, 0.4, 1 ) +editors/3d_gizmos/gizmo_colors/reflection_probe = Color( 0.6, 1, 0.5, 1 ) +editors/3d_gizmos/gizmo_colors/gi_probe = Color( 0.5, 1, 0.6, 1 ) +editors/3d_gizmos/gizmo_colors/baked_indirect_light = Color( 0.5, 0.6, 1, 1 ) +editors/3d_gizmos/gizmo_colors/navigation_edge = Color( 0.5, 1, 1, 1 ) +editors/3d_gizmos/gizmo_colors/navigation_edge_disabled = Color( 0.7, 0.7, 0.7, 1 ) +editors/3d_gizmos/gizmo_colors/navigation_solid = Color( 0.5, 1, 1, 0.4 ) +editors/3d_gizmos/gizmo_colors/navigation_solid_disabled = Color( 0.7, 0.7, 0.7, 0.4 ) +editors/3d_gizmos/gizmo_colors/joint = Color( 0.5, 0.8, 1, 1 ) +editors/3d_gizmos/gizmo_colors/joint_body_a = Color( 0.6, 0.8, 1, 1 ) +editors/3d_gizmos/gizmo_colors/joint_body_b = Color( 0.6, 0.9, 1, 1 ) +text_editor/highlighting/gdscript/function_definition_color = Color( 0.65098, 0.886275, 0.180392, 1 ) +text_editor/highlighting/gdscript/node_path_color = Color( 0.992157, 0.592157, 0.121569, 1 ) +shortcuts = [ "file_dialog/create_folder", SubResource( 1 ), "file_dialog/delete", SubResource( 2 ), "file_dialog/focus_path", SubResource( 3 ), "file_dialog/go_back", SubResource( 4 ), "file_dialog/go_forward", SubResource( 5 ), "file_dialog/go_up", SubResource( 6 ), "file_dialog/move_favorite_down", SubResource( 7 ), "file_dialog/move_favorite_up", SubResource( 8 ), "file_dialog/refresh", SubResource( 9 ), "file_dialog/toggle_favorite", SubResource( 10 ), "file_dialog/toggle_hidden_files", SubResource( 11 ), "file_dialog/toggle_mode", SubResource( 12 ) ] diff --git a/config/godot/script_templates/empty.gd b/config/godot/script_templates/empty.gd @@ -0,0 +1,2 @@ +extends %BASE% + diff --git a/config/godot/script_templates/no_comments.gd b/config/godot/script_templates/no_comments.gd @@ -0,0 +1,5 @@ +extends %BASE% + + +func _ready()%VOID_RETURN%: +%TS%pass diff --git a/config/godot/text_editor_themes b/config/godot/text_editor_themes @@ -0,0 +1 @@ +Subproject commit 7ec05434f1f9c9349b96d00266689d95d78c8af8 diff --git a/config/gtk-2.0/gtkfilechooser.ini b/config/gtk-2.0/gtkfilechooser.ini @@ -0,0 +1,11 @@ +[Filechooser Settings] +LocationMode=path-bar +ShowHidden=false +ShowSizeColumn=true +GeometryX=46 +GeometryY=187 +GeometryWidth=720 +GeometryHeight=540 +SortColumn=name +SortOrder=ascending +StartupMode=recent diff --git a/config/gtk-2.0/gtkrc-2.0 b/config/gtk-2.0/gtkrc-2.0 @@ -0,0 +1,19 @@ +# DO NOT EDIT! This file will be overwritten by LXAppearance. +# Any customization should be done in ~/.gtkrc-2.0.mine instead. + +include "~/.gtkrc-2.0.mine" +gtk-theme-name="Arc-Gruvbox" +gtk-icon-theme-name="Adwaita" +gtk-font-name="Sans 14" +gtk-cursor-theme-name="Adwaita" +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_TEXT +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=0 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle="hintfull" +gtk-xft-rgba="rgb" diff --git a/config/gtk-3.0/bookmarks b/config/gtk-3.0/bookmarks @@ -0,0 +1,2 @@ +file:///home/odst/Videos/Memes +file:///home/odst/Pictures/Memes diff --git a/config/gtk-3.0/settings.ini b/config/gtk-3.0/settings.ini @@ -0,0 +1,16 @@ +[Settings] +gtk-theme-name=Arc-Gruvbox +gtk-icon-theme-name=Adwaita +gtk-font-name=Sans 14 +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_TEXT +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=0 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintfull +gtk-xft-rgba=rgb +gtk-cursor-theme-name=Adwaita diff --git a/config/inputrc b/config/inputrc @@ -0,0 +1,19 @@ +$include /etc/inputrc +set editing-mode vi +$if mode=vi + +set show-mode-in-prompt on +set vi-ins-mode-string \1\e[6 q\2 +set vi-cmd-mode-string \1\e[2 q\2 + +set keymap vi-command +# these are for vi-command mode +Control-l: clear-screen +Control-a: beginning-of-line + +set keymap vi-insert +# these are for vi-insert mode +Control-l: clear-screen +Control-a: beginning-of-line + +$endif diff --git a/config/mutt/.mailsynclastrun b/config/mutt/.mailsynclastrun diff --git a/config/mutt/accounts/1-risingthumb.muttrc b/config/mutt/accounts/1-risingthumb.muttrc @@ -0,0 +1,36 @@ +# vim: filetype=neomuttrc +# muttrc file for account risingthumb +set realname = "Aaron Leonard" +set from = "risingthumb@risingthumb.xyz" +set sendmail = "msmtp -a risingthumb" +alias me Aaron Leonard <risingthumb@risingthumb.xyz> +set folder = "/home/odst/.local/share/mail/risingthumb" +set header_cache = /home/odst/.cache/mutt-wizard/risingthumb/headers +set message_cachedir = /home/odst/.cache/mutt-wizard/risingthumb/bodies +set mbox_type = Maildir + +bind index,pager gg noop +bind index,pager g noop +bind index,pager M noop +bind index,pager C noop +bind index gg first-entry +macro index o "<shell-escape>mailsync -V risingthumb<enter>" "run mbsync to sync risingthumb" +unmailboxes * + +set spoolfile = "+INBOX" +set record = "+Sent" +set postponed = "+Drafts" +set trash = "" +mailboxes "=Sent" "=Junk" "=Drafts" "=INBOX" +macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox" # mw-autogenerated +macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox" # mw-autogenerated +macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox" # mw-autogenerated +macro index,pager gs "<change-folder>=Sent<enter>" "go to sent" # mw-autogenerated +macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent" # mw-autogenerated +macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent" # mw-autogenerated +macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts" # mw-autogenerated +macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts" # mw-autogenerated +macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts" # mw-autogenerated +macro index,pager gj "<change-folder>=Junk<enter>" "go to junk" # mw-autogenerated +macro index,pager Mj ";<save-message>=Junk<enter>" "move mail to junk" # mw-autogenerated +macro index,pager Cj ";<copy-message>=Junk<enter>" "copy mail to junk" # mw-autogenerated diff --git a/config/mutt/accounts/2-aaron-leonard.muttrc b/config/mutt/accounts/2-aaron-leonard.muttrc @@ -0,0 +1,36 @@ +# vim: filetype=neomuttrc +# muttrc file for account aaron-leonard +set realname = "Aaron Leonard" +set from = "aaronleonard@risingthumb.xyz" +set sendmail = "msmtp -a aaron-leonard" +alias me Aaron Leonard <aaronleonard@risingthumb.xyz> +set folder = "/home/odst/.local/share/mail/aaron-leonard" +set header_cache = /home/odst/.cache/mutt-wizard/aaron-leonard/headers +set message_cachedir = /home/odst/.cache/mutt-wizard/aaron-leonard/bodies +set mbox_type = Maildir + +bind index,pager gg noop +bind index,pager g noop +bind index,pager M noop +bind index,pager C noop +bind index gg first-entry +macro index o "<shell-escape>mailsync -V aaron-leonard<enter>" "run mbsync to sync aaron-leonard" +unmailboxes * + +set spoolfile = "+INBOX" +set record = "+Sent" +set postponed = "+Drafts" +set trash = "" +mailboxes "=Sent" "=Junk" "=Drafts" "=INBOX" +macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox" # mw-autogenerated +macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox" # mw-autogenerated +macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox" # mw-autogenerated +macro index,pager gs "<change-folder>=Sent<enter>" "go to sent" # mw-autogenerated +macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent" # mw-autogenerated +macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent" # mw-autogenerated +macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts" # mw-autogenerated +macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts" # mw-autogenerated +macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts" # mw-autogenerated +macro index,pager gj "<change-folder>=Junk<enter>" "go to junk" # mw-autogenerated +macro index,pager Mj ";<save-message>=Junk<enter>" "move mail to junk" # mw-autogenerated +macro index,pager Cj ";<copy-message>=Junk<enter>" "copy mail to junk" # mw-autogenerated diff --git a/config/mutt/muttrc b/config/mutt/muttrc @@ -0,0 +1,6 @@ +# vim: filetype=neomuttrc +source /usr/local/share/mutt-wizard/mutt-wizard.muttrc # mw-autogenerated +source /home/odst/.config/mutt/accounts/1-risingthumb.muttrc # mw-autogenerated +macro index,pager i1 '<sync-mailbox><enter-command>source /home/odst/.config/mutt/accounts/1-risingthumb.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to risingthumb@risingthumb.xyz" # mw-autogenerated +macro index,pager i2 '<sync-mailbox><enter-command>source /home/odst/.config/mutt/accounts/2-aaron-leonard.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to aaronleonard@risingthumb.xyz" # mw-autogenerated +set edit_headers=yes diff --git a/config/neofetch/ascii b/config/neofetch/ascii @@ -0,0 +1,25 @@ +${c3} ./osssssssssssssssssssssso:` + -ossssssssssssssssssssssssssss: + .ossssssssssssyyysssssssssssssssso` + /ssyyyyyyyyyyyhhyyyysyyyyysyyyyyyyyo + osyyyssyyyyyyyysysyyyoyyyyyyyyyyyyyyy/ + +yyyysoyysysyyoysss+sy.oyyyyyyyyyyyyyys + ./oyhyyyhyyoos:yyyy+`+s`.syyyhyyssyhyhyy. + ..hhhhhyhy+.y/syys:``:+``-o:yhhyysyhhhyyo + ooohdyhho.-s+ys:````--...+`-ysyyyyhhhhyyy+:. + ..-hsshyh../sdy.````.:++ooo:`:+yyhhhhhhhyhhso- + `-+oshhh::y//dh.``````.//No+s.-shhhhdhhhhyo:` + `:oyhhhdoy-+hms````````hdds`s/`+hhhhhhhhys/. + `-/yy+:-.+::````````//+-`:..:ysyddhhho- + ./sy/${c1}........````........../:..dmmddhhs` + +${c1}........````............-ymmmdy/` + `-/hd${c1}.....````````........+/smNNho:` + `:sdmmo${c1}.`````..`````````.-hmNdmmmhs/` + ./h+${c1}..``........`..--sssys/. .` + `-:+/:${c1}..:+:...............-`-::-.:o:+/-` +${c6} -+++-o+/.-:-.-....-::::--.``-:++++++/++++/` +${c5} :+++//++/...........--:-.....-/++++//+++++++` +${c4} -..++++:+++/...........-:--.....-++++//++++++++-. +${c3}--++o+++//+:-....------------....-+++:/+++++++oo/: +${c2}::+oo++++:++:-------------::-:----o+:+ooooooooso+: +${c1}:-+ooo+++//+:------------:///so+:-/:oooooooossoo+- diff --git a/config/neofetch/config.conf b/config/neofetch/config.conf @@ -0,0 +1,849 @@ +# 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 + # [[ "$player" ]] && prin "Music Player" "$player" + # info "Local IP" local_ip + # info "Public IP" public_ip + # info "Users" users + # info "Locale" locale # This only works on glibc systems. + + info cols +} + +# Title + + +# Hide/Show Fully qualified domain name. +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --title_fqdn +title_fqdn="off" + + +# 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', 'tiny', 'off' +# 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', 'tiny', 'off' +# Flag: --uptime_shorthand +# +# Example: +# on: '2 days, 10 hours, 3 mins' +# tiny: '2d 10h 3m' +# off: '2 days, 10 hours, 3 minutes' +uptime_shorthand="on" + + +# Memory + + +# Show memory pecentage in output. +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --memory_percent +# +# Example: +# on: '1801MiB / 7881MiB (22%)' +# off: '1801MiB / 7881MiB' +memory_percent="off" + + +# 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" + +# Public IP timeout. +# +# Default: '2' +# Values: 'int' +# Flag: --ip_timeout +public_ip_timeout=2 + + +# Desktop Environment + + +# Show Desktop Environment version +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --de_version +de_version="off" + + +# 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', 'none' +# 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%)' +# +# none: 'Disk: 74G / 118G (66%)' +# 'Disk: 74G / 118G (66%)' +# 'Disk: 74G / 118G (66%)' +disk_subtitle="mount" + +# Disk percent. +# Show/Hide disk percent. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --disk_percent +# +# Example: +# on: 'Disk (/): 74G / 118G (66%)' +# off: 'Disk (/): 74G / 118G' +disk_percent="on" + + +# 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 +# gogglesmm +# guayadeque +# io.elementary.music +# iTunes +# juk +# lollypop +# mocp +# mopidy +# mpd +# muine +# netease-cloud-music +# pogo +# pragha +# qmmp +# quodlibet +# rhythmbox +# sayonara +# smplayer +# spotify +# strawberry +# tomahawk +# vlc +# xmms2d +# xnoise +# 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="-" + + +# Info Separator +# Replace the default separator with the specified string. +# +# Default: ':' +# Flag: --separator +# +# Example: +# separator="->": 'Shell-> bash' +# separator=" =": 'WM = dwm' +separator=":" + + +# Color Blocks + + +# Color block range +# The range of colors to print. +# +# Default: '0', '15' +# 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 15) + +# 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 + +# Color Alignment +# +# Default: 'auto' +# Values: 'auto', 'num' +# Flag: --col_offset +# +# Number specifies how far from the left side of the terminal (in spaces) to +# begin printing the columns, in case you want to e.g. center them under your +# text. +# Example: +# col_offset="auto" - Default behavior of neofetch +# col_offset=7 - Leave 7 spaces then print the colors +col_offset="auto" + +# 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', 'chafa', 'jp2a', 'iterm2', 'off', +# 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty' +# Flag: --backend +image_backend="ueberzug" + +# Image Source +# +# Which image or ascii file to display. +# +# Default: 'auto' +# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' +# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")' +# 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="/home/odst/Pictures/Memes/HmmmReaction.jpg" + + +# Ascii Options + + +# Ascii distro +# Which distro's ascii art to display. +# +# Default: 'auto' +# Values: 'auto', 'distro_name' +# Flag: --ascii_distro +# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, AOSC, +# Apricity, ArcoLinux, ArchBox, ARCHlabs, ArchStrike, +# XFerience, ArchMerge, Arch, Artix, Arya, Bedrock, Bitrig, +# BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD, +# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS, +# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover, +# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin, +# DesaOS, Devuan, DracOS, DragonFly, Drauger, Elementary, +# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD, +# FreeMiNT, Frugalware, Funtoo, GalliumOS, Gentoo, Pentoo, +# gNewSense, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra, +# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion, +# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite, +# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva, +# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib, +# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner, +# NuTyX, OBRevenge, OpenBSD, OpenIndiana, OpenMandriva, +# OpenWrt, osmc, Oracle, PacBSD, Parabola, Pardus, Parrot, +# Parsix, TrueOS, PCLinuxOS, Peppermint, popos, Porteus, +# PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix, Raspbian, +# Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan, Regata, +# Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific, Septor, +# SharkLinux, Siduction, Slackware, SliTaz, SmartOS, Solus, +# Source_Mage, Sparky, Star, SteamOS, SunOS, openSUSE_Leap, +# openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, Trisquel, +# Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio, Ubuntu, +# Void, Obarun, windows10, Windows7, Xubuntu, Zorin, and IRIX +# have ascii logos +# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants. +# Use '{distro name}_old' to use the old logos. +# NOTE: Ubuntu has flavor variants. +# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME, +# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors. +# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu, +# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android, +# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola, +# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS, +# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian, +# postmarketOS, and Void have a smaller logo variant. +# Use '{distro name}_small' to use the small variants. +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" diff --git a/config/newsboat/config b/config/newsboat/config @@ -0,0 +1,39 @@ +#show-read-feeds no +auto-reload yes + +external-url-viewer "urlscan -dc -r 'linkhandler {}'" + +bind-key j down +bind-key k up +bind-key j next articlelist +bind-key k prev articlelist +bind-key J next-feed articlelist +bind-key K prev-feed articlelist +bind-key G end +bind-key g home +bind-key d pagedown +bind-key u pageup +bind-key l open +bind-key h quit +bind-key a toggle-article-read +bind-key n next-unread +bind-key N prev-unread +bind-key D pb-download +bind-key U show-urls +bind-key x pb-delete + +color listnormal cyan default +color listfocus black yellow standout bold +color listnormal_unread blue default +color listfocus_unread yellow default bold +color info red black bold +color article cyan default + +browser linkhandler +macro , open-in-browser +macro t set browser "tsp youtube-dl --add-metadata -ic"; open-in-browser ; set browser linkhandler +macro a set browser "tsp youtube-dl --add-metadata -xic -f bestaudio/best"; open-in-browser ; set browser linkhandler +macro v set browser "setsid nohup mpv"; open-in-browser ; set browser linkhandler +macro w set browser "w3m"; open-in-browser ; set browser linkhandler +macro p set browser "dmenuhandler"; open-in-browser ; set browser linkhandler +macro c set browser "xsel -b <<<" ; open-in-browser ; set browser linkhandler diff --git a/config/newsboat/urls b/config/newsboat/urls @@ -0,0 +1,117 @@ +# Blogs +http://lukesmith.xyz/rss.xml "~Luke Smith (Blog)" +https://risingthumb.xyz/rss.xml "~RisingThumb (Blog)" +http://esr.ibiblio.org/?feed=rss2 "~esr (Blog)" +https://www.nayuki.io/rss20.xml "~nayuki (Blog)" +https://blog.tox.chat/feed/ "~Tox Project (Blog)" +https://suckless.org/atom.xml "~Suckless (Feed)" + +# Subreddits +https://www.reddit.com/r/UnknownTradeCo.rss "~UNKNOWN[?] Trade Co (Reddit)" + +# News +https://godotengine.org/rss.xml "~Godot Engine news" +https://www.archlinux.org/feeds/news/ "~Arch Linux news" +https://static.fsf.org/fsforg/rss/news.xml "~Free Software Foundation News" + +# Youtube Channels +# Template. Get channel ID and substitute into below to use +#https://www.youtube.com/feeds/videos.xml?channel_id= "~ (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCYO_jab_esuFRV4b17AJtAw "~3Blue1Brown (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC0a8nteER_pU4Aj6hmEyJAQ "~Kliksphilip (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCEKJKJ3FO-9SFv5x5BzyxhQ "~2Kliksphilip (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCmu9PVIZBk-ZCi-Sk2F2utA "~3Kliksphilip (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCOYBuFGi8T3NM5fNAptCLCw "~4Kliksphilip (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCY3A_5R_m3PXCn5XDhvBBsg "~Adam Millard - The Architect of Games (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCE1jXbVAGJQEORz9nZqb5bQ "~Ahoy (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCov_51F0betb6hJ6Gumxg3Q "~AI and Games (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCvIL0fhX8_NOvL3D0hUmiIw "~Al Chestbreach (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCXKNiazqmuUi9CeX_kyDpjw "~Alpha Beta Gamer (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCQEnQfezywrAwkHWX_Uo_Qg "~A Jolly Wangcore (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC4rxS3O4kLdKDtelmiEOexA "~Astral Dawn Studios (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCd_lJ4zSp9wZDNyeKCWUstg "~Ask Gamedev (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCpIvXT9VhAA1Z4_yReFgdBg "~Barren Dome (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC2FA34eEa09tpFLqC9yVbtQ "~Beta Blargho (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCq6aw03lNILzV96UvEAASfQ "~Bill Wurtz (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCKTehwyGCKF-b2wo0RKwrcg "~Bisquit (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCTU7zMqyCsIcaYWwtjemYoQ "~Bizonacci (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC9Z1XWw1kmnvOOFsj6Bzy2g "~BlackThornProd (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCr3cBLTYmIK9kY0F_OdFWFQ "~Casually Explained (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC2C_jShtL725hvbm1arSV9w "~CGP Grey (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCCDOQrpqLqKVcTCKzqarxLg "~Chess Network (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC0e3QhIYukixgh5VVpKHH9Q "~Code Bullet (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCrv269YwJzuZL3dH5PCgxUw "~Code Parade (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCu6mSoMNzHQiBIOCkHUa2Aw "~Cody's Lab (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC2MJylovjrLtsGP0_4UrqrQ "~Cody's Blab (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCQZIRgC-TLpHOPOsqzs0OPQ "~Cubicle Brothers (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCJfJWct8jN1RpCuVWk3zHTA "~Daryl Talks Games (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC6wBro4B4pf9xnBh9Xi2zcQ "~David Hoffman (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC4nJnJ-HO5vVbGlJ14rf5yg "~DeSinc (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCVAy9j7CKEFy2tyVn7yHPOA "~Dustin O'Daffer (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCIr36tGw1gpR_XeXC5n1DzA "~Edmund McMillen (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC9DR22-qohBDtZ74R3FxOZg "~Emilio (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCm4JnxTxtvItQecKUc4zRhQ "~Errant Signal (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCFKDEp9si4RmHFWJW1vYsMA "~Ethoslab (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCCODtTcd5M1JavPCOr_Uydg "~Extra Credits (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCimiUgDLbi6P17BdaCZpVbg "~exurb1a (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCMQj8WMKlRQf0CNC_SrJ1Sg "~FamousZaggy (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCHZ986wm_sJT6wntdDTIIcw "~FitMC (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCrfKGpvbEQXcbe68dzXgJuA "~Forgotten Weapons (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCF1ckGg0HTOuPjGLaFcJZbg "~Franco the Gamer (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCbWcXB0PoqOsAvAdfzWMf0w "~Fredrik Knudsen (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC_hwKJdF3KRAy4QIaiCSMgQ "~Game Dev Underground (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCqJ-Xo29CKyLTjn6z2XwYAw "~GameMaker's Toolkit (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC0JB7TSe49lg56u6qH8y_MQ "~GDC (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCFJ9M_-nJXskQVqhOydcTcQ "~Generalkidd (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCfIXdjDQH9Fau7y99_Orpjw "~Gorillaz (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC7Q1eYWGXjlOsUB7T9cYr6w "~Guy Bloke (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC3s0BtrBJpwNDaflRSoiieQ "~Hak5 (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCfB9IEEK0vis5-OImwOIUyQ "~InfernoPlus (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCR1D15p_vdP3HkrH8wgjQRw "~Internet Historian (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC8oSqea10PZl2cbYVcjSQ5w "~Israel Blargh! (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCe_ijwgvhtHQwQ55vsXDY8w "~Jack Stauber (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCY16a3w_eOKFv1mCBNOW9hw "~Jarkey Bacon (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC_p_9arduPuxM8DHTGIuSOg "~Jonas Tyroller (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCGSGPehp0RWfca-kENgBJ9Q "~Jreg (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCS5tt2z_DFvG7-39J3aE-bQ "~Life of Boris (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC9pgQfOXRsp4UKrI8q0zjXQ "~Lindybeige (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UClcE-kVhqyiHCcjYwcpfj9w "~LiveOverflow (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCoLblLUQbqjfCAmU13LbwHw "~Luis Zuno (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke Smith (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCsXVk37bltHxD1rDPwtNM8Q "~Kurzgesagt (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCDYZxJE8kLZ-o6nL8E1bXdQ "~Many a True Nerd (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCW4BscaN7XuLrLsCnbrV9wA "~Markus Persson (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC7ivNZIEmepeJ3YhrkK7PJQ "~Martin O'Donnell (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCVh47EKH9VLresRqiYi9txw "~Mili (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCK09g6gYGMvU-0x1VCF1hgA "~Military History Visualized (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCaoqVlqPTH78_xjTjTOMcmQ "~Miziziziz (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCExlOjz0OJhOD_eO1DOId6Q "~Moonshine Animations (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCFDOXTSVu6oBXJciSTiqJ1w "~MUNIMUNI (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCTrH1MoRSn5MYMLtrP_arXw "~muniLab (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCyKNzTQpYtKliiBmz4Ep5Hw "~munimuni Bekkan (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCOsmeQd5NmhL3mAbejd-Ajg "~N0THANKY0U (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCZskBBoQ8jjnOnFKjQiMB5Q "~Ningishu (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC-3J5xNrAbTLbU1gN8mMpOA "~Nitro Rad (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCvrLvII5oxSWEMEkszrxXEA "~N-O-D-E (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCrJNoVvvSJrzk27MQnpJqVA "~Pripyat Hawks (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UClzSWMeFKsxUaRyRyTtj56w "~RisingThumb (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCwRqWnW5ZkVaP_lZF7caZ-g "~Retro game mechanics explained (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCKv_QzXft4mD6TXmQBZtzIA "~Roguelike Celebration (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UC1DTYW241WD64ah5BFWn4JA "~Sam O'Nella Academy (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCZS2K8ZsUmujTuj3cNMyBSA "~Team Cherry (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCYXpatz5Z4ek0M_5VR-Qt1A "~Teh Lurd of Teh Reings (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCxr2d4As312LulcajAkKJYw "~Townsends (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCUcyEsEjhPEDf69RRVhRh4A "~The Great War (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCpFcHE36IoySjYj1Rytxyog "~TheWarOwl (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCuHVjteDW9tCb8QqMrtGvwQ "~Thomas Brush (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCBa659QWEk1AI4Tg--mrJ2A "~Tom Scott (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCqBQ9nQCJBsur5A1Yk079Ig "~Turtel (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCbfYPyITQ-7l4upoX8nvctg "~Two Minute Papers (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCU9pX8hKcrx06XfOB-VQLdw "~xisumavoid (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCm6yD26HlafzqNlYaK7uEaA "~xisumasays (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCT6iAerLNE-0J1S_E97UAuQ "~YongYea (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCkqBGpsiOkZMdwpvWmWRw8g "~Yrimir (YouTube)" +https://www.youtube.com/feeds/videos.xml?channel_id=UCeQwCalZK1scamopwHt9UWw "~람다람 (YouTube)" + +# Podcasts +https://notrelated.libsyn.com/rss "~Not Related podcast" diff --git a/config/nvim/autoload/plug.vim b/config/nvim/autoload/plug.vim @@ -0,0 +1,2664 @@ +" vim-plug: Vim plugin manager +" ============================ +" +" Download plug.vim and put it in ~/.vim/autoload +" +" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ +" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +" +" Edit your .vimrc +" +" call plug#begin('~/.vim/plugged') +" +" " Make sure you use single quotes +" +" " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align +" Plug 'junegunn/vim-easy-align' +" +" " Any valid git URL is allowed +" Plug 'https://github.com/junegunn/vim-github-dashboard.git' +" +" " Multiple Plug commands can be written in a single line using | separators +" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' +" +" " On-demand loading +" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +" Plug 'tpope/vim-fireplace', { 'for': 'clojure' } +" +" " Using a non-master branch +" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } +" +" " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) +" Plug 'fatih/vim-go', { 'tag': '*' } +" +" " Plugin options +" Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } +" +" " Plugin outside ~/.vim/plugged with post-update hook +" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +" +" " Unmanaged plugin (manually installed and updated) +" Plug '~/my-prototype-plugin' +" +" " Initialize plugin system +" call plug#end() +" +" Then reload .vimrc and :PlugInstall to install plugins. +" +" Plug options: +" +"| Option | Description | +"| ----------------------- | ------------------------------------------------ | +"| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use | +"| `rtp` | Subdirectory that contains Vim plugin | +"| `dir` | Custom directory for the plugin | +"| `as` | Use different name for the plugin | +"| `do` | Post-update hook (string or funcref) | +"| `on` | On-demand loading: Commands or `<Plug>`-mappings | +"| `for` | On-demand loading: File types | +"| `frozen` | Do not update unless explicitly specified | +" +" More information: https://github.com/junegunn/vim-plug +" +" +" Copyright (c) 2017 Junegunn Choi +" +" MIT License +" +" 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. + +if exists('g:loaded_plug') + finish +endif +let g:loaded_plug = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let s:plug_src = 'https://github.com/junegunn/vim-plug.git' +let s:plug_tab = get(s:, 'plug_tab', -1) +let s:plug_buf = get(s:, 'plug_buf', -1) +let s:mac_gui = has('gui_macvim') && has('gui_running') +let s:is_win = has('win32') +let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win) +let s:vim8 = has('patch-8.0.0039') && exists('*job_start') +if s:is_win && &shellslash + set noshellslash + let s:me = resolve(expand('<sfile>:p')) + set shellslash +else + let s:me = resolve(expand('<sfile>:p')) +endif +let s:base_spec = { 'branch': 'master', 'frozen': 0 } +let s:TYPE = { +\ 'string': type(''), +\ 'list': type([]), +\ 'dict': type({}), +\ 'funcref': type(function('call')) +\ } +let s:loaded = get(s:, 'loaded', {}) +let s:triggers = get(s:, 'triggers', {}) + +if s:is_win + function! s:plug_call(fn, ...) + let shellslash = &shellslash + try + set noshellslash + return call(a:fn, a:000) + finally + let &shellslash = shellslash + endtry + endfunction +else + function! s:plug_call(fn, ...) + return call(a:fn, a:000) + endfunction +endif + +function! s:plug_getcwd() + return s:plug_call('getcwd') +endfunction + +function! s:plug_fnamemodify(fname, mods) + return s:plug_call('fnamemodify', a:fname, a:mods) +endfunction + +function! s:plug_expand(fmt) + return s:plug_call('expand', a:fmt, 1) +endfunction + +function! s:plug_tempname() + return s:plug_call('tempname') +endfunction + +function! plug#begin(...) + if a:0 > 0 + let s:plug_home_org = a:1 + let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p')) + elseif exists('g:plug_home') + let home = s:path(g:plug_home) + elseif !empty(&rtp) + let home = s:path(split(&rtp, ',')[0]) . '/plugged' + else + return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.') + endif + if s:plug_fnamemodify(home, ':t') ==# 'plugin' && s:plug_fnamemodify(home, ':h') ==# s:first_rtp + return s:err('Invalid plug home. '.home.' is a standard Vim runtime path and is not allowed.') + endif + + let g:plug_home = home + let g:plugs = {} + let g:plugs_order = [] + let s:triggers = {} + + call s:define_commands() + return 1 +endfunction + +function! s:define_commands() + command! -nargs=+ -bar Plug call plug#(<args>) + if !executable('git') + return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.') + endif + if has('win32') + \ && &shellslash + \ && (&shell =~# 'cmd\.exe' || &shell =~# 'powershell\.exe') + return s:err('vim-plug does not support shell, ' . &shell . ', when shellslash is set.') + endif + if !has('nvim') + \ && (has('win32') || has('win32unix')) + \ && !has('multi_byte') + return s:err('Vim needs +multi_byte feature on Windows to run shell commands. Enable +iconv for best results.') + endif + command! -nargs=* -bar -bang -complete=customlist,s:names PlugInstall call s:install(<bang>0, [<f-args>]) + command! -nargs=* -bar -bang -complete=customlist,s:names PlugUpdate call s:update(<bang>0, [<f-args>]) + command! -nargs=0 -bar -bang PlugClean call s:clean(<bang>0) + command! -nargs=0 -bar PlugUpgrade if s:upgrade() | execute 'source' s:esc(s:me) | endif + command! -nargs=0 -bar PlugStatus call s:status() + command! -nargs=0 -bar PlugDiff call s:diff() + command! -nargs=? -bar -bang -complete=file PlugSnapshot call s:snapshot(<bang>0, <f-args>) +endfunction + +function! s:to_a(v) + return type(a:v) == s:TYPE.list ? a:v : [a:v] +endfunction + +function! s:to_s(v) + return type(a:v) == s:TYPE.string ? a:v : join(a:v, "\n") . "\n" +endfunction + +function! s:glob(from, pattern) + return s:lines(globpath(a:from, a:pattern)) +endfunction + +function! s:source(from, ...) + let found = 0 + for pattern in a:000 + for vim in s:glob(a:from, pattern) + execute 'source' s:esc(vim) + let found = 1 + endfor + endfor + return found +endfunction + +function! s:assoc(dict, key, val) + let a:dict[a:key] = add(get(a:dict, a:key, []), a:val) +endfunction + +function! s:ask(message, ...) + call inputsave() + echohl WarningMsg + let answer = input(a:message.(a:0 ? ' (y/N/a) ' : ' (y/N) ')) + echohl None + call inputrestore() + echo "\r" + return (a:0 && answer =~? '^a') ? 2 : (answer =~? '^y') ? 1 : 0 +endfunction + +function! s:ask_no_interrupt(...) + try + return call('s:ask', a:000) + catch + return 0 + endtry +endfunction + +function! s:lazy(plug, opt) + return has_key(a:plug, a:opt) && + \ (empty(s:to_a(a:plug[a:opt])) || + \ !isdirectory(a:plug.dir) || + \ len(s:glob(s:rtp(a:plug), 'plugin')) || + \ len(s:glob(s:rtp(a:plug), 'after/plugin'))) +endfunction + +function! plug#end() + if !exists('g:plugs') + return s:err('plug#end() called without calling plug#begin() first') + endif + + if exists('#PlugLOD') + augroup PlugLOD + autocmd! + augroup END + augroup! PlugLOD + endif + let lod = { 'ft': {}, 'map': {}, 'cmd': {} } + + if exists('g:did_load_filetypes') + filetype off + endif + for name in g:plugs_order + if !has_key(g:plugs, name) + continue + endif + let plug = g:plugs[name] + if get(s:loaded, name, 0) || !s:lazy(plug, 'on') && !s:lazy(plug, 'for') + let s:loaded[name] = 1 + continue + endif + + if has_key(plug, 'on') + let s:triggers[name] = { 'map': [], 'cmd': [] } + for cmd in s:to_a(plug.on) + if cmd =~? '^<Plug>.\+' + if empty(mapcheck(cmd)) && empty(mapcheck(cmd, 'i')) + call s:assoc(lod.map, cmd, name) + endif + call add(s:triggers[name].map, cmd) + elseif cmd =~# '^[A-Z]' + let cmd = substitute(cmd, '!*$', '', '') + if exists(':'.cmd) != 2 + call s:assoc(lod.cmd, cmd, name) + endif + call add(s:triggers[name].cmd, cmd) + else + call s:err('Invalid `on` option: '.cmd. + \ '. Should start with an uppercase letter or `<Plug>`.') + endif + endfor + endif + + if has_key(plug, 'for') + let types = s:to_a(plug.for) + if !empty(types) + augroup filetypedetect + call s:source(s:rtp(plug), 'ftdetect/**/*.vim', 'after/ftdetect/**/*.vim') + augroup END + endif + for type in types + call s:assoc(lod.ft, type, name) + endfor + endif + endfor + + for [cmd, names] in items(lod.cmd) + execute printf( + \ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, %s)', + \ cmd, string(cmd), string(names)) + endfor + + for [map, names] in items(lod.map) + for [mode, map_prefix, key_prefix] in + \ [['i', '<C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']] + execute printf( + \ '%snoremap <silent> %s %s:<C-U>call <SID>lod_map(%s, %s, %s, "%s")<CR>', + \ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix) + endfor + endfor + + for [ft, names] in items(lod.ft) + augroup PlugLOD + execute printf('autocmd FileType %s call <SID>lod_ft(%s, %s)', + \ ft, string(ft), string(names)) + augroup END + endfor + + call s:reorg_rtp() + filetype plugin indent on + if has('vim_starting') + if has('syntax') && !exists('g:syntax_on') + syntax enable + end + else + call s:reload_plugins() + endif +endfunction + +function! s:loaded_names() + return filter(copy(g:plugs_order), 'get(s:loaded, v:val, 0)') +endfunction + +function! s:load_plugin(spec) + call s:source(s:rtp(a:spec), 'plugin/**/*.vim', 'after/plugin/**/*.vim') +endfunction + +function! s:reload_plugins() + for name in s:loaded_names() + call s:load_plugin(g:plugs[name]) + endfor +endfunction + +function! s:trim(str) + return substitute(a:str, '[\/]\+$', '', '') +endfunction + +function! s:version_requirement(val, min) + for idx in range(0, len(a:min) - 1) + let v = get(a:val, idx, 0) + if v < a:min[idx] | return 0 + elseif v > a:min[idx] | return 1 + endif + endfor + return 1 +endfunction + +function! s:git_version_requirement(...) + if !exists('s:git_version') + let s:git_version = map(split(split(s:system(['git', '--version']))[2], '\.'), 'str2nr(v:val)') + endif + return s:version_requirement(s:git_version, a:000) +endfunction + +function! s:progress_opt(base) + return a:base && !s:is_win && + \ s:git_version_requirement(1, 7, 1) ? '--progress' : '' +endfunction + +function! s:rtp(spec) + return s:path(a:spec.dir . get(a:spec, 'rtp', '')) +endfunction + +if s:is_win + function! s:path(path) + return s:trim(substitute(a:path, '/', '\', 'g')) + endfunction + + function! s:dirpath(path) + return s:path(a:path) . '\' + endfunction + + function! s:is_local_plug(repo) + return a:repo =~? '^[a-z]:\|^[%~]' + endfunction + + " Copied from fzf + function! s:wrap_cmds(cmds) + let cmds = [ + \ '@echo off', + \ 'setlocal enabledelayedexpansion'] + \ + (type(a:cmds) == type([]) ? a:cmds : [a:cmds]) + \ + ['endlocal'] + if has('iconv') + if !exists('s:codepage') + let s:codepage = libcallnr('kernel32.dll', 'GetACP', 0) + endif + return map(cmds, printf('iconv(v:val."\r", "%s", "cp%d")', &encoding, s:codepage)) + endif + return map(cmds, 'v:val."\r"') + endfunction + + function! s:batchfile(cmd) + let batchfile = s:plug_tempname().'.bat' + call writefile(s:wrap_cmds(a:cmd), batchfile) + let cmd = plug#shellescape(batchfile, {'shell': &shell, 'script': 0}) + if &shell =~# 'powershell\.exe' + let cmd = '& ' . cmd + endif + return [batchfile, cmd] + endfunction +else + function! s:path(path) + return s:trim(a:path) + endfunction + + function! s:dirpath(path) + return substitute(a:path, '[/\\]*$', '/', '') + endfunction + + function! s:is_local_plug(repo) + return a:repo[0] =~ '[/$~]' + endfunction +endif + +function! s:err(msg) + echohl ErrorMsg + echom '[vim-plug] '.a:msg + echohl None +endfunction + +function! s:warn(cmd, msg) + echohl WarningMsg + execute a:cmd 'a:msg' + echohl None +endfunction + +function! s:esc(path) + return escape(a:path, ' ') +endfunction + +function! s:escrtp(path) + return escape(a:path, ' ,') +endfunction + +function! s:remove_rtp() + for name in s:loaded_names() + let rtp = s:rtp(g:plugs[name]) + execute 'set rtp-='.s:escrtp(rtp) + let after = globpath(rtp, 'after') + if isdirectory(after) + execute 'set rtp-='.s:escrtp(after) + endif + endfor +endfunction + +function! s:reorg_rtp() + if !empty(s:first_rtp) + execute 'set rtp-='.s:first_rtp + execute 'set rtp-='.s:last_rtp + endif + + " &rtp is modified from outside + if exists('s:prtp') && s:prtp !=# &rtp + call s:remove_rtp() + unlet! s:middle + endif + + let s:middle = get(s:, 'middle', &rtp) + let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])') + let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), '!empty(v:val)') + let rtp = join(map(rtps, 'escape(v:val, ",")'), ',') + \ . ','.s:middle.',' + \ . join(map(afters, 'escape(v:val, ",")'), ',') + let &rtp = substitute(substitute(rtp, ',,*', ',', 'g'), '^,\|,$', '', 'g') + let s:prtp = &rtp + + if !empty(s:first_rtp) + execute 'set rtp^='.s:first_rtp + execute 'set rtp+='.s:last_rtp + endif +endfunction + +function! s:doautocmd(...) + if exists('#'.join(a:000, '#')) + execute 'doautocmd' ((v:version > 703 || has('patch442')) ? '<nomodeline>' : '') join(a:000) + endif +endfunction + +function! s:dobufread(names) + for name in a:names + let path = s:rtp(g:plugs[name]) + for dir in ['ftdetect', 'ftplugin', 'after/ftdetect', 'after/ftplugin'] + if len(finddir(dir, path)) + if exists('#BufRead') + doautocmd BufRead + endif + return + endif + endfor + endfor +endfunction + +function! plug#load(...) + if a:0 == 0 + return s:err('Argument missing: plugin name(s) required') + endif + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + let names = a:0 == 1 && type(a:1) == s:TYPE.list ? a:1 : a:000 + let unknowns = filter(copy(names), '!has_key(g:plugs, v:val)') + if !empty(unknowns) + let s = len(unknowns) > 1 ? 's' : '' + return s:err(printf('Unknown plugin%s: %s', s, join(unknowns, ', '))) + end + let unloaded = filter(copy(names), '!get(s:loaded, v:val, 0)') + if !empty(unloaded) + for name in unloaded + call s:lod([name], ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + endfor + call s:dobufread(unloaded) + return 1 + end + return 0 +endfunction + +function! s:remove_triggers(name) + if !has_key(s:triggers, a:name) + return + endif + for cmd in s:triggers[a:name].cmd + execute 'silent! delc' cmd + endfor + for map in s:triggers[a:name].map + execute 'silent! unmap' map + execute 'silent! iunmap' map + endfor + call remove(s:triggers, a:name) +endfunction + +function! s:lod(names, types, ...) + for name in a:names + call s:remove_triggers(name) + let s:loaded[name] = 1 + endfor + call s:reorg_rtp() + + for name in a:names + let rtp = s:rtp(g:plugs[name]) + for dir in a:types + call s:source(rtp, dir.'/**/*.vim') + endfor + if a:0 + if !s:source(rtp, a:1) && !empty(s:glob(rtp, a:2)) + execute 'runtime' a:1 + endif + call s:source(rtp, a:2) + endif + call s:doautocmd('User', name) + endfor +endfunction + +function! s:lod_ft(pat, names) + let syn = 'syntax/'.a:pat.'.vim' + call s:lod(a:names, ['plugin', 'after/plugin'], syn, 'after/'.syn) + execute 'autocmd! PlugLOD FileType' a:pat + call s:doautocmd('filetypeplugin', 'FileType') + call s:doautocmd('filetypeindent', 'FileType') +endfunction + +function! s:lod_cmd(cmd, bang, l1, l2, args, names) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args) +endfunction + +function! s:lod_map(map, names, with_prefix, prefix) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + let extra = '' + while 1 + let c = getchar(0) + if c == 0 + break + endif + let extra .= nr2char(c) + endwhile + + if a:with_prefix + let prefix = v:count ? v:count : '' + let prefix .= '"'.v:register.a:prefix + if mode(1) == 'no' + if v:operator == 'c' + let prefix = "\<esc>" . prefix + endif + let prefix .= v:operator + endif + call feedkeys(prefix, 'n') + endif + call feedkeys(substitute(a:map, '^<Plug>', "\<Plug>", '') . extra) +endfunction + +function! plug#(repo, ...) + if a:0 > 1 + return s:err('Invalid number of arguments (1..2)') + endif + + try + let repo = s:trim(a:repo) + let opts = a:0 == 1 ? s:parse_options(a:1) : s:base_spec + let name = get(opts, 'as', s:plug_fnamemodify(repo, ':t:s?\.git$??')) + let spec = extend(s:infer_properties(name, repo), opts) + if !has_key(g:plugs, name) + call add(g:plugs_order, name) + endif + let g:plugs[name] = spec + let s:loaded[name] = get(s:loaded, name, 0) + catch + return s:err(v:exception) + endtry +endfunction + +function! s:parse_options(arg) + let opts = copy(s:base_spec) + let type = type(a:arg) + if type == s:TYPE.string + let opts.tag = a:arg + elseif type == s:TYPE.dict + call extend(opts, a:arg) + if has_key(opts, 'dir') + let opts.dir = s:dirpath(s:plug_expand(opts.dir)) + endif + else + throw 'Invalid argument type (expected: string or dictionary)' + endif + return opts +endfunction + +function! s:infer_properties(name, repo) + let repo = a:repo + if s:is_local_plug(repo) + return { 'dir': s:dirpath(s:plug_expand(repo)) } + else + if repo =~ ':' + let uri = repo + else + if repo !~ '/' + throw printf('Invalid argument: %s (implicit `vim-scripts'' expansion is deprecated)', repo) + endif + let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git') + let uri = printf(fmt, repo) + endif + return { 'dir': s:dirpath(g:plug_home.'/'.a:name), 'uri': uri } + endif +endfunction + +function! s:install(force, names) + call s:update_impl(0, a:force, a:names) +endfunction + +function! s:update(force, names) + call s:update_impl(1, a:force, a:names) +endfunction + +function! plug#helptags() + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + for spec in values(g:plugs) + let docd = join([s:rtp(spec), 'doc'], '/') + if isdirectory(docd) + silent! execute 'helptags' s:esc(docd) + endif + endfor + return 1 +endfunction + +function! s:syntax() + syntax clear + syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber + syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX + syn match plugNumber /[0-9]\+[0-9.]*/ contained + syn match plugBracket /[[\]]/ contained + syn match plugX /x/ contained + syn match plugDash /^-/ + syn match plugPlus /^+/ + syn match plugStar /^*/ + syn match plugMessage /\(^- \)\@<=.*/ + syn match plugName /\(^- \)\@<=[^ ]*:/ + syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/ + syn match plugTag /(tag: [^)]\+)/ + syn match plugInstall /\(^+ \)\@<=[^:]*/ + syn match plugUpdate /\(^* \)\@<=[^:]*/ + syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag + syn match plugEdge /^ \X\+$/ + syn match plugEdge /^ \X*/ contained nextgroup=plugSha + syn match plugSha /[0-9a-f]\{7,9}/ contained + syn match plugRelDate /([^)]*)$/ contained + syn match plugNotLoaded /(not loaded)$/ + syn match plugError /^x.*/ + syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/ + syn match plugH2 /^.*:\n-\+$/ + syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean + hi def link plug1 Title + hi def link plug2 Repeat + hi def link plugH2 Type + hi def link plugX Exception + hi def link plugBracket Structure + hi def link plugNumber Number + + hi def link plugDash Special + hi def link plugPlus Constant + hi def link plugStar Boolean + + hi def link plugMessage Function + hi def link plugName Label + hi def link plugInstall Function + hi def link plugUpdate Type + + hi def link plugError Error + hi def link plugDeleted Ignore + hi def link plugRelDate Comment + hi def link plugEdge PreProc + hi def link plugSha Identifier + hi def link plugTag Constant + + hi def link plugNotLoaded Comment +endfunction + +function! s:lpad(str, len) + return a:str . repeat(' ', a:len - len(a:str)) +endfunction + +function! s:lines(msg) + return split(a:msg, "[\r\n]") +endfunction + +function! s:lastline(msg) + return get(s:lines(a:msg), -1, '') +endfunction + +function! s:new_window() + execute get(g:, 'plug_window', 'vertical topleft new') +endfunction + +function! s:plug_window_exists() + let buflist = tabpagebuflist(s:plug_tab) + return !empty(buflist) && index(buflist, s:plug_buf) >= 0 +endfunction + +function! s:switch_in() + if !s:plug_window_exists() + return 0 + endif + + if winbufnr(0) != s:plug_buf + let s:pos = [tabpagenr(), winnr(), winsaveview()] + execute 'normal!' s:plug_tab.'gt' + let winnr = bufwinnr(s:plug_buf) + execute winnr.'wincmd w' + call add(s:pos, winsaveview()) + else + let s:pos = [winsaveview()] + endif + + setlocal modifiable + return 1 +endfunction + +function! s:switch_out(...) + call winrestview(s:pos[-1]) + setlocal nomodifiable + if a:0 > 0 + execute a:1 + endif + + if len(s:pos) > 1 + execute 'normal!' s:pos[0].'gt' + execute s:pos[1] 'wincmd w' + call winrestview(s:pos[2]) + endif +endfunction + +function! s:finish_bindings() + nnoremap <silent> <buffer> R :call <SID>retry()<cr> + nnoremap <silent> <buffer> D :PlugDiff<cr> + nnoremap <silent> <buffer> S :PlugStatus<cr> + nnoremap <silent> <buffer> U :call <SID>status_update()<cr> + xnoremap <silent> <buffer> U :call <SID>status_update()<cr> + nnoremap <silent> <buffer> ]] :silent! call <SID>section('')<cr> + nnoremap <silent> <buffer> [[ :silent! call <SID>section('b')<cr> +endfunction + +function! s:prepare(...) + if empty(s:plug_getcwd()) + throw 'Invalid current working directory. Cannot proceed.' + endif + + for evar in ['$GIT_DIR', '$GIT_WORK_TREE'] + if exists(evar) + throw evar.' detected. Cannot proceed.' + endif + endfor + + call s:job_abort() + if s:switch_in() + if b:plug_preview == 1 + pc + endif + enew + else + call s:new_window() + endif + + nnoremap <silent> <buffer> q :if b:plug_preview==1<bar>pc<bar>endif<bar>bd<cr> + if a:0 == 0 + call s:finish_bindings() + endif + let b:plug_preview = -1 + let s:plug_tab = tabpagenr() + let s:plug_buf = winbufnr(0) + call s:assign_name() + + for k in ['<cr>', 'L', 'o', 'X', 'd', 'dd'] + execute 'silent! unmap <buffer>' k + endfor + setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline modifiable nospell + if exists('+colorcolumn') + setlocal colorcolumn= + endif + setf vim-plug + if exists('g:syntax_on') + call s:syntax() + endif +endfunction + +function! s:assign_name() + " Assign buffer name + let prefix = '[Plugins]' + let name = prefix + let idx = 2 + while bufexists(name) + let name = printf('%s (%s)', prefix, idx) + let idx = idx + 1 + endwhile + silent! execute 'f' fnameescape(name) +endfunction + +function! s:chsh(swap) + let prev = [&shell, &shellcmdflag, &shellredir] + if !s:is_win + set shell=sh + endif + if a:swap + if &shell =~# 'powershell\.exe' || &shell =~# 'pwsh$' + let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s' + elseif &shell =~# 'sh' || &shell =~# 'cmd\.exe' + set shellredir=>%s\ 2>&1 + endif + endif + return prev +endfunction + +function! s:bang(cmd, ...) + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(a:0) + " FIXME: Escaping is incomplete. We could use shellescape with eval, + " but it won't work on Windows. + let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd + if s:is_win + let [batchfile, cmd] = s:batchfile(cmd) + endif + let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%') + execute "normal! :execute g:_plug_bang\<cr>\<cr>" + finally + unlet g:_plug_bang + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry + return v:shell_error ? 'Exit status: ' . v:shell_error : '' +endfunction + +function! s:regress_bar() + let bar = substitute(getline(2)[1:-2], '.*\zs=', 'x', '') + call s:progress_bar(2, bar, len(bar)) +endfunction + +function! s:is_updated(dir) + return !empty(s:system_chomp(['git', 'log', '--pretty=format:%h', 'HEAD...HEAD@{1}'], a:dir)) +endfunction + +function! s:do(pull, force, todo) + for [name, spec] in items(a:todo) + if !isdirectory(spec.dir) + continue + endif + let installed = has_key(s:update.new, name) + let updated = installed ? 0 : + \ (a:pull && index(s:update.errors, name) < 0 && s:is_updated(spec.dir)) + if a:force || installed || updated + execute 'cd' s:esc(spec.dir) + call append(3, '- Post-update hook for '. name .' ... ') + let error = '' + let type = type(spec.do) + if type == s:TYPE.string + if spec.do[0] == ':' + if !get(s:loaded, name, 0) + let s:loaded[name] = 1 + call s:reorg_rtp() + endif + call s:load_plugin(spec) + try + execute spec.do[1:] + catch + let error = v:exception + endtry + if !s:plug_window_exists() + cd - + throw 'Warning: vim-plug was terminated by the post-update hook of '.name + endif + else + let error = s:bang(spec.do) + endif + elseif type == s:TYPE.funcref + try + let status = installed ? 'installed' : (updated ? 'updated' : 'unchanged') + call spec.do({ 'name': name, 'status': status, 'force': a:force }) + catch + let error = v:exception + endtry + else + let error = 'Invalid hook type' + endif + call s:switch_in() + call setline(4, empty(error) ? (getline(4) . 'OK') + \ : ('x' . getline(4)[1:] . error)) + if !empty(error) + call add(s:update.errors, name) + call s:regress_bar() + endif + cd - + endif + endfor +endfunction + +function! s:hash_match(a, b) + return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0 +endfunction + +function! s:checkout(spec) + let sha = a:spec.commit + let output = s:system(['git', 'rev-parse', 'HEAD'], a:spec.dir) + if !v:shell_error && !s:hash_match(sha, s:lines(output)[0]) + let output = s:system( + \ 'git fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir) + endif + return output +endfunction + +function! s:finish(pull) + let new_frozen = len(filter(keys(s:update.new), 'g:plugs[v:val].frozen')) + if new_frozen + let s = new_frozen > 1 ? 's' : '' + call append(3, printf('- Installed %d frozen plugin%s', new_frozen, s)) + endif + call append(3, '- Finishing ... ') | 4 + redraw + call plug#helptags() + call plug#end() + call setline(4, getline(4) . 'Done!') + redraw + let msgs = [] + if !empty(s:update.errors) + call add(msgs, "Press 'R' to retry.") + endif + if a:pull && len(s:update.new) < len(filter(getline(5, '$'), + \ "v:val =~ '^- ' && v:val !~# 'Already up.to.date'")) + call add(msgs, "Press 'D' to see the updated changes.") + endif + echo join(msgs, ' ') + call s:finish_bindings() +endfunction + +function! s:retry() + if empty(s:update.errors) + return + endif + echo + call s:update_impl(s:update.pull, s:update.force, + \ extend(copy(s:update.errors), [s:update.threads])) +endfunction + +function! s:is_managed(name) + return has_key(g:plugs[a:name], 'uri') +endfunction + +function! s:names(...) + return sort(filter(keys(g:plugs), 'stridx(v:val, a:1) == 0 && s:is_managed(v:val)')) +endfunction + +function! s:check_ruby() + silent! ruby require 'thread'; VIM::command("let g:plug_ruby = '#{RUBY_VERSION}'") + if !exists('g:plug_ruby') + redraw! + return s:warn('echom', 'Warning: Ruby interface is broken') + endif + let ruby_version = split(g:plug_ruby, '\.') + unlet g:plug_ruby + return s:version_requirement(ruby_version, [1, 8, 7]) +endfunction + +function! s:update_impl(pull, force, args) abort + let sync = index(a:args, '--sync') >= 0 || has('vim_starting') + let args = filter(copy(a:args), 'v:val != "--sync"') + let threads = (len(args) > 0 && args[-1] =~ '^[1-9][0-9]*$') ? + \ remove(args, -1) : get(g:, 'plug_threads', 16) + + let managed = filter(copy(g:plugs), 's:is_managed(v:key)') + let todo = empty(args) ? filter(managed, '!v:val.frozen || !isdirectory(v:val.dir)') : + \ filter(managed, 'index(args, v:key) >= 0') + + if empty(todo) + return s:warn('echo', 'No plugin to '. (a:pull ? 'update' : 'install')) + endif + + if !s:is_win && s:git_version_requirement(2, 3) + let s:git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : '' + let $GIT_TERMINAL_PROMPT = 0 + for plug in values(todo) + let plug.uri = substitute(plug.uri, + \ '^https://git::@github\.com', 'https://github.com', '') + endfor + endif + + if !isdirectory(g:plug_home) + try + call mkdir(g:plug_home, 'p') + catch + return s:err(printf('Invalid plug directory: %s. '. + \ 'Try to call plug#begin with a valid directory', g:plug_home)) + endtry + endif + + if has('nvim') && !exists('*jobwait') && threads > 1 + call s:warn('echom', '[vim-plug] Update Neovim for parallel installer') + endif + + let use_job = s:nvim || s:vim8 + let python = (has('python') || has('python3')) && !use_job + let ruby = has('ruby') && !use_job && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && threads > 1 && s:check_ruby() + + let s:update = { + \ 'start': reltime(), + \ 'all': todo, + \ 'todo': copy(todo), + \ 'errors': [], + \ 'pull': a:pull, + \ 'force': a:force, + \ 'new': {}, + \ 'threads': (python || ruby || use_job) ? min([len(todo), threads]) : 1, + \ 'bar': '', + \ 'fin': 0 + \ } + + call s:prepare(1) + call append(0, ['', '']) + normal! 2G + silent! redraw + + let s:clone_opt = [] + if get(g:, 'plug_shallow', 1) + call extend(s:clone_opt, ['--depth', '1']) + if s:git_version_requirement(1, 7, 10) + call add(s:clone_opt, '--no-single-branch') + endif + endif + + if has('win32unix') || has('wsl') + call extend(s:clone_opt, ['-c', 'core.eol=lf', '-c', 'core.autocrlf=input']) + endif + + let s:submodule_opt = s:git_version_requirement(2, 8) ? ' --jobs='.threads : '' + + " Python version requirement (>= 2.7) + if python && !has('python3') && !ruby && !use_job && s:update.threads > 1 + redir => pyv + silent python import platform; print platform.python_version() + redir END + let python = s:version_requirement( + \ map(split(split(pyv)[0], '\.'), 'str2nr(v:val)'), [2, 6]) + endif + + if (python || ruby) && s:update.threads > 1 + try + let imd = &imd + if s:mac_gui + set noimd + endif + if ruby + call s:update_ruby() + else + call s:update_python() + endif + catch + let lines = getline(4, '$') + let printed = {} + silent! 4,$d _ + for line in lines + let name = s:extract_name(line, '.', '') + if empty(name) || !has_key(printed, name) + call append('$', line) + if !empty(name) + let printed[name] = 1 + if line[0] == 'x' && index(s:update.errors, name) < 0 + call add(s:update.errors, name) + end + endif + endif + endfor + finally + let &imd = imd + call s:update_finish() + endtry + else + call s:update_vim() + while use_job && sync + sleep 100m + if s:update.fin + break + endif + endwhile + endif +endfunction + +function! s:log4(name, msg) + call setline(4, printf('- %s (%s)', a:msg, a:name)) + redraw +endfunction + +function! s:update_finish() + if exists('s:git_terminal_prompt') + let $GIT_TERMINAL_PROMPT = s:git_terminal_prompt + endif + if s:switch_in() + call append(3, '- Updating ...') | 4 + for [name, spec] in items(filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && (s:update.force || s:update.pull || has_key(s:update.new, v:key))')) + let [pos, _] = s:logpos(name) + if !pos + continue + endif + if has_key(spec, 'commit') + call s:log4(name, 'Checking out '.spec.commit) + let out = s:checkout(spec) + elseif has_key(spec, 'tag') + let tag = spec.tag + if tag =~ '\*' + let tags = s:lines(s:system('git tag --list '.plug#shellescape(tag).' --sort -version:refname 2>&1', spec.dir)) + if !v:shell_error && !empty(tags) + let tag = tags[0] + call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag)) + call append(3, '') + endif + endif + call s:log4(name, 'Checking out '.tag) + let out = s:system('git checkout -q '.plug#shellescape(tag).' -- 2>&1', spec.dir) + else + let branch = get(spec, 'branch', 'master') + call s:log4(name, 'Merging origin/'.s:esc(branch)) + let out = s:system('git checkout -q '.plug#shellescape(branch).' -- 2>&1' + \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only '.plug#shellescape('origin/'.branch).' 2>&1')), spec.dir) + endif + if !v:shell_error && filereadable(spec.dir.'/.gitmodules') && + \ (s:update.force || has_key(s:update.new, name) || s:is_updated(spec.dir)) + call s:log4(name, 'Updating submodules. This may take a while.') + let out .= s:bang('git submodule update --init --recursive'.s:submodule_opt.' 2>&1', spec.dir) + endif + let msg = s:format_message(v:shell_error ? 'x': '-', name, out) + if v:shell_error + call add(s:update.errors, name) + call s:regress_bar() + silent execute pos 'd _' + call append(4, msg) | 4 + elseif !empty(out) + call setline(pos, msg[0]) + endif + redraw + endfor + silent 4 d _ + try + call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && has_key(v:val, "do")')) + catch + call s:warn('echom', v:exception) + call s:warn('echo', '') + return + endtry + call s:finish(s:update.pull) + call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') + call s:switch_out('normal! gg') + endif +endfunction + +function! s:job_abort() + if (!s:nvim && !s:vim8) || !exists('s:jobs') + return + endif + + for [name, j] in items(s:jobs) + if s:nvim + silent! call jobstop(j.jobid) + elseif s:vim8 + silent! call job_stop(j.jobid) + endif + if j.new + call s:rm_rf(g:plugs[name].dir) + endif + endfor + let s:jobs = {} +endfunction + +function! s:last_non_empty_line(lines) + let len = len(a:lines) + for idx in range(len) + let line = a:lines[len-idx-1] + if !empty(line) + return line + endif + endfor + return '' +endfunction + +function! s:job_out_cb(self, data) abort + let self = a:self + let data = remove(self.lines, -1) . a:data + let lines = map(split(data, "\n", 1), 'split(v:val, "\r", 1)[-1]') + call extend(self.lines, lines) + " To reduce the number of buffer updates + let self.tick = get(self, 'tick', -1) + 1 + if !self.running || self.tick % len(s:jobs) == 0 + let bullet = self.running ? (self.new ? '+' : '*') : (self.error ? 'x' : '-') + let result = self.error ? join(self.lines, "\n") : s:last_non_empty_line(self.lines) + call s:log(bullet, self.name, result) + endif +endfunction + +function! s:job_exit_cb(self, data) abort + let a:self.running = 0 + let a:self.error = a:data != 0 + call s:reap(a:self.name) + call s:tick() +endfunction + +function! s:job_cb(fn, job, ch, data) + if !s:plug_window_exists() " plug window closed + return s:job_abort() + endif + call call(a:fn, [a:job, a:data]) +endfunction + +function! s:nvim_cb(job_id, data, event) dict abort + return (a:event == 'stdout' || a:event == 'stderr') ? + \ s:job_cb('s:job_out_cb', self, 0, join(a:data, "\n")) : + \ s:job_cb('s:job_exit_cb', self, 0, a:data) +endfunction + +function! s:spawn(name, cmd, opts) + let job = { 'name': a:name, 'running': 1, 'error': 0, 'lines': [''], + \ 'new': get(a:opts, 'new', 0) } + let s:jobs[a:name] = job + + if s:nvim + if has_key(a:opts, 'dir') + let job.cwd = a:opts.dir + endif + let argv = a:cmd + call extend(job, { + \ 'on_stdout': function('s:nvim_cb'), + \ 'on_stderr': function('s:nvim_cb'), + \ 'on_exit': function('s:nvim_cb'), + \ }) + let jid = s:plug_call('jobstart', argv, job) + if jid > 0 + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = [jid < 0 ? argv[0].' is not executable' : + \ 'Invalid arguments (or job table is full)'] + endif + elseif s:vim8 + let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"script": 0})')) + if has_key(a:opts, 'dir') + let cmd = s:with_cd(cmd, a:opts.dir, 0) + endif + let argv = s:is_win ? ['cmd', '/s', '/c', '"'.cmd.'"'] : ['sh', '-c', cmd] + let jid = job_start(s:is_win ? join(argv, ' ') : argv, { + \ 'out_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'err_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'exit_cb': function('s:job_cb', ['s:job_exit_cb', job]), + \ 'err_mode': 'raw', + \ 'out_mode': 'raw' + \}) + if job_status(jid) == 'run' + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = ['Failed to start job'] + endif + else + let job.lines = s:lines(call('s:system', has_key(a:opts, 'dir') ? [a:cmd, a:opts.dir] : [a:cmd])) + let job.error = v:shell_error != 0 + let job.running = 0 + endif +endfunction + +function! s:reap(name) + let job = s:jobs[a:name] + if job.error + call add(s:update.errors, a:name) + elseif get(job, 'new', 0) + let s:update.new[a:name] = 1 + endif + let s:update.bar .= job.error ? 'x' : '=' + + let bullet = job.error ? 'x' : '-' + let result = job.error ? join(job.lines, "\n") : s:last_non_empty_line(job.lines) + call s:log(bullet, a:name, empty(result) ? 'OK' : result) + call s:bar() + + call remove(s:jobs, a:name) +endfunction + +function! s:bar() + if s:switch_in() + let total = len(s:update.all) + call setline(1, (s:update.pull ? 'Updating' : 'Installing'). + \ ' plugins ('.len(s:update.bar).'/'.total.')') + call s:progress_bar(2, s:update.bar, total) + call s:switch_out() + endif +endfunction + +function! s:logpos(name) + let max = line('$') + for i in range(4, max > 4 ? max : 4) + if getline(i) =~# '^[-+x*] '.a:name.':' + for j in range(i + 1, max > 5 ? max : 5) + if getline(j) !~ '^ ' + return [i, j - 1] + endif + endfor + return [i, i] + endif + endfor + return [0, 0] +endfunction + +function! s:log(bullet, name, lines) + if s:switch_in() + let [b, e] = s:logpos(a:name) + if b > 0 + silent execute printf('%d,%d d _', b, e) + if b > winheight('.') + let b = 4 + endif + else + let b = 4 + endif + " FIXME For some reason, nomodifiable is set after :d in vim8 + setlocal modifiable + call append(b - 1, s:format_message(a:bullet, a:name, a:lines)) + call s:switch_out() + endif +endfunction + +function! s:update_vim() + let s:jobs = {} + + call s:bar() + call s:tick() +endfunction + +function! s:tick() + let pull = s:update.pull + let prog = s:progress_opt(s:nvim || s:vim8) +while 1 " Without TCO, Vim stack is bound to explode + if empty(s:update.todo) + if empty(s:jobs) && !s:update.fin + call s:update_finish() + let s:update.fin = 1 + endif + return + endif + + let name = keys(s:update.todo)[0] + let spec = remove(s:update.todo, name) + let new = empty(globpath(spec.dir, '.git', 1)) + + call s:log(new ? '+' : '*', name, pull ? 'Updating ...' : 'Installing ...') + redraw + + let has_tag = has_key(spec, 'tag') + if !new + let [error, _] = s:git_validate(spec, 0) + if empty(error) + if pull + let cmd = ['git', 'fetch'] + if has_tag && !empty(globpath(spec.dir, '.git/shallow')) + call extend(cmd, ['--depth', '99999999']) + endif + if !empty(prog) + call add(cmd, prog) + endif + call s:spawn(name, cmd, { 'dir': spec.dir }) + else + let s:jobs[name] = { 'running': 0, 'lines': ['Already installed'], 'error': 0 } + endif + else + let s:jobs[name] = { 'running': 0, 'lines': s:lines(error), 'error': 1 } + endif + else + let cmd = ['git', 'clone'] + if !has_tag + call extend(cmd, s:clone_opt) + endif + if !empty(prog) + call add(cmd, prog) + endif + call s:spawn(name, extend(cmd, [spec.uri, s:trim(spec.dir)]), { 'new': 1 }) + endif + + if !s:jobs[name].running + call s:reap(name) + endif + if len(s:jobs) >= s:update.threads + break + endif +endwhile +endfunction + +function! s:update_python() +let py_exe = has('python') ? 'python' : 'python3' +execute py_exe "<< EOF" +import datetime +import functools +import os +try: + import queue +except ImportError: + import Queue as queue +import random +import re +import shutil +import signal +import subprocess +import tempfile +import threading as thr +import time +import traceback +import vim + +G_NVIM = vim.eval("has('nvim')") == '1' +G_PULL = vim.eval('s:update.pull') == '1' +G_RETRIES = int(vim.eval('get(g:, "plug_retries", 2)')) + 1 +G_TIMEOUT = int(vim.eval('get(g:, "plug_timeout", 60)')) +G_CLONE_OPT = ' '.join(vim.eval('s:clone_opt')) +G_PROGRESS = vim.eval('s:progress_opt(1)') +G_LOG_PROB = 1.0 / int(vim.eval('s:update.threads')) +G_STOP = thr.Event() +G_IS_WIN = vim.eval('s:is_win') == '1' + +class PlugError(Exception): + def __init__(self, msg): + self.msg = msg +class CmdTimedOut(PlugError): + pass +class CmdFailed(PlugError): + pass +class InvalidURI(PlugError): + pass +class Action(object): + INSTALL, UPDATE, ERROR, DONE = ['+', '*', 'x', '-'] + +class Buffer(object): + def __init__(self, lock, num_plugs, is_pull): + self.bar = '' + self.event = 'Updating' if is_pull else 'Installing' + self.lock = lock + self.maxy = int(vim.eval('winheight(".")')) + self.num_plugs = num_plugs + + def __where(self, name): + """ Find first line with name in current buffer. Return line num. """ + found, lnum = False, 0 + matcher = re.compile('^[-+x*] {0}:'.format(name)) + for line in vim.current.buffer: + if matcher.search(line) is not None: + found = True + break + lnum += 1 + + if not found: + lnum = -1 + return lnum + + def header(self): + curbuf = vim.current.buffer + curbuf[0] = self.event + ' plugins ({0}/{1})'.format(len(self.bar), self.num_plugs) + + num_spaces = self.num_plugs - len(self.bar) + curbuf[1] = '[{0}{1}]'.format(self.bar, num_spaces * ' ') + + with self.lock: + vim.command('normal! 2G') + vim.command('redraw') + + def write(self, action, name, lines): + first, rest = lines[0], lines[1:] + msg = ['{0} {1}{2}{3}'.format(action, name, ': ' if first else '', first)] + msg.extend([' ' + line for line in rest]) + + try: + if action == Action.ERROR: + self.bar += 'x' + vim.command("call add(s:update.errors, '{0}')".format(name)) + elif action == Action.DONE: + self.bar += '=' + + curbuf = vim.current.buffer + lnum = self.__where(name) + if lnum != -1: # Found matching line num + del curbuf[lnum] + if lnum > self.maxy and action in set([Action.INSTALL, Action.UPDATE]): + lnum = 3 + else: + lnum = 3 + curbuf.append(msg, lnum) + + self.header() + except vim.error: + pass + +class Command(object): + CD = 'cd /d' if G_IS_WIN else 'cd' + + def __init__(self, cmd, cmd_dir=None, timeout=60, cb=None, clean=None): + self.cmd = cmd + if cmd_dir: + self.cmd = '{0} {1} && {2}'.format(Command.CD, cmd_dir, self.cmd) + self.timeout = timeout + self.callback = cb if cb else (lambda msg: None) + self.clean = clean if clean else (lambda: None) + self.proc = None + + @property + def alive(self): + """ Returns true only if command still running. """ + return self.proc and self.proc.poll() is None + + def execute(self, ntries=3): + """ Execute the command with ntries if CmdTimedOut. + Returns the output of the command if no Exception. + """ + attempt, finished, limit = 0, False, self.timeout + + while not finished: + try: + attempt += 1 + result = self.try_command() + finished = True + return result + except CmdTimedOut: + if attempt != ntries: + self.notify_retry() + self.timeout += limit + else: + raise + + def notify_retry(self): + """ Retry required for command, notify user. """ + for count in range(3, 0, -1): + if G_STOP.is_set(): + raise KeyboardInterrupt + msg = 'Timeout. Will retry in {0} second{1} ...'.format( + count, 's' if count != 1 else '') + self.callback([msg]) + time.sleep(1) + self.callback(['Retrying ...']) + + def try_command(self): + """ Execute a cmd & poll for callback. Returns list of output. + Raises CmdFailed -> return code for Popen isn't 0 + Raises CmdTimedOut -> command exceeded timeout without new output + """ + first_line = True + + try: + tfile = tempfile.NamedTemporaryFile(mode='w+b') + preexec_fn = not G_IS_WIN and os.setsid or None + self.proc = subprocess.Popen(self.cmd, stdout=tfile, + stderr=subprocess.STDOUT, + stdin=subprocess.PIPE, shell=True, + preexec_fn=preexec_fn) + thrd = thr.Thread(target=(lambda proc: proc.wait()), args=(self.proc,)) + thrd.start() + + thread_not_started = True + while thread_not_started: + try: + thrd.join(0.1) + thread_not_started = False + except RuntimeError: + pass + + while self.alive: + if G_STOP.is_set(): + raise KeyboardInterrupt + + if first_line or random.random() < G_LOG_PROB: + first_line = False + line = '' if G_IS_WIN else nonblock_read(tfile.name) + if line: + self.callback([line]) + + time_diff = time.time() - os.path.getmtime(tfile.name) + if time_diff > self.timeout: + raise CmdTimedOut(['Timeout!']) + + thrd.join(0.5) + + tfile.seek(0) + result = [line.decode('utf-8', 'replace').rstrip() for line in tfile] + + if self.proc.returncode != 0: + raise CmdFailed([''] + result) + + return result + except: + self.terminate() + raise + + def terminate(self): + """ Terminate process and cleanup. """ + if self.alive: + if G_IS_WIN: + os.kill(self.proc.pid, signal.SIGINT) + else: + os.killpg(self.proc.pid, signal.SIGTERM) + self.clean() + +class Plugin(object): + def __init__(self, name, args, buf_q, lock): + self.name = name + self.args = args + self.buf_q = buf_q + self.lock = lock + self.tag = args.get('tag', 0) + + def manage(self): + try: + if os.path.exists(self.args['dir']): + self.update() + else: + self.install() + with self.lock: + thread_vim_command("let s:update.new['{0}'] = 1".format(self.name)) + except PlugError as exc: + self.write(Action.ERROR, self.name, exc.msg) + except KeyboardInterrupt: + G_STOP.set() + self.write(Action.ERROR, self.name, ['Interrupted!']) + except: + # Any exception except those above print stack trace + msg = 'Trace:\n{0}'.format(traceback.format_exc().rstrip()) + self.write(Action.ERROR, self.name, msg.split('\n')) + raise + + def install(self): + target = self.args['dir'] + if target[-1] == '\\': + target = target[0:-1] + + def clean(target): + def _clean(): + try: + shutil.rmtree(target) + except OSError: + pass + return _clean + + self.write(Action.INSTALL, self.name, ['Installing ...']) + callback = functools.partial(self.write, Action.INSTALL, self.name) + cmd = 'git clone {0} {1} {2} {3} 2>&1'.format( + '' if self.tag else G_CLONE_OPT, G_PROGRESS, self.args['uri'], + esc(target)) + com = Command(cmd, None, G_TIMEOUT, callback, clean(target)) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + + def repo_uri(self): + cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url' + command = Command(cmd, self.args['dir'], G_TIMEOUT,) + result = command.execute(G_RETRIES) + return result[-1] + + def update(self): + actual_uri = self.repo_uri() + expect_uri = self.args['uri'] + regex = re.compile(r'^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$') + ma = regex.match(actual_uri) + mb = regex.match(expect_uri) + if ma is None or mb is None or ma.groups() != mb.groups(): + msg = ['', + 'Invalid URI: {0}'.format(actual_uri), + 'Expected {0}'.format(expect_uri), + 'PlugClean required.'] + raise InvalidURI(msg) + + if G_PULL: + self.write(Action.UPDATE, self.name, ['Updating ...']) + callback = functools.partial(self.write, Action.UPDATE, self.name) + fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else '' + cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS) + com = Command(cmd, self.args['dir'], G_TIMEOUT, callback) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + else: + self.write(Action.DONE, self.name, ['Already installed']) + + def write(self, action, name, msg): + self.buf_q.put((action, name, msg)) + +class PlugThread(thr.Thread): + def __init__(self, tname, args): + super(PlugThread, self).__init__() + self.tname = tname + self.args = args + + def run(self): + thr.current_thread().name = self.tname + buf_q, work_q, lock = self.args + + try: + while not G_STOP.is_set(): + name, args = work_q.get_nowait() + plug = Plugin(name, args, buf_q, lock) + plug.manage() + work_q.task_done() + except queue.Empty: + pass + +class RefreshThread(thr.Thread): + def __init__(self, lock): + super(RefreshThread, self).__init__() + self.lock = lock + self.running = True + + def run(self): + while self.running: + with self.lock: + thread_vim_command('noautocmd normal! a') + time.sleep(0.33) + + def stop(self): + self.running = False + +if G_NVIM: + def thread_vim_command(cmd): + vim.session.threadsafe_call(lambda: vim.command(cmd)) +else: + def thread_vim_command(cmd): + vim.command(cmd) + +def esc(name): + return '"' + name.replace('"', '\"') + '"' + +def nonblock_read(fname): + """ Read a file with nonblock flag. Return the last line. """ + fread = os.open(fname, os.O_RDONLY | os.O_NONBLOCK) + buf = os.read(fread, 100000).decode('utf-8', 'replace') + os.close(fread) + + line = buf.rstrip('\r\n') + left = max(line.rfind('\r'), line.rfind('\n')) + if left != -1: + left += 1 + line = line[left:] + + return line + +def main(): + thr.current_thread().name = 'main' + nthreads = int(vim.eval('s:update.threads')) + plugs = vim.eval('s:update.todo') + mac_gui = vim.eval('s:mac_gui') == '1' + + lock = thr.Lock() + buf = Buffer(lock, len(plugs), G_PULL) + buf_q, work_q = queue.Queue(), queue.Queue() + for work in plugs.items(): + work_q.put(work) + + start_cnt = thr.active_count() + for num in range(nthreads): + tname = 'PlugT-{0:02}'.format(num) + thread = PlugThread(tname, (buf_q, work_q, lock)) + thread.start() + if mac_gui: + rthread = RefreshThread(lock) + rthread.start() + + while not buf_q.empty() or thr.active_count() != start_cnt: + try: + action, name, msg = buf_q.get(True, 0.25) + buf.write(action, name, ['OK'] if not msg else msg) + buf_q.task_done() + except queue.Empty: + pass + except KeyboardInterrupt: + G_STOP.set() + + if mac_gui: + rthread.stop() + rthread.join() + +main() +EOF +endfunction + +function! s:update_ruby() + ruby << EOF + module PlugStream + SEP = ["\r", "\n", nil] + def get_line + buffer = '' + loop do + char = readchar rescue return + if SEP.include? char.chr + buffer << $/ + break + else + buffer << char + end + end + buffer + end + end unless defined?(PlugStream) + + def esc arg + %["#{arg.gsub('"', '\"')}"] + end + + def killall pid + pids = [pid] + if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM + pids.each { |pid| Process.kill 'INT', pid.to_i rescue nil } + else + unless `which pgrep 2> /dev/null`.empty? + children = pids + until children.empty? + children = children.map { |pid| + `pgrep -P #{pid}`.lines.map { |l| l.chomp } + }.flatten + pids += children + end + end + pids.each { |pid| Process.kill 'TERM', pid.to_i rescue nil } + end + end + + def compare_git_uri a, b + regex = %r{^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$} + regex.match(a).to_a.drop(1) == regex.match(b).to_a.drop(1) + end + + require 'thread' + require 'fileutils' + require 'timeout' + running = true + iswin = VIM::evaluate('s:is_win').to_i == 1 + pull = VIM::evaluate('s:update.pull').to_i == 1 + base = VIM::evaluate('g:plug_home') + all = VIM::evaluate('s:update.todo') + limit = VIM::evaluate('get(g:, "plug_timeout", 60)') + tries = VIM::evaluate('get(g:, "plug_retries", 2)') + 1 + nthr = VIM::evaluate('s:update.threads').to_i + maxy = VIM::evaluate('winheight(".")').to_i + vim7 = VIM::evaluate('v:version').to_i <= 703 && RUBY_PLATFORM =~ /darwin/ + cd = iswin ? 'cd /d' : 'cd' + tot = VIM::evaluate('len(s:update.todo)') || 0 + bar = '' + skip = 'Already installed' + mtx = Mutex.new + take1 = proc { mtx.synchronize { running && all.shift } } + logh = proc { + cnt = bar.length + $curbuf[1] = "#{pull ? 'Updating' : 'Installing'} plugins (#{cnt}/#{tot})" + $curbuf[2] = '[' + bar.ljust(tot) + ']' + VIM::command('normal! 2G') + VIM::command('redraw') + } + where = proc { |name| (1..($curbuf.length)).find { |l| $curbuf[l] =~ /^[-+x*] #{name}:/ } } + log = proc { |name, result, type| + mtx.synchronize do + ing = ![true, false].include?(type) + bar += type ? '=' : 'x' unless ing + b = case type + when :install then '+' when :update then '*' + when true, nil then '-' else + VIM::command("call add(s:update.errors, '#{name}')") + 'x' + end + result = + if type || type.nil? + ["#{b} #{name}: #{result.lines.to_a.last || 'OK'}"] + elsif result =~ /^Interrupted|^Timeout/ + ["#{b} #{name}: #{result}"] + else + ["#{b} #{name}"] + result.lines.map { |l| " " << l } + end + if lnum = where.call(name) + $curbuf.delete lnum + lnum = 4 if ing && lnum > maxy + end + result.each_with_index do |line, offset| + $curbuf.append((lnum || 4) - 1 + offset, line.gsub(/\e\[./, '').chomp) + end + logh.call + end + } + bt = proc { |cmd, name, type, cleanup| + tried = timeout = 0 + begin + tried += 1 + timeout += limit + fd = nil + data = '' + if iswin + Timeout::timeout(timeout) do + tmp = VIM::evaluate('tempname()') + system("(#{cmd}) > #{tmp}") + data = File.read(tmp).chomp + File.unlink tmp rescue nil + end + else + fd = IO.popen(cmd).extend(PlugStream) + first_line = true + log_prob = 1.0 / nthr + while line = Timeout::timeout(timeout) { fd.get_line } + data << line + log.call name, line.chomp, type if name && (first_line || rand < log_prob) + first_line = false + end + fd.close + end + [$? == 0, data.chomp] + rescue Timeout::Error, Interrupt => e + if fd && !fd.closed? + killall fd.pid + fd.close + end + cleanup.call if cleanup + if e.is_a?(Timeout::Error) && tried < tries + 3.downto(1) do |countdown| + s = countdown > 1 ? 's' : '' + log.call name, "Timeout. Will retry in #{countdown} second#{s} ...", type + sleep 1 + end + log.call name, 'Retrying ...', type + retry + end + [false, e.is_a?(Interrupt) ? "Interrupted!" : "Timeout!"] + end + } + main = Thread.current + threads = [] + watcher = Thread.new { + if vim7 + while VIM::evaluate('getchar(1)') + sleep 0.1 + end + else + require 'io/console' # >= Ruby 1.9 + nil until IO.console.getch == 3.chr + end + mtx.synchronize do + running = false + threads.each { |t| t.raise Interrupt } unless vim7 + end + threads.each { |t| t.join rescue nil } + main.kill + } + refresh = Thread.new { + while true + mtx.synchronize do + break unless running + VIM::command('noautocmd normal! a') + end + sleep 0.2 + end + } if VIM::evaluate('s:mac_gui') == 1 + + clone_opt = VIM::evaluate('s:clone_opt').join(' ') + progress = VIM::evaluate('s:progress_opt(1)') + nthr.times do + mtx.synchronize do + threads << Thread.new { + while pair = take1.call + name = pair.first + dir, uri, tag = pair.last.values_at *%w[dir uri tag] + exists = File.directory? dir + ok, result = + if exists + chdir = "#{cd} #{iswin ? dir : esc(dir)}" + ret, data = bt.call "#{chdir} && git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url", nil, nil, nil + current_uri = data.lines.to_a.last + if !ret + if data =~ /^Interrupted|^Timeout/ + [false, data] + else + [false, [data.chomp, "PlugClean required."].join($/)] + end + elsif !compare_git_uri(current_uri, uri) + [false, ["Invalid URI: #{current_uri}", + "Expected: #{uri}", + "PlugClean required."].join($/)] + else + if pull + log.call name, 'Updating ...', :update + fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : '' + bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil + else + [true, skip] + end + end + else + d = esc dir.sub(%r{[\\/]+$}, '') + log.call name, 'Installing ...', :install + bt.call "git clone #{clone_opt unless tag} #{progress} #{uri} #{d} 2>&1", name, :install, proc { + FileUtils.rm_rf dir + } + end + mtx.synchronize { VIM::command("let s:update.new['#{name}'] = 1") } if !exists && ok + log.call name, result, ok + end + } if running + end + end + threads.each { |t| t.join rescue nil } + logh.call + refresh.kill if refresh + watcher.kill +EOF +endfunction + +function! s:shellesc_cmd(arg, script) + let escaped = substitute('"'.a:arg.'"', '[&|<>()@^!"]', '^&', 'g') + return substitute(escaped, '%', (a:script ? '%' : '^') . '&', 'g') +endfunction + +function! s:shellesc_ps1(arg) + return "'".substitute(escape(a:arg, '\"'), "'", "''", 'g')."'" +endfunction + +function! s:shellesc_sh(arg) + return "'".substitute(a:arg, "'", "'\\\\''", 'g')."'" +endfunction + +" Escape the shell argument based on the shell. +" Vim and Neovim's shellescape() are insufficient. +" 1. shellslash determines whether to use single/double quotes. +" Double-quote escaping is fragile for cmd.exe. +" 2. It does not work for powershell. +" 3. It does not work for *sh shells if the command is executed +" via cmd.exe (ie. cmd.exe /c sh -c command command_args) +" 4. It does not support batchfile syntax. +" +" Accepts an optional dictionary with the following keys: +" - shell: same as Vim/Neovim 'shell' option. +" If unset, fallback to 'cmd.exe' on Windows or 'sh'. +" - script: If truthy and shell is cmd.exe, escape for batchfile syntax. +function! plug#shellescape(arg, ...) + if a:arg =~# '^[A-Za-z0-9_/:.-]\+$' + return a:arg + endif + let opts = a:0 > 0 && type(a:1) == s:TYPE.dict ? a:1 : {} + let shell = get(opts, 'shell', s:is_win ? 'cmd.exe' : 'sh') + let script = get(opts, 'script', 1) + if shell =~# 'cmd\.exe' + return s:shellesc_cmd(a:arg, script) + elseif shell =~# 'powershell\.exe' || shell =~# 'pwsh$' + return s:shellesc_ps1(a:arg) + endif + return s:shellesc_sh(a:arg) +endfunction + +function! s:glob_dir(path) + return map(filter(s:glob(a:path, '**'), 'isdirectory(v:val)'), 's:dirpath(v:val)') +endfunction + +function! s:progress_bar(line, bar, total) + call setline(a:line, '[' . s:lpad(a:bar, a:total) . ']') +endfunction + +function! s:compare_git_uri(a, b) + " See `git help clone' + " https:// [user@] github.com[:port] / junegunn/vim-plug [.git] + " [git@] github.com[:port] : junegunn/vim-plug [.git] + " file:// / junegunn/vim-plug [/] + " / junegunn/vim-plug [/] + let pat = '^\%(\w\+://\)\='.'\%([^@/]*@\)\='.'\([^:/]*\%(:[0-9]*\)\=\)'.'[:/]'.'\(.\{-}\)'.'\%(\.git\)\=/\?$' + let ma = matchlist(a:a, pat) + let mb = matchlist(a:b, pat) + return ma[1:2] ==# mb[1:2] +endfunction + +function! s:format_message(bullet, name, message) + if a:bullet != 'x' + return [printf('%s %s: %s', a:bullet, a:name, s:lastline(a:message))] + else + let lines = map(s:lines(a:message), '" ".v:val') + return extend([printf('x %s:', a:name)], lines) + endif +endfunction + +function! s:with_cd(cmd, dir, ...) + let script = a:0 > 0 ? a:1 : 1 + return printf('cd%s %s && %s', s:is_win ? ' /d' : '', plug#shellescape(a:dir, {'script': script}), a:cmd) +endfunction + +function! s:system(cmd, ...) + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + if type(a:cmd) == s:TYPE.list + " Neovim's system() supports list argument to bypass the shell + " but it cannot set the working directory for the command. + " Assume that the command does not rely on the shell. + if has('nvim') && a:0 == 0 + return system(a:cmd) + endif + let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"shell": &shell, "script": 0})')) + if &shell =~# 'powershell\.exe' + let cmd = '& ' . cmd + endif + else + let cmd = a:cmd + endif + if a:0 > 0 + let cmd = s:with_cd(cmd, a:1, type(a:cmd) != s:TYPE.list) + endif + if s:is_win && type(a:cmd) != s:TYPE.list + let [batchfile, cmd] = s:batchfile(cmd) + endif + return system(cmd) + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry +endfunction + +function! s:system_chomp(...) + let ret = call('s:system', a:000) + return v:shell_error ? '' : substitute(ret, '\n$', '', '') +endfunction + +function! s:git_validate(spec, check_branch) + let err = '' + if isdirectory(a:spec.dir) + let result = s:lines(s:system('git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url', a:spec.dir)) + let remote = result[-1] + if v:shell_error + let err = join([remote, 'PlugClean required.'], "\n") + elseif !s:compare_git_uri(remote, a:spec.uri) + let err = join(['Invalid URI: '.remote, + \ 'Expected: '.a:spec.uri, + \ 'PlugClean required.'], "\n") + elseif a:check_branch && has_key(a:spec, 'commit') + let result = s:lines(s:system('git rev-parse HEAD 2>&1', a:spec.dir)) + let sha = result[-1] + if v:shell_error + let err = join(add(result, 'PlugClean required.'), "\n") + elseif !s:hash_match(sha, a:spec.commit) + let err = join([printf('Invalid HEAD (expected: %s, actual: %s)', + \ a:spec.commit[:6], sha[:6]), + \ 'PlugUpdate required.'], "\n") + endif + elseif a:check_branch + let branch = result[0] + " Check tag + if has_key(a:spec, 'tag') + let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir) + if a:spec.tag !=# tag && a:spec.tag !~ '\*' + let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.', + \ (empty(tag) ? 'N/A' : tag), a:spec.tag) + endif + " Check branch + elseif a:spec.branch !=# branch + let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.', + \ branch, a:spec.branch) + endif + if empty(err) + let [ahead, behind] = split(s:lastline(s:system([ + \ 'git', 'rev-list', '--count', '--left-right', + \ printf('HEAD...origin/%s', a:spec.branch) + \ ], a:spec.dir)), '\t') + if !v:shell_error && ahead + if behind + " Only mention PlugClean if diverged, otherwise it's likely to be + " pushable (and probably not that messed up). + let err = printf( + \ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n" + \ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', a:spec.branch, ahead, behind) + else + let err = printf("Ahead of origin/%s by %d commit(s).\n" + \ .'Cannot update until local changes are pushed.', + \ a:spec.branch, ahead) + endif + endif + endif + endif + else + let err = 'Not found' + endif + return [err, err =~# 'PlugClean'] +endfunction + +function! s:rm_rf(dir) + if isdirectory(a:dir) + call s:system(s:is_win + \ ? 'rmdir /S /Q '.plug#shellescape(a:dir) + \ : ['rm', '-rf', a:dir]) + endif +endfunction + +function! s:clean(force) + call s:prepare() + call append(0, 'Searching for invalid plugins in '.g:plug_home) + call append(1, '') + + " List of valid directories + let dirs = [] + let errs = {} + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + if !s:is_managed(name) + call add(dirs, spec.dir) + else + let [err, clean] = s:git_validate(spec, 1) + if clean + let errs[spec.dir] = s:lines(err)[0] + else + call add(dirs, spec.dir) + endif + endif + let cnt += 1 + call s:progress_bar(2, repeat('=', cnt), total) + normal! 2G + redraw + endfor + + let allowed = {} + for dir in dirs + let allowed[s:dirpath(s:plug_fnamemodify(dir, ':h:h'))] = 1 + let allowed[dir] = 1 + for child in s:glob_dir(dir) + let allowed[child] = 1 + endfor + endfor + + let todo = [] + let found = sort(s:glob_dir(g:plug_home)) + while !empty(found) + let f = remove(found, 0) + if !has_key(allowed, f) && isdirectory(f) + call add(todo, f) + call append(line('$'), '- ' . f) + if has_key(errs, f) + call append(line('$'), ' ' . errs[f]) + endif + let found = filter(found, 'stridx(v:val, f) != 0') + end + endwhile + + 4 + redraw + if empty(todo) + call append(line('$'), 'Already clean.') + else + let s:clean_count = 0 + call append(3, ['Directories to delete:', '']) + redraw! + if a:force || s:ask_no_interrupt('Delete all directories?') + call s:delete([6, line('$')], 1) + else + call setline(4, 'Cancelled.') + nnoremap <silent> <buffer> d :set opfunc=<sid>delete_op<cr>g@ + nmap <silent> <buffer> dd d_ + xnoremap <silent> <buffer> d :<c-u>call <sid>delete_op(visualmode(), 1)<cr> + echo 'Delete the lines (d{motion}) to delete the corresponding directories' + endif + endif + 4 + setlocal nomodifiable +endfunction + +function! s:delete_op(type, ...) + call s:delete(a:0 ? [line("'<"), line("'>")] : [line("'["), line("']")], 0) +endfunction + +function! s:delete(range, force) + let [l1, l2] = a:range + let force = a:force + while l1 <= l2 + let line = getline(l1) + if line =~ '^- ' && isdirectory(line[2:]) + execute l1 + redraw! + let answer = force ? 1 : s:ask('Delete '.line[2:].'?', 1) + let force = force || answer > 1 + if answer + call s:rm_rf(line[2:]) + setlocal modifiable + call setline(l1, '~'.line[1:]) + let s:clean_count += 1 + call setline(4, printf('Removed %d directories.', s:clean_count)) + setlocal nomodifiable + endif + endif + let l1 += 1 + endwhile +endfunction + +function! s:upgrade() + echo 'Downloading the latest version of vim-plug' + redraw + let tmp = s:plug_tempname() + let new = tmp . '/plug.vim' + + try + let out = s:system(['git', 'clone', '--depth', '1', s:plug_src, tmp]) + if v:shell_error + return s:err('Error upgrading vim-plug: '. out) + endif + + if readfile(s:me) ==# readfile(new) + echo 'vim-plug is already up-to-date' + return 0 + else + call rename(s:me, s:me . '.old') + call rename(new, s:me) + unlet g:loaded_plug + echo 'vim-plug has been upgraded' + return 1 + endif + finally + silent! call s:rm_rf(tmp) + endtry +endfunction + +function! s:upgrade_specs() + for spec in values(g:plugs) + let spec.frozen = get(spec, 'frozen', 0) + endfor +endfunction + +function! s:status() + call s:prepare() + call append(0, 'Checking plugins') + call append(1, '') + + let ecnt = 0 + let unloaded = 0 + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + let is_dir = isdirectory(spec.dir) + if has_key(spec, 'uri') + if is_dir + let [err, _] = s:git_validate(spec, 1) + let [valid, msg] = [empty(err), empty(err) ? 'OK' : err] + else + let [valid, msg] = [0, 'Not found. Try PlugInstall.'] + endif + else + if is_dir + let [valid, msg] = [1, 'OK'] + else + let [valid, msg] = [0, 'Not found.'] + endif + endif + let cnt += 1 + let ecnt += !valid + " `s:loaded` entry can be missing if PlugUpgraded + if is_dir && get(s:loaded, name, -1) == 0 + let unloaded = 1 + let msg .= ' (not loaded)' + endif + call s:progress_bar(2, repeat('=', cnt), total) + call append(3, s:format_message(valid ? '-' : 'x', name, msg)) + normal! 2G + redraw + endfor + call setline(1, 'Finished. '.ecnt.' error(s).') + normal! gg + setlocal nomodifiable + if unloaded + echo "Press 'L' on each line to load plugin, or 'U' to update" + nnoremap <silent> <buffer> L :call <SID>status_load(line('.'))<cr> + xnoremap <silent> <buffer> L :call <SID>status_load(line('.'))<cr> + end +endfunction + +function! s:extract_name(str, prefix, suffix) + return matchstr(a:str, '^'.a:prefix.' \zs[^:]\+\ze:.*'.a:suffix.'$') +endfunction + +function! s:status_load(lnum) + let line = getline(a:lnum) + let name = s:extract_name(line, '-', '(not loaded)') + if !empty(name) + call plug#load(name) + setlocal modifiable + call setline(a:lnum, substitute(line, ' (not loaded)$', '', '')) + setlocal nomodifiable + endif +endfunction + +function! s:status_update() range + let lines = getline(a:firstline, a:lastline) + let names = filter(map(lines, 's:extract_name(v:val, "[x-]", "")'), '!empty(v:val)') + if !empty(names) + echo + execute 'PlugUpdate' join(names) + endif +endfunction + +function! s:is_preview_window_open() + silent! wincmd P + if &previewwindow + wincmd p + return 1 + endif +endfunction + +function! s:find_name(lnum) + for lnum in reverse(range(1, a:lnum)) + let line = getline(lnum) + if empty(line) + return '' + endif + let name = s:extract_name(line, '-', '') + if !empty(name) + return name + endif + endfor + return '' +endfunction + +function! s:preview_commit() + if b:plug_preview < 0 + let b:plug_preview = !s:is_preview_window_open() + endif + + let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}') + if empty(sha) + return + endif + + let name = s:find_name(line('.')) + if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir) + return + endif + + if exists('g:plug_pwindow') && !s:is_preview_window_open() + execute g:plug_pwindow + execute 'e' sha + else + execute 'pedit' sha + wincmd P + endif + setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha + if s:is_win + let [batchfile, cmd] = s:batchfile(cmd) + endif + execute 'silent %!' cmd + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry + setlocal nomodifiable + nnoremap <silent> <buffer> q :q<cr> + wincmd p +endfunction + +function! s:section(flags) + call search('\(^[x-] \)\@<=[^:]\+:', a:flags) +endfunction + +function! s:format_git_log(line) + let indent = ' ' + let tokens = split(a:line, nr2char(1)) + if len(tokens) != 5 + return indent.substitute(a:line, '\s*$', '', '') + endif + let [graph, sha, refs, subject, date] = tokens + let tag = matchstr(refs, 'tag: [^,)]\+') + let tag = empty(tag) ? ' ' : ' ('.tag.') ' + return printf('%s%s%s%s%s (%s)', indent, graph, sha, tag, subject, date) +endfunction + +function! s:append_ul(lnum, text) + call append(a:lnum, ['', a:text, repeat('-', len(a:text))]) +endfunction + +function! s:diff() + call s:prepare() + call append(0, ['Collecting changes ...', '']) + let cnts = [0, 0] + let bar = '' + let total = filter(copy(g:plugs), 's:is_managed(v:key) && isdirectory(v:val.dir)') + call s:progress_bar(2, bar, len(total)) + for origin in [1, 0] + let plugs = reverse(sort(items(filter(copy(total), (origin ? '' : '!').'(has_key(v:val, "commit") || has_key(v:val, "tag"))')))) + if empty(plugs) + continue + endif + call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:') + for [k, v] in plugs + let range = origin ? '..origin/'.v.branch : 'HEAD@{1}..' + let cmd = ['git', 'log', '--graph', '--color=never'] + if s:git_version_requirement(2, 10, 0) + call add(cmd, '--no-show-signature') + endif + call extend(cmd, ['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range]) + if has_key(v, 'rtp') + call extend(cmd, ['--', v.rtp]) + endif + let diff = s:system_chomp(cmd, v.dir) + if !empty(diff) + let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : '' + call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)'))) + let cnts[origin] += 1 + endif + let bar .= '=' + call s:progress_bar(2, bar, len(total)) + normal! 2G + redraw + endfor + if !cnts[origin] + call append(5, ['', 'N/A']) + endif + endfor + call setline(1, printf('%d plugin(s) updated.', cnts[0]) + \ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : '')) + + if cnts[0] || cnts[1] + nnoremap <silent> <buffer> <plug>(plug-preview) :silent! call <SID>preview_commit()<cr> + if empty(maparg("\<cr>", 'n')) + nmap <buffer> <cr> <plug>(plug-preview) + endif + if empty(maparg('o', 'n')) + nmap <buffer> o <plug>(plug-preview) + endif + endif + if cnts[0] + nnoremap <silent> <buffer> X :call <SID>revert()<cr> + echo "Press 'X' on each block to revert the update" + endif + normal! gg + setlocal nomodifiable +endfunction + +function! s:revert() + if search('^Pending updates', 'bnW') + return + endif + + let name = s:find_name(line('.')) + if empty(name) || !has_key(g:plugs, name) || + \ input(printf('Revert the update of %s? (y/N) ', name)) !~? '^y' + return + endif + + call s:system('git reset --hard HEAD@{1} && git checkout '.plug#shellescape(g:plugs[name].branch).' --', g:plugs[name].dir) + setlocal modifiable + normal! "_dap + setlocal nomodifiable + echo 'Reverted' +endfunction + +function! s:snapshot(force, ...) abort + call s:prepare() + setf vim + call append(0, ['" Generated by vim-plug', + \ '" '.strftime("%c"), + \ '" :source this file in vim to restore the snapshot', + \ '" or execute: vim -S snapshot.vim', + \ '', '', 'PlugUpdate!']) + 1 + let anchor = line('$') - 3 + let names = sort(keys(filter(copy(g:plugs), + \'has_key(v:val, "uri") && !has_key(v:val, "commit") && isdirectory(v:val.dir)'))) + for name in reverse(names) + let sha = s:system_chomp(['git', 'rev-parse', '--short', 'HEAD'], g:plugs[name].dir) + if !empty(sha) + call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha)) + redraw + endif + endfor + + if a:0 > 0 + let fn = s:plug_expand(a:1) + if filereadable(fn) && !(a:force || s:ask(a:1.' already exists. Overwrite?')) + return + endif + call writefile(getline(1, '$'), fn) + echo 'Saved as '.a:1 + silent execute 'e' s:esc(fn) + setf vim + endif +endfunction + +function! s:split_rtp() + return split(&rtp, '\\\@<!,') +endfunction + +let s:first_rtp = s:escrtp(get(s:split_rtp(), 0, '')) +let s:last_rtp = s:escrtp(get(s:split_rtp(), -1, '')) + +if exists('g:plugs') + let g:plugs_order = get(g:, 'plugs_order', keys(g:plugs)) + call s:upgrade_specs() + call s:define_commands() +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/config/nvim/init.vim b/config/nvim/init.vim @@ -0,0 +1,140 @@ +let mapleader ="," + +if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"')) + echo "Downloading junegunn/vim-plug to manage plugins..." + silent !mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/ + silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim + autocmd VimEnter * PlugInstall +endif + +call plug#begin(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/plugged"')) +Plug 'tpope/vim-surround' +Plug 'preservim/nerdtree' +Plug 'junegunn/goyo.vim' +Plug 'PotatoesMaster/i3-vim-syntax' +Plug 'jreybert/vimagit' +Plug 'lukesmithxyz/vimling' +Plug 'vimwiki/vimwiki' +Plug 'bling/vim-airline' +Plug 'tpope/vim-commentary' +Plug 'kovetskiy/sxhkd-vim' +Plug 'ap/vim-css-color' +call plug#end() + +filetype indent plugin off +set bg=light +set go=a +set mouse=a +set nohlsearch +set clipboard+=unnamedplus + +" Some basics: + nnoremap c "_c + set nocompatible + filetype plugin on + syntax on + set encoding=utf-8 + set number relativenumber +" Enable autocompletion: + set wildmode=longest,list,full +" Disables automatic commenting on newline: + autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o + +" Goyo plugin makes text more readable when writing prose: + map <leader>f :Goyo \| set bg=light \| set linebreak<CR> + +" Spell-check set to <leader>o, 'o' for 'orthography': + map <leader>o :setlocal spell! spelllang=en_us<CR> + +" Splits open at the bottom and right, which is non-retarded, unlike vim defaults. + set splitbelow splitright + +" Nerd tree + map <leader>n :NERDTreeToggle<CR> + autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif + +" vimling: + nm <leader>d :call ToggleDeadKeys()<CR> + imap <leader>d <esc>:call ToggleDeadKeys()<CR>a + nm <leader>i :call ToggleIPA()<CR> + imap <leader>i <esc>:call ToggleIPA()<CR>a + nm <leader>q :call ToggleProse()<CR> +" mappings for moving lines: + nnoremap <C-j> :m .+1<CR>== + nnoremap <C-k> :m .-2<CR>== + inoremap <C-j> <Esc>:m .+1<CR>==gi + inoremap <C-k> <Esc>:m .-2<CR>==gi + vnoremap <C-j> :m '>+1<CR>gv=gv + vnoremap <C-k> :m '<-2<CR>gv=gv + +" Shortcutting split navigation, saving a keypress: +" map <C-h> <C-w>h +" map <C-j> <C-w>j +" map <C-k> <C-w>k +" map <C-l> <C-w>l + +" Replace ex mode with gq + map Q gq + +" Check file in shellcheck: + map <leader>s :!clear && shellcheck %<CR> + +" Open my bibliography file in split + map <leader>b :vsp<space>$BIB<CR> + map <leader>r :vsp<space>$REFER<CR> + +" Replace all is aliased to S. + nnoremap S :%s//g<Left><Left> + +" Compile document, be it groff/LaTeX/markdown/etc. + map <leader>c :w! \| !compiler <c-r>%<CR> + +" Open corresponding .pdf/.html or preview + map <leader>p :!opout <c-r>%<CR><CR> + +" Runs a script that cleans out tex build files whenever I close out of a .tex file. + autocmd VimLeave *.tex !texclear % + +" Ensure files are read as what I want: + let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} + map <leader>v :VimwikiIndex + let g:vimwiki_list = [{'path': '~/vimwiki', 'syntax': 'markdown', 'ext': '.md'}] + autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown + autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff + autocmd BufRead,BufNewFile *.tex set filetype=tex + +" Save file as sudo on files that require root permission + cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit! + +" Enable Goyo by default for mutt writting + autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80 + autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo | set bg=light + autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR> + autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR> + +" Automatically deletes all trailing whitespace and newlines at end of file on save. + autocmd BufWritePre * %s/\s\+$//e + autocmd BufWritepre * %s/\n\+\%$//e + +" When shortcut files are updated, renew bash and ranger configs with new material: + autocmd BufWritePost files,directories !shortcuts +" Run xrdb whenever Xdefaults or Xresources are updated. + autocmd BufWritePost *Xresources,*Xdefaults !xrdb % +" Update binds when sxhkdrc is updated. + autocmd BufWritePost *sxhkdrc !pkill -USR1 sxhkd + +" Turns off highlighting on the bits of code that are changed, so the line that is changed is highlighted but the actual text that has changed stands out on the line and is readable. +if &diff + highlight! link DiffText MatchParen +endif + +" Extra autocmds +" Latex compile +autocmd BufWritePost *.tex silent! execute "!compiler %; texclear %;" | redraw! + +" Groff compile +autocmd BufWritePost *.ms silent! execute "make;" | redraw! + + +" Dwmblocks refresh +autocmd BufWritePost ~/.local/src/dwmblocks/config.h !cd ~/.local/src/dwmblocks/; sudo make install && { killall -q dwmblocks;setsid dwmblocks & } diff --git a/config/nvim/plugged/goyo.vim b/config/nvim/plugged/goyo.vim @@ -0,0 +1 @@ +Subproject commit 6b6ed2734084fdbb6315357ddcaecf9c8e6f143d diff --git a/config/nvim/plugged/i3-vim-syntax b/config/nvim/plugged/i3-vim-syntax @@ -0,0 +1 @@ +Subproject commit affe37e89911c47831cb5b87697ac70e48bb3e0f diff --git a/config/nvim/plugged/nerdtree b/config/nvim/plugged/nerdtree @@ -0,0 +1 @@ +Subproject commit 29a321d061032df5b2ec347b6b4b778f665305a6 diff --git a/config/nvim/plugged/sxhkd-vim b/config/nvim/plugged/sxhkd-vim @@ -0,0 +1 @@ +Subproject commit 2760f9d32bd2fb4d7d5305a88eb2056d149c6484 diff --git a/config/nvim/plugged/vim-airline b/config/nvim/plugged/vim-airline @@ -0,0 +1 @@ +Subproject commit ff3f66ed30fbab70af1f37c8532327bd9617f7c7 diff --git a/config/nvim/plugged/vim-commentary b/config/nvim/plugged/vim-commentary @@ -0,0 +1 @@ +Subproject commit f8238d70f873969fb41bf6a6b07ca63a4c0b82b1 diff --git a/config/nvim/plugged/vim-css-color b/config/nvim/plugged/vim-css-color @@ -0,0 +1 @@ +Subproject commit 741dd18a35e251ededc0687eea9b8d100d3b83b8 diff --git a/config/nvim/plugged/vim-surround b/config/nvim/plugged/vim-surround @@ -0,0 +1 @@ +Subproject commit f51a26d3710629d031806305b6c8727189cd1935 diff --git a/config/nvim/plugged/vimagit b/config/nvim/plugged/vimagit @@ -0,0 +1 @@ +Subproject commit bf7b16e99e075b019e56f2fbfb96c493ca3635e2 diff --git a/config/nvim/plugged/vimling b/config/nvim/plugged/vimling @@ -0,0 +1 @@ +Subproject commit d9bdc50a7efbc955fde72614ebf4ad19f17c226c diff --git a/config/nvim/plugged/vimwiki b/config/nvim/plugged/vimwiki @@ -0,0 +1 @@ +Subproject commit 64c9f3d36d632b1657616c06ea8f08f14cf6438d diff --git a/config/qt5ct/qt5ct.conf b/config/qt5ct/qt5ct.conf @@ -0,0 +1,28 @@ +[Appearance] +color_scheme_path=/usr/share/qt5ct/colors/airy.conf +custom_palette=false +icon_theme=Adwaita +standard_dialogs=default +style=Breeze + +[Fonts] +fixed="@Variant(\0\0\0@\0\0\0\x12\0M\0o\0n\0o\0s\0p\0\x61\0\x63\0\x65@,\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)" +general="@Variant(\0\0\0@\0\0\0\x12\0M\0o\0n\0o\0s\0p\0\x61\0\x63\0\x65@,\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)" + +[Interface] +activate_item_on_single_click=1 +buttonbox_layout=0 +cursor_flash_time=1000 +dialog_buttons_have_icons=1 +double_click_interval=400 +gui_effects=@Invalid() +keyboard_scheme=2 +menus_have_icons=true +show_shortcuts_in_context_menus=true +stylesheets=/usr/share/qt5ct/qss/scrollbar-simple.qss +toolbutton_style=4 +underline_shortcut=1 +wheel_scroll_lines=3 + +[SettingsWindow] +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\x1b\0\0\0\x1c\0\0\x6\x1e\0\0\x3v\0\0\0\x1e\0\0\0\x1f\0\0\x6\x1b\0\0\x3s\0\0\0\0\0\0\0\0\x6@\0\0\0\x1e\0\0\0\x1f\0\0\x6\x1b\0\0\x3s) diff --git a/config/ranger/commands.py b/config/ranger/commands.py @@ -0,0 +1,208 @@ +# This is a sample commands.py. You can add your own commands here. +# +# Please refer to commands_full.py for all the default commands and a complete +# documentation. Do NOT add them all here, or you may end up with defunct +# commands when upgrading ranger. + +# You always need to import ranger.api.commands here to get the Command class: +from ranger.api.commands import * +from ranger.core.loader import CommandLoader + +# A simple command for demonstration purposes follows. +#------------------------------------------------------------------------------ + +# You can import any python module as needed. +import os + +# Any class that is a subclass of "Command" will be integrated into ranger as a +# command. Try typing ":my_edit<ENTER>" in ranger! +class my_edit(Command): + # The so-called doc-string of the class will be visible in the built-in + # help that is accessible by typing "?c" inside ranger. + """:my_edit <filename> + + A sample command for demonstration purposes that opens a file in an editor. + """ + + # The execute method is called when you run this command in ranger. + def execute(self): + # self.arg(1) is the first (space-separated) argument to the function. + # This way you can write ":my_edit somefilename<ENTER>". + if self.arg(1): + # self.rest(1) contains self.arg(1) and everything that follows + target_filename = self.rest(1) + else: + # self.fm is a ranger.core.filemanager.FileManager object and gives + # you access to internals of ranger. + # self.fm.thisfile is a ranger.container.file.File object and is a + # reference to the currently selected file. + target_filename = self.fm.thisfile.path + + # This is a generic function to print text in ranger. + self.fm.notify("Let's edit the file " + target_filename + "!") + + # Using bad=True in fm.notify allows you to print error messages: + if not os.path.exists(target_filename): + self.fm.notify("The given file does not exist!", bad=True) + return + + # This executes a function from ranger.core.acitons, a module with a + # variety of subroutines that can help you construct commands. + # Check out the source, or run "pydoc ranger.core.actions" for a list. + self.fm.edit_file(target_filename) + + # The tab method is called when you press tab, and should return a list of + # suggestions that the user will tab through. + def tab(self): + # This is a generic tab-completion function that iterates through the + # content of the current directory. + return self._tab_directory_content() + + +# https://github.com/ranger/ranger/wiki/Integrating-File-Search-with-fzf +# Now, simply bind this function to a key, by adding this to your ~/.config/ranger/rc.conf: map <C-f> fzf_select +class fzf_select(Command): + """ + :fzf_select + + Find a file using fzf. + + With a prefix argument select only directories. + + See: https://github.com/junegunn/fzf + """ + def execute(self): + import subprocess + if self.quantifier: + # match only directories + command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \ + -o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m" + else: + # match files and directories + command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \ + -o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m" + fzf = self.fm.execute_command(command, stdout=subprocess.PIPE) + stdout, stderr = fzf.communicate() + if fzf.returncode == 0: + fzf_file = os.path.abspath(stdout.decode('utf-8').rstrip('\n')) + if os.path.isdir(fzf_file): + self.fm.cd(fzf_file) + else: + self.fm.select_file(fzf_file) + + +# fzf_locate +class fzf_locate(Command): + """ + :fzf_locate + + Find a file using fzf. + + With a prefix argument select only directories. + + See: https://github.com/junegunn/fzf + """ + def execute(self): + import subprocess + if self.quantifier: + command="locate home media | fzf -e -i" + else: + command="locate home media | fzf -e -i" + fzf = self.fm.execute_command(command, stdout=subprocess.PIPE) + stdout, stderr = fzf.communicate() + if fzf.returncode == 0: + fzf_file = os.path.abspath(stdout.decode('utf-8').rstrip('\n')) + if os.path.isdir(fzf_file): + self.fm.cd(fzf_file) + else: + self.fm.select_file(fzf_file) + + +class fzf_bring(Command): + """ + :fzf_bring + + Find a file using fzf and bring it to the current directory. + + See: https://github.com/junegunn/fzf + """ + def execute(self): + import subprocess + import shutil + if self.quantifier: + # match only directories + command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \ + -o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m" + else: + # match files and directories + command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \ + -o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m" + fzf = self.fm.execute_command(command, stdout=subprocess.PIPE) + stdout, stderr = fzf.communicate() + if fzf.returncode == 0: + fzf_file = os.path.abspath(stdout.decode('utf-8').rstrip('\n')) + shutil.move(fzf_file, self.fm.thisdir.path) + + +class compress(Command): + def execute(self): + """ Compress marked files to current directory """ + cwd = self.fm.thisdir + marked_files = cwd.get_selection() + + if not marked_files: + return + + def refresh(_): + cwd = self.fm.get_directory(original_path) + cwd.load_content() + + original_path = cwd.path + parts = self.line.split() + au_flags = parts[1:] + + descr = "compressing files in: " + os.path.basename(parts[1]) + obj = CommandLoader(args=['apack'] + au_flags + \ + [os.path.relpath(f.path, cwd.path) for f in marked_files], descr=descr) + + obj.signal_bind('after', refresh) + self.fm.loader.add(obj) + + def tab(self): + """ Complete with current folder name """ + + extension = ['.zip', '.tar.gz', '.rar', '.7z'] + return ['compress ' + os.path.basename(self.fm.thisdir.path) + ext for ext in extension] + + +class extracthere(Command): + def execute(self): + """ Extract copied files to current directory """ + copied_files = tuple(self.fm.copy_buffer) + + if not copied_files: + return + + def refresh(_): + cwd = self.fm.get_directory(original_path) + cwd.load_content() + + one_file = copied_files[0] + cwd = self.fm.thisdir + original_path = cwd.path + au_flags = ['-X', cwd.path] + au_flags += self.line.split()[1:] + au_flags += ['-e'] + + self.fm.copy_buffer.clear() + self.fm.cut_buffer = False + if len(copied_files) == 1: + descr = "extracting: " + os.path.basename(one_file.path) + else: + descr = "extracting files from: " + os.path.basename(one_file.dirname) + obj = CommandLoader(args=['aunpack'] + au_flags \ + + [f.path for f in copied_files], descr=descr) + + obj.signal_bind('after', refresh) + self.fm.loader.add(obj) + diff --git a/config/ranger/luke_ranger_readme.md b/config/ranger/luke_ranger_readme.md @@ -0,0 +1,85 @@ +# Luke's ranger setup + +## Basic Ranger shortcuts + +These are the basic key binds in ranger, even outside of my configs. Note that they are mostly vim-based. + ++ h/j/k/l -- Move left/down/up/right (where left moves up in the directory structure, right moves into a folder) ++ Space -- select/highlight file ++ dd -- cut selected files ++ yy -- copy/yank selected files ++ pp -- paste/move cut/copied files ++ / -- search, when (n/N) next/previos result ++ zh or CTRL-h -- show hidden files ++ Renaming files: + + cw -- rename file from scratch + + A -- rename file adding to the end + + aa -- rename file appending before the extension + + I -- rename file adding at the beginning + +## Shortcuts + +As I say in the main readme, there are shortcut commands generated for ranger +based on what bookmarked directories and files you give it. For directory +shortcuts, here are the "verbs": + ++ g -- "go or cd" ++ t -- "new tab" ++ m -- "move file" ++ Y -- "yank or copy file" + +These "verbs" take "nouns" or "arguments," like these: + ++ d -- "~/Documents" ++ D -- "~/Downloads" ++ cf -- "~/.config" ++ And many others, including those you add to `~/.bmdirs`. + +Press any "verb" followed by any "argument" to perform a folder operation. "gd" will cd to ~/Documents, for example. "mD" will move the selected file(s) to ~/Downloads. "tcf" will create a new tab in ~/.config, etc. etc. + +## Many little additions! + ++ Basic additions: + + V -- Make a new file and edit it in vim + + cW -- rename *all* selected files, editing in your text editor + + mkd -- Make a directory/folder + + sc -- Makes a link/shortcut (ln -sT) + + D -- delete selected file + + X -- Extract a zip/rar/tar.gz, whatever. Runs a script that picks the right command for the right archive. + + Z -- zips a folder up into a .tar.gz archive. + + CTRL-f -- Fuzzy find a file + + CTRL-l -- Fuzzy locate a file ++ Document manipulation: + + p1s -- print this file on the default printer, one-sided (lpr) + + p2s -- print this file on the default printer, double-sided (lpr) + + MP -- convert to a .pdf with pandoc (I use this to convert markdown, etc.) + + MX -- compile selected document in XeLaTeX + + ML -- compile selected document in LaTeX + + TC -- clear all non-visible TeX build files in this directory + + Txa -- copy article template to new file + + Txs -- copy slideshow/beamer template to new file + + Txh -- copy handout template to new file ++ Image commands: + + bg -- makes an image your background (assuming i3 is looking at ~/.local/share/bg for your background) + + bw -- runs Pywal on the selected image, making it your background and generating a color scheme based off of it. + + C -- rotates an image (requires imagemagick) + + F -- flips an image (requires imagemagick) + + TR -- add transparency to image file ++ mpd/mpc shortcuts + + MS -- Start mpd + + MK -- kill mpd + + MN -- Start playing selected song/folder now + + Ma -- Enqueue selected song/folder + + Mp -- Pause + + Mn -- Next track + + Mb -- Previous track + + Mo -- Restart track ++ Audio tagging with eye3D: + + Ta -- change artist name + + TA -- change album name + + Tb -- change album artist + + Tt -- change title + + Tn -- change track number ++ Downloading: + + ytv -- Download online video (paste in url) (requires youtube-dl) + + yta -- Download audio of online video (paste in url) (requires youtube-dl) diff --git a/config/ranger/rc.conf b/config/ranger/rc.conf @@ -0,0 +1,508 @@ +###SETTINGS### + +set column_ratios 1,3,4 +#set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ +set hidden_filter ^\.|\.(?:pyc|vrb|pyo|lof|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)$|^lost\+found$|^__(py)?cache__$ +set show_hidden false +set confirm_on_delete multiple +set use_preview_script true +set automatically_count_files true +set open_all_images true +set vcs_aware false +set vcs_backend_git enabled +set vcs_backend_hg disabled +set vcs_backend_bzr disabled +set preview_images true +set preview_images_method ueberzug +set unicode_ellipsis false +set show_hidden_bookmarks false +set colorscheme default +set preview_files true +set preview_directories true +set collapse_preview true +set save_console_history false +set status_bar_on_top false +set draw_progress_bar_in_status_bar true +set draw_borders true +set dirname_in_tabs true +set mouse_enabled true +set display_size_in_main_column true +set display_size_in_status_bar true +set display_tags_in_all_columns true +set update_title false +set update_tmux_title true +set shorten_title 3 +set tilde_in_titlebar true +set max_history_size 20 +set max_console_history_size 50 +set scroll_offset 8 +set flushinput true +set padding_right true +set autosave_bookmarks false +set autoupdate_cumulative_size false +set show_cursor false +set sort natural +set sort_reverse false +set sort_case_insensitive true +set sort_directories_first true +set sort_unicode false +set xterm_alt_key false +set cd_bookmarks false +set preview_max_size 0 +set show_selection_in_titlebar true +set idle_delay 2000 +set metadata_deep_search false + +###ALIASES### +alias e edit +alias q quit +alias q! quitall +alias qa quitall +alias qall quitall +alias setl setlocal + +alias filter scout -prt +alias find scout -aeit +alias mark scout -mr +alias unmark scout -Mr +alias search scout -rs +alias search_inc scout -rts +alias travel scout -aefiklst + +###BASIC KEYS### + +#BASIC +map Q quit! +map q quit +copymap q ZZ ZQ + +#map R reload_cwd +map <C-r> reset +#map <C-l> redraw_window +map <C-c> abort +map <esc> change_mode normal + +map i display_file +map ? help +#map W display_log +map w taskview_open +map S shell $SHELL + +map : console +map ; console +map ! console shell%space +map @ console -p6 shell %s +map # console shell -p%space +#map s console shell%space +map r chain draw_possible_programs; console open_with%%space +map f console find%space +map cd console cd%space + +# Change the line mode +#map Mf linemode filename +#map Mi linemode fileinfo +#map Mp linemode permissions +#map Mt linemode metatitle + +#moc +#map Mc shell mocp -c +#map Ma shell mocp -a %s +#map Ms shell mocp -p +#map MS shell mocp -S +#map Mp shell mocp -G +#map Mn shell mocp -f +#map Mb shell mocp -r +#map MN shell mocp -s && mocp -c && mocp -a %s && mocp -p +#map Mo shell mocp -j 0%% +#map MK shell killall mocp + +# Tagging / Marking +map at tag_toggle +map ut tag_remove +map "<any> tag_toggle tag=%any +map <Space> mark_files toggle=True +map va mark_files all=True toggle=True +map uv mark_files all=True val=False +map vs toggle_visual_mode +map uV toggle_visual_mode reverse=True + +# For the nostalgics: Midnight Commander bindings +map <F1> help +map <F3> display_file +map <F4> edit +map <F5> copy +map <F5> console shell echo "require(rmarkdown); render_site()" | R --vanilla +map <F6> cut +map <F7> console mkdir%space +map <F8> console delete +map <F10> exit + +# In case you work on a keyboard with dvorak layout +map <UP> move up=1 +map <DOWN> move down=1 +map <LEFT> move left=1 +map <RIGHT> move right=1 +map <HOME> move to=0 +map <END> move to=-1 +map <PAGEDOWN> move down=1 pages=True +map <PAGEUP> move up=1 pages=True +map <CR> move right=1 +map <DELETE> console delete +map <INSERT> console touch%space + +# VIM-like +copymap <UP> k +copymap <DOWN> j +copymap <LEFT> h +copymap <RIGHT> l +copymap <HOME> gg +copymap <END> G +copymap <PAGEDOWN> <C-F> +copymap <PAGEUP> <C-B> + +map J move down=0.5 pages=True +map K move up=0.5 pages=True +copymap J <C-D> +copymap K <C-U> + +# Jumping around +map H history_go -1 +map L history_go 1 +map ] move_parent 1 +map [ move_parent -1 +map } traverse + +#DEFAULT MOVEMENT +map ge cd /etc +map gu cd /usr +#map gl cd -r . +map gL cd -r %f +#map gv cd /var +map gM cd /mnt +map gr cd / +map gR eval fm.cd(ranger.RANGERDIR) +map g? cd /usr/share/doc/ranger + +# Tabs +map <C-n> tab_new ~ +map <C-w> tab_close +map <TAB> tab_move 1 +map <S-TAB> tab_move -1 +map <A-Right> tab_move 1 +map <A-Left> tab_move -1 +#map gt tab_move 1 +#map gT tab_move -1 +map gn tab_new ~ +#map gc tab_close +map tt tab_close +map uq tab_restore +map <a-1> tab_open 1 +map <a-2> tab_open 2 +map <a-3> tab_open 3 +map <a-4> tab_open 4 +map <a-5> tab_open 5 +map <a-6> tab_open 6 +map <a-7> tab_open 7 +map <a-8> tab_open 8 +map <a-9> tab_open 9 + + +# External Programs +map E edit +map du shell -p du --max-depth=1 -h --apparent-size +map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh +map yp shell -f echo -n %%d/%%f | xsel -i; xsel -o | xsel -i -b +map yd shell -f echo -n %%d | xsel -i; xsel -o | xsel -i -b +map yn shell -f echo -n %%f | xsel -i; xsel -o | xsel -i -b + + +# Filesystem Operations +map = chmod +map cw console rename%space +map aa rename_append +map A eval fm.open_console('rename ' + fm.thisfile.relative_path) +map I eval fm.open_console('rename ' + fm.thisfile.relative_path, position=7) +map pp paste +map po paste overwrite=True +map pP paste append=True +map pO paste overwrite=True append=True +map pl paste_symlink relative=False +map pL paste_symlink relative=True +map phl paste_hardlink +map pht paste_hardlinked_subtree + +map dD console delete + +map dd cut +map ud uncut +map da cut mode=add +map dr cut mode=remove + +map yy copy +map uy uncut +map ya copy mode=add +map yr copy mode=remove + + +# Temporary workarounds +map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) +map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) +map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) +map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) +map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) +map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) +map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) +map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) + + +# Searching +map / console search%space +map n search_next +map N search_next forward=False +map ct search_next order=tag +map cs search_next order=size +map ci search_next order=mimetype +map cc search_next order=ctime +map cm search_next order=mtime +map ca search_next order=atime + + +# Sorting +map or toggle_option sort_reverse +map oz set sort=random +map os chain set sort=size; set sort_reverse=False +map ob chain set sort=basename; set sort_reverse=False +map on chain set sort=natural; set sort_reverse=False +map om chain set sort=mtime; set sort_reverse=False +map oc chain set sort=ctime; set sort_reverse=False +map oa chain set sort=atime; set sort_reverse=False +map ot chain set sort=type; set sort_reverse=False +map oe chain set sort=extension; set sort_reverse=False + +map oS chain set sort=size; set sort_reverse=True +map oB chain set sort=basename; set sort_reverse=True +map oN chain set sort=natural; set sort_reverse=True +map oM chain set sort=mtime; set sort_reverse=True +map oC chain set sort=ctime; set sort_reverse=True +map oA chain set sort=atime; set sort_reverse=True +map oT chain set sort=type; set sort_reverse=True +map oE chain set sort=extension; set sort_reverse=True + +map dc get_cumulative_size + + +# Settings +map zc toggle_option collapse_preview +map zd toggle_option sort_directories_first +map zh toggle_option show_hidden +map <C-h> toggle_option show_hidden +map zi toggle_option flushinput +map zm toggle_option mouse_enabled +map zp toggle_option preview_files +map zP toggle_option preview_directories +map zs toggle_option sort_case_insensitive +map zu toggle_option autoupdate_cumulative_size +map zv toggle_option use_preview_script +map zf console filter%space + + +# Bookmarks +#map `<any> enter_bookmark %any +#map '<any> enter_bookmark %any +#map mm<any> set_bookmark %any +#map um<any> unset_bookmark %any + +#map m<bg> draw_bookmarks +#copymap m<bg> um<bg> `<bg> '<bg> + + +# Generate all the chmod bindings with some python help: +eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg)) + +eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg)) + + +###CONSOLE KEYS### +# Basic +cmap <tab> eval fm.ui.console.tab() +cmap <s-tab> eval fm.ui.console.tab(-1) +cmap <ESC> eval fm.ui.console.close() +cmap <CR> eval fm.ui.console.execute() +#cmap <C-l> redraw_window + +copycmap <ESC> <C-c> +copycmap <CR> <C-j> + + +# Move around +cmap <up> eval fm.ui.console.history_move(-1) +cmap <down> eval fm.ui.console.history_move(1) +cmap <left> eval fm.ui.console.move(left=1) +cmap <right> eval fm.ui.console.move(right=1) +cmap <home> eval fm.ui.console.move(right=0, absolute=True) +cmap <end> eval fm.ui.console.move(right=-1, absolute=True) + + +# Line Editing +cmap <backspace> eval fm.ui.console.delete(-1) +cmap <delete> eval fm.ui.console.delete(0) +cmap <C-w> eval fm.ui.console.delete_word() +cmap <A-d> eval fm.ui.console.delete_word(backward=False) +cmap <C-k> eval fm.ui.console.delete_rest(1) +cmap <C-u> eval fm.ui.console.delete_rest(-1) +cmap <C-y> eval fm.ui.console.paste() + +# And of course the emacs way +#copycmap <up> <C-p> +#copycmap <down> <C-n> +#copycmap <left> <C-b> +#copycmap <right> <C-f> +#copycmap <home> <C-a> +#copycmap <end> <C-e> +#copycmap <delete> <C-d> +#copycmap <backspace> <C-h> + + +# Note: There are multiple ways to express backspaces. <backspace> (code 263) +# and <backspace2> (code 127). To be sure, use both. +copycmap <backspace> <backspace2> + +# This special expression allows typing in numerals: +cmap <allow_quantifiers> false + + + +###PAGER KEYS### +# Movement +pmap <down> pager_move down=1 +pmap <up> pager_move up=1 +pmap <left> pager_move left=4 +pmap <right> pager_move right=4 +pmap <home> pager_move to=0 +pmap <end> pager_move to=-1 +pmap <pagedown> pager_move down=1.0 pages=True +pmap <pageup> pager_move up=1.0 pages=True +pmap <C-d> pager_move down=0.5 pages=True +pmap <C-u> pager_move up=0.5 pages=True + +copypmap <UP> k <C-p> +copypmap <DOWN> j <C-n> <CR> +copypmap <LEFT> h +copypmap <RIGHT> l +copypmap <HOME> g +copypmap <END> G +copypmap <C-d> d +copypmap <C-u> u +copypmap <PAGEDOWN> n f <C-F> <Space> +copypmap <PAGEUP> p b <C-B> + + +# Basic +#pmap <C-l> redraw_window +pmap <ESC> pager_close +copypmap <ESC> q Q i <F3> +pmap E edit_file + +# =================================================================== +# == Taskview Keybindings +# =================================================================== + +# Movement +tmap <up> taskview_move up=1 +tmap <down> taskview_move down=1 +tmap <home> taskview_move to=0 +tmap <end> taskview_move to=-1 +tmap <pagedown> taskview_move down=1.0 pages=True +tmap <pageup> taskview_move up=1.0 pages=True +tmap <C-d> taskview_move down=0.5 pages=True +tmap <C-u> taskview_move up=0.5 pages=True + +copytmap <UP> k <C-p> +copytmap <DOWN> j <C-n> <CR> +copytmap <HOME> g +copytmap <END> G +copytmap <C-u> u +copytmap <PAGEDOWN> n f <C-F> <Space> +copytmap <PAGEUP> p b <C-B> + +# Changing priority and deleting tasks +tmap J eval -q fm.ui.taskview.task_move(-1) +tmap K eval -q fm.ui.taskview.task_move(0) +tmap dd eval -q fm.ui.taskview.task_remove() +tmap <pagedown> eval -q fm.ui.taskview.task_move(-1) +tmap <pageup> eval -q fm.ui.taskview.task_move(0) +tmap <delete> eval -q fm.ui.taskview.task_remove() + +# Basic +#tmap <C-l> redraw_window +tmap <ESC> taskview_close +copytmap <ESC> q Q w <C-c> + + +map sp console shell bash speedvid.sh %f%space +map x shell chmod -x %s + +#General +map V console shell vim%space +map cW bulkrename %s +map mkd console mkdir%space +map sc console shell ln -sT%space +map D console delete +map X shell atool -x %f +map Z shell tar -cvzf %f.tar.gz %s +map <C-f> fzf_select +map <C-l> fzf_locate + +#Document Manipulation +map p1s shell lpr -o sides=one-sided %f +map p2s shell lpr -o sides=two-sided-long-edge %f +map MP shell pandoc %f -o %f.pdf +map MX shell xelatex %f +map ML shell latex %f +map TC shell texclear +map Txa console shell cp ~/Documents/LaTeX/article.tex%space +map Txs console shell cp ~/Documents/LaTeX/beamer.tex%space +map Txh console shell cp ~/Documents/LaTeX/handout.tex%space + +#Image commands +map bg shell setbg %f +map bw shell wal -i %f && setbg %f +map C shell killall w3mimgdisplay && convert -rotate 90 %s %s +map F shell killall w3mimgdisplay && convert -flop %s %s +map bl shell killall w3mimgdisplay && convert %s -resize 1440x1080\> bl_%s +map TR shell convert %s -transparent white %s + +#Music (mpd) shortcuts +map MS shell mpd +map MK shell killall mpd +map Ma shell mpc add "%s" +map Ms shell mpc play +map Mp shell mpc toggle +map Mn shell mpc next +map Mb shell mpc prev +map MN shell mpc stop && mpc clear && mpc add "%s" +map Mo shell mpc seek 0% + +#Audio tagging (Requires eyeD3) +map Ta eval fm.open_console('shell eyeD3 -a ' + fm.thisfile.relative_path, position=15) +#Artist +map TA eval fm.open_console('shell eyeD3 -A ' + fm.thisfile.relative_path, position=15) +#Album +map Tb eval fm.open_console('shell eyeD3 -b ' + fm.thisfile.relative_path, position=15) +#Album artist +map Tt eval fm.open_console('shell eyeD3 -t "" ' + fm.thisfile.relative_path, position=16) +map Tn eval fm.open_console('shell eyeD3 -n "" ' + fm.thisfile.relative_path, position=16) + +#Downloading +map ytv console shell youtube-dl -ic%space +map yta console shell youtube-dl -xic%space + +eval cmd('source ' + fm.confpath('shortcuts.conf')) diff --git a/config/ranger/rifle.conf b/config/ranger/rifle.conf @@ -0,0 +1,236 @@ +# vim: ft=cfg +# +# This is the configuration file of "rifle", ranger's file executor/opener. +# Each line consists of conditions and a command. For each line the conditions +# are checked and if they are met, the respective command is run. +# +# Syntax: +# <condition1> , <condition2> , ... = command +# +# The command can contain these environment variables: +# $1-$9 | The n-th selected file +# $@ | All selected files +# +# If you use the special command "ask", rifle will ask you what program to run. +# +# Prefixing a condition with "!" will negate its result. +# These conditions are currently supported: +# match <regexp> | The regexp matches $1 +# ext <regexp> | The regexp matches the extension of $1 +# mime <regexp> | The regexp matches the mime type of $1 +# name <regexp> | The regexp matches the basename of $1 +# path <regexp> | The regexp matches the absolute path of $1 +# has <program> | The program is installed (i.e. located in $PATH) +# env <variable> | The environment variable "variable" is non-empty +# file | $1 is a file +# directory | $1 is a directory +# number <n> | change the number of this command to n +# terminal | stdin, stderr and stdout are connected to a terminal +# X | $DISPLAY is not empty (i.e. Xorg runs) +# +# There are also pseudo-conditions which have a "side effect": +# flag <flags> | Change how the program is run. See below. +# label <label> | Assign a label or name to the command so it can +# | be started with :open_with <label> in ranger +# | or `rifle -p <label>` in the standalone executable. +# else | Always true. +# +# Flags are single characters which slightly transform the command: +# f | Fork the program, make it run in the background. +# | New command = setsid $command >& /dev/null & +# r | Execute the command with root permissions +# | New command = sudo $command +# t | Run the program in a new terminal. If $TERMCMD is not defined, +# | rifle will attempt to extract it from $TERM. +# | New command = $TERMCMD -e $command +# Note: The "New command" serves only as an illustration, the exact +# implementation may differ. +# Note: When using rifle in ranger, there is an additional flag "c" for +# only running the current file even if you have marked multiple files. + +#------------------------------------------- +# Websites +#------------------------------------------- +# Rarely installed browsers get higher priority; It is assumed that if you +# install a rare browser, you probably use it. Firefox/konqueror/w3m on the +# other hand are often only installed as fallback browsers. + +ext x?html?, has waterfox, X, flag f = waterfox -- "$@" +ext x?html?, has surf, X, flag f = surf -- file://"$1" +ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@" +ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@" +ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@" +ext x?html?, has dwb, X, flag f = dwb -- "$@" +ext x?html?, has jumanji, X, flag f = jumanji -- "$@" +ext x?html?, has luakit, X, flag f = luakit -- "$@" +ext x?html?, has uzbl, X, flag f = uzbl -- "$@" +ext x?html?, has uzbl-tabbed, X, flag f = uzbl-tabbed -- "$@" +ext x?html?, has uzbl-browser, X, flag f = uzbl-browser -- "$@" +ext x?html?, has uzbl-core, X, flag f = uzbl-core -- "$@" +ext x?html?, has midori, X, flag f = midori -- "$@" +ext x?html?, has chromium, X, flag f = chromium -- "$@" +ext x?html?, has opera, X, flag f = opera -- "$@" +ext x?html?, has firefox, X, flag f = firefox -- "$@" +ext x?html?, has dillo, X, flag f = dillo -- "$@" +ext x?html?, has seamonkey, X, flag f = seamonkey -- "$@" +ext x?html?, has iceweasel, X, flag f = iceweasel -- "$@" +ext x?html?, has epiphany, X, flag f = epiphany -- "$@" +ext x?html?, has konqueror, X, flag f = konqueror -- "$@" +ext x?html?, has elinks, terminal = elinks "$@" +ext x?html?, has links2, terminal = links2 "$@" +ext x?html?, has links, terminal = links "$@" +ext x?html?, has lynx, terminal = lynx -- "$@" +ext x?html?, has w3m, terminal = w3m "$@" + + +#Spreadsheets for scim +ext sc|csv|sxc|xlsx?|xlt|xlw|gnm|gnumeric, = sc-im -- "$@" + +#------------------------------------------- +# Misc +#------------------------------------------- +# Define the "editor" for text files as first action +mime ^text, label editor = $EDITOR -- "$@" +mime ^text, label pager = "$PAGER" -- "$@" +!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@" +!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@" + +ext 1 = man "$1" +ext s[wmf]c, has zsnes, X = zsnes "$1" +ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1" +ext nes, has fceux, X = fceux "$1" +ext exe = wine "$1" +name ^[mM]akefile$ = make +ext asf, has mpv, X, flag f = mpv -- "$@" + +#-------------------------------------------- +# Code +#------------------------------------------- +ext py = python -- "$1" +ext pl = perl -- "$1" +ext rb = ruby -- "$1" +ext js = node -- "$1" +ext sh = sh -- "$1" +ext php = php -- "$1" + +#-------------------------------------------- +# Video/Audio with a GUI +#------------------------------------------- +mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@" +mime ^video|audio, has smplayer, X, flag f = smplayer "$@" +mime ^video, has mpv, X, flag f = mpv -- "$@" +mime ^video, has mpv, X, flag f = mpv --no-video -- "$@" +mime ^video, has mpv, X, flag f = mpv --fs -- "$@" +mime ^video, has mpv, X, flag f = mpv --loop -- "$@" +mime ^video, has mpv, X, flag f = mpv --title="obs" --autofit=1050x700 -- "$@" +mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@" +mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@" +mime ^video, has mplayer, X, flag f = mplayer -- "$@" +mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@" +# mime ^video|audio, has vlc, X, flag f = vlc -- "$@" +mime ^video|audio, has totem, X, flag f = totem -- "$@" +mime ^video|audio, has totem, X, flag f = totem --fullscreen -- "$@" +#-------------------------------------------- +# Audio without X +#------------------------------------------- +mime ^audio|ogg$, terminal, has mplayer = mplayer -- "$@" +mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@" +mime ^audio|ogg$, terminal, has mpv = mpv --no-audio-display -- "$@" +mime ^audio|ogg$ = tag "$@" +mime ^audio|ogg$, terminal, has mpv = mpv -- "$@" +ext midi?, terminal, has wildmidi = wildmidi -- "$@" + + +#-------------------------------------------- +# Video without X: +#------------------------------------------- +mime ^video, terminal, !X, has mpv = mpv -- "$@" +mime ^video, terminal, !X, has mplayer2 = mplayer2 -- "$@" +mime ^video, terminal, !X, has mplayer = mplayer -- "$@" + +#------------------------------------------- +# Documents +#------------------------------------------- +ext pdf, has llpp, X, flag f = llpp "$@" +ext pdf, has zathura, X, flag f = zathura -- "$@" +ext pdf, has mupdf, X, flag f = mupdf "$@" +ext pdf, has mupdf, X, flag f = mupdf -I "$@" +ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@" +ext pdf, has apvlv, X, flag f = apvlv -- "$@" +ext pdf, has xpdf, X, flag f = xpdf -- "$@" +ext pdf, has evince, X, flag f = evince -- "$@" +ext pdf, has atril, X, flag f = atril -- "$@" +ext pdf, has okular, X, flag f = okular -- "$@" +ext pdf, has epdfview, X, flag f = epdfview -- "$@" +ext pdf, has qpdfview, X, flag f = qpdfview "$@" + +ext epub, has zathura, X, flag f = zathura -- "$@" +ext epub, has mupdf, X, flag f = mupdf "$@" + +ext ps, has zathura, X, flag f = zathura -- "$@" + +ext docx, has abiword, X, flag f = abiword "$@" + +ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER" + +ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@" +ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@" +ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@" +ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@" +ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@" + +ext djvu, has zathura,X, flag f = zathura -- "$@" +ext djvu, has evince, X, flag f = evince -- "$@" +ext djvu, has atril, X, flag f = atril -- "$@" + +#------------------------------------------- +# Image Viewing: +#------------------------------------------- +mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@" +mime ^image/svg, has display, X, flag f = display -- "$@" +mime ^image/gif, has viewnior, X, flag f = viewnior -- "$@" +mime ^image/gif, has qutebrowser, X, flag f = qutebrowser -- "$@" + +ext xcf, X, flag f = gimp -- "$@" +mime ^image, has sxiv, X, flag f = sxiv -a -- "$@" +mime ^image, has feh, X, flag f = feh --scale-down --auto-zoom --image-bg black -- "$@" +mime ^image, has feh, X, flag f = feh --scale-down --auto-zoom -- "$@" +mime ^image, has mirage, X, flag f = mirage -- "$@" +mime ^image, has ristretto, X, flag f = ristretto "$@" +mime ^image, has eog, X, flag f = eog -- "$@" +mime ^image, has eom, X, flag f = eom -- "$@" +mime ^image, has gimp, X, flag f = gimp -- "$@" +mime ^image, has pinta, X, flag f = pinta -- "$@" +mime ^image, has mypaint, X, flag f = mypaint -- "$@" +mime ^image, has kolourpaint, X, flag f = kolourpaint -- "$@" + +#------------------------------------------- +# Archives +#------------------------------------------- +# This requires atool +ext jar = java -jar "$@" + +ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has als = als -- "$@" | "$PAGER" +ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has als = als -- "$@" | "$PAGER" +ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has aunpack = aunpack -- "$@" +ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has aunpack = aunpack -- "$@" + +# Fallback: +ext tar|gz, has tar = tar vvtf "$@" | "$PAGER" +ext tar|gz, has tar = tar vvxf "$@" + +#------------------------------------------- +# Misc +#------------------------------------------- +label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1" +label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1" +label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1" +label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1" + +# Define the editor for non-text files + pager as last action + !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|ms = ask +label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|ms = $EDITOR -- "$@" +label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|ms = "$PAGER" -- "$@" + +ext blend, has blender, X, flag f = blender -- "$@" +ext ms = $EDITOR -- "$@" diff --git a/config/ranger/scope.sh b/config/ranger/scope.sh @@ -0,0 +1,120 @@ +#!/usr/bin/env bash +# ranger supports enhanced previews. If the option "use_preview_script" +# is set to True and this file exists, this script will be called and its +# output is displayed in ranger. ANSI color codes are supported. + +# NOTES: This script is considered a configuration file. If you upgrade +# ranger, it will be left untouched. (You must update it yourself.) +# Also, ranger disables STDIN here, so interactive scripts won't work properly + +# Meanings of exit codes: +# code | meaning | action of ranger +# -----+------------+------------------------------------------- +# 0 | success | success. display stdout as preview +# 1 | no preview | failure. display no preview at all +# 2 | plain text | display the plain content of the file +# 3 | fix width | success. Don't reload when width changes +# 4 | fix height | success. Don't reload when height changes +# 5 | fix both | success. Don't ever reload +# 6 | image | success. display the image $cached points to as an image preview +# 7 | image | success. display the file directly as an image + +# Meaningful aliases for arguments: +path="$1" # Full path of the selected file +width="$2" # Width of the preview pane (number of fitting characters) +height="$3" # Height of the preview pane (number of fitting characters) +cached="$4" # Path that should be used to cache image previews +preview_images="$5" # "True" if image previews are enabled, "False" otherwise. + +maxln=200 # Stop after $maxln lines. Can be used like ls | head -n $maxln + +# Find out something about the file: +mimetype=$(file --mime-type -Lb "$path") +extension=$(/bin/echo "${path##*.}" | awk '{print tolower($0)}') + +# Functions: +# runs a command and saves its output into $output. Useful if you need +# the return value AND want to use the output in a pipe +try() { output=$(eval '"$@"'); } + +# writes the output of the previously used "try" command +dump() { /bin/echo "$output"; } + +# a common post-processing function used after most commands +trim() { head -n "$maxln"; } + +# wraps highlight to treat exit code 141 (killed by SIGPIPE) as success +safepipe() { "$@"; test $? = 0 -o $? = 141; } + +# Image previews, if enabled in ranger. +if [ "$preview_images" = "True" ]; then + case "$mimetype" in + image/svg+xml) + convert "$path" "$cached" && exit 6 || exit 1;; + image/*) + exit 7;; + # Image preview for video, disabled by default.: + ###video/*) + ### ffmpegthumbnailer -i "$path" -o "$cached" -s 0 && exit 6 || exit 1;; + esac +fi + +case "$extension" in + # Archive extensions: + a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\ + rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip) + try als "$path" && { dump | trim; exit 0; } + try acat "$path" && { dump | trim; exit 3; } + try bsdtar -lf "$path" && { dump | trim; exit 0; } + exit 1;; + csv) + sed "s/\(.*\".*\),\(.*\".*\)/\1~\2/;s/,/\t/g;s/~/,/g;s/\t\"/\t/g;s/\"\t/\t/g" "$path" && { dump| trim; exit 0; } || exit 1;; + rar) + # avoid password prompt by providing empty password + try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;; + 7z) + # avoid password prompt by providing empty password + try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;; + # PDF documents: + pdf) + try pdftoppm -jpeg -singlefile "$path" "${cached//.jpg}" && exit 6 || exit 1;; + #try pdftotext -l 10 -nopgbrk -q "$path" - && \ + #{ dump | trim | fmt -s -w $width; exit 0; } || exit 1;; + # BitTorrent Files + torrent) + try transmission-show "$path" && { dump | trim; exit 5; } || exit 1;; + # ODT Files + odt|ods|odp|sxw) + try odt2txt "$path" && { dump | trim; exit 5; } || exit 1;; + # HTML Pages: + htm|html|xhtml) + try w3m -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; } + try lynx -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; } + try elinks -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; } + ;; # fall back to highlight/cat if the text browsers fail +esac + +case "$mimetype" in + # Syntax highlight for text files: + text/* | */xml) + if [ "$(tput colors)" -ge 256 ]; then + pygmentize_format=terminal256 + highlight_format=ansi + else + pygmentize_format=terminal + highlight_format=ansi + fi + try safepipe highlight --out-format=${highlight_format} "$path" && { dump | trim; exit 5; } + try safepipe pygmentize -f ${pygmentize_format} "$path" && { dump | trim; exit 5; } + exit 2;; + # Ascii-previews of images: + image/*) + img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;; + # Display information about media files: + video/* | audio/*) + exiftool "$path" && exit 5 + # Use sed to remove spaces so the output fits into the narrow window + try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;; +esac + +exit 1 diff --git a/config/ranger/shortcuts.conf b/config/ranger/shortcuts.conf @@ -0,0 +1,51 @@ +map gh cd ~/ +map th tab_new ~/ +map mh shell mv -v %s ~/ +map Yh shell cp -rv %s ~/ +map gd cd ~/Documents +map td tab_new ~/Documents +map md shell mv -v %s ~/Documents +map Yd shell cp -rv %s ~/Documents +map gD cd ~/Downloads +map tD tab_new ~/Downloads +map mD shell mv -v %s ~/Downloads +map YD shell cp -rv %s ~/Downloads +map gm cd ~/Music +map tm tab_new ~/Music +map mm shell mv -v %s ~/Music +map Ym shell cp -rv %s ~/Music +map gpp cd ~/Pictures +map tpp tab_new ~/Pictures +map mpp shell mv -v %s ~/Pictures +map Ypp shell cp -rv %s ~/Pictures +map gvv cd ~/Videos +map tvv tab_new ~/Videos +map mvv shell mv -v %s ~/Videos +map Yvv shell cp -rv %s ~/Videos +map gcf cd ${XDG_CONFIG_HOME:-$HOME/.config} +map tcf tab_new ${XDG_CONFIG_HOME:-$HOME/.config} +map mcf shell mv -v %s ${XDG_CONFIG_HOME:-$HOME/.config} +map Ycf shell cp -rv %s ${XDG_CONFIG_HOME:-$HOME/.config} +map gcac cd ${XDG_CACHE_HOME:-$HOME/.cache} +map tcac tab_new ${XDG_CACHE_HOME:-$HOME/.cache} +map mcac shell mv -v %s ${XDG_CACHE_HOME:-$HOME/.cache} +map Ycac shell cp -rv %s ${XDG_CACHE_HOME:-$HOME/.cache} +map gsc cd ~/.local/bin +map tsc tab_new ~/.local/bin +map msc shell mv -v %s ~/.local/bin +map Ysc shell cp -rv %s ~/.local/bin +map gmn cd /mnt +map tmn tab_new /mnt +map mmn shell mv -v %s /mnt +map Ymn shell cp -rv %s /mnt +map bf shell $EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/files +map bd shell $EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/directories +map bw shell $EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/bookmarks +map cfa shell $EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc +map cfz shell $EDITOR $ZDOTDIR/.zshrc +map cfv shell $EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim +map cfm shell $EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc +map cfx shell $EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources +map cfu shell $EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls +map cfn shell $EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config +map cfk shell $EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/sxhkd/sxhkdrc diff --git a/config/shortcutrc b/config/shortcutrc @@ -0,0 +1,22 @@ +# vim: filetype=sh +alias h="cd ~/ && ls -a" \ +d="cd ~/Documents && ls -a" \ +D="cd ~/Downloads && ls -a" \ +m="cd ~/Music && ls -a" \ +pp="cd ~/Pictures && ls -a" \ +vv="cd ~/Videos && ls -a" \ +cf="cd ${XDG_CONFIG_HOME:-$HOME/.config} && ls -a" \ +cac="cd ${XDG_CACHE_HOME:-$HOME/.cache} && ls -a" \ +sc="cd ~/.local/bin && ls -a" \ +mn="cd /mnt && ls -a" \ +bf="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/files" \ +bd="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/directories" \ +bw="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/bookmarks" \ +cfa="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc" \ +cfz="$EDITOR $ZDOTDIR/.zshrc" \ +cfv="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim" \ +cfm="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc" \ +cfx="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources" \ +cfu="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls" \ +cfn="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config" \ +cfk="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/sxhkd/sxhkdrc" \ diff --git a/config/sxiv/exec/key-handler b/config/sxiv/exec/key-handler @@ -0,0 +1,34 @@ +#!/usr/bin/env sh +while read file +do + case "$1" in + "w") setbg "$file" & ;; + "c") + [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/directories | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" + [ -z "$destdir" ] && exit + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit + cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & + ;; + "m") + [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/directories | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" + [ -z "$destdir" ] && exit + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit + mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & + ;; + "r") + convert -rotate 90 "$file" "$file" ;; + "R") + convert -rotate -90 "$file" "$file" ;; + "f") + convert -flop "$file" "$file" ;; + "y") + echo -n "$file" | xclip -selection clipboard && + notify-send "$file copied to clipboard" & ;; + "Y") + readlink -f "$file" | xclip -selection clipboard && + notify-send "$(readlink -f "$file") copied to clipboard" & ;; + "d") + [ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;; + "g") ifinstalled gimp && gimp "$file" & ;; + esac +done diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf @@ -0,0 +1,10 @@ +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix +unbind | +unbind - +unbind r +bind-key | split-window -h +bind-key - split-window -v +bind-key N break-pane +bind-key r source-file ~/.config/tmux/tmux.conf diff --git a/config/user-dirs.dirs b/config/user-dirs.dirs @@ -0,0 +1 @@ +XDG_DESKTOP_DIR="$HOME/" diff --git a/config/xinitrc b/config/xinitrc @@ -0,0 +1,22 @@ +#!/bin/sh + +# xinitrc runs automatically when you run startx. + +# There are some small but important commands that need to be run when we start +# the graphical environment. I keep those commands in ~/config/xprofile because +# that file is run automatically if someone uses a display manager (login +# screen) and so they are needed there. To prevent doubling up commands, I +# source them here with the line below. + +# export STATUSBAR="i3blocks" # Uncomment this line when using i3. + +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/xprofile" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/xprofile" + +# Your default LARBS WM is determined in your `~/.profile` on login. Here we +# run the proper command to run when the graphical environment starts. + +# Comment/uncomment these lines depending on what wm you want to use. Also +# check the i3blocks line above. +ssh-agent dwm +# ssh-agent i3 +exec dwm diff --git a/config/xprofile b/config/xprofile @@ -0,0 +1,21 @@ +#/bin/bash + +# This file runs when a DM logs you into a graphical session. +# If you use startx/xinit like a Chad, this file will also be sourced. + +# This file's true location is in ~/.config/xprofile and a link exists to it in +# ~/.xprofile. If you do not use a DM, you may remove the link to it to have a +# cleaner home. + +# Fix Gnome Apps Slow Start due to failing services +# Add this when you include flatpak in your system +dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY + +setxkbmap gb & +setbg ~/Pictures/Wallpapers & +remaps & # run the remaps script, switching caps/esc and more; check it for more info +xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources & # Uncomment to use Xresources colors/settings on startup +xcompmgr & # xcompmgr for transparency +dunst & # dunst for notifications +xset r rate 300 50 & # Speed xrate up +unclutter & # Remove mouse when idle diff --git a/config/zsh/.zcompdump b/config/zsh/.zcompdump @@ -0,0 +1,1790 @@ +#files: 788 version: 5.8 + +_comps=( +'-' '_precommand' +'-*-' '_bootctl' +'.' '_source' +'5g' '_go' +'5l' '_go' +'6g' '_go' +'6l' '_go' +'8g' '_go' +'8l' '_go' +'a2ps' '_a2ps' +'aaaa' '_hosts' +'aap' '_aap' +'abcde' '_abcde' +'ack' '_ack' +'ack2' '_ack' +'ack-grep' '_ack' +'ack-standalone' '_ack' +'acpi' '_acpi' +'acpitool' '_acpitool' +'acroread' '_acroread' +'adb' '_adb' +'add-zle-hook-widget' '_add-zle-hook-widget' +'add-zsh-hook' '_add-zsh-hook' +'admin' '_sccs' +'ali' '_mh' +'alias' '_alias' +'amaya' '_webbrowser' +'analyseplugin' '_analyseplugin' +'animate' '_imagemagick' +'anno' '_mh' +'ansible' '_ansible' +'ansible-config' '_ansible' +'ansible-console' '_ansible' +'ansible-doc' '_ansible' +'ansible-galaxy' '_ansible' +'ansible-inventory' '_ansible' +'ansible-playbook' '_ansible' +'ansible-pull' '_ansible' +'ansible-vault' '_ansible' +'ant' '_ant' +'antiword' '_antiword' +'aodh' '_openstack' +'aoss' '_precommand' +'apache2ctl' '_apachectl' +'apachectl' '_apachectl' +'aplay' '_alsa-utils' +'apm' '_apm' +'appletviewer' '_java' +'apropos' '_man' +'apvlv' '_pdf' +'arecord' '_alsa-utils' +'arena' '_webbrowser' +'arp' '_arp' +'arping' '_arping' +'-array-value-' '_value' +'asciidoctor' '_asciidoctor' +'asciinema' '_asciinema' +'ash' '_sh' +'-assign-parameter-' '_assign' +'at' '_at' +'atq' '_at' +'atrm' '_at' +'attr' '_attr' +'augtool' '_augeas' +'autoload' '_typeset' +'avahi-browse' '_avahi' +'avahi-browse-domains' '_avahi' +'avahi-resolve' '_avahi' +'avahi-resolve-address' '_avahi' +'avahi-resolve-host-name' '_avahi' +'awk' '_awk' +'b2sum' '_md5sum' +'barbican' '_openstack' +'base32' '_base64' +'base64' '_base64' +'basename' '_basename' +'bash' '_bash' +'batch' '_at' +'baz' '_baz' +'beep' '_beep' +'bg' '_jobs_bg' +'bibtex' '_bibtex' +'bindkey' '_bindkey' +'bison' '_bison' +'bmake' '_make' +'bogofilter' '_bogofilter' +'bogotune' '_bogofilter' +'bogoutil' '_bogofilter' +'bootctl' '_bootctl' +'bpython' '_bpython' +'bpython2' '_bpython' +'bpython2-gtk' '_bpython' +'bpython2-urwid' '_bpython' +'bpython3' '_bpython' +'bpython3-gtk' '_bpython' +'bpython3-urwid' '_bpython' +'bpython-gtk' '_bpython' +'bpython-urwid' '_bpython' +'-brace-parameter-' '_brace_parameter' +'brctl' '_brctl' +'bsdgrep' '_grep' +'bsdtar' '_tar' +'btdownloadcurses' '_bittorrent' +'btdownloadgui' '_bittorrent' +'btdownloadheadless' '_bittorrent' +'btlaunchmany' '_bittorrent' +'btlaunchmanycurses' '_bittorrent' +'btmakemetafile' '_bittorrent' +'btreannounce' '_bittorrent' +'btrename' '_bittorrent' +'btrfs' '_btrfs' +'btshowmetainfo' '_bittorrent' +'bttrack' '_bittorrent' +'buildhash' '_ispell' +'builtin' '_builtin' +'bunzip2' '_bzip2' +'burst' '_mh' +'busctl' '_busctl' +'bzcat' '_bzip2' +'bzegrep' '_grep' +'bzfgrep' '_grep' +'bzgrep' '_grep' +'bzip2' '_bzip2' +'bzip2recover' '_bzip2' +'bzr' '_bzr' +'c++' '_gcc' +'cabal' '_cabal' +'cal' '_cal' +'calendar' '_calendar' +'cargo' '_cargo' +'cat' '_cat' +'catchsegv' '_precommand' +'cc' '_gcc' +'ccal' '_ccal' +'cd' '_cd' +'cdc' '_sccs' +'cdcd' '_cdcd' +'cdr' '_cdr' +'cdrdao' '_cdrdao' +'cdrecord' '_cdrecord' +'ceilometer' '_openstack' +'certtool' '_gnutls' +'cftp' '_twisted' +'chage' '_users' +'chattr' '_chattr' +'chcon' '_chcon' +'chdir' '_cd' +'chfn' '_users' +'chgrp' '_chown' +'chimera' '_webbrowser' +'chkconfig' '_chkconfig' +'chkstow' '_stow' +'chmod' '_chmod' +'chown' '_chown' +'chpass' '_chsh' +'chroot' '_chroot' +'chrt' '_chrt' +'chsh' '_chsh' +'ci' '_rcs' +'cifsiostat' '_sysstat' +'cinder' '_openstack' +'ckeygen' '_twisted' +'cksum' '_cksum' +'clang' '_gcc' +'clang++' '_gcc' +'clay' '_clay' +'clear' '_nothing' +'cloudkitty' '_openstack' +'clusterdb' '_postgresql' +'cmp' '_cmp' +'cmus' '_cmus' +'cmus-remote' '_cmus' +'co' '_rcs' +'code' '_code' +'column' '_column' +'comb' '_sccs' +'combine' '_imagemagick' +'combinediff' '_patchutils' +'comm' '_comm' +'-command-' '_autocd' +'command' '_command' +'-command-line-' '_normal' +'comp' '_mh' +'compadd' '_compadd' +'compdef' '_compdef' +'composer' '_composer' +'composer.phar' '_composer' +'composite' '_imagemagick' +'compress' '_compress' +'conch' '_twisted' +'-condition-' '_condition' +'config.status' '_configure' +'configure' '_configure' +'convert' '_imagemagick' +'coredumpctl' '_coredumpctl' +'cowsay' '_cowsay' +'cowthink' '_cowsay' +'cp' '_cp' +'cpio' '_cpio' +'cplay' '_cplay' +'cpupower' '_cpupower' +'createdb' '_postgresql' +'createuser' '_postgresql' +'crontab' '_crontab' +'crsh' '_cssh' +'cryptsetup' '_cryptsetup' +'cscope' '_cscope' +'csh' '_sh' +'cssh' '_cssh' +'curl' '_curl' +'cut' '_cut' +'cvs' '_cvs' +'darcs' '_darcs' +'dash' '_sh' +'date' '_date' +'dbus-launch' '_dbus' +'dbus-monitor' '_dbus' +'dbus-send' '_dbus' +'dconf' '_dconf' +'dcop' '_dcop' +'dcopclient' '_dcop' +'dcopfind' '_dcop' +'dcopobject' '_dcop' +'dcopref' '_dcop' +'dcopstart' '_dcop' +'dd' '_dd' +'declare' '_typeset' +'-default-' '_default' +'delta' '_sccs' +'designate' '_openstack' +'devtodo' '_devtodo' +'df' '_df' +'dhclient' '_dhclient' +'dhclient3' '_dhclient' +'dict' '_dict' +'diff' '_diff' +'diff3' '_diff3' +'diffstat' '_diffstat' +'dig' '_dig' +'dillo' '_webbrowser' +'dircmp' '_directories' +'dirs' '_dirs' +'disable' '_disable' +'disown' '_jobs_fg' +'display' '_imagemagick' +'dist' '_mh' +'django-admin' '_django' +'django-admin.py' '_django' +'dkms' '_dkms' +'dmake' '_make' +'dmesg' '_dmesg' +'dmidecode' '_dmidecode' +'doas' '_doas' +'domainname' '_yp' +'dos2unix' '_dos2unix' +'drill' '_drill' +'dropdb' '_postgresql' +'dropuser' '_postgresql' +'dsh' '_dsh' +'dtruss' '_dtruss' +'du' '_du' +'dvibook' '_dvi' +'dviconcat' '_dvi' +'dvicopy' '_dvi' +'dvidvi' '_dvi' +'dvipdf' '_dvi' +'dvips' '_dvi' +'dviselect' '_dvi' +'dvitodvi' '_dvi' +'dvitype' '_dvi' +'dwb' '_webbrowser' +'e2label' '_e2label' +'eatmydata' '_precommand' +'ecasound' '_ecasound' +'echotc' '_echotc' +'echoti' '_echoti' +'ed' '_ed' +'egrep' '_grep' +'elfdump' '_elfdump' +'elinks' '_elinks' +'emulate' '_emulate' +'enable' '_enable' +'enscript' '_enscript' +'entr' '_entr' +'env' '_env' +'eog' '_eog' +'epdfview' '_pdf' +'epsffit' '_psutils' +'-equal-' '_equal' +'erb' '_ruby' +'espeak' '_espeak' +'etags' '_etags' +'ethtool' '_ethtool' +'eu-nm' '_nm' +'eu-objdump' '_objdump' +'eu-readelf' '_readelf' +'eu-strings' '_strings' +'eval' '_precommand' +'eview' '_vim' +'evim' '_vim' +'evince' '_evince' +'exec' '_exec' +'expand' '_unexpand' +'export' '_typeset' +'express' '_webbrowser' +'extcheck' '_java' +'extractres' '_psutils' +'fakeroot' '_fakeroot' +'false' '_nothing' +'fc' '_fc' +'fc-list' '_xft_fonts' +'fc-match' '_xft_fonts' +'feh' '_feh' +'fetchmail' '_fetchmail' +'ffmpeg' '_ffmpeg' +'fg' '_jobs_fg' +'fgrep' '_grep' +'figlet' '_figlet' +'filterdiff' '_patchutils' +'find' '_find' +'findaffix' '_ispell' +'findmnt' '_findmnt' +'finger' '_finger' +'firefox' '_mozilla' +'-first-' '_first' +'fixdlsrps' '_psutils' +'fixfmps' '_psutils' +'fixmacps' '_psutils' +'fixpsditps' '_psutils' +'fixpspps' '_psutils' +'fixscribeps' '_psutils' +'fixtpps' '_psutils' +'fixwfwps' '_psutils' +'fixwpps' '_psutils' +'fixwwps' '_psutils' +'flac' '_flac' +'flex' '_flex' +'flex++' '_flex' +'flipdiff' '_patchutils' +'flist' '_mh' +'flists' '_mh' +'float' '_typeset' +'fmt' '_fmt' +'fmttest' '_mh' +'fned' '_zed' +'fnext' '_mh' +'fold' '_fold' +'folder' '_mh' +'folders' '_mh' +'fortune' '_fortune' +'forw' '_mh' +'fprev' '_mh' +'free' '_free' +'freebsd-make' '_make' +'freezer' '_openstack' +'fsh' '_fsh' +'ftp' '_hosts' +'functions' '_typeset' +'fuser' '_fuser' +'fusermount' '_fusermount' +'fwhois' '_whois' +'g++' '_gcc' +'galeon' '_webbrowser' +'gawk' '_awk' +'gb2sum' '_md5sum' +'gbase32' '_base64' +'gbase64' '_base64' +'gbasename' '_basename' +'gcat' '_cat' +'gcc' '_gcc' +'gccgo' '_go' +'gchgrp' '_chown' +'gchmod' '_chmod' +'gchown' '_chown' +'gchroot' '_chroot' +'gcksum' '_cksum' +'gcmp' '_cmp' +'gcomm' '_comm' +'gcore' '_gcore' +'gcp' '_cp' +'gcut' '_cut' +'gdate' '_date' +'gdb' '_gdb' +'gdd' '_dd' +'gdf' '_df' +'gdiff' '_diff' +'gdu' '_du' +'geany' '_geany' +'gegrep' '_grep' +'gem' '_gem' +'genisoimage' '_genisoimage' +'genv' '_env' +'get' '_sccs' +'getafm' '_psutils' +'getconf' '_getconf' +'getent' '_getent' +'getfacl' '_getfacl' +'getfacl.exe' '_getfacl' +'getfattr' '_attr' +'getmail' '_getmail' +'getopt' '_getopt' +'getopts' '_vars' +'gex' '_vim' +'gexpand' '_unexpand' +'gfgrep' '_grep' +'gfind' '_find' +'gfmt' '_fmt' +'gfold' '_fold' +'ggetopt' '_getopt' +'ggrep' '_grep' +'ggv' '_gnome-gv' +'ghead' '_head' +'ghostscript' '_ghostscript' +'ghostview' '_pspdf' +'gid' '_id' +'ginstall' '_install' +'git' '_git' +'git-cvsserver' '_git' +'gitk' '_git' +'git-receive-pack' '_git' +'git-shell' '_git' +'git-upload-archive' '_git' +'git-upload-pack' '_git' +'gjoin' '_join' +'glance' '_openstack' +'gln' '_ln' +'global' '_global' +'glocate' '_locate' +'gls' '_ls' +'gm' '_graphicsmagick' +'gmake' '_make' +'gmd5sum' '_md5sum' +'gmkdir' '_mkdir' +'gmkfifo' '_mkfifo' +'gmknod' '_mknod' +'gmktemp' '_mktemp' +'gmplayer' '_mplayer' +'gmv' '_mv' +'gnl' '_nl' +'gnocchi' '_openstack' +'gnome-gv' '_gnome-gv' +'gnumfmt' '_numfmt' +'gnupod_addsong' '_gnupod' +'gnupod_addsong.pl' '_gnupod' +'gnupod_check' '_gnupod' +'gnupod_check.pl' '_gnupod' +'gnupod_INIT' '_gnupod' +'gnupod_INIT.pl' '_gnupod' +'gnupod_search' '_gnupod' +'gnupod_search.pl' '_gnupod' +'gnutls-cli' '_gnutls' +'gnutls-cli-debug' '_gnutls' +'gnutls-serv' '_gnutls' +'god' '_od' +'gofmt' '_go' +'gpasswd' '_gpasswd' +'gpaste' '_paste' +'gpatch' '_patch' +'gpg' '_gpg' +'gpg2' '_gpg' +'gpgv' '_gpg' +'gpg-zip' '_gpg' +'gphoto2' '_gphoto2' +'gprintenv' '_printenv' +'gprof' '_gprof' +'gqview' '_gqview' +'gradle' '_gradle' +'gradlew' '_gradle' +'grail' '_webbrowser' +'greadlink' '_readlink' +'grep' '_grep' +'grepdiff' '_patchutils' +'grm' '_rm' +'grmdir' '_rmdir' +'groff' '_groff' +'groupadd' '_user_admin' +'groupdel' '_groups' +'groupmod' '_user_admin' +'groups' '_users' +'growisofs' '_growisofs' +'gs' '_ghostscript' +'gsbj' '_pspdf' +'gsdj' '_pspdf' +'gsdj500' '_pspdf' +'gsed' '_sed' +'gseq' '_seq' +'gsettings' '_gsettings' +'gsha1sum' '_md5sum' +'gsha224sum' '_md5sum' +'gsha256sum' '_md5sum' +'gsha384sum' '_md5sum' +'gsha512sum' '_md5sum' +'gshred' '_shred' +'gshuf' '_shuf' +'gslj' '_pspdf' +'gslp' '_pspdf' +'gsnd' '_pspdf' +'gsort' '_sort' +'gsplit' '_split' +'gstat' '_stat' +'gstdbuf' '_stdbuf' +'gstrings' '_strings' +'gstty' '_stty' +'gsum' '_cksum' +'gtac' '_tac' +'gtail' '_tail' +'gtar' '_tar' +'gtee' '_tee' +'gtimeout' '_timeout' +'gtouch' '_touch' +'gtr' '_tr' +'gtty' '_tty' +'guilt' '_guilt' +'guilt-add' '_guilt' +'guilt-applied' '_guilt' +'guilt-delete' '_guilt' +'guilt-files' '_guilt' +'guilt-fold' '_guilt' +'guilt-fork' '_guilt' +'guilt-header' '_guilt' +'guilt-help' '_guilt' +'guilt-import' '_guilt' +'guilt-import-commit' '_guilt' +'guilt-init' '_guilt' +'guilt-new' '_guilt' +'guilt-next' '_guilt' +'guilt-patchbomb' '_guilt' +'guilt-pop' '_guilt' +'guilt-prev' '_guilt' +'guilt-push' '_guilt' +'guilt-rebase' '_guilt' +'guilt-refresh' '_guilt' +'guilt-rm' '_guilt' +'guilt-series' '_guilt' +'guilt-status' '_guilt' +'guilt-top' '_guilt' +'guilt-unapplied' '_guilt' +'guname' '_uname' +'gunexpand' '_unexpand' +'guniq' '_uniq' +'gunzip' '_gzip' +'guptime' '_uptime' +'gv' '_gv' +'gview' '_vim' +'gvim' '_vim' +'gvimdiff' '_vim' +'gwc' '_wc' +'gwho' '_who' +'gxargs' '_xargs' +'gzcat' '_gzip' +'gzegrep' '_grep' +'gzfgrep' '_grep' +'gzgrep' '_grep' +'gzilla' '_webbrowser' +'gzip' '_gzip' +'hash' '_hash' +'hd' '_hexdump' +'head' '_head' +'heat' '_openstack' +'help' '_sccs' +'hexdump' '_hexdump' +'hilite' '_precommand' +'history' '_fc' +'host' '_host' +'hostname' '_hostname' +'hostnamectl' '_hostnamectl' +'hotjava' '_webbrowser' +'htop' '_htop' +'iceweasel' '_mozilla' +'icombine' '_ispell' +'iconv' '_iconv' +'iconvconfig' '_iconvconfig' +'id' '_id' +'identify' '_imagemagick' +'ifconfig' '_ifconfig' +'ifdown' '_net_interfaces' +'iftop' '_iftop' +'ifup' '_net_interfaces' +'ijoin' '_ispell' +'img2sixel' '_img2sixel' +'import' '_imagemagick' +'inc' '_mh' +'includeres' '_psutils' +'info' '_texinfo' +'infocmp' '_terminals' +'initctl' '_initctl' +'initdb' '_postgresql' +'insmod' '_modutils' +'install' '_install' +'install-info' '_texinfo' +'integer' '_typeset' +'interdiff' '_patchutils' +'ionice' '_ionice' +'iostat' '_iostat' +'ip' '_ip' +'ip6tables' '_iptables' +'ip6tables-restore' '_iptables' +'ip6tables-save' '_iptables' +'ipkg' '_opkg' +'ipsec' '_ipsec' +'ipset' '_ipset' +'iptables' '_iptables' +'iptables-restore' '_iptables' +'iptables-save' '_iptables' +'irb' '_ruby' +'ironic' '_openstack' +'irssi' '_irssi' +'isag' '_sysstat' +'ispell' '_ispell' +'iwconfig' '_iwconfig' +'jadetex' '_tex' +'jar' '_java' +'jarsigner' '_java' +'java' '_java' +'javac' '_java' +'javadoc' '_java' +'javah' '_java' +'javap' '_java' +'jdb' '_java' +'jobs' '_jobs_builtin' +'joe' '_joe' +'join' '_join' +'journalctl' '_journalctl' +'jq' '_jq' +'kdeconnect-cli' '_kdeconnect' +'kernel-install' '_kernel-install' +'keystone' '_openstack' +'keytool' '_java' +'kfmclient' '_kfmclient' +'kill' '_kill' +'killall' '_killall' +'killall5' '_killall' +'kioclient' '_kfmclient' +'knock' '_knock' +'konqueror' '_webbrowser' +'kpartx' '_kpartx' +'kpdf' '_pdf' +'ksh' '_sh' +'ksh88' '_sh' +'ksh93' '_sh' +'kvno' '_kvno' +'last' '_last' +'lastb' '_last' +'latex' '_tex' +'latexmk' '_tex' +'ldconfig' '_ldconfig' +'ldconfig.real' '_ldconfig' +'ldd' '_ldd' +'less' '_less' +'let' '_math' +'lftp' '_ncftp' +'lha' '_lha' +'libinput' '_libinput' +'light' '_webbrowser' +'limit' '_limit' +'links' '_links' +'links2' '_links' +'linux' '_uml' +'lldb' '_lldb' +'llvm-g++' '_gcc' +'llvm-gcc' '_gcc' +'llvm-objdump' '_objdump' +'ln' '_ln' +'loadkeys' '_loadkeys' +'local' '_typeset' +'locale' '_locale' +'localectl' '_localectl' +'localedef' '_localedef' +'locate' '_locate' +'log' '_nothing' +'loginctl' '_loginctl' +'logname' '_nothing' +'look' '_look' +'losetup' '_losetup' +'lp' '_lp' +'lpadmin' '_lp' +'lpinfo' '_lp' +'lpoptions' '_lp' +'lpq' '_lp' +'lpr' '_lp' +'lprm' '_lp' +'lpstat' '_lp' +'ls' '_ls' +'lsattr' '_lsattr' +'lsblk' '_lsblk' +'lsdiff' '_patchutils' +'lsinitcpio' '_mkinitcpio' +'lsmod' '_modutils' +'lsof' '_lsof' +'lsusb' '_lsusb' +'ltrace' '_ltrace' +'lua' '_lua' +'luarocks' '_luarocks' +'lynx' '_lynx' +'lz4' '_lz4' +'lz4c' '_lz4' +'lz4c32' '_lz4' +'lz4cat' '_lz4' +'lzcat' '_xz' +'lzma' '_xz' +'lzop' '_lzop' +'mac2unix' '_dos2unix' +'machinectl' '_machinectl' +'magnum' '_openstack' +'mail' '_mail' +'Mail' '_mail' +'mailx' '_mail' +'make' '_make' +'makeinfo' '_texinfo' +'makepkg' '_pacman' +'man' '_man' +'manage.py' '_django' +'manila' '_openstack' +'mark' '_mh' +'-math-' '_math' +'matlab' '_matlab' +'mattrib' '_mtools' +'mcd' '_mtools' +'mcopy' '_mtools' +'md2' '_cksum' +'md4' '_cksum' +'md5' '_cksum' +'md5sum' '_md5sum' +'mdadm' '_mdadm' +'mdel' '_mtools' +'mdeltree' '_mtools' +'mdir' '_mtools' +'mdu' '_mtools' +'mencal' '_mencal' +'mere' '_mere' +'merge' '_rcs' +'metaflac' '_flac' +'mformat' '_mtools' +'mgv' '_pspdf' +'mhfixmsg' '_mh' +'mhlist' '_mh' +'mhmail' '_mh' +'mhn' '_mh' +'mhparam' '_mh' +'mhpath' '_mh' +'mhshow' '_mh' +'mhstore' '_mh' +'mii-tool' '_mii-tool' +'mistral' '_openstack' +'mkdir' '_mkdir' +'mkfifo' '_mkfifo' +'mkinitcpio' '_mkinitcpio' +'mkisofs' '_growisofs' +'mknod' '_mknod' +'mksh' '_sh' +'mktemp' '_mktemp' +'mktunes' '_gnupod' +'mktunes.pl' '_gnupod' +'mlabel' '_mtools' +'mlocate' '_locate' +'mmd' '_mtools' +'mmm' '_webbrowser' +'mmount' '_mtools' +'mmove' '_mtools' +'modinfo' '_modutils' +'modprobe' '_modutils' +'module' '_module' +'mogrify' '_imagemagick' +'monasca' '_openstack' +'mondoarchive' '_mondo' +'montage' '_imagemagick' +'moosic' '_moosic' +'Mosaic' '_webbrowser' +'mosh' '_mosh' +'mount' '_mount' +'mozilla' '_mozilla' +'mozilla-firefox' '_mozilla' +'mozilla-xremote-client' '_mozilla' +'mpc' '_mpc' +'mplayer' '_mplayer' +'mpstat' '_sysstat' +'mpv' '_mpv' +'mr' '_myrepos' +'mrd' '_mtools' +'mread' '_mtools' +'mren' '_mtools' +'msgchk' '_mh' +'mt' '_mt' +'mtn' '_monotone' +'mtoolstest' '_mtools' +'mtr' '_mtr' +'mtype' '_mtools' +'munchlist' '_ispell' +'mupdf' '_mupdf' +'murano' '_openstack' +'mush' '_mail' +'mutt' '_mutt' +'mv' '_mv' +'mvim' '_vim' +'mx' '_hosts' +'mysql' '_mysql_utils' +'mysqladmin' '_mysql_utils' +'mysqldiff' '_mysqldiff' +'mysqldump' '_mysql_utils' +'mysqlimport' '_mysql_utils' +'mysqlshow' '_mysql_utils' +'nail' '_mail' +'native2ascii' '_java' +'nautilus' '_nautilus' +'nawk' '_awk' +'nc' '_netcat' +'ncal' '_cal' +'ncftp' '_ncftp' +'ncl' '_nedit' +'nedit' '_nedit' +'nedit-nc' '_nedit' +'netcat' '_netcat' +'netrik' '_webbrowser' +'netscape' '_netscape' +'netstat' '_netstat' +'networkctl' '_networkctl' +'neutron' '_openstack' +'new' '_mh' +'newgrp' '_groups' +'next' '_mh' +'nginx' '_nginx' +'ngrep' '_ngrep' +'nice' '_nice' +'nkf' '_nkf' +'nl' '_nl' +'nm' '_nm' +'nmap' '_nmap' +'nmblookup' '_samba' +'nmcli' '_networkmanager' +'nocorrect' '_precommand' +'noglob' '_precommand' +'nohup' '_precommand' +'nordvpn' '_nordvpn_auto_complete' +'notmuch' '_notmuch' +'nova' '_openstack' +'npm' '_npm' +'ns' '_hosts' +'nslookup' '_nslookup' +'ntalk' '_other_accounts' +'numfmt' '_numfmt' +'nvim' '_vim' +'objdump' '_objdump' +'od' '_od' +'ogg123' '_vorbis' +'oggdec' '_vorbis' +'oggenc' '_vorbis' +'ogginfo' '_vorbis' +'oksh' '_sh' +'okular' '_okular' +'openstack' '_openstack' +'opera' '_webbrowser' +'opera-next' '_webbrowser' +'opkg' '_opkg' +'p4' '_perforce' +'p4d' '_perforce' +'pacat' '_pulseaudio' +'pack' '_pack' +'packf' '_mh' +'pacman' '_pacman' +'pacman-key' '_pacman' +'pacman.static' '_pacman' +'pacmd' '_pulseaudio' +'pactl' '_pulseaudio' +'padsp' '_pulseaudio' +'pandoc' '_pandoc' +'paplay' '_pulseaudio' +'-parameter-' '_parameter' +'parec' '_pulseaudio' +'parecord' '_pulseaudio' +'pass' '_pass' +'passwd' '_users' +'paste' '_paste' +'pasuspender' '_pulseaudio' +'patch' '_patch' +'pax' '_pax' +'pcat' '_pack' +'pcred' '_pids' +'pdf2dsc' '_pdf' +'pdf2ps' '_pdf' +'pdffonts' '_pdf' +'pdfimages' '_pdf' +'pdfinfo' '_pdf' +'pdfjadetex' '_tex' +'pdflatex' '_tex' +'pdfopt' '_pdf' +'pdftex' '_tex' +'pdftexi2dvi' '_texinfo' +'pdftk' '_pdftk' +'pdftopbm' '_pdf' +'pdftops' '_pdf' +'pdftotext' '_pdf' +'pdksh' '_sh' +'perl' '_perl' +'perldoc' '_perldoc' +'pfiles' '_pids' +'pflags' '_pids' +'pg_config' '_postgresql' +'pg_ctl' '_postgresql' +'pg_dump' '_postgresql' +'pg_dumpall' '_postgresql' +'pg_isready' '_postgresql' +'pgrep' '_pgrep' +'pg_restore' '_postgresql' +'pg_upgrade' '_postgresql' +'php' '_php' +'pick' '_mh' +'picocom' '_picocom' +'pidof' '_pidof' +'pidstat' '_sysstat' +'pigz' '_gzip' +'pine' '_pine' +'pinef' '_pine' +'pinfo' '_texinfo' +'ping' '_ping' +'ping6' '_ping' +'pkgadd' '_pkgadd' +'pkg-config' '_pkg-config' +'pkgfile' '_pkgfile' +'pkginfo' '_pkginfo' +'pkgrm' '_pkgrm' +'pkill' '_pgrep' +'pldd' '_pids' +'pmake' '_make' +'pman' '_perl_modules' +'pmap' '_pmap' +'pmcat' '_perl_modules' +'pmdesc' '_perl_modules' +'pmeth' '_perl_modules' +'pmexp' '_perl_modules' +'pmfunc' '_perl_modules' +'pmload' '_perl_modules' +'pmls' '_perl_modules' +'pmpath' '_perl_modules' +'pmvers' '_perl_modules' +'podgrep' '_perl_modules' +'podpath' '_perl_modules' +'podtoc' '_perl_modules' +'poff' '_pon' +'policytool' '_java' +'pon' '_pon' +'popd' '_directory_stack' +'postconf' '_postfix' +'postgres' '_postgresql' +'postmaster' '_postgresql' +'postqueue' '_postfix' +'postsuper' '_postfix' +'prev' '_mh' +'print' '_print' +'printenv' '_printenv' +'printf' '_print' +'prompt' '_prompt' +'prove' '_prove' +'prs' '_sccs' +'prt' '_sccs' +'prun' '_pids' +'ps' '_ps' +'ps2ascii' '_pspdf' +'ps2epsi' '_postscript' +'ps2pdf' '_postscript' +'ps2pdf12' '_postscript' +'ps2pdf13' '_postscript' +'ps2pdf14' '_postscript' +'ps2pdfwr' '_postscript' +'ps2ps' '_postscript' +'psbook' '_psutils' +'psed' '_sed' +'psig' '_pids' +'psmerge' '_psutils' +'psmulti' '_postscript' +'psnup' '_psutils' +'psql' '_postgresql' +'psresize' '_psutils' +'psselect' '_psutils' +'pstack' '_pids' +'pstoedit' '_pspdf' +'pstop' '_pids' +'pstops' '_psutils' +'pstotgif' '_pspdf' +'pswrap' '_postscript' +'pulseaudio' '_pulseaudio' +'pump' '_pump' +'pushd' '_cd' +'pv' '_pv' +'pwait' '_pids' +'pwdx' '_pids' +'pwgen' '_pwgen' +'pyhtmlizer' '_twisted' +'qdbus' '_qdbus' +'qiv' '_qiv' +'quilt' '_quilt' +'r' '_fc' +'rake' '_rake' +'ranlib' '_ranlib' +'rar' '_rar' +'rc' '_sh' +'rclone' '_rclone' +'rcp' '_rlogin' +'rcs' '_rcs' +'rcsdiff' '_rcs' +'rdesktop' '_rdesktop' +'read' '_read' +'readelf' '_readelf' +'readlink' '_readlink' +'readonly' '_typeset' +'-redirect-' '_redirect' +'-redirect-,<,bunzip2' '_bzip2' +'-redirect-,<,bzip2' '_bzip2' +'-redirect-,>,bzip2' '_bzip2' +'-redirect-,<,compress' '_compress' +'-redirect-,>,compress' '_compress' +'-redirect-,-default-,-default-' '_files' +'-redirect-,<,gunzip' '_gzip' +'-redirect-,<,gzip' '_gzip' +'-redirect-,>,gzip' '_gzip' +'-redirect-,<,uncompress' '_compress' +'-redirect-,<,unxz' '_xz' +'-redirect-,<,xz' '_xz' +'-redirect-,>,xz' '_xz' +'refile' '_mh' +'rehash' '_hash' +'reindexdb' '_postgresql' +'reload' '_initctl' +'remsh' '_rlogin' +'renice' '_renice' +'repl' '_mh' +'resolvectl' '_resolvectl' +'restart' '_initctl' +'retawq' '_webbrowser' +'rgview' '_vim' +'rgvim' '_vim' +'ri' '_ri' +'rlogin' '_rlogin' +'rm' '_rm' +'rmd160' '_cksum' +'rmdel' '_sccs' +'rmdir' '_rmdir' +'rmf' '_mh' +'rmic' '_java' +'rmid' '_java' +'rmiregistry' '_java' +'rmm' '_mh' +'rmmod' '_modutils' +'route' '_route' +'rrdtool' '_rrdtool' +'rsh' '_rlogin' +'rsync' '_rsync' +'rtin' '_tin' +'rubber' '_rubber' +'rubber-info' '_rubber' +'rubber-pipe' '_rubber' +'ruby' '_ruby' +'ruby-mri' '_ruby' +'run-help' '_run-help' +'rup' '_hosts' +'rusage' '_precommand' +'rview' '_vim' +'rvim' '_vim' +'rwho' '_hosts' +'rxvt' '_urxvt' +'s2p' '_sed' +'sact' '_sccs' +'sadf' '_sysstat' +'sahara' '_openstack' +'sar' '_sysstat' +'scan' '_mh' +'sccs' '_sccs' +'sccsdiff' '_sccs' +'sched' '_sched' +'schedtool' '_schedtool' +'scons' '_scons' +'scp' '_ssh' +'screen' '_screen' +'script' '_script' +'scriptreplay' '_script' +'seaf-cli' '_seafile' +'sed' '_sed' +'senlin' '_openstack' +'seq' '_seq' +'serialver' '_java' +'service' '_service' +'set' '_set' +'setfacl' '_setfacl' +'setfacl.exe' '_setfacl' +'setfattr' '_attr' +'setopt' '_setopt' +'setsid' '_setsid' +'setxkbmap' '_setxkbmap' +'sftp' '_ssh' +'sh' '_sh' +'sha1' '_cksum' +'sha1sum' '_md5sum' +'sha224sum' '_md5sum' +'sha256' '_cksum' +'sha256sum' '_md5sum' +'sha384' '_cksum' +'sha384sum' '_md5sum' +'sha512' '_cksum' +'sha512sum' '_md5sum' +'sha512t256' '_cksum' +'shasum' '_shasum' +'shell-script' '_bootctl' +'shift' '_arrays' +'show' '_mh' +'showchar' '_psutils' +'showmount' '_showmount' +'shred' '_shred' +'shuf' '_shuf' +'shutdown' '_shutdown' +'sisu' '_sisu' +'skein1024' '_cksum' +'skein256' '_cksum' +'skein512' '_cksum' +'skipstone' '_webbrowser' +'slabtop' '_slabtop' +'slitex' '_tex' +'slocate' '_locate' +'slogin' '_ssh' +'slrn' '_slrn' +'smartctl' '_smartmontools' +'smbclient' '_samba' +'smbcontrol' '_samba' +'smbstatus' '_samba' +'soa' '_hosts' +'socket' '_socket' +'sort' '_sort' +'sortm' '_mh' +'source' '_source' +'spamassassin' '_spamassassin' +'split' '_split' +'splitdiff' '_patchutils' +'sqlite' '_sqlite' +'sqlite3' '_sqlite' +'sqsh' '_sqsh' +'sr' '_surfraw' +'srptool' '_gnutls' +'ss' '_ss' +'ssh' '_ssh' +'ssh-add' '_ssh' +'ssh-agent' '_ssh' +'ssh-copy-id' '_ssh' +'sshfs' '_sshfs' +'ssh-keygen' '_ssh' +'ssh-keyscan' '_ssh' +'star' '_tar' +'start' '_initctl' +'stat' '_stat' +'status' '_initctl' +'stdbuf' '_stdbuf' +'stg' '_stgit' +'stop' '_initctl' +'stow' '_stow' +'strace' '_strace' +'strace64' '_strace' +'strftime' '_strftime' +'strings' '_strings' +'strip' '_strip' +'strongswan' '_ipsec' +'stty' '_stty' +'su' '_su' +'subl' '_sublimetext' +'-subscript-' '_subscript' +'sudo' '_sudo' +'sudoedit' '_sudo' +'sum' '_cksum' +'surfraw' '_surfraw' +'sv' '_runit' +'svn' '_subversion' +'svnadmin' '_subversion' +'svnadmin-static' '_subversion' +'svnlite' '_subversion' +'swaks' '_swaks' +'swanctl' '_swanctl' +'swift' '_swift' +'swiftc' '_swift' +'sync' '_nothing' +'sysctl' '_sysctl' +'systemctl' '_systemctl' +'systemd-analyze' '_systemd-analyze' +'systemd-ask-password' '_systemd' +'systemd-cat' '_systemd' +'systemd-cgls' '_systemd' +'systemd-cgtop' '_systemd' +'systemd-delta' '_systemd-delta' +'systemd-detect-virt' '_systemd' +'systemd-inhibit' '_systemd-inhibit' +'systemd-machine-id-setup' '_systemd' +'systemd-notify' '_systemd' +'systemd-nspawn' '_systemd-nspawn' +'systemd-resolve' '_resolvectl' +'systemd-run' '_systemd-run' +'systemd-tmpfiles' '_systemd-tmpfiles' +'systemd-tty-ask-password-agent' '_systemd' +'tac' '_tac' +'tacker' '_openstack' +'tail' '_tail' +'talk' '_other_accounts' +'tar' '_tar' +'tardy' '_tardy' +'task' '_task' +'tcpdump' '_tcpdump' +'tcp_open' '_tcpsys' +'tcptraceroute' '_tcptraceroute' +'tcsh' '_sh' +'tda' '_devtodo' +'tdd' '_devtodo' +'tde' '_devtodo' +'tdr' '_devtodo' +'tee' '_tee' +'telnet' '_telnet' +'tex' '_tex' +'texi2any' '_texinfo' +'texi2dvi' '_texinfo' +'texi2pdf' '_texinfo' +'texindex' '_texinfo' +'tg' '_topgit' +'tidy' '_tidy' +'tig' '_git' +'-tilde-' '_tilde' +'time' '_precommand' +'timedatectl' '_timedatectl' +'timeout' '_timeout' +'times' '_nothing' +'tin' '_tin' +'tkconch' '_twisted' +'tkinfo' '_texinfo' +'tla' '_tla' +'tload' '_tload' +'tmux' '_tmux' +'todo' '_devtodo' +'todo.sh' '_todo.sh' +'toilet' '_toilet' +'top' '_top' +'totdconfig' '_totd' +'touch' '_touch' +'tpb' '_tpb' +'tput' '_tput' +'tr' '_tr' +'tracepath' '_tracepath' +'tracepath6' '_tracepath' +'traceroute' '_hosts' +'transmission-remote' '_transmission' +'transmission-remote-cli' '_transmission-remote-cli' +'trap' '_trap' +'tree' '_tree' +'tremc' '_tremc' +'trial' '_twisted' +'trove' '_openstack' +'true' '_nothing' +'truss' '_truss' +'tryaffix' '_ispell' +'tty' '_tty' +'ttyctl' '_ttyctl' +'tunctl' '_uml' +'tune2fs' '_tune2fs' +'tunes2pod' '_gnupod' +'tunes2pod.pl' '_gnupod' +'twidge' '_twidge' +'twist' '_twisted' +'twistd' '_twisted' +'txt' '_hosts' +'type' '_which' +'typeset' '_typeset' +'udevadm' '_udevadm' +'ulimit' '_ulimit' +'uml_mconsole' '_uml' +'uml_moo' '_uml' +'uml_switch' '_uml' +'umount' '_mount' +'unace' '_unace' +'unalias' '_aliases' +'uname' '_uname' +'uncompress' '_compress' +'unexpand' '_unexpand' +'unfunction' '_functions' +'unget' '_sccs' +'unhash' '_unhash' +'uniq' '_uniq' +'unison' '_unison' +'units' '_units' +'unix2dos' '_dos2unix' +'unix2mac' '_dos2unix' +'unlimit' '_limits' +'unlz4' '_lz4' +'unlzma' '_xz' +'unpack' '_pack' +'unpigz' '_gzip' +'unrar' '_rar' +'unset' '_vars' +'unsetopt' '_setopt' +'unwrapdiff' '_patchutils' +'unxz' '_xz' +'unzip' '_zip' +'uptime' '_uptime' +'urxvt' '_urxvt' +'urxvt256c' '_urxvt' +'urxvt256cc' '_urxvt' +'urxvt256c-ml' '_urxvt' +'urxvt256c-mlc' '_urxvt' +'urxvtc' '_urxvt' +'useradd' '_user_admin' +'userdel' '_users' +'usermod' '_user_admin' +'vacuumdb' '_postgresql' +'val' '_sccs' +'valgrind' '_valgrind' +'-value-' '_value' +'-value-,ADB_TRACE,-default-' '_adb' +'-value-,ANDROID_LOG_TAGS,-default-' '_adb' +'-value-,ANDROID_SERIAL,-default-' '_adb' +'-value-,ANSIBLE_STDOUT_CALLBACK,-default-' '_ansible' +'-value-,ANT_ARGS,-default-' '_ant' +'-value-,CFLAGS,-default-' '_gcc' +'-value-,CPPFLAGS,-default-' '_gcc' +'-value-,CXXFLAGS,-default-' '_gcc' +'-value-,-default-,-command-' '_zargs' +'-value-,-default-,-default-' '_value' +'-value-,DISPLAY,-default-' '_x_display' +'-value-,GREP_OPTIONS,-default-' '_grep' +'-value-,GZIP,-default-' '_gzip' +'-value-,LANG,-default-' '_locales' +'-value-,LANGUAGE,-default-' '_locales' +'-value-,LD_DEBUG,-default-' '_ld_debug' +'-value-,LDFLAGS,-default-' '_gcc' +'-value-,LESSCHARSET,-default-' '_less' +'-value-,LESS,-default-' '_less' +'-value-,LOOPDEV_DEBUG,-default-' '_losetup' +'-value-,LPDEST,-default-' '_printers' +'-value-,MPD_HOST,-default' '_mpc' +'-value-,P4CLIENT,-default-' '_perforce' +'-value-,P4MERGE,-default-' '_perforce' +'-value-,P4PORT,-default-' '_perforce' +'-value-,P4USER,-default-' '_perforce' +'-value-,PERLDOC,-default-' '_perldoc' +'-value-,PRINTER,-default-' '_printers' +'-value-,PROMPT2,-default-' '_ps1234' +'-value-,PROMPT3,-default-' '_ps1234' +'-value-,PROMPT4,-default-' '_ps1234' +'-value-,PROMPT,-default-' '_ps1234' +'-value-,PS1,-default-' '_ps1234' +'-value-,PS2,-default-' '_ps1234' +'-value-,PS3,-default-' '_ps1234' +'-value-,PS4,-default-' '_ps1234' +'-value-,RPROMPT2,-default-' '_ps1234' +'-value-,RPROMPT,-default-' '_ps1234' +'-value-,RPS1,-default-' '_ps1234' +'-value-,RPS2,-default-' '_ps1234' +'-value-,SPROMPT,-default-' '_ps1234' +'-value-,TERM,-default-' '_terminals' +'-value-,TERMINFO_DIRS,-default-' '_dir_list' +'-value-,TZ,-default-' '_time_zone' +'-value-,VALGRIND_OPTS,-default-' '_valgrind' +'-value-,WWW_HOME,-default-' '_urls' +'-value-,XML_CATALOG_FILES,-default-' '_xmlsoft' +'-value-,XZ_DEFAULTS,-default-' '_xz' +'-value-,XZ_OPT,-default-' '_xz' +'-vared-' '_in_vared' +'vared' '_vared' +'vcsh' '_vcsh' +'vifm' '_vifm' +'vim' '_vim' +'vimdiff' '_vim' +'virsh' '_libvirt' +'virt-admin' '_libvirt' +'virt-host-validate' '_libvirt' +'virt-pki-validate' '_libvirt' +'virt-xml-validate' '_libvirt' +'visudo' '_visudo' +'vitrage' '_openstack' +'vmstat' '_vmstat' +'vncserver' '_vnc' +'vncviewer' '_vnc' +'vorbiscomment' '_vorbis' +'vpnc' '_vpnc' +'vpnc-connect' '_vpnc' +'vserver' '_vserver' +'w' '_w' +'w3m' '_w3m' +'wait' '_wait' +'watch' '_watch' +'watcher' '_openstack' +'wc' '_wc' +'wget' '_wget' +'what' '_sccs' +'whatis' '_man' +'whence' '_which' +'where' '_which' +'whereis' '_whereis' +'which' '_which' +'who' '_who' +'whoami' '_nothing' +'whois' '_whois' +'whom' '_mh' +'wiggle' '_wiggle' +'wipefs' '_wipefs' +'wodim' '_cdrecord' +'wpa_cli' '_wpa_cli' +'write' '_users_on' +'www' '_webbrowser' +'xargs' '_xargs' +'xattr' '_attr' +'xauth' '_xauth' +'xautolock' '_xautolock' +'xclip' '_xclip' +'xdpyinfo' '_x_utils' +'xdvi' '_xdvi' +'xelatex' '_tex' +'xetex' '_tex' +'xev' '_x_utils' +'xfd' '_x_utils' +'xfig' '_xfig' +'xfontsel' '_x_utils' +'xfreerdp' '_rdesktop' +'xhost' '_x_utils' +'xkill' '_x_utils' +'xli' '_xloadimage' +'xloadimage' '_xloadimage' +'xlsatoms' '_x_utils' +'xlsclients' '_x_utils' +'xml' '_xmlstarlet' +'xmllint' '_xmlsoft' +'xmlstarlet' '_xmlstarlet' +'xmms2' '_xmms2' +'xmodmap' '_xmodmap' +'xmosaic' '_webbrowser' +'xon' '_x_utils' +'xournal' '_xournal' +'xpdf' '_xpdf' +'xping' '_hosts' +'xprop' '_x_utils' +'xrandr' '_xrandr' +'xrdb' '_x_utils' +'xscreensaver-command' '_xscreensaver' +'xset' '_xset' +'xsetbg' '_xloadimage' +'xsetroot' '_x_utils' +'xsltproc' '_xmlsoft' +'xterm' '_xterm' +'xtightvncviewer' '_vnc' +'xtp' '_imagemagick' +'xv' '_xv' +'xview' '_xloadimage' +'xvnc4viewer' '_vnc' +'xvncviewer' '_vnc' +'xwallpaper' '_xwallpaper' +'xwd' '_x_utils' +'xwininfo' '_x_utils' +'xwit' '_xwit' +'xwud' '_x_utils' +'xxd' '_xxd' +'xz' '_xz' +'xzcat' '_xz' +'yafc' '_yafc' +'yash' '_sh' +'yay' '_yay' +'youtube-dl' '_youtube-dl' +'ypbind' '_yp' +'ypcat' '_yp' +'ypmatch' '_yp' +'yppasswd' '_yp' +'yppoll' '_yp' +'yppush' '_yp' +'ypserv' '_yp' +'ypset' '_yp' +'ypwhich' '_yp' +'ypxfr' '_yp' +'ytalk' '_other_accounts' +'zargs' '_zargs' +'zathura' '_zathura' +'zcalc' '_zcalc' +'-zcalc-line-' '_zcalc_line' +'zcat' '_zcat' +'zcompile' '_zcompile' +'zcp' '_zmv' +'zdelattr' '_zattr' +'zdump' '_zdump' +'zeal' '_zeal' +'zed' '_zed' +'zegrep' '_grep' +'zen' '_webbrowser' +'zf_chgrp' '_chown' +'zf_chmod' '_chmod' +'zf_chown' '_chown' +'zfgrep' '_grep' +'zf_ln' '_ln' +'zf_mkdir' '_mkdir' +'zf_mv' '_mv' +'zf_rm' '_rm' +'zf_rmdir' '_rmdir' +'zfs' '_zfs' +'zgetattr' '_zattr' +'zgrep' '_grep' +'zip' '_zip' +'zipinfo' '_zip' +'zle' '_zle' +'zlistattr' '_zattr' +'zln' '_zmv' +'zmail' '_mail' +'zmodload' '_zmodload' +'zmv' '_zmv' +'zone' '_hosts' +'zparseopts' '_zparseopts' +'zpool' '_zpool' +'zpty' '_zpty' +'zsetattr' '_zattr' +'zsh' '_zsh' +'zsh-mime-handler' '_zsh-mime-handler' +'zsocket' '_zsocket' +'zstat' '_stat' +'zstyle' '_zstyle' +'ztodo' '_ztodo' +'zun' '_openstack' +'zxpdf' '_xpdf' +) + +_services=( +'bzcat' 'bunzip2' +'gchgrp' 'chgrp' +'gchown' 'chown' +'gnupod_addsong.pl' 'gnupod_addsong' +'gnupod_check.pl' 'gnupod_check' +'gnupod_INIT.pl' 'gnupod_INIT' +'gnupod_search.pl' 'gnupod_search' +'gpg2' 'gpg' +'gzcat' 'gunzip' +'iceweasel' 'firefox' +'lzcat' 'unxz' +'lzma' 'xz' +'Mail' 'mail' +'mailx' 'mail' +'mktunes.pl' 'mktunes' +'nail' 'mail' +'ncl' 'nc' +'nedit-nc' 'nc' +'pacman.static' 'pacman' +'pcat' 'unpack' +'-redirect-,<,bunzip2' 'bunzip2' +'-redirect-,<,bzip2' 'bzip2' +'-redirect-,>,bzip2' 'bunzip2' +'-redirect-,<,compress' 'compress' +'-redirect-,>,compress' 'uncompress' +'-redirect-,<,gunzip' 'gunzip' +'-redirect-,<,gzip' 'gzip' +'-redirect-,>,gzip' 'gunzip' +'-redirect-,<,uncompress' 'uncompress' +'-redirect-,<,unxz' 'unxz' +'-redirect-,<,xz' 'xz' +'-redirect-,>,xz' 'unxz' +'remsh' 'rsh' +'slogin' 'ssh' +'svnadmin-static' 'svnadmin' +'svnlite' 'svn' +'tunes2pod.pl' 'tunes2pod' +'unlzma' 'unxz' +'xelatex' 'latex' +'xetex' 'tex' +'xzcat' 'unxz' +'zf_chgrp' 'chgrp' +'zf_chown' 'chown' +) + +_patcomps=( +'*/(init|rc[0-9S]#).d/*' '_init_d' +'notmuch-*' '_notmuch' +) + +_postpatcomps=( +'c++-*' '_gcc' +'g++-*' '_gcc' +'gcc-*' '_gcc' +'gem[0-9.]#' '_gem' +'lua[0-9.-]##' '_lua' +'(p[bgpn]m*|*top[bgpn]m)' '_pbm' +'php[0-9.-]' '_php' +'pydoc[0-9.]#' '_pydoc' +'python[0-9.]#' '_python' +'qemu(|-system-*)' '_qemu' +'(ruby|[ei]rb)[0-9.]#' '_ruby' +'shasum(|5).*' '_shasum' +'(texi(2*|ndex))' '_texi' +'(tiff*|*2tiff|pal2rgb)' '_tiff' +'-value-,(ftp|http(|s))_proxy,-default-' '_urls' +'-value-,LC_*,-default-' '_locales' +'-value-,*path,-default-' '_directories' +'-value-,*PATH,-default-' '_dir_list' +'-value-,RUBY(LIB|OPT|PATH),-default-' '_ruby' +'*/X11(|R<4->)/*' '_x_arguments' +'yodl(|2*)' '_yodl' +'zf*' '_zftp' +) + +_compautos=( +'_call_program' '+X' +) + +zle -C _bash_complete-word .complete-word _bash_completions +zle -C _bash_list-choices .list-choices _bash_completions +zle -C _complete_debug .complete-word _complete_debug +zle -C _complete_help .complete-word _complete_help +zle -C _complete_tag .complete-word _complete_tag +zle -C _correct_filename .complete-word _correct_filename +zle -C _correct_word .complete-word _correct_word +zle -C _expand_alias .complete-word _expand_alias +zle -C _expand_word .complete-word _expand_word +zle -C _history-complete-newer .complete-word _history_complete_word +zle -C _history-complete-older .complete-word _history_complete_word +zle -C _list_expansions .list-choices _expand_word +zle -C _most_recent_file .complete-word _most_recent_file +zle -C _next_tags .list-choices _next_tags +zle -C _read_comp .complete-word _read_comp +bindkey '^X^R' _read_comp +bindkey '^X?' _complete_debug +bindkey '^XC' _correct_filename +bindkey '^Xa' _expand_alias +bindkey '^Xc' _correct_word +bindkey '^Xd' _list_expansions +bindkey '^Xe' _expand_word +bindkey '^Xh' _complete_help +bindkey '^Xm' _most_recent_file +bindkey '^Xn' _next_tags +bindkey '^Xt' _complete_tag +bindkey '^X~' _bash_list-choices +bindkey '^[,' _history-complete-newer +bindkey '^[/' _history-complete-older +bindkey '^[~' _bash_complete-word + +autoload -Uz _bootctl _busctl _cargo _cmus _coredumpctl \ + _curl _email-notmuch _hostnamectl _img2sixel _journalctl \ + _kernel-install _libinput _localectl _loginctl _machinectl \ + _mkinitcpio _mpv _networkctl _notmuch _pacman \ + _pass _pkgfile _pulseaudio _resolvectl _sd_hosts_or_user_at_host \ + _sd_machines _sd_outputmodes _sd_unit_files _systemctl _systemd \ + _systemd-analyze _systemd-delta _systemd-inhibit _systemd-nspawn _systemd-run \ + _systemd-tmpfiles _task _timedatectl _transmission-remote-cli _tremc \ + _udevadm _vifm _xwallpaper _yay _youtube-dl \ + _zathura _cdr _all_labels _all_matches _alternative \ + _approximate _arg_compile _arguments _bash_completions _cache_invalid \ + _call_function _combination _complete _complete_debug _complete_help \ + _complete_help_generic _complete_tag _comp_locale _correct _correct_filename \ + _correct_word _describe _description _dispatch _expand \ + _expand_alias _expand_word _extensions _external_pwds _generic \ + _guard _history _history_complete_word _ignored _list \ + _main_complete _match _menu _message _most_recent_file \ + _multi_parts _next_label _next_tags _normal _nothing \ + _oldlist _pick_variant _prefix _read_comp _regex_arguments \ + _regex_words _requested _retrieve_cache _sep_parts _sequence \ + _set_command _setup _store_cache _sub_commands _tags \ + _user_expand _values _wanted _acpi _acpitool \ + _alsa-utils _analyseplugin _brctl _btrfs _chattr \ + _chcon _chrt _cpupower _cryptsetup _dkms \ + _e2label _ethtool _findmnt _free _fuse_arguments \ + _fusermount _fuse_values _gpasswd _htop _iconvconfig \ + _ionice _ipset _iptables _iwconfig _kpartx \ + _losetup _lsattr _lsblk _lsusb _ltrace \ + _mdadm _mii-tool _modutils _mondo _networkmanager \ + _opkg _pidof _pmap _qdbus _schedtool \ + _selinux_contexts _selinux_roles _selinux_types _selinux_users _setsid \ + _slabtop _ss _sshfs _strace _sysstat \ + _tload _tpb _tracepath _tune2fs _uml \ + _valgrind _vserver _wakeup_capable_devices _wipefs _wpa_cli \ + _a2ps _aap _abcde _absolute_command_paths _ack \ + _adb _ansible _ant _antiword _apachectl \ + _apm _arch_archives _arch_namespace _arp _arping \ + _asciidoctor _asciinema _at _attr _augeas \ + _avahi _awk _base64 _basename _bash \ + _baudrates _baz _beep _bibtex _bind_addresses \ + _bison _bittorrent _bogofilter _bpf_filters _bpython \ + _bzip2 _bzr _cabal _cal _calendar \ + _canonical_paths _cat _ccal _cdcd _cdrdao \ + _cdrecord _chkconfig _chmod _chown _chroot \ + _chsh _cksum _clay _cmdambivalent _cmdstring \ + _cmp _column _comm _composer _compress \ + _configure _cowsay _cp _cpio _cplay \ + _crontab _cscope _cssh _ctags_tags _curl \ + _cut _cvs _darcs _date _date_formats \ + _dates _dbus _dconf _dd _devtodo \ + _df _dhclient _dict _dict_words _diff \ + _diff3 _diff_options _diffstat _dig _directories \ + _dir_list _django _dmesg _dmidecode _dns_types \ + _doas _domains _dos2unix _drill _dsh \ + _dtruss _du _dvi _ecasound _ed \ + _elfdump _elinks _email_addresses _enscript _entr \ + _env _espeak _etags _fakeroot _feh \ + _fetchmail _ffmpeg _figlet _file_modes _files \ + _file_systems _find _find_net_interfaces _finger _flac \ + _flex _fmt _fold _fortune _fsh \ + _fuser _gcc _gcore _gdb _gem \ + _genisoimage _getconf _getent _getfacl _getmail \ + _getopt _ghostscript _git _global _global_tags \ + _gnu_generic _gnupod _gnutls _go _gpg \ + _gphoto2 _gprof _gradle _graphicsmagick _grep \ + _groff _groups _growisofs _gsettings _guilt \ + _gzip _have_glob_qual _head _hexdump _host \ + _hostname _hosts _iconv _id _ifconfig \ + _iftop _imagemagick _initctl _init_d _install \ + _iostat _ip _ipsec _irssi _ispell \ + _java _java_class _joe _join _jq \ + _killall _knock _kvno _last _ldconfig \ + _ldd _ld_debug _less _lha _libvirt \ + _links _list_files _lldb _ln _loadkeys \ + _locale _localedef _locales _locate _look \ + _lp _ls _lsof _lua _luarocks \ + _lynx _lz4 _lzop _mail _mailboxes \ + _make _man _md5sum _mencal _mh \ + _mime_types _mkdir _mkfifo _mknod _mktemp \ + _module _monotone _moosic _mosh _mount \ + _mpc _mt _mtools _mtr _mutt \ + _mv _my_accounts _myrepos _mysqldiff _mysql_utils \ + _ncftp _netcat _net_interfaces _netstat _newsgroups \ + _nginx _ngrep _nice _nkf _nl \ + _nm _nmap _nordvpn_auto_complete _npm _nslookup \ + _numfmt _objdump _object_files _od _openstack \ + _other_accounts _pack _pandoc _paste _patch \ + _patchutils _path_commands _path_files _pax _pbm \ + _pdf _perforce _perl _perl_basepods _perldoc \ + _perl_modules _pgrep _php _picocom _pids \ + _pine _ping _pkgadd _pkg-config _pkginfo \ + _pkg_instance _pkgrm _pon _ports _postfix \ + _postgresql _postscript _printenv _printers _process_names \ + _prove _ps _pspdf _psutils _pump \ + _pv _pwgen _pydoc _python _python_modules \ + _qemu _quilt _rake _ranlib _rar \ + _rclone _rcs _readelf _readlink _remote_files \ + _renice _ri _rlogin _rm _rmdir \ + _route _rrdtool _rsync _rubber _ruby \ + _runit _samba _sccs _scons _screen \ + _script _seafile _sed _seq _service \ + _services _setfacl _sh _shasum _showmount \ + _shred _shuf _shutdown _signals _sisu \ + _slrn _smartmontools _socket _sort _spamassassin \ + _split _sqlite _sqsh _ssh _ssh_hosts \ + _stat _stdbuf _stgit _stow _strings \ + _strip _stty _su _subversion _sudo \ + _surfraw _swaks _swanctl _swift _sys_calls \ + _sysctl _tac _tail _tar _tar_archive \ + _tardy _tcpdump _tcptraceroute _tee _telnet \ + _terminals _tex _texi _texinfo _tidy \ + _tiff _tilde_files _timeout _time_zone _tin \ + _tla _tmux _todo.sh _toilet _top \ + _topgit _totd _touch _tput _tr \ + _transmission _tree _truss _tty _ttys \ + _twidge _twisted _umountable _unace _uname \ + _unexpand _uniq _unison _units _uptime \ + _urls _user_admin _user_at_host _users _users_on \ + _vcsh _vim _visudo _vmstat _vorbis \ + _vpnc _w _w3m _watch _wc \ + _webbrowser _wget _whereis _who _whois \ + _wiggle _xargs _xmlsoft _xmlstarlet _xmms2 \ + _xxd _xz _yafc _yodl _yp \ + _zcat _zdump _zfs _zfs_dataset _zfs_keysource_props \ + _zfs_pool _zip _zpool _zsh _acroread \ + _code _dcop _eog _evince _geany \ + _gnome-gv _gqview _gv _kdeconnect _kfmclient \ + _matlab _mozilla _mplayer _mupdf _nautilus \ + _nedit _netscape _okular _pdftk _qiv \ + _rdesktop _setxkbmap _sublimetext _urxvt _vnc \ + _x_arguments _xauth _xautolock _x_borderwidth _xclip \ + _x_color _x_colormapid _x_cursor _x_display _xdvi \ + _x_extension _xfig _x_font _xft_fonts _x_geometry \ + _x_keysym _xloadimage _x_locale _x_modifier _xmodmap \ + _x_name _xournal _xpdf _xrandr _x_resource \ + _xscreensaver _x_selection_timeout _xset _xt_arguments _xterm \ + _x_title _xt_session_id _x_utils _xv _x_visual \ + _x_window _xwit _zeal _add-zle-hook-widget _add-zsh-hook \ + _alias _aliases _arrays _assign _autocd \ + _bindkey _brace_parameter _builtin _cd _command \ + _command_names _compadd _compdef _completers _condition \ + _default _delimiters _directory_stack _dirs _disable \ + _dynamic_directory_name _echotc _echoti _emulate _enable \ + _equal _exec _fc _file_descriptors _first \ + _functions _globflags _globqual_delims _globquals _hash \ + _history_modifiers _in_vared _jobs _jobs_bg _jobs_builtin \ + _jobs_fg _kill _limit _limits _math \ + _math_params _mere _module_math_func _options _options_set \ + _options_unset _parameter _parameters _precommand _print \ + _prompt _ps1234 _read _redirect _run-help \ + _sched _set _setopt _source _strftime \ + _subscript _suffix_alias_files _tcpsys _tilde _trap \ + _ttyctl _typeset _ulimit _unhash _user_math_func \ + _value _vared _vars _wait _which \ + _widgets _zargs _zattr _zcalc _zcalc_line \ + _zcompile _zed _zftp _zle _zmodload \ + _zmv _zparseopts _zpty _zsh-mime-handler _zsocket \ + _zstyle _ztodo +autoload -Uz +X _call_program + +typeset -gUa _comp_assocs +_comp_assocs=( '' ) diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc @@ -0,0 +1,87 @@ +# Luke's config for the Zoomer Shell + +# Enable colors and change prompt: +autoload -U colors && colors # Load colors +#PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " +powerline-daemon -q +. /usr/lib/python3.8/site-packages/powerline/bindings/zsh/powerline.zsh +#powerline-daemon -q +#POWERLINE_BASH_CONTINUATION=1 +#POWERLINE_BASH_SELECT=1 +#. /usr/share/powerline/bindings/bash/powerline.sh +setopt autocd # Automatically cd into typed directory. +stty stop undef # Disable ctrl-s to freeze terminal. + +# History in cache directory: +HISTSIZE=10000 +SAVEHIST=10000 +HISTFILE=~/.cache/zsh/history + +# Load aliases and shortcuts if existent. +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc" +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc" +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/zshnameddirrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/zshnameddirrc" + +# Basic auto/tab complete: +autoload -U compinit +zstyle ':completion:*' menu select +zmodload zsh/complist +compinit +_comp_options+=(globdots) # Include hidden files. + +# vi mode +bindkey -v +export KEYTIMEOUT=1 + +# Use vim keys in tab complete menu: +bindkey -M menuselect 'h' vi-backward-char +bindkey -M menuselect 'k' vi-up-line-or-history +bindkey -M menuselect 'l' vi-forward-char +bindkey -M menuselect 'j' vi-down-line-or-history +bindkey -v '^?' backward-delete-char + +# Change cursor shape for different vi modes. +function zle-keymap-select { + if [[ ${KEYMAP} == vicmd ]] || + [[ $1 = 'block' ]]; then + echo -ne '\e[1 q' + elif [[ ${KEYMAP} == main ]] || + [[ ${KEYMAP} == viins ]] || + [[ ${KEYMAP} = '' ]] || + [[ $1 = 'beam' ]]; then + echo -ne '\e[5 q' + fi +} +zle -N zle-keymap-select +zle-line-init() { + zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) + echo -ne "\e[5 q" +} +zle -N zle-line-init +echo -ne '\e[5 q' # Use beam shape cursor on startup. +preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. + +# Use lf to switch directories and bind it to ctrl-o +lfcd () { + tmp="$(mktemp)" + lf -last-dir-path="$tmp" "$@" + if [ -f "$tmp" ]; then + dir="$(cat "$tmp")" + rm -f "$tmp" >/dev/null + [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" + fi +} +bindkey -s '^o' 'lfcd\n' + +bindkey -s '^a' 'bc -l\n' + +bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n' + +bindkey '^[[P' delete-char + +# Edit line in vim with ctrl-e: +autoload edit-command-line; zle -N edit-command-line +bindkey '^e' edit-command-line + +# Load zsh-syntax-highlighting; should be last. +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null diff --git a/config/zshnameddirrc b/config/zshnameddirrc @@ -0,0 +1,10 @@ +hash -d h=~/ +hash -d d=~/Documents +hash -d D=~/Downloads +hash -d m=~/Music +hash -d pp=~/Pictures +hash -d vv=~/Videos +hash -d cf=${XDG_CONFIG_HOME:-$HOME/.config} +hash -d cac=${XDG_CACHE_HOME:-$HOME/.cache} +hash -d sc=~/.local/bin +hash -d mn=/mnt diff --git a/description b/description @@ -0,0 +1 @@ +Dotfiles for use with Linux systems and programs. diff --git a/local/bin/aseprite b/local/bin/aseprite @@ -0,0 +1 @@ +/home/odst/.local/share/Steam/steamapps/common/Aseprite/aseprite+ \ No newline at end of file diff --git a/local/bin/bandcamp-dl b/local/bin/bandcamp-dl @@ -0,0 +1,8 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from bandcamp_dl.__main__ import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/local/bin/compiler b/local/bin/compiler @@ -0,0 +1,40 @@ +#!/bin/sh + +# This script will compile or run another finishing operation on a document. I +# have this script run via vim. +# +# Compiles .tex. groff (.mom, .ms), .rmd, .md. Opens .sent files as sent +# presentations. Runs scripts based on extention or shebang + +file=$(readlink -f "$1") +dir=$(dirname "$file") +base="${file%.*}" + +cd "$dir" || exit + +textype() { \ + command="pdflatex" + ( sed 5q "$file" | grep -i -q 'xelatex' ) && command="xelatex" + $command --output-directory="$dir" "$base" && + grep -i addbibresource "$file" >/dev/null && + biber --input-directory "$dir" "$base" && + $command --output-directory="$dir" "$base" && + $command --output-directory="$dir" "$base" + } + +case "$file" in + *\.ms) refer -PS -e "$file" | groff -me -ms -kept -T pdf > "$base".pdf ;; + *\.mom) refer -PS -e "$file" | groff -mom -kept -T pdf > "$base".pdf ;; + *\.[0-9]) refer -PS -e "$file" | groff -mandoc -T pdf > "$base".pdf ;; + *\.[rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;; + *\.tex) textype "$file" ;; + *\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;; + *config.h) sudo make install ;; + *\.c) cc "$file" -o "$base" && "$base" ;; + *\.py) python "$file" ;; + *\.m) octave "$file" ;; + *\.scad) openscad -o "$base".stl "$file" ;; + *\.go) go run "$file" ;; + *\.sent) setsid sent "$file" 2>/dev/null & ;; + *) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;; +esac diff --git a/local/bin/countries b/local/bin/countries @@ -0,0 +1,365 @@ +#!/usr/bin/env bash +# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2012-01-15 +# +# _______________| country : look-up country ISO code or currency symbol. +# +# Usage: country [term] ["iso"|"fx"] +# where "fx" is foreign exchange, +# "iso" is the default option, +# term is case-insensitive regular expression. +# +# Examples: % country 'united states' +# US +# % country 'United States' fx +# USD +# % country us +# UNITED STATES +# % country usd +# US +# % country usd fx +# UNITED STATES +# +# Dependencies: awk + + +# CHANGE LOG get LATEST version from https://bitbucket.org/rsvp/gists/src +# +# 2012-01-15 First version depends on these FACTS: +# - ISO country code has exactly TWO letters. +# See ISO 3166-1: http://www.iso.org/iso/iso_3166_code_lists +# - Currency symbol has exactly THREE letters. +# See ISO 4217: http://en.wikipedia.org/wiki/Currency_code +# - EUR here designates EUROZONE where the Euro may be also +# used by non-EU members: http://en.wikipedia.org/wiki/Eurozone +# - No country has a full NAME of three letters or less. + + +# _____ Prelims +set -u +# ^ unbound (i.e. unassigned) variables shall be errors. +# Example of default assignment: arg1=${1:-'foo'} +set -e +# ^ error checking :: Highly Recommended (caveat: you can't check $? later). +# +# _______________ :: BEGIN Script :::::::::::::::::::::::::::::::::::::::: + + +term=${1:-'United States'} +term=${term^^} +# uppper case conversion +termlen=${#term} +arg2=${2:-'iso'} + + +outf='/dev/shm/country-out.tmp' +tmpf='/dev/shm/country.tmp' + +# Write to TMP FILE data on 249 countries: +cat - > $tmpf <<EOHereDoc +AF@AFGHANISTAN@AFN +AX@ALAND ISLANDS +AL@ALBANIA +DZ@ALGERIA +AS@AMERICAN SAMOA +AD@ANDORRA@EUR +AO@ANGOLA +AI@ANGUILLA +AQ@ANTARCTICA +AG@ANTIGUA AND BARBUDA +AR@ARGENTINA@ARS +AM@ARMENIA +AW@ARUBA +AU@AUSTRALIA@AUD +AT@AUSTRIA@EUR +AZ@AZERBAIJAN +BS@BAHAMAS +BH@BAHRAIN +BD@BANGLADESH +BB@BARBADOS +BY@BELARUS +BE@BELGIUM@EUR +BZ@BELIZE +BJ@BENIN +BM@BERMUDA +BT@BHUTAN +BO@BOLIVIA +BQ@BONAIRE +BA@BOSNIA AND HERZEGOVINA +BW@BOTSWANA +BV@BOUVET ISLAND +BR@BRAZIL@BRL +IO@BRITISH INDIAN OCEAN TERRITORY +BN@BRUNEI DARUSSALAM +BG@BULGARIA +BF@BURKINA FASO +BI@BURUNDI +KH@CAMBODIA +CM@CAMEROON@XAF +CA@CANADA@CAD +CV@CAPE VERDE +KY@CAYMAN ISLANDS@KYD +CF@CENTRAL AFRICAN REPUBLIC@XAF +TD@CHAD@XAF +CL@CHILE +CN@CHINA@CNY +CX@CHRISTMAS ISLAND +CC@COCOS KEELING ISLANDS +CO@COLOMBIA +KM@COMOROS +CG@CONGO@XAF +CK@COOK ISLANDS +CR@COSTA RICA +CI@COTE D'IVOIRE +HR@CROATIA +CU@CUBA +CW@CURACAO +CY@CYPRUS@EUR +CZ@CZECH REPUBLIC +DK@DENMARK@DKK +DJ@DJIBOUTI +DM@DOMINICA +DO@DOMINICAN REPUBLIC +EC@ECUADOR +EG@EGYPT@EGP +SV@EL SALVADOR +GQ@EQUATORIAL GUINEA +ER@ERITREA +EE@ESTONIA@EUR +ET@ETHIOPIA +FK@FALKLAND ISLANDS MALVINAS +FO@FAROE ISLANDS +FJ@FIJI +FI@FINLAND@EUR +FR@FRANCE@EUR +GF@FRENCH GUIANA +PF@FRENCH POLYNESIA@XPF +TF@FRENCH SOUTHERN TERRITORIES +GA@GABON@XAF +GM@GAMBIA +GE@GEORGIA +DE@GERMANY@EUR +GH@GHANA +GI@GIBRALTAR@GIP +GR@GREECE@EUR +GL@GREENLAND@DKK +GD@GRENADA +GP@GUADELOUPE +GU@GUAM +GT@GUATEMALA +GG@GUERNSEY +GN@GUINEA +GW@GUINEA-BISSAU +GY@GUYANA +HT@HAITI +HM@HEARD MCDONALD ISLANDS@AUD +HN@HONDURAS +HK@HONG KONG@HKD +HU@HUNGARY +IS@ICELAND +IN@INDIA@INR +ID@INDONESIA +IR@IRAN@IRR +IQ@IRAQ +IE@IRELAND@EUR +IM@ISLE OF MAN@GBP +IL@ISRAEL@ILS +IT@ITALY@EUR +JM@JAMAICA@JMD +JP@JAPAN@JPY +JE@JERSEY +JO@JORDAN +KZ@KAZAKHSTAN +KE@KENYA +KI@KIRIBATI +KP@NORTH KOREA@KPW +KR@SOUTH KOREA@KRW +XK@KOSOVO@EUR +KW@KUWAIT +KG@KYRGYZSTAN +LA@LAOS +LV@LATVIA +LB@LEBANON@LBP +LS@LESOTHO +LR@LIBERIA +LY@LIBYA +LI@LIECHTENSTEIN@CHF +LT@LITHUANIA +LU@LUXEMBOURG@EUR +MO@MACAO +MK@MACEDONIA +MG@MADAGASCAR +MW@MALAWI +MY@MALAYSIA +MV@MALDIVES +ML@MALI +MT@MALTA@EUR +MH@MARSHALL ISLANDS +MQ@MARTINIQUE +MR@MAURITANIA +MU@MAURITIUS +YT@MAYOTTE +MX@MEXICO@MXN +FM@MICRONESIA +MD@MOLDOVA +MC@MONACO@EUR +MN@MONGOLIA@MNT +ME@MONTENEGRO@EUR +MS@MONTSERRAT +MA@MOROCCO@MAD +MZ@MOZAMBIQUE +MM@MYANMAR +NA@NAMIBIA +NR@NAURU@AUD +NP@NEPAL +NL@NETHERLANDS@EUR +NC@NEW CALEDONIA@XPF +NZ@NEW ZEALAND@NZD +NI@NICARAGUA +NE@NIGER +NG@NIGERIA@NGN +NU@NIUE +NF@NORFOLK ISLAND +MP@NORTHERN MARIANA ISLANDS +NO@NORWAY@NOK +OM@OMAN +PK@PAKISTAN@PKR +PW@PALAU +PS@PALESTINIAN TERRITORY +PA@PANAMA +PG@PAPUA NEW GUINEA +PY@PARAGUAY +PE@PERU +PH@PHILIPPINES@PHP +PN@PITCAIRN +PL@POLAND@PLN +PT@PORTUGAL@EUR +PR@PUERTO RICO@USD +QA@QATAR +RE@REUNION +RO@ROMANIA +RU@RUSSIA@RUB +RW@RWANDA +BL@SAINT BARTHELEMY +SH@SAINT HELENA +KN@SAINT KITTS AND NEVIS +LC@SAINT LUCIA +MF@SAINT MARTIN FRENCH +PM@SAINT PIERRE AND MIQUELON +VC@SAINT VINCENT AND GRENADINES +WS@SAMOA +SM@SAN MARINO@EUR +ST@SAO TOME AND PRINCIPE +SA@SAUDI ARABIA@SAR +SN@SENEGAL +RS@SERBIA +SC@SEYCHELLES +SL@SIERRA LEONE +SG@SINGAPORE@SGD +SX@SINT MAARTEN DUTCH +SK@SLOVAKIA@EUR +SI@SLOVENIA@EUR +SB@SOLOMON ISLANDS +SO@SOMALIA +ZA@SOUTH AFRICA@ZAR +GS@SOUTH GEORGIA AND SOUTH SANDWICH ISLANDS +SS@SOUTH SUDAN +ES@SPAIN@EUR +LK@SRI LANKA +SD@SUDAN +SR@SURINAME +SJ@SVALBARD AND JAN MAYEN +SZ@SWAZILAND +SE@SWEDEN@SEK +CH@SWITZERLAND@CHF +SY@SYRIA +TW@TAIWAN@TWD +TJ@TAJIKISTAN +TZ@TANZANIA +TH@THAILAND@THB +TL@TIMOR-LESTE +TG@TOGO +TK@TOKELAU +TO@TONGA +TT@TRINIDAD AND TOBAGO +TN@TUNISIA@TND +TR@TURKEY@TRY +TM@TURKMENISTAN +TC@TURKS AND CAICOS ISLANDS +TV@TUVALU +UG@UGANDA +UA@UKRAINE +AE@UNITED ARAB EMIRATES@AED +GB@UNITED KINGDOM@GBP +US@UNITED STATES@USD +UM@U.S. MINOR OUTLYING ISLANDS +UY@URUGUAY +UZ@UZBEKISTAN +VU@VANUATU +VA@VATICAN HOLY SEE@EUR +VE@VENEZUELA +VN@VIETNAM@VND +VG@VIRGIN ISLANDS BRITISH +VI@VIRGIN ISLANDS U.S.@USD +WF@WALLIS AND FUTUNA@XPF +EH@WESTERN SAHARA +YE@YEMEN +ZM@ZAMBIA +ZW@ZIMBABWE@ZWL +X1@GOLD@XAU +X2@SILVER@XAG +X3@PLATINUM@XPT +X4@SDR SPECIAL DRAWING RIGHTS@XDR +EOHereDoc + +# N.B. - the last several entries (of form Xi where i=integer) +# are obviously not countries but included for sake of +# completeness for foreign exchange purposes. + + +# Length of first argument term determines appropriate action; +# where awk matches and prints the appropriate fields. +# -F@ specifies field separator. + +case $termlen in + + 1) : > $outf ;; + # doing nothing, so size zero file. + + 2) if [ $arg2 = 'iso' ] ; then + awk -F@ "\$1 ~ /$term/ {print \$2}" $tmpf + else + awk -F@ "\$1 ~ /$term/ {print \$3}" $tmpf + fi > $outf ;; + + 3) if [ $arg2 = 'iso' ] ; then + awk -F@ "\$3 ~ /$term/ {print \$1}" $tmpf + else + awk -F@ "\$3 ~ /$term/ {print \$2}" $tmpf + fi > $outf ;; + + *) if [ $arg2 = 'iso' ] ; then + awk -F@ "\$2 ~ /$term/ {print \$1}" $tmpf + else + awk -F@ "\$2 ~ /$term/ {print \$3}" $tmpf + fi > $outf ;; + +esac + + + +# display OUTPUT if non-zero size, otherwise generate error message: +# remember to clean-up... +if [ -s $outf ] ; then + cat $outf + rm -f $tmpf $outf +else + echo " !! country: NULL response; check arguments and data." 1>&2 + rm -f $tmpf $outf + exit 113 +fi + + +exit 0 +# _______________ EOS :: END of Script :::::::::::::::::::::::::::::::::::::::: + +# vim: set fileencoding=utf-8 ff=unix tw=78 ai syn=sh : diff --git a/local/bin/cron/IMPORTANT_NOTE.md b/local/bin/cron/IMPORTANT_NOTE.md @@ -0,0 +1,11 @@ +# Important Note + +These cronjobs have components that require information about your current display to display notifications correctly. + +When you add them as cronjobs, I recommend you precede the command with commands as those below: + +``` +export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus; export DISPLAY=:0; . $HOME/.zprofile; then_command_goes_here +``` + +This ensures that notifications will display, xdotool commands will function and environmental variables will work as well. diff --git a/local/bin/cron/checkup b/local/bin/cron/checkup @@ -0,0 +1,19 @@ +#!/bin/sh + +# Syncs repositories and downloads updates, meant to be run as a cronjob. + +ping -q -c 1 1.1.1.1 > /dev/null || exit + +notify-send "📦 Repository Sync" "Checking for package updates..." + +sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates. + +Check your internet connection, if pacman is already running, or run update manually to see errors." +pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}" + +if pacman -Qu | grep -v "\[ignored\]" +then + notify-send "🎁 Repository Sync" "Updates available. Click statusbar icon (📦) for update." +else + notify-send "📦 Repository Sync" "Sync complete. No new packages for update." +fi diff --git a/local/bin/cron/cronbat b/local/bin/cron/cronbat @@ -0,0 +1,9 @@ +#!/bin/sh + +# Notify me with notify-send if my battery is below 25%. +# You can set this to run via cron. + +[ "$(cat /sys/class/power_supply/BAT0/status)" = "Charging" ] && exit +[ "$(cat /sys/class/power_supply/BAT0/capacity)" -lt 25 ] && +export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus && +notify-send -u critical "Battery critically low." diff --git a/local/bin/cron/crontog b/local/bin/cron/crontog @@ -0,0 +1,6 @@ +#!/bin/sh + +# Toggles all cronjobs off/on. +# Stores disabled crontabs in ~/.consaved until restored. + +([ -f ${XDG_CONFIG_HOME:-$HOME/.config}/cronsaved ] && crontab - < ${XDG_CONFIG_HOME:-$HOME/.config}/cronsaved && rm ${XDG_CONFIG_HOME:-$HOME/.config}/cronsaved && notify-send "🕓 Cronjobs re-enabled.") || ( crontab -l > ${XDG_CONFIG_HOME:-$HOME/.config}/cronsaved && crontab -r && notify-send "🕓 Cronjobs saved and disabled.") diff --git a/local/bin/cron/newsup b/local/bin/cron/newsup @@ -0,0 +1,17 @@ +#!/bin/sh + +# Set as a cron job to check for new RSS entries for newsboat. +# If newsboat is open, sends it an "R" key to refresh. + +ping -q -c 1 1.1.1.1 > /dev/null || exit + +#/usr/bin/notify-send "📰 Updating RSS feeds..." + +ps ax | grep -q newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit + +echo 🔃 > /tmp/newsupdate +pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}" +/usr/bin/newsboat -x reload +rm -f /tmp/newsupdate +pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}" +#/usr/bin/notify-send "📰 RSS feed update complete." diff --git a/local/bin/displayselect b/local/bin/displayselect @@ -0,0 +1,83 @@ +#!/bin/sh + +# A UI for detecting and selecting all displays. Probes xrandr for connected +# displays and lets user select one to use. User may also select "manual +# selection" which opens arandr. + +twoscreen() { # If multi-monitor is selected and there are two screens. + + mirror=$(printf "no\\nyes" | dmenu -i -p "Mirror displays?") + # Mirror displays using native resolution of external display and a scaled + # version for the internal display + if [ "$mirror" = "yes" ]; then + external=$(echo "$screens" | dmenu -i -p "Optimize resolution for:") + internal=$(echo "$screens" | grep -v "$external") + + res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \ + tail -n 1 | awk '{print $1}') + res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \ + tail -n 1 | awk '{print $1}') + + res_ext_x=$(echo $res_external | sed 's/x.*//') + res_ext_y=$(echo $res_external | sed 's/.*x//') + res_int_x=$(echo $res_internal | sed 's/x.*//') + res_int_y=$(echo $res_internal | sed 's/.*x//') + + scale_x=$(echo "$res_ext_x / $res_int_x" | bc -l) + scale_y=$(echo "$res_ext_y / $res_int_y" | bc -l) + + xrandr --output "$external" --auto --scale 1.0x1.0 \ + --output "$internal" --auto --same-as "$external" \ + --scale "$scale_x"x"$scale_y" + else + + primary=$(echo "$screens" | dmenu -i -p "Select primary display:") + secondary=$(echo "$screens" | grep -v "$primary") + direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?") + xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0 + fi + } + +morescreen() { # If multi-monitor is selected and there are more than two screens. + primary=$(echo "$screens" | dmenu -i -p "Select primary display:") + secondary=$(echo "$screens" | grep -v "$primary" | dmenu -i -p "Select secondary display:") + direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?") + tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenu -i -p "Select third display:") + xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto --output "$tertiary" --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" --auto + } + +multimon() { # Multi-monitor handler. + case "$(echo "$screens" | wc -l)" in + 2) twoscreen ;; + *) morescreen ;; + esac ;} + +onescreen() { # If only one output available or chosen. + xrandr --output "$1" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$1" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') + } + +postrun() { # Stuff to run to clean up. + setbg # Fix background if screen size/arangement has changed. + remaps # Re-remap keys if keyboard added (for laptop bases) + { killall dunst ; setsid dunst & } >/dev/null 2>&1 # Restart dunst to ensure proper location on screen + } + +# Get all possible displays +allposs=$(xrandr -q | grep "connected") + +# Get all connected screens. +screens=$(echo "$allposs" | awk '/ connected/ {print $1}') + +# If there's only one screen +[ "$(echo "$screens" | wc -l)" -lt 2 ] && + { onescreen "$screens"; postrun; notify-send "💻 Only one screen detected." "Using it in its optimal settings..."; exit ;} + +# Get user choice including multi-monitor and manual selection: +chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") && +case "$chosen" in + "manual selection") arandr ; exit ;; + "multi-monitor") multimon ;; + *) onescreen "$chosen" ;; +esac + +postrun diff --git a/local/bin/dmenuhandler b/local/bin/dmenuhandler @@ -0,0 +1,16 @@ +#!/bin/sh + +# Feed this script a link and it will give dmenu +# some choice programs to use to open it. + +case "$(printf "copy url\\nmpv\\nmpv (loop)\\nqueue download\\n\\nqueue youtube-dl\\nfeh\\nbrowser\\nw3m\\nmpv (float)" | dmenu -i -p "Open link with what program?")" in + "copy url") echo "$1" | xclip -selection clipboard ;; + mpv) setsid mpv -quiet "$1" >/dev/null 2>&1 & ;; + "mpv (loop)") setsid mpv -quiet --loop "$1" >/dev/null 2>&1 & ;; + "queue download") tsp curl -LO "$1" >/dev/null 2>&1 ;; + "queue youtube-dl") tsp youtube-dl --write-metadata -ic "$1" >/dev/null 2>&1 ;; + browser) setsid "$BROWSER" "$1" >/dev/null 2>&1 & ;; + feh) setsid feh "$1" >/dev/null 2>&1 & ;; + w3m) w3m "$1" >/dev/null 2>&1 ;; + "mpv (float)") setsid mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$1" >/dev/null 2>&1 & ;; +esac diff --git a/local/bin/dmenumount b/local/bin/dmenumount @@ -0,0 +1,66 @@ +#!/bin/sh + +# Gives a dmenu prompt to mount unmounted drives and Android phones. If +# they're in /etc/fstab, they'll be mounted automatically. Otherwise, you'll +# be prompted to give a mountpoint from already existsing directories. If you +# input a novel directory, it will prompt you to create that directory. + +getmount() { \ + [ -z "$chosen" ] && exit 1 + # shellcheck disable=SC2086 + mp="$(find $1 2>/dev/null | dmenu -i -p "Type in mount point.")" || exit 1 + [ "$mp" = "" ] && exit 1 + if [ ! -d "$mp" ]; then + mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?") || exit 1 + [ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp") + fi + } + +mountusb() { \ + chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?")" || exit 1 + chosen="$(echo "$chosen" | awk '{print $1}')" + sudo -A mount "$chosen" 2>/dev/null && notify-send "💻 USB mounting" "$chosen mounted." && exit 0 + alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not ( -path *%s -prune ) ",$3}') + getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted" + partitiontype="$(lsblk -no "fstype" "$chosen")" + case "$partitiontype" in + "vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;; + *) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";; + esac + notify-send "💻 USB mounting" "$chosen mounted to $mp." + } + +mountandroid() { \ + chosen="$(echo "$anddrives" | dmenu -i -p "Which Android device?")" || exit 1 + chosen="$(echo "$chosen" | cut -d : -f 1)" + getmount "$HOME -maxdepth 3 -type d" + simple-mtpfs --device "$chosen" "$mp" + echo "OK" | dmenu -i -p "Tap Allow on your phone if it asks for permission and then press enter" || exit 1 + simple-mtpfs --device "$chosen" "$mp" + notify-send "🤖 Android Mounting" "Android device mounted to $mp." + } + +asktype() { \ + choice="$(printf "USB\\nAndroid" | dmenu -i -p "Mount a USB drive or Android device?")" || exit 1 + case $choice in + USB) mountusb ;; + Android) mountandroid ;; + esac + } + +anddrives=$(simple-mtpfs -l 2>/dev/null) +usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | awk '$4==""{printf "%s (%s)\n",$1,$3}')" + +if [ -z "$usbdrives" ]; then + [ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit + echo "Android device(s) detected." + mountandroid +else + if [ -z "$anddrives" ]; then + echo "USB drive(s) detected." + mountusb + else + echo "Mountable USB drive(s) and Android device(s) detected." + asktype + fi +fi diff --git a/local/bin/dmenupass b/local/bin/dmenupass @@ -0,0 +1,6 @@ +#!/bin/sh + +# This script is the SUDO_ASKPASS variable, meaning that it will be used as a +# password prompt if needed. + +dmenu -fn Monospace-8 -P -p "$1" <&- && echo diff --git a/local/bin/dmenurecord b/local/bin/dmenurecord @@ -0,0 +1,105 @@ +#!/bin/sh + +# Usage: +# `$0`: Ask for recording type via dmenu +# `$0 screencast`: Record both audio and screen +# `$0 video`: Record only screen +# `$0 audio`: Record only audio +# `$0 kill`: Kill existing recording +# +# If there is already a running instance, user will be prompted to end it. + +updateicon() { \ + echo "$1" > /tmp/recordingicon + pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}" + } + +killrecording() { + recpid="$(cat /tmp/recordingpid)" + # kill with SIGTERM, allowing finishing touches. + kill -15 "$recpid" + rm -f /tmp/recordingpid + updateicon "" + pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}" + # even after SIGTERM, ffmpeg may still run, so SIGKILL it. + sleep 3 + kill -9 "$recpid" + exit + } + +screencast() { \ + ffmpeg -y \ + -f x11grab \ + -framerate 60 \ + -s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \ + -i "$DISPLAY" \ + -f alsa -i default \ + -r 30 \ + -c:v h264 -crf 0 -preset ultrafast -c:a aac \ + "$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" & + echo $! > /tmp/recordingpid + updateicon "⏺️🎙️" + } + +video() { ffmpeg \ + -f x11grab \ + -s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \ + -i "$DISPLAY" \ + -c:v libx264 -qp 0 -r 30 \ + "$HOME/video-$(date '+%y%m%d-%H%M-%S').mkv" & + echo $! > /tmp/recordingpid + updateicon "⏺️" + } + +webcamhidef() { ffmpeg \ + -f v4l2 \ + -i /dev/video0 \ + -video_size 1920x1080 \ + "$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & + echo $! > /tmp/recordingpid + updateicon "🎥" + } + +webcam() { ffmpeg \ + -f v4l2 \ + -i /dev/video0 \ + -video_size 640x480 \ + "$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & + echo $! > /tmp/recordingpid + updateicon "🎥" + } + + +audio() { \ + ffmpeg \ + -f alsa -i default \ + -c:a flac \ + "$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" & + echo $! > /tmp/recordingpid + updateicon "🎙️" + } + +askrecording() { \ + choice=$(printf "screencast\\nvideo\\naudio\\nwebcam\\nwebcam (hi-def)" | dmenu -i -p "Select recording style:") + case "$choice" in + screencast) screencast;; + audio) audio;; + video) video;; + webcam) webcam;; + "webcam (hi-def)") webcamhidef;; + esac + } + +asktoend() { \ + response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") && + [ "$response" = "Yes" ] && killrecording + } + + +case "$1" in + screencast) screencast;; + audio) audio;; + video) video;; + kill) killrecording;; + *) ([ -f /tmp/recordingpid ] && asktoend && exit)| askrecording;; +esac diff --git a/local/bin/dmenuumount b/local/bin/dmenuumount @@ -0,0 +1,44 @@ +#!/bin/sh + +# A dmenu prompt to unmount drives. +# Provides you with mounted partitions, select one to unmount. +# Drives mounted at /, /boot and /home will not be options to unmount. + +unmountusb() { + [ -z "$drives" ] && exit + chosen="$(echo "$drives" | dmenu -i -p "Unmount which drive?")" || exit 1 + chosen="$(echo "$chosen" | awk '{print $1}')" + [ -z "$chosen" ] && exit + sudo -A umount "$chosen" && notify-send "💻 USB unmounting" "$chosen unmounted." + } + +unmountandroid() { \ + chosen="$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")" || exit 1 + [ -z "$chosen" ] && exit + sudo -A umount -l "$chosen" && notify-send "🤖 Android unmounting" "$chosen unmounted." + } + +asktype() { \ + choice="$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" || exit 1 + case "$choice" in + USB) unmountusb ;; + Android) unmountandroid ;; + esac + } + +drives=$(lsblk -nrpo "name,type,size,mountpoint" | awk '$4!~/\/boot|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}') + +if ! grep simple-mtpfs /etc/mtab; then + [ -z "$drives" ] && echo "No drives to unmount." && exit + echo "Unmountable USB drive detected." + unmountusb +else + if [ -z "$drives" ] + then + echo "Unmountable Android device detected." + unmountandroid + else + echo "Unmountable USB drive(s) and Android device(s) detected." + asktype + fi +fi diff --git a/local/bin/dmenuunicode b/local/bin/dmenuunicode @@ -0,0 +1,18 @@ +#!/bin/sh + +# The famous "get a menu of emojis to copy" script. + +# Must have xclip installed to even show menu. +xclip -h 2>/dev/null || exit 1 + +chosen=$(cut -d ';' -f1 ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/emoji | dmenu -i -l 20 | sed "s/ .*//") + +[ "$chosen" != "" ] || exit + +# If you run this command with an argument, it will automatically insert the character. +if [ -n "$1" ]; then + xdotool key Shift+Insert +else + echo "$chosen" | tr -d '\n' | xclip -selection clipboard + notify-send "'$chosen' copied to clipboard." & +fi diff --git a/local/bin/ext b/local/bin/ext @@ -0,0 +1,44 @@ +#!/bin/sh + +# A general, all-purpose extraction script. Not all extraction programs here +# are installed by LARBS automatically. +# +# Default behavior: Extract archive into new directory +# Behavior with `-c` option: Extract contents into current directory + +while getopts "hc" o; do case "${o}" in + c) extracthere="True" ;; + *) printf "Options:\\n -c: Extract archive into current directory rather than a new one.\\n" && exit ;; +esac done + +if [ -z "$extracthere" ]; then + archive="$(readlink -f "$*")" && + directory="$(echo "$archive" | sed 's/\.[^\/.]*$//')" && + mkdir -p "$directory" && + cd "$directory" || exit +else + archive="$(readlink -f "$(echo "$*" | cut -d' ' -f2)")" +fi + +[ "$archive" = "" ] && printf "Give archive to extract as argument.\\n" && exit + +if [ -f "$archive" ] ; then + case "$archive" in + *.tar.bz2|*.tbz2) tar xvjf "$archive" ;; + *.tar.xz) tar -xf "$archive" ;; + *.tar.gz|*.tgz) tar xvzf "$archive" ;; + *.lzma) unlzma "$archive" ;; + *.bz2) bunzip2 "$archive" ;; + *.rar) unrar x -ad "$archive" ;; + *.gz) gunzip "$archive" ;; + *.tar) tar xvf "$archive" ;; + *.zip) unzip "$archive" ;; + *.Z) uncompress "$archive" ;; + *.7z) 7z x "$archive" ;; + *.xz) unxz "$archive" ;; + *.exe) cabextract "$archive" ;; + *) printf "extract: '%s' - unknown archive method\\n" "$archive" ;; + esac +else + printf "File \"%s\" not found.\\n" "$archive" +fi diff --git a/local/bin/fixstatusfreeze b/local/bin/fixstatusfreeze @@ -0,0 +1,3 @@ +#!/bin/sh +/usr/bin/killall -q dwmblocks; +/usr/local/bin/dwmblocks diff --git a/local/bin/getkeys b/local/bin/getkeys @@ -0,0 +1,5 @@ +#!/bin/sh + +cat ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/getkeys/"$1" 2>/dev/null && exit +echo "Run command with one of the following arguments for info about that program:" +ls ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/getkeys diff --git a/local/bin/git-commit b/local/bin/git-commit @@ -0,0 +1,44 @@ +#!/bin/bash + + +helpFunction() +{ + echo "" + echo "Usage: $0 -m message -t version tag" + echo -e "\t-m Commit message" + echo -e "\t-t Version tag" + exit 1 # Exit script after printing help +} +while getopts "m:t:" opt +do + case "$opt" in + m ) parameterMessage="$OPTARG";; + t ) parameterTag="$OPTARG";; + ? ) helpFunction;; + esac +done + +if [ -z "$parameterMessage"] +then + echo "You need a commit message"; + helpFunction +fi + +git add . +git commit -m "$parameterMessage"; + +if [ -z "$parameterTag"] +then + echo "No tag specified... Ignoring..."; +else + echo "Tagging as $parameterTag"; + git tag -a "$parameterTag" -m "$parameterTag"; +fi + +HEAD="<h1>Changelog</h1><br />"; +HTML=$(git log --pretty=format:'<h2>%d</h2><li> <a href="http://github.com/Malod219/BermudaGlitch/commit/%H">view commit &bull;</a> %s</li> ' | sed -e 's/<h2><\/h2>//g' -e 's/(HEAD -> master)/(Unreleased)/g' -e 's/<h2> (origin\/master)<\/h2>//g' -e 's/HEAD -> master, //g'); +FULLHTML="$HEAD$HTML"; +echo $FULLHTML > CHANGELOG.md; + +git add CHANGELOG.md; +git commit --amend --no-edit; diff --git a/local/bin/gmodserver b/local/bin/gmodserver @@ -0,0 +1 @@ +ssh -i ~/.ssh/risingthumbxyz/private.txt root@risingthumb.xyz "cd server_1; ./run"; diff --git a/local/bin/gmodserverkill b/local/bin/gmodserverkill @@ -0,0 +1 @@ +ssh -i ~/.ssh/risingthumbxyz/private.txt root@risingthumb.xyz "tmux kill-session -t gmod"; diff --git a/local/bin/hman b/local/bin/hman @@ -0,0 +1,2 @@ +#!/bin/sh +man -Hbrave "$@" diff --git a/local/bin/i3cmds/ddspawn b/local/bin/i3cmds/ddspawn @@ -0,0 +1,19 @@ +#!/bin/sh + +# Toggle floating dropdown terminal in i3, or start if non-existing. +# $1 is the script run in the terminal. +# All other args are terminal settings. +# Terminal names are in dropdown_* to allow easily setting i3 settings. + +[ -z "$1" ] && exit + +script=$1 +shift +if xwininfo -tree -root | grep "(\"dropdown_$script\" "; +then + echo "Window detected." + i3 "[instance=\"dropdown_$script\"] scratchpad show; [instance=\"dropdown_$script\"] move position center" +else + echo "Window not detected... spawning." + i3 "exec --no-startup-id $TERMINAL -n dropdown_$script $@ -e $script" +fi diff --git a/local/bin/i3cmds/dropdowncalc b/local/bin/i3cmds/dropdowncalc @@ -0,0 +1,3 @@ +#!/bin/sh + +ifinstalled bc && echo "Welcome to the Calculator." && bc -lq diff --git a/local/bin/i3cmds/hover b/local/bin/i3cmds/hover @@ -0,0 +1,15 @@ +#!/bin/sh + +[ -z "$1" ] && exit # If $1 is left, hovers in the bottom left, if right, the bottom right +current=$(xdotool getwindowfocus) +newwidth=$(($(xdotool getdisplaygeometry | awk '{print $2}') / 3)) +newheight=$(($(xdotool getdisplaygeometry | awk '{print $1}') / 3)) +xdotool windowsize "$current" $newheight $newwidth +newsize=$(xdotool getwindowgeometry "$current" | grep Geometry | sed -e 's/x/ /g' | awk '{print $3}') +newwidth=$(xdotool getwindowgeometry "$current" | grep Geometry | grep -o " [0-9]*") + +case "$1" in + left) horizontal=0; vertical=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newsize)) ;; + right) horizontal=$(($(xdotool getdisplaygeometry | awk '{print $1}') - newwidth)) ; vertical=$(($(xdotool getdisplaygeometry | awk '{print $2}') - newsize)) ;; +esac +xdotool windowmove "$current" $horizontal $vertical diff --git a/local/bin/i3cmds/i3resize b/local/bin/i3cmds/i3resize @@ -0,0 +1,28 @@ +#!/bin/sh + +# This script was made by `goferito` on Github. +# Some cleanup by Luke. + +[ -z "$1" ] && echo "No direction provided" && exit 1 +distanceStr="2 px or 2 ppt" + +moveChoice() { + i3-msg resize "$1" "$2" "$distanceStr" | grep '"success":true' || \ + i3-msg resize "$3" "$4" "$distanceStr" +} + +case $1 in + up) + moveChoice grow up shrink down + ;; + down) + moveChoice shrink up grow down + ;; + left) + moveChoice shrink right grow left + ;; + right) + moveChoice grow right shrink left + ;; +esac + diff --git a/local/bin/i3cmds/tmuxdd b/local/bin/i3cmds/tmuxdd @@ -0,0 +1,5 @@ +#!/bin/sh + +# This is the script that i3 runs to either start tmux in +# the dropdown terminal or log into a previous session. +tmux a || tmux diff --git a/local/bin/i3cmds/toggle-welcome b/local/bin/i3cmds/toggle-welcome @@ -0,0 +1,10 @@ +#!/bin/sh + +# Toggles the LARBS welcome message. + +PIC="${XDG_DATA_HOME:-$HOME/.local/share}/larbs/larbs.png" + +grep LARBSWELCOME "$HOME/.xprofile" && + ( sed -i "/LARBSWELCOME/d" ~/.xprofile && notify-send -i "$PIC" "LARBS welcome message" "Welcome message disabled. Press Super+Shift+F1 again to reverse." ) || + ( echo "notify-send -i \"$PIC\" \"Welcome to LARBS\" \"Press super+F1 for the help menu.\" # LARBSWELCOME" >> ~/.xprofile && + notify-send -i "$PIC" "LARBS welcome message" "Welcome message re-enabled." ) diff --git a/local/bin/ifinstalled b/local/bin/ifinstalled @@ -0,0 +1,8 @@ +#!/bin/sh + +# Some optional functions in LARBS require programs not installed by default. I +# use this little script to check to see if a command exists and if it doesn't +# it informs the user that they need that command to continue. This is used in +# various other scripts for clarity's sake. + +pacman -Qq "$1" >/dev/null || { notify-send "📦 $1" "must be installed for this function." && exit 1 ;} diff --git a/local/bin/img b/local/bin/img @@ -0,0 +1,8 @@ +#!/bin/bash +[ -z "$5" ] && echo "Usage: $0 <image> <x> <y> <max height> <max width>" && exit +source "`ueberzug library`" + +ImageLayer 0< <( + ImageLayer::add [identifier]="img" [x]="$2" [y]="$3" [max_height]="$4" [max_width]="$5" [path]="$1" + read +) diff --git a/local/bin/jsonlint b/local/bin/jsonlint @@ -0,0 +1,46 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +r"""A JSON syntax validator and formatter tool. + +Requires demjson module. + +""" +__author__ = "Deron Meranda <http://deron.meranda.us/>" +__homepage__ = "http://deron.meranda.us/python/demjson/" +__date__ = "2014-12-22" +__version__ = "2.2.4" +__credits__ = """Copyright (c) 2006-2015 Deron E. Meranda <http://deron.meranda.us/> + +Licensed under GNU LGPL (GNU Lesser General Public License) version 3.0 +or later. See LICENSE.txt included with this software. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this program. If not, see <http://www.gnu.org/licenses/> +or <http://www.fsf.org/licensing/>. + +""" + +import sys + +try: + import demjson +except ImportError: + sys.stderr.write("Can not import the demjson Python module.\n") + sys.stderr.write("Try running: pip install demjson\n") + sys.exit(1) + + +if __name__ == '__main__': + lint = demjson.jsonlint( program_name=sys.argv[0] ) + rc = lint.main( sys.argv[1:] ) + sys.exit(rc) diff --git a/local/bin/launch_polybar b/local/bin/launch_polybar @@ -0,0 +1,9 @@ +#!/bin/sh + +# Terminate already running bar instances +killall -q polybar + +# Wait until the processes have been shut down +while pidof polybar >/dev/null; do sleep 1; done + +for i in $(polybar -m | awk -F: '{print $1}'); do MONITOR=$i polybar default & done diff --git a/local/bin/lf-select b/local/bin/lf-select @@ -0,0 +1,9 @@ +#!/bin/sh + +# Reads file names from stdin and selects them in lf. + +while read -r file; do + [ -z "$file" ] && continue + lf -remote "send select \"$file\"" + lf -remote "send toggle" +done diff --git a/local/bin/linkhandler b/local/bin/linkhandler @@ -0,0 +1,22 @@ +#!/bin/sh + +# Feed script a url or file location. +# If an image, it will view in sxiv, +# if a video or gif, it will view in mpv +# if a music file or pdf, it will download, +# otherwise it opens link in browser. + +# If no url given. Opens browser. For using script as $BROWSER. +[ -z "$1" ] && { "$BROWSER"; exit; } + +case "$1" in + *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*) + setsid mpv -quiet "$1" >/dev/null 2>&1 & ;; + *png|*jpg|*jpe|*jpeg|*gif) + curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;; + *mp3|*flac|*opus|*mp3?source*) + setsid tsp curl -LO "$1" >/dev/null 2>&1 & ;; + *) + if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR $1" + else setsid $BROWSER "$1" >/dev/null 2>&1 & fi ;; +esac diff --git a/local/bin/lmc b/local/bin/lmc @@ -0,0 +1,28 @@ +#!/bin/sh + +NUM="${2:-5}" + +# Uncomment the following line to use Pulseaudio. +# PULSE=true + +if [ "$PULSE" ]; then + toggle() { pulsemixer --toggle-mute ;} + mute() { pulsemixer --mute ;} + up() { pulsemixer --change-volume +"$NUM" ;} + down() { pulsemixer --change-volume -"$NUM" ;} + control() { pulsemixer ;} +else + toggle() { amixer sset Master toggle ;} + mute() { amixer sset Master mute ;} + up() { amixer sset Master "$NUM"%+ ;} + down() { amixer sset Master "$NUM"%- ;} + control() { alsamixer ;} +fi + +case "$1" in + toggle) toggle ;; + mute) mute ;; + up) up ;; + down) down ;; + control) control ;; +esac diff --git a/local/bin/maimpick b/local/bin/maimpick @@ -0,0 +1,14 @@ +#!/bin/sh + +# This is bound to Shift+PrintScreen by default, requires maim. It lets you +# choose the kind of screenshot to take, including copying the image or even +# highlighting an area to copy. scrotcucks on suicidewatch right now. + +case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in + "a selected area") maim -s pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;; + "current window") maim -i "$(xdotool getactivewindow)" pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;; + "full screen") maim pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;; + "a selected area (copy)") maim -s | xclip -selection clipboard -t image/png ;; + "current window (copy)") maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;; + "full screen (copy)") maim | xclip -selection clipboard -t image/png ;; +esac diff --git a/local/bin/mpd-module-update b/local/bin/mpd-module-update @@ -0,0 +1,8 @@ +#!/bin/sh + +# This loop will update the mpd statusbar module whenever a command changes the +# music player's status. mpd must be running on X's start for this to work. + +while : ; do + mpc idle >/dev/null && pkill -RTMIN+11 "${STATUSBAR:-dwmblocks}" || break +done diff --git a/local/bin/opout b/local/bin/opout @@ -0,0 +1,13 @@ +#!/bin/sh + +# opout: "open output": A general handler for opening a file's intended output, +# usually the pdf of a compiled document. I find this useful especially +# running from vim. + +basename="$(echo "$1" | sed 's/\.[^\/.]*$//')" + +case "$1" in + *.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid xdg-open "$basename".pdf >/dev/null 2>&1 & ;; + *.html) setsid "$BROWSER" "$basename".html >/dev/null 2>&1 & ;; + *.sent) setsid sent "$1" >/dev/null 2>&1 & ;; +esac diff --git a/local/bin/pauseallmpv b/local/bin/pauseallmpv @@ -0,0 +1,10 @@ +#!/bin/sh + +# You might notice all mpv commands are aliased to have this input-ipc-server +# thing. That's just for this particular command, which allows us to pause +# every single one of them with one command! This is bound to super + shift + p +# (with other things) by default and is used in some other places. + +for i in $(ls /tmp/mpvSockets/*); do + echo '{ "command": ["set_property", "pause", true] }' | socat - $i; +done diff --git a/local/bin/pausemusic b/local/bin/pausemusic @@ -0,0 +1,3 @@ +#!/bin/sh + +if [[ "$(cmus-remote -Q | grep "status")" == "status playing" ]]; then cmus-remote -u; else cmus-remote -p; fi diff --git a/local/bin/pip b/local/bin/pip @@ -0,0 +1,8 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/local/bin/pip3 b/local/bin/pip3 @@ -0,0 +1,8 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/local/bin/pip3.8 b/local/bin/pip3.8 @@ -0,0 +1,8 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/local/bin/pman b/local/bin/pman @@ -0,0 +1,2 @@ +#!/bin/sh +man -Tpdf "$@" | zathura - ; diff --git a/local/bin/podentr b/local/bin/podentr @@ -0,0 +1,7 @@ +#!/bin/sh + +# entr command to run `queueandnotify` when newsboat queue is changed + +[ "$(pgrep -x $(basename $0) | wc -l)" -gt 2 ] && exit + +echo ${XDG_DATA_HOME:-$HOME/.local/share}/newsboat/queue | entr -p queueandnotify 2>/dev/null diff --git a/local/bin/pomodoro b/local/bin/pomodoro @@ -0,0 +1,8 @@ +#!/bin/sh +ACTIVE=$(($1*60)) +BREAK=$(($2*60)) +notify-send -i ~/Pictures/ProfilePictures/tomato.png "Pomodoro" "Started" +sleep $ACTIVE && notify-send -i ~/Pictures/ProfilePictures/tomato.png "Pomodoro" "Break\nBreak\nBreak\nBreak\nBreak"; sleep $BREAK && notify-send -i ~/Pictures/ProfilePictures/tomato.png "Pomodoro" "Work\nWork\nWork\nWork\nWork" +sleep $ACTIVE && notify-send -i ~/Pictures/ProfilePictures/tomato.png "Pomodoro" "Break\nBreak\nBreak\nBreak\nBreak"; sleep $BREAK && notify-send -i ~/Pictures/ProfilePictures/tomato.png "Pomodoro" "Work\nWork\nWork\nWork\nWork" +sleep $ACTIVE && notify-send -i ~/Pictures/ProfilePictures/tomato.png "Pomodoro" "Break\nBreak\nBreak\nBreak\nBreak"; sleep $BREAK && notify-send -i ~/Pictures/ProfilePictures/tomato.png "Pomodoro" "Work\nWork\nWork\nWork\nWork" +sleep $ACTIVE && notify-send -i ~/Pictures/ProfilePictures/tomato.png "Pomodoro" "Finished\nFinished\nFinished\nFinished\nFinished"; diff --git a/local/bin/prompt b/local/bin/prompt @@ -0,0 +1,8 @@ +#!/bin/sh + +# A dmenu binary prompt script. +# Gives a dmenu prompt labeled with $1 to perform command $2. +# For example: +# `./prompt "Do you want to shutdown?" "shutdown -h now"` + +[ "$(printf "No\\nYes" | dmenu -i -p "$1" -nb darkred -sb red -sf white -nf gray )" = "Yes" ] && $2 diff --git a/local/bin/qndl b/local/bin/qndl @@ -0,0 +1,12 @@ +#!/bin/sh + +# $1 is a url; $2 is a command +[ -z "$1" ] && exit +base="$(basename "$1")" +notify-send "⏳ Queuing $base..." +cmd="$2" +[ -z "$cmd" ] && cmd="youtube-dl --add-metadata" +idnum="$(tsp $cmd "$1")" +realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")" +tsp -D "$idnum" mv "$base" "$realname" +tsp -D "$idnum" notify-send "👍 $realname done." diff --git a/local/bin/queueandnotify b/local/bin/queueandnotify @@ -0,0 +1,14 @@ +#!/bin/sh + +# Podboat sucks. This script replaces it. +# It reads the newsboat queue, queuing downloads with taskspooler. +# It also removes the junk from extentions. +queuefile="${XDG_DATA_HOME:-$HOME/.local/share}/newsboat/queue" + +while read -r line; do + [ -z "$line" ] && continue + url="$(echo "$line" | awk '{print $1}')" + qndl "$url" "curl -LO" +done < "$queuefile" + +echo > "$queuefile" diff --git a/local/bin/random-file b/local/bin/random-file @@ -0,0 +1,2 @@ +#!/bin/bash +find $1/*.{png,jpg} -type f | shuf -n 1 diff --git a/local/bin/refbar b/local/bin/refbar @@ -0,0 +1,5 @@ +#!/bin/sh + +# Refresh the dwmbar. +# Send SIGTRAP signal to dwmbar script, which will handle it with a trap. +pkill -SIGTRAP dwmbar diff --git a/local/bin/remaps b/local/bin/remaps @@ -0,0 +1,11 @@ +#!/bin/sh + +# This script is called on startup to remap keys. +# Increase key speed via a rate change +xset r rate 300 50 +# Map the caps lock key to super... +setxkbmap -option caps:super +# But when it is pressed only once, treat it as escape. +killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape' +# Map the menu button to right super as well. +xmodmap -e 'keycode 135 = Super_R' diff --git a/local/bin/rotdir b/local/bin/rotdir @@ -0,0 +1,12 @@ +#!/bin/sh + +# When I open an image from the file manager in sxiv (the image viewer), I want +# to be able to press the next/previous keys to key through the rest of the +# images in the same directory. This script "rotates" the content of a +# directory based on the first chosen file, so that if I open the 15th image, +# if I press next, it will go to the 16th etc. Autistic, I know, but this is +# one of the reasons that sxiv is great for being able to read standard input. + +[ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1 +base="$(basename "$1")" + ls "$PWD" | awk "BEGIN { lines = \"\"; m = 0; } /^$base$/ { m = 1; } { if (!m) { if (lines) { lines = lines\"\n\"; } lines = lines\"\"\$0; } else { print \$0; } } END { print lines; }" diff --git a/local/bin/rssadd b/local/bin/rssadd @@ -0,0 +1,10 @@ +#!/bin/sh + +! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null && + notify-send "That doesn't look like a full URL." && exit +RSSFILE="${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls" +if awk '{print $1}' "$RSSFILE" | grep "^$1$" >/dev/null; then + notify-send "You already have this RSS feed." +else + echo "$1" >> "$RSSFILE" && notify-send "RSS feed added." +fi diff --git a/local/bin/samedir b/local/bin/samedir @@ -0,0 +1,8 @@ +#!/bin/sh + +# Open a terminal window in the same directory as the currently active window. + +PID=$(xprop -id "$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')" | grep -m 1 PID | cut -d " " -f 3) +PID="$(pstree -lpA "$PID" | tail -n 1 | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g')" +cd "$(readlink /proc/"$PID"/cwd)" || return 1 +"$TERMINAL" diff --git a/local/bin/setbg b/local/bin/setbg @@ -0,0 +1,21 @@ +#!/bin/sh + +# This script does the following: +# Run by itself, set the wallpaper (at X start). +# If given a file, set that as the new wallpaper. +# If given a directory, choose random file in it. +# If wal is installed, also generates a colorscheme. + +# Location of link to wallpaper link. +bgloc="${XDG_DATA_HOME:-$HOME/.local/share/}/bg" + +[ -f "$1" ] && ln -sf "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..." + +[ -d "$1" ] && ln -sf "$(find "$(readlink -f "$1")" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" + +# If pywal is installed, use it. +#wal -i "$(readlink -f "$bgloc")" -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 + +notify-send -i "$bgloc" "Random Wallpaper chosen." +pidof dwm >/dev/null && xdotool key super+F12 +xwallpaper --zoom "$bgloc" diff --git a/local/bin/shortcuts b/local/bin/shortcuts @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# Output locations. Unactivated progs should go to /dev/null. +shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc" +zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/zshnameddirrc" +ranger_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/ranger/shortcuts.conf" +qute_shortcuts="/dev/null" +fish_shortcuts="/dev/null" +vifm_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/vifm/vifmshortcuts" + +# Remove, prepare files +rm -f "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" 2>/dev/null +printf "# vim: filetype=sh\\n" > "$fish_shortcuts" +printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts" +printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts" + +# Format the `directories` file in the correct syntax and sent it to all three configs. +sed "s/\s*#.*$//;/^\s*$/d" "${XDG_CONFIG_HOME:-$HOME/.config}/directories" | tee >(awk '{print $1"=\"cd "$2" && ls -a\" \\"}' >> "$shell_shortcuts") \ + >(awk '{print "hash -d "$1"="$2}' >> "$zsh_named_dirs") \ + >(awk '{print "abbr", $1, "\"cd " $2 "; and ls -a\""}' >> "$fish_shortcuts") \ + >(awk '{print "map g" $1, ":cd", $2 "<CR>\nmap t" $1, "<tab>:cd", $2 "<CR><tab>\nmap M" $1, "<tab>:cd", $2 "<CR><tab>:mo<CR>\nmap Y" $1, "<tab>:cd", $2 "<CR><tab>:co<CR>" }' >> "$vifm_shortcuts") \ + >(awk '{print "config.bind(\";"$1"\", \"set downloads.location.directory "$2" ;; hint links download\")"}' >> "$qute_shortcuts") \ + | awk '{print "map g"$1" cd "$2"\nmap t"$1" tab_new "$2"\nmap m"$1" shell mv -v %s "$2"\nmap Y"$1" shell cp -rv %s "$2}' >> "$ranger_shortcuts" + +# Format the `files` file in the correct syntax and sent it to both configs. +sed "s/\s*#.*$//;/^\s*$/d" "${XDG_CONFIG_HOME:-$HOME/.config}/files" | tee >(awk '{print $1"=\"$EDITOR "$2"\" \\"}' >> "$shell_shortcuts") \ + >(awk '{print "abbr", $1, "\"$EDITOR "$2"\""}' >> "$fish_shortcuts") \ + >(awk '{print "map", $1, ":e", $2 "<CR>" }' >> "$vifm_shortcuts") \ + | awk '{print "map "$1" shell $EDITOR "$2}' >> "$ranger_shortcuts" diff --git a/local/bin/showclip b/local/bin/showclip @@ -0,0 +1,10 @@ +#!/bin/sh + +# Display contents of selection via dunst if running. +# Separate script for i3. + +clip=$(xclip -o -selection clipboard) +prim=$(xclip -o -selection primary) + +[ -n "$clip" ] && notify-send "Clipboard:" "$clip" +[ -n "$prim" ] && notify-send "Primary:" "$prim" diff --git a/local/bin/statusbar/battery b/local/bin/statusbar/battery @@ -0,0 +1,27 @@ +#!/bin/sh + +# Prints all batteries, their percentage remaining and an emoji corresponding +# to charge status (🔌 for plugged up, 🔋 for discharging on battery, etc.). + +case $BLOCK_BUTTON in + 3) notify-send "🔋 Battery module" "🔋: discharging +🛑: not charging +♻: stagnant charge +🔌: charging +⚡: charged +❗: battery very low!" ;; +esac + +# Loop through all attached batteries. +for battery in /sys/class/power_supply/BAT? +do + # Get its remaining capacity and charge status. + capacity=$(cat "$battery"/capacity) || break + status=$(sed "s/Discharging/🔋/;s/Not charging/🛑/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/" "$battery"/status) + + # If it is discharging and 25% or less, we will add a ❗ as a warning. + [ "$capacity" -le 25 ] && [ "$status" = "🔋" ] && warn="❗" + + printf "%s%s%s%% " "$status" "$warn" "$capacity" + unset warn +done | sed 's/ *$//' diff --git a/local/bin/statusbar/clock b/local/bin/statusbar/clock @@ -0,0 +1,31 @@ +#!/bin/sh + +clock=$(date '+%I') + +case "$clock" in + "00") icon="🕛" ;; + "01") icon="🕐" ;; + "02") icon="🕑" ;; + "03") icon="🕒" ;; + "04") icon="🕓" ;; + "05") icon="🕔" ;; + "06") icon="🕕" ;; + "07") icon="🕖" ;; + "08") icon="🕗" ;; + "09") icon="🕘" ;; + "10") icon="🕙" ;; + "11") icon="🕚" ;; + "12") icon="🕛" ;; +esac + +case $BLOCK_BUTTON in + 1) notify-send "This Month" "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -D ~/.config/calcurse -d3)" ;; + 2) setsid "$TERMINAL" -e calcurse -D ~/.config/calcurse & ;; + 3) notify-send "📅 Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\` +- Middle click opens calcurse if installed" ;; +esac + +printf '%s %s%s\n' "$(date '+%b %d(%a)')" "$(date '+%I:%M%p')" + +#for europeans, use this +#printf '%s %s%s\n' "$(date '+%a %d/%m')" "$icon" "$(date '+%I:%M%p')" diff --git a/local/bin/statusbar/cpu b/local/bin/statusbar/cpu @@ -0,0 +1,11 @@ +#!/bin/sh + +case $BLOCK_BUTTON in + 1) notify-send "🖥 CPU hogs" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)\\n(100% per core)" ;; + 2) setsid "$TERMINAL" -e htop & ;; + 3) notify-send "🖥 CPU module " "\- Shows CPU temperature. +- Click to show intensive processes. +- Middle click to open htop." ;; +esac + +sensors | awk '/Core 0/ {print "🌡", $3}' diff --git a/local/bin/statusbar/disk b/local/bin/statusbar/disk @@ -0,0 +1,22 @@ +#!/bin/sh + +# Status bar module for disk space +# $1 should be drive mountpoint, otherwise assumed /. + +location=${1:-/} + +[ -d "$location" ] || exit + +case $BLOCK_BUTTON in + 1) notify-send "💽 Disk space" "$(df -h --output=target,used,size)" ;; + 3) notify-send "💽 Disk module" "\- Shows used hard drive space. +- Click to show all disk info." ;; +esac + +case "$location" in + "/home"* ) icon="🏠" ;; + "/mnt"* ) icon="💾" ;; + *) icon="🖥";; +esac + +printf "%s: %s\n" "$icon" "$(df -h "$location" | awk ' /[0-9]/ {print $3 "/" $2}')" diff --git a/local/bin/statusbar/help-icon b/local/bin/statusbar/help-icon @@ -0,0 +1,16 @@ +#!/bin/sh + +# The clickable help menu. Middle click to restart wm. + +# If dwm is running, use dwm's readme and restart. +ps ax | grep -q "\sdwm$" && + READMEFILE=/usr/local/share/dwm/larbs.mom + restartwm() { pkill -HUP dwm ;} || + restartwm() { i3 restart ;} + +case $BLOCK_BUTTON in + 1) groff -mom "${READMEFILE:-${XDG_DATA_HOME:-$HOME/.local/share}/larbs/readme.mom}" -Tpdf | zathura - ;; + 2) restartwm ;; + 3) notify-send "❓ Help module" "\- Left click to open LARBS guide. +- Middle click to refresh window manager.";; +esac; echo "❓" diff --git a/local/bin/statusbar/internet b/local/bin/statusbar/internet @@ -0,0 +1,19 @@ +#!/bin/sh + +# Show wifi 📶 and percent strength or 📡 if none. +# Show 🌐 if connected to ethernet or ❎ if none. + +case $BLOCK_BUTTON in + 1) setsid "$TERMINAL" -e nmtui & ;; + 3) notify-send "🌐 Internet module" "\- Click to connect +📡: no wifi connection +📶: wifi connection with quality +❎: no ethernet +🌐: ethernet working +" ;; +esac + +grep -q "down" /sys/class/net/w*/operstate && wifiicon="📡" || + wifiicon="$(grep "^\s*w" /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }')" + +printf "%s\n" "$wifiicon" #"$(sed "s/down/❎/;s/up/🌐/" /sys/class/net/e*/operstate)" diff --git a/local/bin/statusbar/iplocate b/local/bin/statusbar/iplocate @@ -0,0 +1,10 @@ +#!/bin/sh + +# Gets your public ip address checks which country you are in and +# displays that information in the statusbar +# +# https://www.maketecheasier.com/ip-address-geolocation-lookups-linux/ + +ifinstalled "geoip" || exit +addr="$(curl ifconfig.me 2>/dev/null)" || exit +grep "flag: " "${XDG_DATA_HOME:-$HOME/.local/share}/larbs/emoji" | grep "$(geoiplookup "$addr" | sed 's/.*, //')" | sed "s/flag: //;s/;.*//" diff --git a/local/bin/statusbar/mailbox b/local/bin/statusbar/mailbox @@ -0,0 +1,20 @@ +#!/bin/sh + +# i3blocks mail module. +# Displays number of unread mail and an loading icon if updating. +# When clicked, brings up `neomutt`. + +case $BLOCK_BUTTON in + 1) "$TERMINAL" -e neomutt ;; + 2) setsid mailsync >/dev/null & ;; + 3) notify-send "📬 Mail module" "\- Shows unread mail +- Shows 🔃 if syncing mail +- Left click opens neomutt +- Middle click syncs mail" ;; +esac + +unread="$(find ${XDG_DATA_HOME:-$HOME/.local/share}/mail/*/INBOX/new/* -type f | wc -l 2>/dev/null)" + +icon="$(cat "/tmp/imapsyncicon_$USER")" 2>/dev/null + +[ "$unread" = "0" ] && [ "$icon" = "" ] || echo "📬 $unread$(cat "/tmp/imapsyncicon_$USER" 2>/dev/null)" diff --git a/local/bin/statusbar/memory b/local/bin/statusbar/memory @@ -0,0 +1,11 @@ +#!/bin/sh + +case $BLOCK_BUTTON in + 1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;; + 2) setsid "$TERMINAL" -e htop & ;; + 3) notify-send "🧠 Memory module" "\- Shows Memory Used/Total. +- Click to show memory hogs. +- Middle click to open htop." ;; +esac + +free -h | sed -n '2{p;q}' | awk '{print "🧠", $3 "/" $2}' diff --git a/local/bin/statusbar/moonphase b/local/bin/statusbar/moonphase @@ -0,0 +1,25 @@ +#!/bin/sh + +# Shows the current moon phase. Requires `pom-perl`. + +mnphs=$(pom $1 | grep -o 'New\|Waxing Crescent\|First Quarter\|Waxing Gibbous\|Full\|Waning Gibbous\|Last Quarter\|Waning Crescent' | grep -m1 '.') +prcnt=$(pom $1 | grep -o '[[:digit:]]*%' | grep -o '[[:digit:]]*' ) +case "$mnphs" in + "New") icon="🌑" prcnt="0" ;; + "Waxing Crescent") icon="🌒" ;; + "First Quarter") icon="🌓" prcnt="50" ;; + "Waxing Gibbous") icon="🌔" ;; + "Full") icon="🌕" prcnt="100" ;; + "Waning Gibbous") icon="🌖" ;; + "Last Quarter") icon="🌗" prcnt="50" ;; + "Waning Crescent") icon="🌘" ;; + *) echo errorrrr ;; +esac + +case $BLOCK_BUTTON in + 1) $mnphs ;; + 2) $mnphs ;; + 3) notify-send " 🌜$(pom)" ;; +esac + +echo "$icon" "$prcnt"% diff --git a/local/bin/statusbar/music b/local/bin/statusbar/music @@ -0,0 +1,26 @@ +#!/bin/sh +if [[ "$(cmus-remote -Q | grep "status")" == "status playing" ]]; then + artist=`cmus-remote -Q | + grep --text '^tag artist' | + sed '/^tag artistsort/d' | + awk '{gsub("tag artist ", "");print}'` + icon="🎵 " + title=`cmus-remote -Q | + grep --text '^tag title' | + sed -e 's/tag title //' | + awk '{gsub("tag title ", "");print}'` + echo "$icon$artist - $title"; +elif [[ "$(cmus-remote -Q | grep "status")" == "status paused" ]]; then + artist=`cmus-remote -Q | + grep --text '^tag artist' | + sed '/^tag artistsort/d' | + awk '{gsub("tag artist ", "");print}'` + icon="⏸ " + title=`cmus-remote -Q | + grep --text '^tag title' | + sed -e 's/tag title //' | + awk '{gsub("tag title ", "");print}'` + echo "$icon$artist - $title"; + +else echo ""; +fi diff --git a/local/bin/statusbar/news b/local/bin/statusbar/news @@ -0,0 +1,16 @@ +#!/bin/sh + +# Displays number of unread news items and an loading icon if updating. +# When clicked, brings up `newsboat`. + +case $BLOCK_BUTTON in + 1) setsid "$TERMINAL" -e newsboat ;; + 2) setsid newsup >/dev/null & exit ;; + 3) notify-send "📰 News module" "\- Shows unread news items +- Shows 🔃 if updating with \`newsup\` +- Left click opens newsboat +- Middle click syncs RSS feeds +<b>Note:</b> Only one instance of newsboat (including updates) may be running at a time." ;; +esac + + cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ print "📰 " $1}' | sed 's/^📰 0$//g')$(cat ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/.update 2>/dev/null)" diff --git a/local/bin/statusbar/pacpackages b/local/bin/statusbar/pacpackages @@ -0,0 +1,28 @@ +#!/bin/sh + +# Displays number of upgradeable packages. +# For this to work, have a `pacman -Sy` command run in the background as a +# cronjob every so often as root. This script will then read those packages. +# When clicked, it will run an upgrade via pacman. +# +# Add the following text as a file in /usr/share/libalpm/hooks/statusbar.hook: +# +# [Trigger] +# Operation = Upgrade +# Type = Package +# Target = * +# +# [Action] +# Description = Updating statusbar... +# When = PostTransaction +# Exec = /usr/bin/pkill -RTMIN+8 dwmblocks # Or i3blocks if using i3. + +case $BLOCK_BUTTON in + 1) setsid "$TERMINAL" -e popupgrade & ;; + 2) notify-send "$(/usr/bin/pacman -Qu)" ;; + 3) notify-send "🎁 Upgrade module" "📦: number of upgradable packages +- Left click to upgrade packages +- Middle click to show upgradable packages" ;; +esac + +pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/📦/;s/^📦0$//g" diff --git a/local/bin/statusbar/popupgrade b/local/bin/statusbar/popupgrade @@ -0,0 +1,9 @@ +#!/bin/sh + +printf "Beginning upgrade.\\n" + +yay -Syu +pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}" + +printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n" +read -r diff --git a/local/bin/statusbar/statusbarinfo b/local/bin/statusbar/statusbarinfo @@ -0,0 +1,32 @@ +#!/bin/sh + +echo " + ____ _ _ _ +/ ___|| |_ __ _| |_ _ _ ___| |__ __ _ _ __ +\___ \| __/ _\` | __| | | / __| '_ \ / _\` | '__| + ___) | || (_| | |_| |_| \__ \ |_) | (_| | | +|____/ \__\__,_|\__|\__,_|___/_.__/ \__,_|_| + +This is a list of the statusbar modules. + +📦5 \033[31mpacpackages\033[0m: updatable packages (must have pacman -Sy run in root cronjob to check). +📰 41 \033[32mnews\033[0m: unread RSS entries in newsboat. +☔ 83% ❄️ 69° 🌞 80° \033[33mweather\033[0m: ☔ for precipitation, 🌞 and ❄ for daily high and low. +📬 20 \033[34mmailbox\033[0m: number of unread mail if m