├── .gitignore ├── .gitmodules ├── README.md ├── arch-packages.list ├── deploy.zsh ├── etc ├── X11 │ └── xorg.conf.d │ │ ├── 90-kbd.conf │ │ ├── 90-mouse.conf │ │ └── 99-synaptics-overrides.conf ├── binfmt.d │ ├── arm.conf │ ├── armeb.conf │ ├── mips.conf │ ├── mipsel.conf │ ├── ppc.conf │ └── wine.conf ├── dispatch-conf.conf ├── fuse.conf ├── man_db.conf ├── netctl │ └── hooks │ │ ├── network-online │ │ └── tinc ├── pacman.d │ └── hooks │ │ ├── update-charmaps-UTF-8.hook │ │ └── update-charmaps-UTF-8.py ├── portage │ ├── env │ │ └── debug.conf │ ├── make.conf │ ├── package.accept_keywords │ ├── package.mask │ │ ├── costly │ │ ├── temp │ │ └── unstable │ ├── package.use │ │ ├── app │ │ ├── cross-arm-unknown-linux-gnueabi │ │ ├── dev │ │ ├── doc │ │ ├── network │ │ ├── portage │ │ └── system │ ├── profile │ │ └── package.provided │ └── sets │ │ ├── app │ │ ├── dev │ │ ├── font │ │ ├── laptop │ │ ├── network │ │ ├── pc │ │ ├── portage │ │ └── sys ├── sddm.conf.d │ └── default.conf ├── sysctl.d │ ├── 10-network.conf │ ├── 10-ptrace.conf │ ├── 90-general.conf │ └── rr.conf ├── systemd │ └── system │ │ ├── create_ap.service │ │ ├── macspoof@.service │ │ ├── readonly-root.service │ │ └── socksfwd@.service ├── telegramircd │ └── config ├── udev │ └── rules.d │ │ └── 10-automount.rules ├── unbound │ └── unbound.conf ├── wechatircd │ └── config ├── xdg │ └── pacaur │ │ └── config └── yaourtrc ├── freebsd-packages.list ├── gentoo-packages.list ├── home ├── .Xresources ├── .alias ├── .aprc ├── .bashrc ├── .cgdb │ └── cgdbrc ├── .config │ ├── calibre │ │ └── viewer.py │ ├── compton.conf │ ├── doom │ │ ├── +bindings.el │ │ ├── +org.el │ │ ├── +ui.el │ │ ├── autoload │ │ │ └── misc.el │ │ ├── config.el │ │ ├── custom.el │ │ ├── init.el │ │ ├── modules │ │ │ └── private │ │ │ │ ├── my-cc │ │ │ │ ├── autoload.el │ │ │ │ ├── config.el │ │ │ │ └── packages.el │ │ │ │ ├── my-julia │ │ │ │ ├── config.el │ │ │ │ └── packages.el │ │ │ │ ├── my-org │ │ │ │ └── config.el │ │ │ │ └── my-python │ │ │ │ ├── config.el │ │ │ │ └── packages.el │ │ ├── packages.el │ │ └── themes │ │ │ └── my-doom-one-theme.el │ ├── dunst │ │ └── dunstrc │ ├── environment.d │ │ └── envvars.conf │ ├── fcitx │ │ └── config │ ├── feh │ │ ├── keys │ │ └── themes │ ├── fish │ │ ├── config.fish │ │ ├── fish_plugins │ │ └── functions │ │ │ └── tmpdir.fish │ ├── fontconfig │ │ └── fonts.conf │ ├── git │ │ └── ignore │ ├── gtk-3.0 │ │ ├── gtk.css │ │ └── settings.ini │ ├── kanata │ │ └── config.kbd │ ├── khal │ │ └── khal.conf │ ├── mimeapps.list │ ├── newsbeuter │ │ └── config │ ├── nim │ │ └── nim.cfg │ ├── nvim │ │ ├── coc-settings.json │ │ ├── init.lua │ │ └── lua │ │ │ ├── fn.lua │ │ │ ├── lsp.lua │ │ │ ├── my │ │ │ └── util.lua │ │ │ └── plugins.lua │ ├── proxy.pac.coffee │ ├── radare2 │ │ └── radare2rc │ ├── redshift.conf │ ├── rofi │ │ └── config │ ├── skhd │ │ └── skhdrc │ ├── sway │ │ └── config │ ├── systemd │ │ └── user │ │ │ ├── break.service │ │ │ ├── break.timer │ │ │ ├── default.target.wants │ │ │ ├── offlineimap@Ray.service │ │ │ ├── rdm.service │ │ │ ├── ssh-agent.service │ │ │ └── udiskie.service │ │ │ ├── fcitx.service │ │ │ ├── graphical.target │ │ │ ├── graphical.target.wants │ │ │ ├── fcitx.service │ │ │ ├── keynav.service │ │ │ ├── notify-server.service │ │ │ ├── redshift-gtk.service │ │ │ ├── taskbar.service │ │ │ └── xscreensaver.service │ │ │ ├── inotify-tmp-screen.path │ │ │ ├── inotify-tmp-screen.service │ │ │ ├── inotify-tmp-wallpaper.path │ │ │ ├── inotify-tmp-wallpaper.service │ │ │ ├── kanata.service │ │ │ ├── keynav.service │ │ │ ├── notify-server.service │ │ │ ├── offlineimap@.service │ │ │ ├── redshift-gtk.service │ │ │ ├── socks5@.service │ │ │ ├── ssh-agent.service │ │ │ ├── taskbar.service │ │ │ ├── timers.target.wants │ │ │ ├── break.timer │ │ │ └── nvchecker.timer │ │ │ └── xscreensaver.service │ ├── termite │ │ └── config │ ├── user-dirs.dirs │ ├── user-dirs.locale │ ├── vdirsyncer │ │ └── config │ ├── wezterm │ │ └── wezterm.lua │ ├── xmonad │ │ └── xmonad.hs │ ├── ycmd │ │ └── .ycm_extra_conf.py │ └── zellij │ │ └── config.kdl ├── .ctags ├── .gdb │ ├── call-trace │ ├── gdbinit.algo │ ├── gdbinit.asm │ ├── gdbinit.gef │ ├── gdbinit.pwndbg │ └── stl-views.gdb ├── .gdbinit ├── .gemrc ├── .ghci ├── .gitconfig ├── .gnupg │ └── gpg-agent.conf ├── .goldendict │ └── article-style.css ├── .gtkrc-2.0 ├── .gvimrc ├── .history │ └── .keep ├── .ideskrc ├── .indent.pro ├── .inputrc ├── .keynavrc ├── .lambda-term-inputrc ├── .latexmkrc ├── .lftp │ └── rc ├── .lldbinit ├── .local │ └── share │ │ ├── applications │ │ ├── dot.desktop │ │ ├── feh.desktop │ │ ├── google-chrome.desktop │ │ ├── mimeapps.list │ │ └── nvr.desktop │ │ ├── fcitx5 │ │ └── rime │ │ │ └── default.custom.yaml │ │ ├── parcellite │ │ └── actions │ │ └── xmonad │ │ └── .keep ├── .login_conf ├── .lscolor ├── .lscolor256 ├── .mailcap ├── .mlterm │ ├── aafont │ └── main ├── .modules │ ├── common │ ├── deno │ ├── go │ ├── intel │ │ └── 2015.2.164 │ ├── mingw │ ├── mpi │ │ └── impi │ │ │ └── 4.1.3.049 │ ├── nim │ ├── nodejs │ ├── perl │ ├── ruby │ │ └── 2.7.0 │ ├── rust │ └── yarn ├── .mutt │ ├── local │ ├── muttrc │ ├── remote │ └── theme ├── .ncmpcpp │ ├── config │ └── keys ├── .npmrc ├── .ocamlinit ├── .pentadactyl │ └── desert.penta ├── .pentadactylrc ├── .pip │ └── pip.conf ├── .pythonstartup ├── .railsrc ├── .ripgreprc ├── .rtorrent.rc ├── .sage │ └── init.sage ├── .sqliterc ├── .ssh │ └── config ├── .taskrc ├── .terminfo │ └── x │ │ ├── xterm-24bits.terminfo │ │ └── xterm-termite-24bits.terminfo ├── .tmux.conf ├── .urlview ├── .valgrindrc ├── .weechat │ ├── README.md │ ├── alias.conf │ ├── aspell.conf │ ├── autosort.conf │ ├── buffer_autoset.conf │ ├── buflist.conf │ ├── charset.conf │ ├── exec.conf │ ├── irc.conf │ ├── iset.conf │ ├── jabber.conf │ ├── logger.conf │ ├── lua │ │ └── autoload │ │ │ └── emoji.lua │ ├── perl │ │ └── autoload │ │ │ ├── buffers.pl │ │ │ ├── highmon.pl │ │ │ └── iset.pl │ ├── plugins.conf │ ├── python │ │ └── autoload │ │ │ ├── allquery.py │ │ │ ├── autosort.py │ │ │ ├── bot2human.py │ │ │ ├── buffer_autoset.py │ │ │ ├── go.py │ │ │ ├── jabber.py │ │ │ ├── notify.py │ │ │ ├── pastebin.py │ │ │ ├── pushbullet.py │ │ │ ├── shell.py │ │ │ ├── urlgrab.py │ │ │ └── zerotab.py │ ├── relay.conf │ ├── script.conf │ ├── trigger.conf │ ├── urlgrab.conf │ ├── weechat.conf │ └── xfer.conf ├── .wgetrc ├── .xbindkeysrc.scm ├── .xinitrc ├── .xmobarrc ├── .zprofile ├── .zsh │ └── functions │ │ └── jump-target ├── .zshrc ├── Util │ └── pygrep.cc ├── abs │ └── nvchecker.ini └── bin │ ├── ColorMake.mtailrc │ ├── alldot │ ├── allvim │ ├── archpkg │ ├── backup │ ├── bbs │ ├── byzanz │ ├── change-wallpaper │ ├── change_backlight │ ├── change_volume │ ├── chrome │ ├── codeforces │ ├── configure-llvm │ ├── contact │ ├── cookie │ ├── di │ ├── epipe │ ├── exp │ ├── ff │ ├── genhdr │ ├── git-use │ ├── imgbin │ ├── leetcode │ ├── llvm-push │ ├── mkreproduce │ ├── modulecmd.tcl │ ├── mouse │ ├── mutt-notmuch │ ├── notify-server │ ├── ptpb │ ├── rofi-file-browser │ ├── ror │ ├── ror-bindfs │ ├── rrr │ ├── sec │ ├── socksfwd │ ├── ss2qrcode │ ├── start-tiling │ ├── sudogit │ ├── suid.mk │ ├── taskbar │ ├── timein │ ├── tmuxwords.rb │ ├── toggle-invert │ ├── topcoder-data-parser.hs │ ├── topcoder-signature │ ├── update-writefull │ ├── usaco │ ├── vimtrace │ ├── wallpaper │ ├── winprop │ └── wman └── install-utils.zsh /.gitignore: -------------------------------------------------------------------------------- 1 | \#*# 2 | *~ 3 | *.log 4 | *.pyc 5 | tags 6 | /home/.ncmpcpp/artists 7 | /home/.mutt/cache 8 | /home/.mutt/profile 9 | /etc/portage/package.use/cross-* 10 | ._cfg* 11 | /home/.local/share/applications/mimeinfo.cache 12 | /home/.local/share/applications/wine* 13 | /home/.config/newsbeuter/profile 14 | /home/.config/newsbeuter/urls 15 | /home/.config/gtk-3.0/bookmarks 16 | /home/.config/xmonad/xmonad.hi 17 | /home/.config/xmonad/xmonad.o 18 | /home/.tmux/resurrect 19 | /etc/portage/profile/package.use.force 20 | /etc/portage/profile/package.use.mask 21 | /etc/portage/env/cross-* 22 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "home/.gdb/peda"] 2 | path = home/.gdb/peda 3 | url = https://github.com/longld/peda 4 | ignore = dirty 5 | ignore = dirty 6 | [submodule "home/Util/zsh-completions"] 7 | path = home/Util/zsh-completions 8 | url = https://github.com/zsh-users/zsh-completions 9 | [submodule "home/.tmux/plugins/tpm"] 10 | path = home/.tmux/plugins/tpm 11 | url = https://git::@github.com/tmux-plugins/tpm 12 | [submodule "home/Util/fisher"] 13 | path = home/Util/fisher 14 | url = https://github.com/jorgebucaran/fisher 15 | [submodule "home/Util/z.lua"] 16 | path = home/Util/z.lua 17 | url = https://github.com/skywind3000/z.lua 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Config 2 | 3 | Ray's comprehensive configuration archive. 4 | 5 | ## Installation 6 | 7 | ``` 8 | pacman -S stack 9 | stack install fast-tags ghc-mod hoogle hscope hledger pointfree pointful 10 | ``` 11 | 12 | ## Features 13 | 14 | Default applications: 15 | 16 | See `home/.local/share/applications/mimeapps.list` and related desktop entries. 17 | 18 | Gentoo Portage: 19 | 20 | - collected many utilities to facilitate day-to-day shell usage (notable: GNU Parallel, ImageMagick, Unison, renameutils, TaskWarrior) 21 | - servers/clients/tools related to network (MongoDB, ProFTPd, Nginx, PostgreSQL, Redit, ...) 22 | - programming related application collections including compilers (GHC, OCaml, SBCL, Guile, Node.js, GNU Smalltalk, Erlang, Vala, etc) 23 | and many development tools 24 | 25 | Zsh: 26 | 27 | - use fasd to navigate the filesystem hierarchy 28 | - numerous aliases 29 | - decent autocomplete settings 30 | 31 | Vim: 32 | 33 | - Haskell, Ruby, Node.js, Python, C++ and Web development settings 34 | - lots of key bindings 35 | - Many goodies including [Global](www.gnu.org/software/global), Ack, EasyMotion, CtrlP, Syntastic, UltiSnips, Tabular 36 | 37 | XMonad: 38 | 39 | - organize applications on topic basic 40 | - a great many bindings (perhaps over one hundred) for window arrangement, x11 utilities and so on 41 | - scratchpads for ghci, ocaml, coffee, erl (Erlang), node (Node.js), R, pry (Ruby), ipython, lua, gst (GNU Smalltalk), task (taskwarrior), alsa-mixer, etc 42 | - direction-based navigation via XMonad.Actions.Navigation2D 43 | - website launcher for wikipedia, google, duckduckgo, github, developer.mozilla.org, etc 44 | 45 | X resources: 46 | 47 | - XTerm 48 | - URxvt 49 | - XScreenSaver 50 | - ... 51 | 52 | Systemd services: 53 | 54 | - [kmscon](https://github.com/dvdhrm/kmscon) 55 | 56 | Others: 57 | 58 | - Mutt 59 | - GDB 60 | - Tmux 61 | - Mailcap 62 | - Pentadactyl (for Firefox) 63 | - Udev 64 | - Xorg 65 | - ... 66 | 67 | Have a look at my [Linux desktop config (in Chinese)](http://maskray.me/portfolio/linux-desktop) for my choice of desktop applications. 68 | 69 | ## Acknowledgements 70 | 71 | - [@pyx](https://github.com/pyx) (Philip Xu) 72 | My config absorbs quite a few ideas from his well-organized config. 73 | He is also my abecedarian leading me to discover the mysterious FOSS world. 74 | Thank you, Philip! 75 | - [@adam8157](https://github.com/adam8157) (Adam Lee) 76 | - [@roylez](https://github.com/roylez/dotfiles) (Roy Zuo) 77 | - [@laurentb](https://github.com/laurentb/public-dotfiles) (Laurent Bachelier) 78 | - [@terlar](https://github.com/terlar/dotfiles) (Terje Larsen) 79 | -------------------------------------------------------------------------------- /arch-packages.list: -------------------------------------------------------------------------------- 1 | # native 2 | acpi 3 | alsa-utils 4 | base 5 | base-devel 6 | bear 7 | bind 8 | blueman 9 | bluez 10 | bluez-utils 11 | ccache 12 | cgdb 13 | clash 14 | cmake 15 | dhcpcd 16 | dialog 17 | dosfstools 18 | emacs-nativecomp 19 | expect 20 | eza 21 | fakeroot 22 | fcitx5-configtool 23 | fcitx5-gtk 24 | fcitx5-qt 25 | fcitx5-rime 26 | firefox 27 | flatpak 28 | git 29 | git-lfs 30 | github-cli 31 | gnu-netcat 32 | grim 33 | gtk4 34 | htop 35 | imagemagick 36 | imv 37 | iwd 38 | lazygit 39 | linux 40 | linux-firmware 41 | lldb 42 | llvm 43 | make 44 | mako 45 | man-db 46 | mesa 47 | mesa-utils 48 | mimalloc 49 | msmtp 50 | msr-tools 51 | mtools 52 | mupdf-tools 53 | neomutt 54 | neovim 55 | ninja 56 | nodejs 57 | noto-fonts-emoji 58 | npm 59 | openssh 60 | otf-font-awesome 61 | p7zip 62 | pandoc-cli 63 | parted 64 | pass 65 | pavucontrol 66 | perf 67 | pipewire 68 | pipewire-alsa 69 | pipewire-pulse 70 | podman 71 | python-distutils-extra 72 | python-pip 73 | qt5-wayland 74 | reflector 75 | rime-double-pinyin 76 | rime-pinyin-zhwiki 77 | rizin 78 | rsync 79 | ruby 80 | sdcc 81 | slurp 82 | socat 83 | sshfs 84 | strace 85 | sudo 86 | system76-firmware 87 | tcl 88 | texlive-basic 89 | texlive-fontsextra 90 | texlive-latexextra 91 | texlive-meta 92 | tmux 93 | trayer 94 | unzip 95 | valgrind 96 | vim 97 | vulkan-intel 98 | waybar 99 | wget 100 | wine 101 | wireplumber 102 | wl-clipboard 103 | wlr-randr 104 | wmctrl 105 | wofi 106 | wpa_supplicant 107 | xf86-input-evdev 108 | xf86-input-synaptics 109 | xf86-video-vesa 110 | xfsprogs 111 | xmobar 112 | xmonad-contrib 113 | xorg-font-util 114 | xorg-fonts-misc 115 | xorg-fonts-type1 116 | xorg-server 117 | xorg-xbacklight 118 | xorg-xinit 119 | xorg-xinput 120 | xorg-xkill 121 | xorg-xset 122 | xsel 123 | xterm 124 | ydotool 125 | zathura-pdf-mupdf 126 | zellij 127 | zip 128 | zsh 129 | 130 | # foreign 131 | dropbox-cli 132 | fcitx5-input-support 133 | forkstat 134 | google-chrome 135 | light 136 | proot-bin 137 | rr 138 | system76-power 139 | xstow 140 | yay 141 | yay-debug 142 | -------------------------------------------------------------------------------- /deploy.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | set -e 3 | 4 | files=($(git ls-files | egrep -v 'backup|.ssh|proxy.pac.coffee|weechat')) 5 | target=~ 6 | LN_OPT=-sf 7 | [[ $(uname) =~ Linux && $(ln --version) =~ coreutils ]] && LN_OPT=-sfr 8 | 9 | declare -A dir 10 | dir[.vim]=1 11 | #dir[.emacs.d/private/+my]=1 12 | dir[.config/doom]=1 13 | 14 | info() { 15 | printf "\e[1;36m$*\e[m\n" 16 | } 17 | 18 | action() { 19 | printf "\e[1;32m$*\e[m\n" 20 | } 21 | 22 | warning() { 23 | printf "\e[1;33m$*\e[m\n" 24 | } 25 | 26 | link() { 27 | ln "$LN_OPT" "$PWD/$1" "$2" 28 | } 29 | 30 | do_ssh() { 31 | #cp -auT home/.ssh ~/.ssh 32 | if [[ -d ~/.ssh ]]; then 33 | chmod 700 ~/.ssh 34 | chmod 600 ~/.ssh/* 35 | fi 36 | } 37 | 38 | do_mkdir() { 39 | [[ -f ~/.history ]] && rm -i ~/.history 40 | mkdir -p ~/{.history,tmp} 41 | mkdir -p ~/.vimtmp/{backup,swap,undo} 42 | mkdir -p ~/Wallpapers ~/.local/opt 43 | } 44 | 45 | do_git() { 46 | git submodule update --init --recursive 47 | mkdir -p ~/.vim/bundle 48 | if [[ ! -d ~/.vim/bundle/vim-plug ]]; then 49 | git clone https://github.com/junegunn/vim-plug ~/.vim/bundle/vim-plug 50 | fi 51 | } 52 | 53 | do_mkdir 54 | do_ssh 55 | do_git 56 | 57 | for f in "${(@k)dir[@]}"; do 58 | g="$target/${f/home\//}" 59 | mkdir -p "${g%/*}" 60 | if ! [[ -L "$g" ]]; then 61 | if [[ -e "$g" ]]; then 62 | action "$g exists" 63 | continue 64 | fi 65 | link "home/$f" "$g" 66 | fi 67 | done 68 | 69 | for f in ${files[@]}; do 70 | if [[ "$f" =~ ^home/ ]]; then 71 | ff=${f/home\//} 72 | skip= 73 | while :; do 74 | [[ ${dir[$ff]+_} ]] && skip=1 75 | [[ $ff =~ / ]] || break 76 | ff=${ff%/*} 77 | done 78 | [[ -n $skip ]] && continue 79 | else 80 | continue 81 | fi 82 | 83 | info "Copying $f" 84 | g="$target/${f/home\//}" 85 | mkdir -p "${g%/*}" 86 | if ! [[ -L "$g" ]]; then 87 | if [[ -f "$g" || "$f" -ot "$g" ]]; then 88 | if diff -q "$f" "$g"; then 89 | action "identical $g" 90 | continue 91 | else 92 | diff -u "$g" "$f" | less -FMX 93 | while :; do 94 | warning "Overwrite $g ?\n(y)es (n)o (m) vim -d (q)uit [y/n/m/q]" 95 | read -rs 'option?Option: ' 96 | case $option in 97 | [ny]) 98 | break;; 99 | m) 100 | vim -d "$g" "$f";; 101 | q) 102 | exit;; 103 | *) 104 | continue;; 105 | esac 106 | done 107 | if [[ $option == n ]]; then 108 | action "skipping $g" 109 | continue 110 | fi 111 | fi 112 | fi 113 | link "$f" "$g" 114 | fi 115 | done 116 | -------------------------------------------------------------------------------- /etc/X11/xorg.conf.d/90-kbd.conf: -------------------------------------------------------------------------------- 1 | Section "InputClass" 2 | Identifier "keyboard defaults" 3 | MatchIsKeyboard "on" 4 | 5 | Option "XKbOptions" "ctrl:nocaps,keypad:pointerkeys" 6 | EndSection 7 | -------------------------------------------------------------------------------- /etc/X11/xorg.conf.d/90-mouse.conf: -------------------------------------------------------------------------------- 1 | Section "InputClass" 2 | Identifier "mouse defaults" 3 | MatchIsPointer "on" 4 | 5 | Option "AccelerationNumerator" "4" 6 | Option "AccelerationDenominator" "1" 7 | Option "AccelerationThreshold" "4" 8 | EndSection 9 | -------------------------------------------------------------------------------- /etc/X11/xorg.conf.d/99-synaptics-overrides.conf: -------------------------------------------------------------------------------- 1 | Section "InputClass" 2 | Identifier "touchpad overrides" 3 | Driver "libinput" 4 | MatchIsTouchpad "on" 5 | Option "Tapping" "on" 6 | Option "TappingButtonMap" "lrm" 7 | EndSection 8 | -------------------------------------------------------------------------------- /etc/binfmt.d/arm.conf: -------------------------------------------------------------------------------- 1 | :arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x00\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static: 2 | -------------------------------------------------------------------------------- /etc/binfmt.d/armeb.conf: -------------------------------------------------------------------------------- 1 | :armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb-static: 2 | -------------------------------------------------------------------------------- /etc/binfmt.d/mips.conf: -------------------------------------------------------------------------------- 1 | :mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips-static: 2 | -------------------------------------------------------------------------------- /etc/binfmt.d/mipsel.conf: -------------------------------------------------------------------------------- 1 | :mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel-static: 2 | -------------------------------------------------------------------------------- /etc/binfmt.d/ppc.conf: -------------------------------------------------------------------------------- 1 | :ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc-static: 2 | -------------------------------------------------------------------------------- /etc/binfmt.d/wine.conf: -------------------------------------------------------------------------------- 1 | # Start WINE on Windows executables 2 | :DOSWin:M::MZ::/usr/bin/wine: 3 | -------------------------------------------------------------------------------- /etc/dispatch-conf.conf: -------------------------------------------------------------------------------- 1 | # 2 | # dispatch-conf.conf 3 | # 4 | 5 | # Directory to archive replaced configs 6 | archive-dir=${EPREFIX}/etc/config-archive 7 | 8 | # Use rcs for storing files in the archive directory? 9 | # NOTE: You should install dev-vcs/rcs before enabling this option. 10 | # WARNING: When configured to use rcs, read and execute permissions of 11 | # archived files may be inherited from the first check in of a working 12 | # file, as documented in the ci(1) man page. This means that even if 13 | # the permissions of the working file have since changed, the older 14 | # permissions of the first check in may be inherited. As mentioned in 15 | # the ci(1) man page, users can control access to RCS files by setting 16 | # the permissions of the directory containing the files (see 17 | # archive-dir above). 18 | # (yes or no) 19 | use-rcs=no 20 | 21 | # Diff for display 22 | # %s old file 23 | # %s new file 24 | # If using colordiff instead of diff, the less -R option may be required 25 | # for correct display. 26 | diff="diff -Nu '%s' '%s'" 27 | 28 | # Set the pager for use with diff commands (this will 29 | # cause the PAGER environment variable to be ignored). 30 | # Setting pager="cat" will disable pager usage. 31 | pager="" 32 | 33 | # Default options used if less is the pager 34 | less-opts="--no-init --QUIT-AT-EOF" 35 | 36 | # Diff for interactive merges. 37 | # %s output file 38 | # %s old file 39 | # %s new file 40 | #merge="sdiff --suppress-common-lines --output='%s' '%s' '%s'" 41 | merge="vimdiff -c'saveas %s' -c next -c'setlocal noma readonly' -c prev %s %s" 42 | 43 | # Automerge files comprising only CVS interpolations (e.g. Header or Id) 44 | # (yes or no) 45 | replace-cvs=yes 46 | 47 | # Automerge files comprising only whitespace and/or comments 48 | # (yes or no) 49 | replace-wscomments=no 50 | 51 | # Automerge files that the user hasn't modified 52 | # (yes or no) 53 | replace-unmodified=no 54 | 55 | # Ignore a version that is identical to the previously merged version, 56 | # even though it is different from the current user modified version 57 | # Note that emerge already has a similar feature enabled by default, 58 | # which can be disabled by the emerge --noconfmem option. 59 | # (yes or no) 60 | ignore-previously-merged=no 61 | 62 | # Per-session log file of changes made to configuration files 63 | #log-file=/var/log/dispatch-conf.log 64 | 65 | # List of frozen files for which dispatch-conf will automatically zap updates 66 | #frozen-files="" 67 | -------------------------------------------------------------------------------- /etc/fuse.conf: -------------------------------------------------------------------------------- 1 | # Set the maximum number of FUSE mounts allowed to non-root users. 2 | # The default is 1000. 3 | # 4 | #mount_max = 1000 5 | 6 | # Allow non-root users to specify the 'allow_other' or 'allow_root' 7 | # mount options. 8 | # 9 | user_allow_other 10 | -------------------------------------------------------------------------------- /etc/netctl/hooks/network-online: -------------------------------------------------------------------------------- 1 | ExecUpPost="systemctl start network-online.target" 2 | ExecDownPre="systemctl stop network-online.target" 3 | -------------------------------------------------------------------------------- /etc/netctl/hooks/tinc: -------------------------------------------------------------------------------- 1 | ExecUpPost="(systemctl restart tinc@manifold; systemctl restart tinc@azure)||:" 2 | ExecDownPre="(systemctl stop tinc@manifold; systemctl stop tinc@azure)||:" 3 | -------------------------------------------------------------------------------- /etc/pacman.d/hooks/update-charmaps-UTF-8.hook: -------------------------------------------------------------------------------- 1 | [Trigger] 2 | Operation = Upgrade 3 | Type = File 4 | Target = usr/share/i18n/charmaps/UTF-8.gz 5 | 6 | [Action] 7 | When = PostTransaction 8 | Exec = /etc/pacman.d/hooks/update-charmaps-UTF-8.py 9 | -------------------------------------------------------------------------------- /etc/pacman.d/hooks/update-charmaps-UTF-8.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import gzip, re, subprocess 3 | 4 | def encode(x): 5 | return ''.format(x) 6 | 7 | width = {} 8 | mx = 0 9 | is_width = False 10 | 11 | # read original width information from charmaps/UTF-8 12 | with gzip.open('/usr/share/i18n/charmaps/UTF-8.gz') as f: 13 | lines = f.read().decode().splitlines() 14 | for line in lines: 15 | if line == 'WIDTH': 16 | is_width = True 17 | elif line == 'END WIDTH': 18 | is_width = False 19 | elif is_width: 20 | m = re.match(r'(?:\.\.\.)?\t(\d)$', line) 21 | if m: 22 | head = int(m.group(1), 16) 23 | last = int(m.group(2), 16) if m.group(2) else head 24 | mx = max(mx, last) 25 | for code in range(head, last+1): 26 | width[code] = m.group(3) 27 | 28 | # incomplete list of full-width characters 29 | for i, j in [(0x25a0, 0x27c0), # Geometric Shapes, Miscellaneous Symbols, Dingbats 30 | (0x2b00, 0x2bf0), # Miscellaneous Symbols and Arrows 31 | (0x1f300, 0x1f9c1)]: # Miscellaneous Symbols and Pictographs ... Supplemental Symbols and Pictographs 32 | for code in range(i, j): 33 | width[code] = 2 34 | 35 | # print new charmaps/UTF-8 36 | with gzip.open('/usr/share/i18n/charmaps/UTF-8.gz', 'wb') as f: 37 | for line in lines: 38 | if line == 'WIDTH': 39 | is_width = True 40 | f.write((line+'\n').encode()) 41 | i = 0 42 | while i <= mx: 43 | if i in width: 44 | j = i+1 45 | while j in width and width[i] == width[j]: 46 | j += 1 47 | if i == j-1: 48 | f.write('{}\t{}\n'.format(encode(i), width[i]).encode()) 49 | else: 50 | f.write('{}...{}\t{}\n'.format(encode(i), encode(j-1), width[i]).encode()) 51 | i = j 52 | else: 53 | i += 1 54 | elif line == 'END WIDTH': 55 | is_width = False 56 | f.write((line+'\n').encode()) 57 | elif not is_width: 58 | f.write((line+'\n').encode()) 59 | 60 | subprocess.run('localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8', shell=True) 61 | -------------------------------------------------------------------------------- /etc/portage/env/debug.conf: -------------------------------------------------------------------------------- 1 | CFLAGS="$CFLAGS -ggdb" 2 | CXXFLAGS="$CXXFLAGS -ggdb" 3 | FEATURES="$FEATURES installsources splitdebug" 4 | -------------------------------------------------------------------------------- /etc/portage/make.conf: -------------------------------------------------------------------------------- 1 | #CFLAGS="-Os -pipe -march=native -mfpmath=sse -msahf -fgcse-sm -fgcse-after-reload" 2 | CFLAGS="-Os -pipe -march=native" # -mfpmath=sse -msahf -fgcse-sm -fgcse-after-reload" 3 | CXXFLAGS="${CFLAGS}" 4 | MAKEOPTS="-j2" 5 | CHOST="x86_64-pc-linux-gnu" 6 | ACCEPT_KEYWORDS="~amd64" 7 | ACCEPT_LICENSE="*" 8 | LINGUAS="en" 9 | 10 | FEATURES="candy parallel-fetch userfetch preserve-libs" 11 | 12 | EMERGE_DEFAULT_OPTS="--oneshot --keep-going y --quiet-build y --with-bdep y --autounmask-write y" 13 | 14 | # app-portage/elogv 15 | PORTAGE_ELOG_SYSTEM="save" 16 | PORTAGE_ELOG_CLASSES="warn error info log qa" 17 | 18 | # sys-devel/prelink 19 | PRELINK_PATH_MASK="/opt" 20 | 21 | FETCHCOMMAND="/usr/bin/wget -t 3 -T 10 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\"" 22 | RESUMECOMMAND="/usr/bin/wget -c -t 2 -T 5 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\"" 23 | 24 | ALSA_CARDS="hda-intel" 25 | INPUT_DEVICES="evdev" 26 | 27 | # for ray-pc 28 | #VIDEO_CARDS="nvidia" 29 | # for ray-laptop 30 | VIDEO_CARDS="intel" 31 | INPUT_DEVICES="$INPUT_DEVICES synaptics" 32 | 33 | #SYNC="rsync://61.135.158.199/gentoo-portage" 34 | #SYNC="rsync://ftp3.tuna.tsinghua.edu.cn/gentoo-portage" 35 | #SYNC="rsync://mirrors.tuna.tsinghua.edu.cn/gentoo-portage" 36 | SYNC="rsync://mirror6.bjtu.edu.cn/gentoo-portage" 37 | #SYNC="rsync://166.111.8.205/gentoo-portage" 38 | #SYNC="rsync://mirrors.ustc.edu.cn/gentoo-portage" 39 | PORTAGE_BINHOST="rsync://pc/packages" 40 | #PORTAGE_BINHOST="ftp://pc/packages" 41 | #SYNC="rsync://ftp6.xdlinux.info/gentoo-portage" 42 | 43 | RUBY_TARGETS="ruby19" 44 | 45 | #USE_PYTHON="2.7 3.2" 46 | PYTHON_TARGETS="python2_7 python3_3" 47 | USE="c++0x X gtk gtk3 vim-syntax fontconfig smp ssse3 xft bash-completion \ 48 | zsh-completion hoogle hscolour inotify mmx sse sse2 \ 49 | systemd xinerama vaapi vim" 50 | 51 | # use for ray-pc 52 | #USE="$USE nvidia" 53 | 54 | PORTDIR_OVERLAY="/home/ray/portage /var/lib/g-ctan" 55 | source /var/lib/layman/make.conf 56 | #GENTOO_MIRRORS="$GENTOO_MIRRORS rsync://pc http://mirrors.tuna.tsinghua.edu.cn/gentoo/" 57 | #GENTOO_MIRRORS="$GENTOO_MIRRORS http://mirrors.tuna.tsinghua.edu.cn/gentoo" 58 | GENTOO_MIRRORS="http://mirrors.tuna.tsinghua.edu.cn/gentoo" 59 | #GENTOO_MIRRORS="ftp://pc" 60 | #GENTOO_MIRRORS="$GENTOO_MIRRORS ftp://mirrors.sohu.com/gentoo/ ftp://mirrors.stuhome.net/gentoo/" 61 | -------------------------------------------------------------------------------- /etc/portage/package.accept_keywords: -------------------------------------------------------------------------------- 1 | # for X.A.Navigation2D 2 | =x11-wm/xmonad-9999 ** 3 | =x11-wm/xmonad-contrib-9999 ** 4 | 5 | =app-text/llpp-9999 ** 6 | =app-text/mupdf-9999 ** 7 | =www-client/weboob-9999 ** 8 | =x11-misc/compton-9999 ** 9 | 10 | =app-i18n/librime-9999 ** 11 | =app-i18n/fcitx-9999 ** 12 | =app-i18n/fcitx-rime-9999 ** 13 | =app-i18n/rime-data-9999 ** 14 | 15 | =app-shells/zsh-completion-99999999 ** 16 | =app-emulation/qemu-1.7.0 ** 17 | =net-misc/socat-2.0.0_beta7 ** 18 | 19 | www-plugins/google-talkplugin ** 20 | net-im/openfetion ** 21 | -------------------------------------------------------------------------------- /etc/portage/package.mask/costly: -------------------------------------------------------------------------------- 1 | >app-emulation/wine-1.7.19-r1 2 | >dev-db/mongodb-2.4.9 3 | >dev-lang/mercury-13.05 4 | >dev-java/oracle-jdk-bin-1.7.0.51-r1 5 | >dev-lang/ghc-7.6.3-r1 6 | >media-gfx/blender-2.69 7 | >net-libs/webkit-gtk-2.2.6-r200 8 | >sys-devel/gcc-4.9.0 9 | >syxs-devel/llvm-3.4.1-r1 10 | >sys-libs/glibc-2.18-r1 11 | -------------------------------------------------------------------------------- /etc/portage/package.mask/temp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaskRay/Config/67d2cdf21c50798afa6da19b070ee18352ec56ac/etc/portage/package.mask/temp -------------------------------------------------------------------------------- /etc/portage/package.mask/unstable: -------------------------------------------------------------------------------- 1 | #*/*::gentoo-zh 2 | -------------------------------------------------------------------------------- /etc/portage/package.use/app: -------------------------------------------------------------------------------- 1 | # Application - Documentation and tools 2 | app-text/texlive cjk png extra graphics publishers xetex linguas_zh 3 | app-text/texlive-core cjk xetex 4 | app-text/zathura sqlite 5 | app-text/zathura-meta pdf postscript 6 | 7 | app-emulation/spice client 8 | 9 | # Application - Graphics 10 | media-gfx/imagemagick webp graphviz 11 | media-libs/freetype kpathsea infinality 12 | media-gfx/blender blender-game python_single_target_python3_3 13 | media-gfx/gimp webkit python curl 14 | media-sound/cmus cue wma ffmpeg -aac # aac plugin is broken 15 | 16 | # Application - GUI misc. 17 | app-misc/recoll inotify -fam tex 18 | media-gfx/graphviz gts # otherwise sfdp won't work 19 | net-misc/tigervnc gnutls 20 | app-emulation/qemu spice ssh static-user tci vde 21 | 22 | # Application - Instant messaging 23 | net-im/bitlbee twitter 24 | net-irc/weechat perl python ruby # plugins 25 | 26 | # Application - Mail 27 | mail-client/mutt gpg sidebar imap 28 | mail-mta/msmtp sasl gnutls 29 | 30 | # Application - Media 31 | >=media-libs/libsamplerate-0.1.8 sndfile # required by rosegarden 32 | media-libs/mesa gbm gles2 vdpau xorg 33 | media-sound/ncmpcpp curl outputs fftw taglib visualizer clock 34 | media-video/ffmpeg vdpau threads v4l v4l2 35 | media-video/mplayer ass vdpau v4l v4l2 mp3 alsa fbcon live theora vorbis x264 xvid directfb a52 aac real xvmc 36 | virtual/ffmpeg threads vdpau 37 | 38 | # Application - Misc. 39 | app-arch/p7zip rar 40 | app-arch/unzip natspec 41 | app-emulation/wine win32 win64 alsa dos 42 | dev-java/icedtea-bin nsplugin # Java plugin for Firefox 43 | dev-libs/nss utils 44 | x11-misc/xbindkeys guile # emacs-ish key sequence 45 | 46 | # X11, WM, DE 47 | x11-base/xorg-server xnest xvfb 48 | x11-terms/rxvt-unicode 256-color wcwidth fading-colors blink pixbuf -vanilla 49 | x11-libs/libdrm libkms 50 | x11-wm/enlightenment enlightenment_modules_shot 51 | #required by x11-wm/enlightenment-0.17.1[enlightenment_modules_shot], required by @app, required by @selected, required by @world (argument) 52 | >=dev-libs/ecore-1.7.5 curl 53 | x11-wm/xmonad icccm 54 | 55 | # required by app-emulation/qemu-user-1.4.0 56 | # required by qemu-user (argument) 57 | >=dev-libs/glib-2.36.4 static-libs 58 | # required by app-emulation/qemu-user-1.4.0 59 | # required by qemu-user (argument) 60 | >=sys-libs/zlib-1.2.8-r1 static-libs 61 | 62 | net-fs/samba addns ads winbind 63 | net-fs/cifs-utils ads upcall 64 | 65 | sys-apps/file python 66 | -------------------------------------------------------------------------------- /etc/portage/package.use/cross-arm-unknown-linux-gnueabi: -------------------------------------------------------------------------------- 1 | cross-arm-unknown-linux-gnueabi/gdb -selinux -multilib expat 2 | -------------------------------------------------------------------------------- /etc/portage/package.use/dev: -------------------------------------------------------------------------------- 1 | # Development - Programming languages and environments 2 | sys-devel/gcc fortran mudflap graphite 3 | dev-lang/erlang emacs hipe 4 | dev-lang/python sqlite 5 | dev-lang/swi-prolog gmp 6 | dev-scheme/racket backtrace future jit places plot threads 7 | sys-devel/llvm clang ocaml 8 | dev-lang/php cjk curl fpm truetype exif gd mysql mysqli postgres pdo sqlite 9 | app-admin/eselect-php fpm 10 | 11 | # Development - VCS 12 | dev-vcs/git curl subversion tk # git svn 13 | dev-vcs/subversion -dso perl # required by git[subversion] 14 | 15 | # Development - Libraries 16 | dev-python/PyQt4 webkit # perhaps for phantomjs's dependency 17 | media-libs/opencv ffmpeg 18 | x11-libs/cairo xcb opengl svg 19 | net-misc/curl ssl 20 | 21 | #required by sci-libs/scipy-0.12.0, required by sci-libs/scikits_learn-0.13.1, required by scikits_learn (argument) 22 | >=dev-python/numpy-1.7.1 lapack 23 | 24 | # databases 25 | 26 | # guile dependency 27 | dev-libs/boehm-gc threads 28 | 29 | # llpp dependency 30 | dev-ml/lablgl glut 31 | 32 | app-doc/doxygen latex dot 33 | sys-cluster/openmpi threads mpi-threads -fortran 34 | sci-electronics/gwave gnuplot 35 | 36 | # haskell 37 | dev-lang/ghc binary llvm 38 | app-emacs/ghc-mod emacs 39 | 40 | # Development - Python specific 41 | net-analyzer/scapy gnuplot graphviz imagemagick 42 | dev-lang/python tk 43 | dev-python/imaging tk 44 | dev-python/ipython matplotlib notebook 45 | sci-libs/scipy sparse 46 | 47 | # Development - Editors 48 | app-editors/emacs gzip-el 49 | app-editors/gvim cscope ruby python 50 | app-editors/vim cscope ruby python 51 | app-emacs/org-mode contrib 52 | 53 | # Development- Tools 54 | dev-util/valgrind mpi 55 | sci-mathematics/maxima latex ecl 56 | sci-mathematics/sage mpc 57 | sci-visualization/gnuplot wxwidgets 58 | sys-devel/gdb expat python # Python pretty printers, STL containers specifically 59 | 60 | #required by media-gfx/blender-2.64a 61 | dev-cpp/glog gflags 62 | 63 | # Services 64 | dev-db/mongodb v8 sharedclient 65 | www-servers/nginx nginx_modules_http_stub_status nginx_modules_http_fancyindex nginx_modules_http_headers_more nginx_modules_http_gzip_static 66 | 67 | -------------------------------------------------------------------------------- /etc/portage/package.use/doc: -------------------------------------------------------------------------------- 1 | media-gfx/gimp doc 2 | -------------------------------------------------------------------------------- /etc/portage/package.use/network: -------------------------------------------------------------------------------- 1 | # Network tools 2 | net-analyzer/nmap ncat ndiff nping 3 | net-analyzer/wireshark adns geoip -gtk2 -qt4 gtk3 4 | net-ftp/proftpd ssl openssl -acl # some issue related to acl support 5 | net-misc/openvpn iproute2 6 | net-wireless/wpa_supplicant qt4 # wpa_gui 7 | net-analyzer/tcpreplay pcapnav 8 | -------------------------------------------------------------------------------- /etc/portage/package.use/portage: -------------------------------------------------------------------------------- 1 | app-portage/layman git mercurial darcs 2 | app-portage/eix optimization tools 3 | -------------------------------------------------------------------------------- /etc/portage/package.use/system: -------------------------------------------------------------------------------- 1 | dev-libs/DirectFB fbcon 2 | dev-libs/lzo static-libs # sys-power/suspend 3 | sys-apps/grep pcre 4 | sys-fs/udev extras -acl gudev 5 | sys-libs/glibc systemtap debug 6 | sys-libs/zlib minizip # required by R, vlc, ... 7 | 8 | #required by media-video/cheese-3.6.2, required by cheese (argument) 9 | >=media-libs/gst-plugins-base-1.0.5-r2 theora 10 | # required by www-client/weboob-9999[X] 11 | # required by =weboob-9999 (argument) 12 | >=dev-python/PyQt4-4.10.2 phonon 13 | 14 | # required by sys-libs/tevent-0.9.19 15 | # required by tevent (argument) 16 | >=sys-libs/talloc-2.0.8-r1 python 17 | 18 | # required by net-fs/samba-4.1.0_rc2 19 | # required by @network 20 | # required by @selected 21 | # required by @world (argument) 22 | >=app-crypt/heimdal-1.5.3-r1 -ssl 23 | # required by net-wireless/aircrack-ng-1.2_beta1[airdrop-ng] 24 | # required by @network 25 | # required by @selected 26 | # required by @world (argument) 27 | =net-wireless/lorcon-0.0_p20130212 python 28 | # required by net-fs/samba-4.1.0_rc2[addns] 29 | # required by @network 30 | # required by @selected 31 | # required by @world (argument) 32 | >=net-dns/bind-tools-9.9.3_p2 gssapi 33 | # required by sys-libs/ldb-1.1.16 34 | # required by net-fs/samba-4.1.0_rc2 35 | # required by @network 36 | # required by @selected 37 | # required by @world (argument) 38 | >=sys-libs/tdb-1.2.12-r1 python 39 | 40 | #required by sys-devel/prelink-20130503, required by app-emulation/wine-1.7.0[prelink], required by @__auto_slot_operator_replace_installed__ (argument) 41 | >=dev-libs/elfutils-0.156 static-libs 42 | #required by app-emulation/libguestfs-1.22.6, required by @app, required by @selected, required by @world (argument) 43 | =app-emulation/qemu-1.6.0-r1 qemu_user_targets_x86_64 tci 44 | #required by app-text/texlive-core-2013-r1[xetex], required by dev-texlive/texlive-latex-2013, required by dev-texlive/texlive-latexrecommended-2013, required by virtual/latex-base-1.0, required by app-vim/vim-latex-1.8.23.20130116, required by @dev, required by @selected, required by @world (argument) 45 | =media-libs/harfbuzz-0.9.20 icu 46 | #required by media-libs/sk1libs-0.9.1-r3, required by media-gfx/uniconvertor-1.1.5-r1, required by media-gfx/inkscape-0.48.4-r1, required by @app, required by @selected, required by @world (argument) 47 | >=media-libs/lcms-1.19-r1:0 python 48 | 49 | net-analyzer/rrdtool perl 50 | 51 | # required by app-emulation/virt-manager-0.10.0-r1 52 | # required by virt-manager (argument) 53 | >=net-libs/gtk-vnc-0.5.3 python 54 | # required by app-emulation/virt-manager-0.10.0-r1 55 | # required by virt-manager (argument) 56 | >=app-emulation/libvirt-glib-0.1.7 python 57 | # required by app-emulation/virt-manager-0.10.0-r1 58 | # required by virt-manager (argument) 59 | >=net-misc/spice-gtk-0.21 python 60 | # required by app-emulation/virt-manager-0.10.0-r1 61 | # required by virt-manager (argument) 62 | =app-emulation/libvirt-1.1.3 python 63 | # required by dev-ruby/metasploit_data_models-0.17.0[ruby_targets_ruby19] 64 | # required by net-analyzer/metasploit-4.9.2-r2[-test,ruby_targets_ruby19] 65 | # required by @network 66 | # required by @selected 67 | # required by @world (argument) 68 | >=dev-ruby/activerecord-4.1.1 postgres 69 | -------------------------------------------------------------------------------- /etc/portage/profile/package.provided: -------------------------------------------------------------------------------- 1 | sys-kernel/git-sources-9999 2 | x11-misc/dzen-9999 3 | dev-lang/scala-2.10.0 4 | app-text/texlive-9999 5 | app-text/texlive-core-9999 6 | dev-texlive/texlive-basic-9999 7 | dev-texlive/texlive-latex-9999 8 | dev-texlive/texlive-langenglish-9999 9 | dev-texlive/texlive-fontutils-9999 10 | dev-texlive/texlive-fontsrecommended-9999 11 | dev-texlive/texlive-langcjk-9999 12 | dev-texlive/texlive-latexrecommended-9999 13 | app-misc/task-9999 14 | net-analyzer/bro-9999 15 | -------------------------------------------------------------------------------- /etc/portage/sets/font: -------------------------------------------------------------------------------- 1 | # Fonts 2 | media-fonts/corefonts 3 | media-fonts/dejavu 4 | media-fonts/ttf-bitstream-vera 5 | media-fonts/wqy-microhei 6 | media-fonts/wqy-zenhei 7 | -------------------------------------------------------------------------------- /etc/portage/sets/laptop: -------------------------------------------------------------------------------- 1 | app-emulation/qemu-kvm 2 | net-wireless/wpa_supplicant 3 | sys-power/acpi 4 | sys-power/cpufrequtils 5 | -------------------------------------------------------------------------------- /etc/portage/sets/network: -------------------------------------------------------------------------------- 1 | # Network tools 2 | dev-util/skipfish 3 | net-analyzer/dsniff 4 | net-analyzer/ettercap 5 | net-analyzer/hydra 6 | net-analyzer/metasploit 7 | net-analyzer/mtr 8 | net-analyzer/ncrack 9 | net-analyzer/netcat 10 | net-analyzer/nethogs 11 | net-analyzer/nikto 12 | net-analyzer/nmap 13 | net-analyzer/oinkmaster 14 | net-analyzer/suricata 15 | net-mail/offlineimap 16 | net-analyzer/tcpdump 17 | net-analyzer/tcpflow 18 | net-analyzer/tcpreplay 19 | net-analyzer/wireshark 20 | net-dialup/pptpclient 21 | net-firewall/conntrack-tools 22 | net-firewall/iptables 23 | net-fs/curlftpfs 24 | net-fs/samba 25 | net-ftp/lftp 26 | net-libs/libnetfilter_queue 27 | net-misc/aria2 28 | net-misc/bridge-utils 29 | net-misc/dhcpcd 30 | net-misc/openvpn 31 | net-misc/proxychains 32 | net-misc/socat 33 | net-misc/telnet-bsd 34 | net-misc/tigervnc 35 | net-misc/tinc 36 | net-misc/whois 37 | net-misc/zsync 38 | net-proxy/polipo 39 | net-wireless/aircrack-ng 40 | net-wireless/kismet 41 | net-wireless/hostapd 42 | net-wireless/wpa_supplicant 43 | sys-apps/ethtool 44 | net-dns/unbound 45 | net-analyzer/iptraf-ng 46 | net-fs/cifs-utils 47 | net-misc/ipcalc 48 | net-misc/ipv6calc 49 | net-misc/dropbox 50 | net-misc/rdesktop 51 | net-misc/iodine 52 | net-analyzer/p0f 53 | net-analyzer/net-snmp 54 | net-analyzer/argus 55 | net-analyzer/jnettop 56 | net-p2p/transmission 57 | net-misc/httpie 58 | net-misc/pssh 59 | net-misc/mosh 60 | net-misc/tor 61 | net-wireless/iw 62 | net-misc/vde 63 | net-misc/ntp 64 | net-misc/googlecl 65 | net-misc/dropbox-cli 66 | net-misc/httpie 67 | net-misc/teamviewer 68 | www-misc/urlwatch 69 | -------------------------------------------------------------------------------- /etc/portage/sets/pc: -------------------------------------------------------------------------------- 1 | x11-drivers/nvidia-drivers 2 | -------------------------------------------------------------------------------- /etc/portage/sets/portage: -------------------------------------------------------------------------------- 1 | # Gentoo/Portage specific 2 | app-portage/eix 3 | app-portage/elogv 4 | app-portage/euses 5 | app-portage/genlop 6 | app-portage/gentoolkit 7 | app-portage/gentoolkit-dev 8 | app-portage/layman 9 | app-portage/portage-utils 10 | -------------------------------------------------------------------------------- /etc/portage/sets/sys: -------------------------------------------------------------------------------- 1 | # System tools 2 | app-admin/augeas 3 | app-admin/clustershell 4 | app-admin/lnav 5 | app-admin/logrotate 6 | app-admin/sudo 7 | app-admin/supervisor 8 | app-admin/webalizer 9 | app-admin/xstow 10 | app-benchmarks/i7z 11 | app-laptop/laptop-mode-tools 12 | app-shells/pdsh 13 | app-shells/zsh 14 | dev-libs/libcgroup 15 | net-fs/nfs-utils 16 | sys-apps/dstat 17 | sys-apps/etckeeper 18 | sys-apps/hdparm 19 | sys-apps/lshw 20 | sys-apps/man-db 21 | sys-apps/openrc 22 | sys-apps/pciutils 23 | sys-apps/smartmontools 24 | sys-apps/systemd-units 25 | sys-apps/usbutils 26 | sys-fs/bindfs 27 | sys-fs/dosfstools 28 | sys-fs/ntfs3g 29 | sys-fs/reiserfsprogs 30 | sys-fs/simple-mtpfs 31 | sys-fs/squashfs-tools 32 | sys-fs/sysfsutils 33 | sys-kernel/module-rebuild 34 | sys-power/cpupower 35 | sys-power/acpi 36 | sys-power/acpid 37 | sys-process/at 38 | sys-process/fcron 39 | sys-process/htop 40 | sys-process/atop 41 | sys-process/iotop 42 | sys-process/lsof 43 | sys-apps/lm_sensors 44 | sys-process/nmon 45 | sys-apps/sdparm 46 | sys-apps/sg3_utils 47 | sys-boot/unetbootin 48 | sys-boot/grub:2 49 | sys-process/audit 50 | sys-power/acpi 51 | sys-power/acpid 52 | sys-power/powertop 53 | -------------------------------------------------------------------------------- /etc/sddm.conf.d/default.conf: -------------------------------------------------------------------------------- 1 | [User] 2 | RememberLastUser=true 3 | -------------------------------------------------------------------------------- /etc/sysctl.d/10-network.conf: -------------------------------------------------------------------------------- 1 | net.ipv4.ip_forward=1 2 | net.ipv6.conf.default.forwarding=1 3 | net.ipv6.conf.all.forwarding=1 4 | -------------------------------------------------------------------------------- /etc/sysctl.d/10-ptrace.conf: -------------------------------------------------------------------------------- 1 | kernel.yama.ptrace_scope=0 2 | -------------------------------------------------------------------------------- /etc/sysctl.d/90-general.conf: -------------------------------------------------------------------------------- 1 | kernel.perf_event_paranoid=-1 2 | kernel.sysrq=1 3 | vm.swappiness=20 4 | -------------------------------------------------------------------------------- /etc/sysctl.d/rr.conf: -------------------------------------------------------------------------------- 1 | # rr 2 | kernel.perf_event_paranoid = 1 3 | -------------------------------------------------------------------------------- /etc/systemd/system/create_ap.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Create AP Service 3 | After=network.target 4 | 5 | [Service] 6 | Type=simple 7 | ExecStart=/usr/bin/create_ap --no-virt wlp3s0 -g 10.0.0.1 enp4s0f2 raymeow meowmeow 8 | KillSignal=SIGINT 9 | Restart=on-failure 10 | RestartSec=5 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /etc/systemd/system/macspoof@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=MAC spoof %I 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=/bin/sh -c "/bin/ip link set dev %i address 00:`openssl rand -hex 5|sed 's=\(..\)=\1:=g;s:.$::'`" 7 | ExecStart=/bin/ip link set dev %i up 8 | 9 | [Install] 10 | WantedBy=network.target 11 | -------------------------------------------------------------------------------- /etc/systemd/system/readonly-root.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Make a readonly root with some writable exceptions 3 | 4 | [Service] 5 | Type=simple 6 | ExecStart=/usr/bin/sleep infinity 7 | 8 | PrivateTmp=false 9 | ReadOnlyPaths=/ 10 | ReadWritePaths=/tmp 11 | ReadWritePaths=/home/ray/.history 12 | ReadWritePaths=/home/ray/.local/share 13 | -------------------------------------------------------------------------------- /etc/systemd/system/socksfwd@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=tun -> socks5 3 | 4 | [Service] 5 | ExecStart=/home/ray/bin/socksfwd %I 6 | -------------------------------------------------------------------------------- /etc/telegramircd/config: -------------------------------------------------------------------------------- 1 | # See https://pypi.python.org/pypi/ConfigArgParse for syntax 2 | 3 | # HTTP/WebSocket related options 4 | # Use HTTPS to server links if at least one of http-cert or http-key is specified 5 | #http-cert: /etc/telegramircd/cert.pem 6 | #http-key: /etc/telegramircd/key.pem 7 | http-listen: [127.0.0.1, ::1] 8 | http-port: 9003 9 | # Display document links as http://127.1:9003/document/$id 10 | http-url: @@SECRET 11 | 12 | #ignore: [channel_name_regex0, channel_name_regex1] 13 | # uncomment the next line if you do not want to receive private messages with bots 14 | #ignore-bot 15 | #ignore-topic: [group_name_regex0] 16 | 17 | # IRC related options 18 | # Use IRC over TLS if at least one of irc-cert or irc-key is specified 19 | #irc-cert: /etc/telegramircd/irc-cert.pem 20 | #irc-key: /etc/telegramircd/irc-key.pem 21 | irc-listen: [127.0.0.1, ::1] 22 | # reserved nicks for clients 23 | #irc-nicks: [ray] 24 | # IRC connection password 25 | #irc-password: 26 | irc-port: 6669 27 | 28 | # join mode 29 | join: new 30 | 31 | # logger 32 | #logger-ignore: 33 | #logger-mask: /tmp/telegramircd/$channel/%Y-%m-%d.log 34 | #logger-time-format: %H:%M 35 | 36 | # when to mark_read private messages from users, choices: always, reply, never 37 | #mark-read: reply 38 | 39 | # SASL PLAIN password (as an alternative to --irc-password) 40 | #sasl-password: 41 | 42 | # telegram-cli 43 | #telegram-cli-command: telegram-cli 44 | #telegram-cli-port: 1235 45 | #telegram-cli-timeout: 10 46 | # telegram-cli cannot receive messages in some channels https://github.com/vysheng/tg/issues/1135 , specify their `peer_id` to poll messages with the `history` command 47 | telegram-cli-poll-channels: @@SECRET 48 | # history channel#{peer_id} {telegram_cli_poll_limit} 49 | #telegram-cli-poll-limit: 10 50 | # interval in seconds, default: 10 51 | #telegram-cli-poll-interval: 10 52 | -------------------------------------------------------------------------------- /etc/udev/rules.d/10-automount.rules: -------------------------------------------------------------------------------- 1 | # start at sdc to ignore the system hard drive 2 | KERNEL!="sd[c-z]*", GOTO="my_media_automount_end" 3 | ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end" 4 | 5 | # import some useful filesystem info as variables 6 | IMPORT{program}="/sbin/blkid -o udev -p %N" 7 | 8 | # get the label if present, otherwise assign one based on device/partition 9 | ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}" 10 | ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k" 11 | 12 | # create the dir in /media and symlink it to /mnt 13 | ACTION=="add", RUN+="/bin/mkdir -p '/media/%E{dir_name}'" 14 | 15 | # global mount options 16 | ACTION=="add", ENV{mount_options}="relatime" 17 | # filesystem-specific mount options (777/666 dir/file perms for ntfs/vfat) 18 | ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},uid=1000,gid=1000,dmask=000,fmask=111,iocharset=cp936,utf8" 19 | 20 | # automount ntfs filesystems using ntfs-3g driver 21 | ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/mount -t ntfs-3g -o %E{mount_options} /dev/%k '/media/%E{dir_name}'" 22 | # automount all other filesystems 23 | ACTION=="add", ENV{ID_FS_TYPE}!="ntfs", RUN+="/bin/mount -t auto -o %E{mount_options} /dev/%k '/media/%E{dir_name}'" 24 | 25 | # clean up after device removal 26 | ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l '/media/%E{dir_name}'", RUN+="/bin/rmdir '/media/%E{dir_name}'" 27 | 28 | # exit 29 | LABEL="my_media_automount_end" 30 | -------------------------------------------------------------------------------- /etc/unbound/unbound.conf: -------------------------------------------------------------------------------- 1 | server: 2 | use-syslog: yes 3 | tcp-upstream: yes 4 | 5 | # no response for Emacs tramp 6 | local-zone: "host.does.not.exist." refuse 7 | 8 | remote-control: 9 | control-enable: yes 10 | control-key-file: "unbound_control.key" 11 | control-cert-file: "unbound_control.pem" 12 | server-key-file: "unbound_server.key" 13 | server-cert-file: "unbound_server.pem" 14 | 15 | # stable forword-zone 16 | 17 | forward-zone: 18 | name: "." 19 | forward-addr: 208.67.222.222@5353 20 | -------------------------------------------------------------------------------- /etc/wechatircd/config: -------------------------------------------------------------------------------- 1 | # See https://pypi.python.org/pypi/ConfigArgParse for syntax 2 | 3 | # HTTP/WebSocket related options 4 | # Use HTTPS to server injector.js and injector.user.js if at least one of http-cert or http-key is specified 5 | http-cert: /etc/wechatircd/cert.pem 6 | http-key: /etc/wechatircd/key.pem 7 | http-listen: [127.0.0.1, ::1] 8 | http-port: 9000 9 | # Specify http-root if injector.js is located elsewhere 10 | http-root: /usr/share/wechatircd 11 | # Display media links as https://127.0.0.1:9000/media/$id 12 | #http-url: @@SECRET 13 | 14 | ignore: @@SECRET 15 | ignore-topic: @@SECRET 16 | # uncomment the next line if you do not want to receive messages from Subscription Accounts(BrandServ user) 17 | #ignore-brand 18 | 19 | # IRC related options 20 | # Use IRC over TLS if at least one of irc-cert or irc-key is specified 21 | #irc-cert: /etc/wechatircd/irc-cert.pem 22 | #irc-key: /etc/wechatircd/irc-key.pem 23 | irc-listen: [127.0.0.1, ::1] 24 | # reserved nicks for clients 25 | irc-nicks: [ray] 26 | # IRC connection password 27 | #irc-password: 28 | irc-port: 6667 29 | 30 | # join mode 31 | join: new 32 | 33 | # logger 34 | #logger-ignore: 35 | logger-mask: /home/ray/irclogs/wechatircd/$channel/%Y-%m-%d.log 36 | #logger-time-format: %H:%M 37 | 38 | # SASL PLAIN password (as an alternative to --irc-password) 39 | #sasl-password: 40 | -------------------------------------------------------------------------------- /etc/xdg/pacaur/config: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # /etc/xdg/pacaur/config 5 | # 6 | 7 | # The following options are commented out with their default values listed. 8 | # If you wish to use different values, uncomment and update the values. 9 | # The Color and VerbosePkgLists options can be enabled in /etc/pacman.conf. 10 | # The clone directory can be changed through the $AURDEST environment variable. 11 | # The makepkg environment variables are also fully honored. 12 | #editor="${VISUAL:-${EDITOR:-vi}}" # build files editor 13 | #displaybuildfiles=diff # display build files (none|diff|full) 14 | #fallback=true # pacman fallback to the AUR 15 | #silent=false # silence output 16 | #sortby=popularity # sort method (name|votes|popularity) 17 | #sortorder=descending # sort order (ascending|descending) 18 | #sudoloop=true # prevent sudo timeout 19 | clonedir=/tmp/pacaur 20 | usercachedir=$clonedir 21 | -------------------------------------------------------------------------------- /etc/yaourtrc: -------------------------------------------------------------------------------- 1 | # yaourtrc - Configuration for yaourt 2 | # 3 | # See yaourtrc(5) for more information 4 | # 5 | # 6 | 7 | # General 8 | #AUTOSAVEBACKUPFILE=0 9 | DEVELSRCDIR="/var/abs/local/yaourtbuild" 10 | #DEVEL=0 11 | #VISUAL="$VISUAL" 12 | #EDITOR="$EDITOR" 13 | #FORCEENGLISH=0 14 | #FORCE=0 15 | #TMPDIR="/tmp" 16 | #NO_TESTDB=0 17 | 18 | # SUDO 19 | #SUDONOVERIF=0 # Avoid multiple sudo checks when timestamp_timeout=0 20 | #SUDOREDIRECT=1 # Define to 0 in case you use a fingerprint device 21 | 22 | # ABS 23 | #USE_GIT=0 24 | # If the package "abs" is installed, those var are parsed from abs.conf 25 | #REPOS=() # REPOS available at $SYNCSERVER 26 | #SYNCSERVER="" 27 | 28 | # AUR 29 | #AURURL="https://aur.archlinux.org" 30 | #AURCOMMENT=5 31 | #AURDEVELONLY=0 32 | #AURSEARCH=1 33 | #AURUPGRADE=0 34 | #AURVOTE=1 35 | #AURUSEGIT=0 36 | 37 | # Build 38 | #EXPORT=0 # Export to 1: EXPORTDIR or PKGDEST 39 | # 2: pacman cache (as root) 40 | #EXPORTSRC=0 # Need EXPORT>0 to be used 41 | #EXPORTDIR="" # If empty, use makepkg's connfiguration (see makepkg.conf) 42 | 43 | # Prompt 44 | #NOCONFIRM=0 45 | #UP_NOCONFIRM=0 # No prompt while build upgrades (including -Sbu) 46 | #BUILD_NOCONFIRM=0 # Only prompt for editing files 47 | #PU_NOCONFIRM=0 # Add --noconfirm to $PACMAN -U 48 | #EDITFILES=1 49 | #NOENTER=1 50 | 51 | # Output 52 | #USECOLOR=1 53 | #USEPAGER=0 54 | #DETAILUPGRADE=1 55 | #SHOWORPHANS=1 56 | #TERMINALTITLE=1 57 | 58 | # Command 59 | #PACMAN="pacman" 60 | #MAKEPKG="makepkg" 61 | #DIFFEDITCMD="vimdiff" 62 | 63 | # pacdiffviewer 64 | #P_LOCATE=0 # Use locate instead of find 65 | #P_SEARCHDIR=(/etc/ /boot/) 66 | #P_SAVEDIR='/var/lib/yaourt/backupfiles' 67 | -------------------------------------------------------------------------------- /freebsd-packages.list: -------------------------------------------------------------------------------- 1 | sysutils/autojump 2 | shells/bash 3 | devel/cgdb 4 | devel/cmake 5 | sysutils/fd 6 | devel/gdb 7 | devel/git 8 | devel/gmake 9 | devel/llvm60 10 | editors/neovim 11 | devel/ninja 12 | ports-mgmt/pkg 13 | lang/python 14 | lang/python2 15 | lang/python3 16 | textproc/ripgrep 17 | net/rsync 18 | lang/rust 19 | security/sudo 20 | sysutils/tmux 21 | shells/zsh 22 | -------------------------------------------------------------------------------- /gentoo-packages.list: -------------------------------------------------------------------------------- 1 | app-admin/clustershell 2 | app-admin/lnav 3 | app-admin/xstow 4 | app-misc/jq 5 | app-misc/ranger 6 | app-misc/rlwrap 7 | app-portage/eix 8 | app-portage/genlop 9 | app-portage/gentoolkit 10 | app-portage/gentoolkit-dev 11 | app-portage/layman 12 | app-portage/portage-utils 13 | app-shells/zsh 14 | app-text/tree 15 | dev-util/cgdb 16 | dev-util/cloc 17 | dev-util/cscope 18 | dev-util/global 19 | dev-util/ltrace 20 | dev-util/perf 21 | dev-util/strace 22 | dev-util/systemtap 23 | dev-util/valgrind 24 | dev-vcs/git 25 | dev-vcs/mercurial 26 | net-analyzer/mtr 27 | net-analyzer/nethogs 28 | net-misc/pssh 29 | sys-apps/lm_sensors 30 | sys-apps/moreutils 31 | sys-apps/renameutils 32 | sys-devel/gdb 33 | sys-fs/sshfs-fuse 34 | sys-power/cpupower 35 | sys-process/atop 36 | sys-process/htop 37 | sys-process/iotop 38 | sys-process/lsof 39 | sys-process/nmon 40 | sys-process/parallel 41 | -------------------------------------------------------------------------------- /home/.aprc: -------------------------------------------------------------------------------- 1 | AwesomePrint.defaults = { 2 | :indent => -2, 3 | :index => false, 4 | :sort_keys => true, 5 | :color => { 6 | :args => :greenish, 7 | :array => :pale, 8 | :bigdecimal => :blue, 9 | :class => :yellow, 10 | :date => :greenish, 11 | :falseclass => :red, 12 | :fixnum => :blue, 13 | :float => :blue, 14 | :hash => :pale, 15 | :keyword => :cyan, 16 | :method => :purpleish, 17 | :nilclass => :red, 18 | :string => :yellowish, 19 | :struct => :pale, 20 | :symbol => :cyanish, 21 | :time => :greenish, 22 | :trueclass => :green, 23 | :variable => :cyanish 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /home/.bashrc: -------------------------------------------------------------------------------- 1 | shopt -s checkwinsize cmdhist extglob globstar histappend 2 | 3 | PS1='\e[1;36m\u \e[m@ \e[1;36mhacking \e[m>>= \e[1;32m\w\n\[\e[1;31m\]\$ \[\e[m\]' 4 | PS4='(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]} - [${SHLVL},${BASH_SUBSHELL}, $?]' 5 | 6 | prepend_path() { 7 | [[ ":$PATH:" != *"$1"* ]] && PATH="$1:$PATH" 8 | } 9 | 10 | HISTCONTROL=ignoreboth 11 | HISTSIZE=10000 12 | HISTTIMEFORMAT='%F %T ' 13 | 14 | alias rm='rm -i' 15 | alias mv='mv -i' 16 | alias ll='ls -l' 17 | 18 | #bind '\C-w:unix-filename-rubout' 19 | #bind '\C-t:unix-word-rubout' 20 | 21 | [[ -f /etc/profile.d/bash-completion.sh ]] && source /etc/profile.d/bash-completion.sh 22 | 23 | . ~/.alias 24 | 25 | prepend_path $HOME/.local/bin 26 | prepend_path $HOME/.rvm/bin 27 | prepend_path $HOME/.cargo/bin 28 | #export PATH="$HOME/.local/bin:$HOME/.rvm/bin:$PATH" # Add RVM to PATH for scripting 29 | 30 | export NVM_DIR="$HOME/.nvm" 31 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm 32 | [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion 33 | -------------------------------------------------------------------------------- /home/.cgdb/cgdbrc: -------------------------------------------------------------------------------- 1 | set arrowstyle = highlight 2 | set hlsearch 3 | set ignorecase 4 | #set showdebugcommands 5 | set tabstop=8 6 | set winsplit=src_big 7 | imap ; 8 | map i 9 | #set cgdbmodekey=; 10 | 11 | # SPC : toggle breakpoint 12 | # a : list args 13 | map a iinfoargs 14 | # bt : backtrace 15 | # map bt ibt 16 | map b ib 17 | map c :continue 18 | map d :down 19 | map e :setdis 20 | map E :setnodis 21 | # f : finish 22 | map f :finish 23 | # n : next 24 | map n :next 25 | map N ireverse-next 26 | # o : open file dialog 27 | # r : run 28 | map r :run 29 | map s :step 30 | map S ireverse-step 31 | # t : temp Breakpoint 32 | map t it 33 | map u :up 34 | map U :until 35 | map v iinfolocals 36 | -------------------------------------------------------------------------------- /home/.config/compton.conf: -------------------------------------------------------------------------------- 1 | # Shadow 2 | shadow = true; # Enabled client-side shadows on windows. 3 | no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows. 4 | no-dnd-shadow = true; # Don't draw shadows on DND windows. 5 | clear-shadow = true; # Zero the part of the shadow's mask behind the window (experimental). 6 | shadow-radius = 7; # The blur radius for shadows. (default 12) 7 | shadow-offset-x = -7; # The left offset for shadows. (default -15) 8 | shadow-offset-y = -7; # The top offset for shadows. (default -15) 9 | # shadow-opacity = 0.7; # The translucency for shadows. (default .75) 10 | # shadow-red = 0.0; # Red color value of shadow. (0.0 - 1.0, defaults to 0) 11 | # shadow-green = 0.0; # Green color value of shadow. (0.0 - 1.0, defaults to 0) 12 | # shadow-blue = 0.0; # Blue color value of shadow. (0.0 - 1.0, defaults to 0) 13 | shadow-exclude = [ "n:e:Notification", "n:s:dzen" ]; # Exclude conditions for shadows. 14 | shadow-ignore-shaped = true; 15 | 16 | # Opacity 17 | menu-opacity = 0.9; # The opacity for menus. (default 1.0) 18 | inactive-opacity = 0.95; # Opacity of inactive windows. (0.1 - 1.0) 19 | #frame-opacity = 0.8; # Opacity of window titlebars and borders. (0.1 - 1.0) 20 | #inactive-opacity-override = true; # Inactive opacity set by 'inactive-opacity' overrides value of _NET_WM_OPACITY. 21 | 22 | # Fading 23 | fading = false; # Fade windows during opacity changes. 24 | fade-delta = 5; # The time between steps in a fade in milliseconds. (default 10). 25 | fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028). 26 | fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03). 27 | # no-fading-openclose = true; # Fade windows in/out when opening/closing. 28 | 29 | # Other 30 | backend = "glx" 31 | #inactive-dim = 0.5; # Dim inactive windows. (0.0 - 1.0, defaults to 0). 32 | mark-wmwin-focused = true; # Try to detect WM windows and mark them as active. 33 | mark-ovredir-focused = false; 34 | detect-rounded-corners = true; 35 | refresh-rate = 0; 36 | vsync = "opengl"; 37 | dbe = false; 38 | sw-opti = false; 39 | unredir-if-possible = false; 40 | focus-exclude = [ ]; 41 | detect-transient = true; 42 | detect-client-leader = true; 43 | invert-color-include = [ ]; 44 | 45 | # Window type settings 46 | wintypes: 47 | { 48 | tooltip = { fade = true; shadow = false; opacity = 0.75; }; 49 | }; 50 | -------------------------------------------------------------------------------- /home/.config/doom/+org.el: -------------------------------------------------------------------------------- 1 | ;;; -*- lexical-binding: t; -*- 2 | 3 | (after! org 4 | (setq org-capture-templates 5 | '( 6 | ("d" "Diary" entry 7 | (file+datetree "diary.org") 8 | "* %?" :kill-buffer t) 9 | ("n" "Notes" entry 10 | (file+headline +org-default-notes-file "Inbox") 11 | "* %u %?\n%i" :prepend t :kill-buffer t) 12 | ("t" "Todo" entry 13 | (file+headline +org-default-todo-file "Inbox") 14 | "* [ ] %?\n%i" :prepend t :kill-buffer t) 15 | 16 | ))) 17 | -------------------------------------------------------------------------------- /home/.config/doom/+ui.el: -------------------------------------------------------------------------------- 1 | ;;; private/my/+ui.el -*- lexical-binding: t; -*- 2 | 3 | (setq 4 | doom-font (font-spec :family "Monospace" :size 25) 5 | doom-variable-pitch-font (font-spec :family "Monospace") 6 | doom-unicode-font (font-spec :family "Monospace") 7 | ) 8 | (setq doom-big-font (font-spec :family "Monospace" :size 27)) 9 | (remove-hook 'doom-init-ui-hook #'blink-cursor-mode) 10 | 11 | ;; (setq doom-theme 'doom-nord) 12 | -------------------------------------------------------------------------------- /home/.config/doom/custom.el: -------------------------------------------------------------------------------- 1 | (put 'customize-face 'disabled nil) 2 | (custom-set-variables 3 | ;; custom-set-variables was added by Custom. 4 | ;; If you edit it by hand, you could mess it up, so be careful. 5 | ;; Your init file should contain only one such instance. 6 | ;; If there is more than one, they won't work right. 7 | '(safe-local-variable-values 8 | '((eval c-set-offset 'innamespace 0) 9 | (whitespace-line-column . 80)))) 10 | (custom-set-faces 11 | ;; custom-set-faces was added by Custom. 12 | ;; If you edit it by hand, you could mess it up, so be careful. 13 | ;; Your init file should contain only one such instance. 14 | ;; If there is more than one, they won't work right. 15 | '(avy-lead-face ((t (:background "wheat" :foreground "#000000" :weight bold)))) 16 | '(ccls-sem-global-variable-face ((t (:underline t :weight extra-bold)))) 17 | '(lsp-face-highlight-read ((t (:background "sea green")))) 18 | '(lsp-face-highlight-write ((t (:background "brown4")))) 19 | '(lsp-ui-sideline-current-symbol ((t (:foreground "grey38" :box nil)))) 20 | '(lsp-ui-sideline-symbol ((t (:foreground "grey30" :box nil))))) 21 | -------------------------------------------------------------------------------- /home/.config/doom/modules/private/my-cc/packages.el: -------------------------------------------------------------------------------- 1 | ;; -*- no-byte-compile: t; -*- 2 | ;;; private/my-cc/packages.el 3 | 4 | (package! clang-format) 5 | (package! cmake-mode :recipe (:host github :repo "emacsmirror/cmake-mode" :files (:defaults "*"))) 6 | (package! llvm-mode :ignore t) 7 | (package! modern-cpp-font-lock) 8 | (package! tablegen-mode :ignore t) 9 | -------------------------------------------------------------------------------- /home/.config/doom/modules/private/my-julia/config.el: -------------------------------------------------------------------------------- 1 | ;;; private/my-julia/config.el -*- lexical-binding: t; -*- 2 | 3 | (after! julia 4 | (add-hook! julia-mode #'lsp) 5 | ) 6 | 7 | (use-package! lsp-julia 8 | :load-path "~/Dev/Emacs/lsp-julia" 9 | :hook ((julia-mode) . lsp) 10 | :init 11 | (setq lsp-julia-default-environment "~/.julia/environments/v1.3") 12 | ;; Use global projects. 13 | (setq lsp-julia-package-dir nil) 14 | ) 15 | -------------------------------------------------------------------------------- /home/.config/doom/modules/private/my-julia/packages.el: -------------------------------------------------------------------------------- 1 | ;; -*- no-byte-compile: t; -*- 2 | ;;; private/my-julia/packages.el 3 | 4 | (package! lsp-julia :ignore t) 5 | 6 | (def-package! lsp-julia 7 | :load-path "~/Dev/Emacs/lsp-julia" 8 | ) 9 | -------------------------------------------------------------------------------- /home/.config/doom/modules/private/my-org/config.el: -------------------------------------------------------------------------------- 1 | ;;; private/my-org/config.el -*- lexical-binding: t; -*- 2 | 3 | (setq org-capture-templates 4 | '(("t" "Tasks" entry (file "refile.org") 5 | "* TODO %?\n SCHEDULED: %^t") 6 | ("d" "Diary" entry (file+datetree "diary.org") 7 | "* %?") 8 | ("n" "Notes" entry (file "notes.org") 9 | "* %? :NOTE:") 10 | 11 | ;; Will use {project-root}/{todo,notes,changelog}.org, unless a 12 | ;; {todo,notes,changelog}.org file is found in a parent directory. 13 | ;; Uses the basename from `+org-capture-todo-file', 14 | ;; `+org-capture-changelog-file' and `+org-capture-notes-file'. 15 | ("p" "Project notes" entry ; {project-root}/notes.org 16 | (file+headline +org-capture-project-notes-file "Inbox") 17 | "* TODO %?\n%i\n%a" :prepend t :kill-buffer t))) 18 | -------------------------------------------------------------------------------- /home/.config/doom/modules/private/my-python/config.el: -------------------------------------------------------------------------------- 1 | ;;; private/my-python/config.el -*- lexical-binding: t; -*- 2 | 3 | (after! python 4 | (add-hook! python-mode #'lsp) 5 | ) 6 | -------------------------------------------------------------------------------- /home/.config/doom/modules/private/my-python/packages.el: -------------------------------------------------------------------------------- 1 | ;; -*- no-byte-compile: t; -*- 2 | ;;; private/my-python/packages.el 3 | 4 | (package! lsp-python :ignore t) 5 | -------------------------------------------------------------------------------- /home/.config/doom/packages.el: -------------------------------------------------------------------------------- 1 | ;; -*- no-byte-compile: t; -*- 2 | ;;; private/my/packages.el 3 | (disable-packages! cmake-mode company-irony company-irony-c-headers flycheck-irony irony irony-eldoc ivy-rtags rtags) 4 | 5 | (package! avy) 6 | (package! atomic-chrome) 7 | (package! ccls) 8 | (package! eglot) 9 | (package! lispyville) 10 | ;; (package! lsp-mode :ignore t) 11 | ;; (package! lsp-treemacs :ignore t) 12 | ;; (package! lsp-ui :ignore t) 13 | (package! spinner) ; required by lsp-mode 14 | 15 | (package! annotate) 16 | (package! eshell-autojump) 17 | (package! evil-collection) 18 | (package! evil-nerd-commenter) 19 | (package! frog-jump-buffer) 20 | (package! git-link) 21 | (package! link-hint) 22 | (package! htmlize) 23 | (package! rg) 24 | (package! smart-forward) 25 | (package! symbol-overlay) 26 | (package! tldr) 27 | (package! try) 28 | 29 | (package! d-mode) 30 | (package! julia-repl) 31 | 32 | (package! racer :disable t) 33 | 34 | (package! function-args) 35 | ;; (package! lpy :recipe (:fetcher github :repo "abo-abo/lpy" :files ("*"))) 36 | 37 | (package! selectrum) 38 | 39 | (disable-packages! company-prescient) 40 | -------------------------------------------------------------------------------- /home/.config/environment.d/envvars.conf: -------------------------------------------------------------------------------- 1 | GTK_IM_MODULE=fcitx 2 | QT_IM_MODULE=fcitx 3 | XMODIFIERS=@im=fcitx 4 | -------------------------------------------------------------------------------- /home/.config/feh/keys: -------------------------------------------------------------------------------- 1 | jump_back H Prior 2 | jump_fwd L Next 3 | menu_up Up 4 | next_img l Right space 5 | prev_img h Left BackSpace 6 | remove d Delete 7 | scroll_down C-j C-Down 8 | scroll_left C-h C-Left 9 | scroll_right C-l C-Right 10 | scroll_up C-k C-Up 11 | toggle_actions I 12 | toggle_filenames i 13 | zoom_default 0 14 | zoom_fit S-0 15 | zoom_in r 16 | zoom_out t 17 | -------------------------------------------------------------------------------- /home/.config/feh/themes: -------------------------------------------------------------------------------- 1 | # feh configuration file 2 | # Parts of it are based on the default one 3 | # 4 | # I don't need to know the theme names, they're hidden behind shell aliases ;) 5 | 6 | imgidx --index --output-only .fehindex.jpg --limit-width 1024 \ 7 | --thumb-width 128 --thumb-height 128 \ 8 | --fontpath /usr/share/fonts/truetype/ttf-dejavu/ --font DejaVuSans/8 . 9 | 10 | rfs --full-screen --hide-pointer --randomize 11 | fs --full-screen --hide-pointer --sort filename 12 | 13 | exif --full-screen --hide-pointer --fontpath /usr/share/fonts/truetype/ttf-dejavu/ \ 14 | --font DejaVuSansMono/8 --info "exiv2 '%f'" 15 | 16 | thumb_s --thumbnails --cache-thumbnails --thumb-width 128 --thumb-height 128 \ 17 | --limit-width 1024 --sort filename \ 18 | --fontpath /usr/share/fonts/truetype/ttf-dejavu/ --font DejaVuSans/8 19 | 20 | thumb_b --thumbnails --cache-thumbnails --thumb-width 256 --thumb-height 256 \ 21 | --limit-width 1024 --sort filename \ 22 | --fontpath /usr/share/fonts/truetype/ttf-dejavu/ --font DejaVuSans/8 23 | 24 | thumb_s_nt --thumbnails --cache-thumbnails --thumb-width 128 --thumb-height 128 \ 25 | --limit-width 1024 --sort filename --index-name 0 26 | 27 | thumb_b_nt --thumbnails --cache-thumbnails --thumb-width 256 --thumb-height 256 \ 28 | --limit-width 1024 --sort filename --index-name 0 29 | -------------------------------------------------------------------------------- /home/.config/fish/fish_plugins: -------------------------------------------------------------------------------- 1 | jorgebucaran/fisher 2 | PatrickF1/fzf.fish 3 | -------------------------------------------------------------------------------- /home/.config/fish/functions/tmpdir.fish: -------------------------------------------------------------------------------- 1 | # https://github.com/ansemjo/dotfiles/blob/main/fish/functions/tmpdir.fish 2 | function tmpdir --description "Create and switch into an emphemeral directory" 3 | # create a tmpdir and cd into it 4 | set -l tmp (mktemp --tmpdir -d tmpdir-XXXXXX) 5 | cd $tmp; and echo >&2 \ 6 | (set_color yellow)"tmpdir:" $tmp "will be removed on exit" \ 7 | (set_color normal) 8 | 9 | # spawn a new shell, store the exit status and return to previous dir 10 | fish $argv 11 | set -l ret $status 12 | cd $dirprev[-1] 13 | 14 | # after exit, check if there are mounts inside tmpdir 15 | if awk '{ print $2 }' /etc/mtab | grep $tmp 16 | echo >&2 \ 17 | (set_color red)"refusing to purge $tmp due to mounts!" \ 18 | (set_color normal) 19 | else 20 | # if clear, purge directory 21 | echo >&2 \ 22 | (set_color red)"purge $tmp ..." \ 23 | (set_color normal) 24 | rm -rf $tmp 25 | end 26 | 27 | # return subshell exit status 28 | return $ret 29 | end 30 | -------------------------------------------------------------------------------- /home/.config/fontconfig/fonts.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | sans 9 | 10 | Source Han Sans 11 | DejaVu Sans 12 | ZhunYuan 13 | 微軟正黑體 14 | WenQuanYi Micro Hei Mono 15 | 16 | 17 | 18 | serif 19 | 20 | DejaVu Serif 21 | ZhunYuan 22 | 微軟正黑體 23 | WenQuanYi Micro Hei Mono 24 | 25 | 26 | 27 | sans-serif 28 | 29 | Source Han Sans 30 | DejaVu Sans 31 | ZhunYuan 32 | 微軟正黑體 33 | WenQuanYi Micro Hei Mono 34 | 35 | 36 | 37 | monospace 38 | 39 | FantasqueSansM Nerd Font 40 | Source Code Pro 41 | DejaVu Sans Mono 42 | 思源黑体 43 | ZhunYuan 44 | 微軟正黑體 45 | WenQuanYi Micro Hei Mono 46 | 47 | 48 | 49 | cursive 50 | 51 | Allegro 52 | 53 | 54 | 55 | fantasy 56 | 57 | BoomerangItalic 58 | Heiti TC 59 | 60 | 61 | 62 | 63 | Segoe UI Emoji 64 | Noto Color Emoji 65 | 66 | 67 | 68 | 69 | liga off 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /home/.config/git/ignore: -------------------------------------------------------------------------------- 1 | .ccls-cache 2 | .ccls-root 3 | -------------------------------------------------------------------------------- /home/.config/gtk-3.0/settings.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | # Cursor Themes 3 | # Gtounation: http://gnome-look.org/content/show.php?content=14484 4 | gtk-cursor-theme-name = Grounation 5 | 6 | # Icon Themes 7 | # Buuf: http://gnome-look.org/content/show.php?content=81153 8 | # Azenis Icons: http://gnome-look.org/content/show.php?content=107544 9 | # Faenza: http://gnome-look.org/content/show.php?content=128143 10 | # Faience Dark: http://gnome-look.org/content/show.php?content=147321 11 | # LaGaDesk-BlackWhite-III: http://gnome-look.org/content/show.php?content=124185 12 | # Nitrux: http://gnome-look.org/content/show.php?content=154496 13 | # nouveGnome: http://gnome-look.org/content/show.php?content=125474 14 | # nouveGnomeGray: http://gnome-look.org/content/show.php?content=125474 15 | # Ubo Icons: http://gnome-look.org/content/show.php?content=122078 16 | # Ultimate Gnome: http://gnome-look.org/content/show.php?content=75000 17 | # Vamox: http://gnome-look.org/content/show.php?content=95244 18 | gtk-icon-theme-name = Faenza 19 | gtk-fallback-icon-theme = gnome 20 | 21 | # Gtk Themes 22 | # Boje: http://gnome-look.org/content/show.php?content=155857 23 | # Gnome Cupertino: http://gnome-look.org/content/show.php/Gnome+Cupertino?content=147061 24 | # nimbus: http://gnome-look.org/content/show.php/nimbus+gtk3+version?content=164641 25 | # Precise Light: http://gnome-look.org/content/show.php/Precise+Light-themes+GTK+3.12?content=165401 26 | # Zukimac: http://gnome-look.org/content/show.php/Zukimac?content=165450 27 | # Zukitwo: http://gnome-look.org/content/show.php/Zukitwo?content=140562 28 | # Zukiwi: http://gnome-look.org/content/show.php/Zukiwi?content=152192 29 | # gtk-theme-name = Gnome-Cupertino 30 | # gtk-theme-name = nimbus 31 | # gtk-theme-name = PreciseRadiance 32 | # gtk-theme-name = Zukitwo 33 | 34 | gtk-font-name = Sans 18 35 | gtk-can-change-accels = 1 36 | 37 | 38 | # gtk-toolbar-style = GTK_TOOLBAR_BOTH_HORIZ 39 | 40 | # gtk-enable-animations = 0 41 | # gtk-menu-popup-delay = 30 42 | # gtk-enable-event-sounds = 0 43 | # gtk-enable-input-feedback-sounds = 0 44 | # gtk-tooltip-browse-timeout = 30 45 | # gtk-tooltip-browse-mode-timeout = 1000 46 | # gtk-tooltip-timeout = 100 47 | # 48 | # gtk-application-prefer-dark-theme = true 49 | -------------------------------------------------------------------------------- /home/.config/kanata/config.kbd: -------------------------------------------------------------------------------- 1 | (defcfg 2 | concurrent-tap-hold yes 3 | log-layer-changes no 4 | process-unmapped-keys yes 5 | ) 6 | (defvar 7 | tt 200 ;; tap-time 8 | ht 160 ;; hold-time 9 | ) 10 | 11 | (defalias 12 | tab (tap-hold $tt $ht tab (layer-while-held extend)) 13 | cap (tap-hold $tt $ht esc lctl) 14 | ;; cap (tap-hold $tt $hold-time esc (layer-while-held vim-nav)) 15 | a (switch ((key-timing 1 less-than $tt)) _ break () (tap-hold $tt $ht _ lmet) break) 16 | s (switch ((key-timing 1 less-than $tt)) _ break () (tap-hold $tt $ht _ lalt) break) 17 | d (switch ((key-timing 1 less-than $tt)) _ break () (tap-hold $tt $ht _ lctl) break) 18 | f (switch ((key-timing 1 less-than $tt)) _ break () (tap-hold $tt $ht _ lsft) break) 19 | j (switch ((key-timing 1 less-than $tt)) _ break () (tap-hold-release-timeout 0 250 _ rsft _) break) 20 | k (switch ((key-timing 1 less-than $tt)) _ break () (tap-hold-release-timeout 0 250 _ rctl _) break) 21 | l (switch ((key-timing 1 less-than $tt)) _ break () (tap-hold $tt $ht _ ralt) break) 22 | ; (switch ((key-timing 1 less-than $tt)) _ break () (tap-hold $tt $ht _ rmet) break) 23 | ) 24 | 25 | (defsrc 26 | tab q w e r t y u i o p [ 27 | caps a s d f g h j k l ; ' 28 | lsft z x c v b n m , . / rsft 29 | ) 30 | (deflayer default 31 | @tab _ _ _ _ _ _ _ _ _ _ _ 32 | @cap @a @s @d @f _ _ @j @k @l @; _ 33 | _ _ _ _ _ _ _ _ _ _ _ _ 34 | ) 35 | (deflayer extend 36 | _ _ _ _ lrld _ _ C-S-tab C-tab _ _ _ 37 | _ _ _ _ _ _ left down up rght _ _ 38 | _ _ _ _ _ _ home pgdn pgup end _ _ 39 | ) 40 | 41 | (defchordsv2 42 | (j k ) esc 100 all-released () 43 | ( k l ) = 100 all-released () 44 | (j l ) S-= 100 all-released () 45 | ( l ;) - 100 all-released () 46 | ) 47 | 48 | (defalias 49 | pc (macro [ c) 50 | nc (macro ] c) 51 | pr (macro [ [) 52 | nr (macro ] ]) 53 | ph (macro [ h) 54 | nh (macro ] h) 55 | pd (macro [ d) 56 | nd (macro ] d) 57 | pq (macro [ q) 58 | nq (macro ] q) 59 | ) 60 | (deflayer vim-nav 61 | _ _ _ @pc @nc _ _ @nh @ph _ _ _ 62 | _ _ _ @pr @nr _ _ @nd @pd _ _ _ 63 | _ _ _ _ _ _ _ @nq @pq _ _ _ 64 | ) 65 | -------------------------------------------------------------------------------- /home/.config/khal/khal.conf: -------------------------------------------------------------------------------- 1 | [calendars] 2 | [[home]] 3 | path = /home/ray/Calendar/emacsray@gmail.com/ 4 | type = calendar 5 | 6 | [locale] 7 | timeformat = %H:%M 8 | dateformat = %Y-%m-%d 9 | longdateformat = %Y-%m-%d 10 | datetimeformat = %Y-%m-%d %H:%M 11 | longdatetimeformat = %Y-%m-%d %H:%M 12 | 13 | -------------------------------------------------------------------------------- /home/.config/mimeapps.list: -------------------------------------------------------------------------------- 1 | [Default Applications] 2 | ; text/html=firefox-bin.desktop 3 | ; application/xhtml+xml=firefox-bin.desktop 4 | ; x-scheme-handler/http=firefox-bin.desktop 5 | ; x-scheme-handler/https=firefox-bin.desktop 6 | 7 | ; image 8 | image/jpeg=geeqie.desktop 9 | image/gif=geeqie.desktop 10 | image/png=geeqie.desktop 11 | 12 | ; text 13 | ; inode/x-empty=gvim.desktop 14 | ; text/c=nvr.desktop 15 | ; text/plain=nvr.desktop 16 | 17 | ; html 18 | text/html=chromium.desktop 19 | application/xhtml+xml=chromium.desktop 20 | x-scheme-handler/http=chromium.desktop 21 | x-scheme-handler/https=chromium.desktop 22 | application/x-asp=chromium.desktop 23 | ; text/html=firefox.desktop 24 | ; application/xhtml+xml=firefox.desktop 25 | ; x-scheme-handler/http=firefox.desktop 26 | ; x-scheme-handler/https=firefox.desktop 27 | ; application/x-asp=firefox.desktop 28 | 29 | ; .pdf .ps 30 | application/pdf=zathura.desktop 31 | application/postscript=zathura.desktop 32 | 33 | ; .doc .docx 34 | application/msword=wps-office-wps.desktop 35 | application/vnd.openxmlformats-officedocument.wordprocessingml.document=wps-office-wps.desktop 36 | 37 | ; .ppt .pptx 38 | application/vnd.ms-powerpoint=wps-office-wpp.desktop 39 | application/vnd.openxmlformats-officedocument.presentationml.presentation=wps-office-wpp.desktop 40 | 41 | ; .epub 42 | application/epub+zip=ebook-viewer.desktop 43 | -------------------------------------------------------------------------------- /home/.config/newsbeuter/config: -------------------------------------------------------------------------------- 1 | # Settings {{{1 2 | download-retries 5 3 | download-timeout 90 4 | auto-reload yes 5 | reload-time 90 6 | reload-threads 5 7 | always-display-description true 8 | browser "detach xdg-open %u" 9 | external-url-viewer "urlview" 10 | goto-first-unread yes 11 | # html-renderer "w3m -dump -T text/html" 12 | ignore-mode "display" 13 | keep-articles-days 90 14 | #notify-program "notify-send" 15 | notify-beep yes 16 | refresh-on-startup yes 17 | confirm-exit yes 18 | prepopulate-query-feeds yes 19 | openbrowser-and-mark-jumps-to-next-unread yes 20 | toggleitemread-jumps-to-next-unread yes 21 | markfeedread-jumps-to-next-unread yes 22 | 23 | # Sources {{{1 24 | urls-source "local" 25 | reload-threads 20 26 | 27 | # Theme {{{1 28 | color listnormal color244 default 29 | color listnormal_unread color248 default 30 | color listfocus white color235 31 | color listfocus_unread white color235 32 | color article color248 default 33 | color info green default 34 | 35 | highlight article "^Feed: .*$" color3 default 36 | highlight article "^Title: .*$" color13 default bold 37 | highlight article "^Author: .*$" color5 default 38 | highlight article "^Link: .*$" color6 default 39 | highlight article "^Date: .*$" color4 default 40 | 41 | # Podbeuter {{{1 42 | player "mplayer" 43 | download-path "~/Podcasts" 44 | max-downloads 3 45 | 46 | # Bindings {{{1 47 | bind-key k prev-unread 48 | bind-key j next-unread 49 | bind-key k prev-feed 50 | bind-key j next-feed 51 | bind-key J next 52 | bind-key K prev 53 | bind-key h pageup 54 | bind-key l pagedown 55 | bind-key p pb-play podbeuter 56 | bind-key o open-in-browser-and-mark-read 57 | bind-key O open 58 | bind-key SPACE toggle-article-read 59 | 60 | # Includes {{{1 61 | include "~/.config/newsbeuter/profile" 62 | 63 | # vim: fdm=marker: 64 | -------------------------------------------------------------------------------- /home/.config/nim/nim.cfg: -------------------------------------------------------------------------------- 1 | --experimental:strictEffects 2 | --experimental:unicodeOperators 3 | --experimental:overloadableEnums 4 | --define:nimPreviewFloatRoundtrip 5 | --define:nimStrictDelete 6 | --define:nimUseLinenoise 7 | --styleCheck:usages 8 | --styleCheck:hint 9 | -------------------------------------------------------------------------------- /home/.config/nvim/coc-settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "diagnostic.errorSign": "✘", 3 | "diagnostic.infoSign": "ℹ", 4 | "diagnostic.hintSign": "➤", 5 | "highlight.colors.enable": true, 6 | "hover.target": "float", 7 | "languageserver": { 8 | // "ccls": { 9 | // "command": "ccls", 10 | // "filetypes": ["c", "cpp", "cuda", "objc", "objcpp"], 11 | // "rootPatterns": [".ccls-root"], 12 | // "initializationOptions": { 13 | // "capabilities": { 14 | // "foldingRangeProvider": false, 15 | // "workspace": { 16 | // "workspaceFolders": { 17 | // "supported": false 18 | // } 19 | // } 20 | // }, 21 | // "clang":{"extraArgs": ["--gcc-toolchain=/usr"]}, 22 | // "completion": { 23 | // "detailedLabel": true, 24 | // "placeholder": true 25 | // }, 26 | // "client": { 27 | // "snippetSupport": true 28 | // }, 29 | // "index": { 30 | // "onChange": false, 31 | // "initialNoLinkage": true, 32 | // "threads": 2, 33 | // "initialBlacklist": ["/(test|unittests)/"] 34 | // } 35 | // } 36 | // }, 37 | 38 | "gopls": { 39 | "command": "gopls", 40 | "rootPatterns": ["go.mod"], 41 | "filetypes": ["go"] 42 | }, 43 | 44 | "lua-language-server": { 45 | "command": "lua-language-server", 46 | "filetypes": ["lua"] 47 | }, 48 | 49 | "nimlsp": { 50 | "command": "nimlsp", 51 | "filetypes": ["nim"] 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /home/.config/nvim/lua/fn.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.toggle_qf = function() 4 | for _, win in pairs(vim.fn.getwininfo()) do 5 | if win['quickfix'] == 1 then 6 | vim.cmd 'cclose' 7 | return 8 | end 9 | end 10 | if not vim.tbl_isempty(vim.fn.getqflist()) then 11 | vim.cmd 'copen' 12 | end 13 | end 14 | 15 | M.toggle_loclist = function() 16 | for _, win in pairs(vim.fn.getwininfo()) do 17 | if win['loclist'] == 1 then 18 | vim.cmd 'lclose' 19 | return 20 | end 21 | end 22 | if not vim.tbl_isempty(vim.fn.getloclist()) then 23 | vim.cmd 'lopen' 24 | end 25 | end 26 | 27 | return M 28 | -------------------------------------------------------------------------------- /home/.config/nvim/lua/lsp.lua: -------------------------------------------------------------------------------- 1 | ---Adapted from LazyVim util/lsp.lua 2 | local M = {} 3 | 4 | M.words = {} 5 | M.words.enabled = false 6 | M.words.ns = vim.api.nvim_create_namespace("vim_lsp_references") 7 | 8 | ---@param opts? {enabled?: boolean} 9 | function M.words.setup(opts) 10 | opts = opts or {} 11 | if not opts.enabled then 12 | return 13 | end 14 | M.words.enabled = true 15 | local handler = vim.lsp.handlers["textDocument/documentHighlight"] 16 | vim.lsp.handlers["textDocument/documentHighlight"] = function(err, result, ctx, config) 17 | if not vim.api.nvim_buf_is_loaded(ctx.bufnr) then 18 | return 19 | end 20 | vim.lsp.buf.clear_references() 21 | return handler(err, result, ctx, config) 22 | end 23 | 24 | M.on_supports_method("textDocument/documentHighlight", function(_, buf) 25 | vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI", "CursorMoved", "CursorMovedI" }, { 26 | group = vim.api.nvim_create_augroup("lsp_word_" .. buf, { clear = true }), 27 | buffer = buf, 28 | callback = function(ev) 29 | if not require("lazyvim.plugins.lsp.keymaps").has(buf, "documentHighlight") then 30 | return false 31 | end 32 | 33 | if not ({ M.words.get() })[2] then 34 | if ev.event:find("CursorMoved") then 35 | vim.lsp.buf.clear_references() 36 | else 37 | vim.lsp.buf.document_highlight() 38 | end 39 | end 40 | end, 41 | }) 42 | end) 43 | end 44 | 45 | ---@return LspWord[] words, number? current 46 | function M.words.get() 47 | local cursor = vim.api.nvim_win_get_cursor(0) 48 | local current, ret = nil, {} ---@type number?, LspWord[] 49 | for _, extmark in ipairs(vim.api.nvim_buf_get_extmarks(0, M.words.ns, 0, -1, { details = true })) do 50 | local w = { 51 | from = { extmark[2] + 1, extmark[3] }, 52 | to = { extmark[4].end_row + 1, extmark[4].end_col }, 53 | } 54 | ret[#ret + 1] = w 55 | if cursor[1] >= w.from[1] and cursor[1] <= w.to[1] and cursor[2] >= w.from[2] and cursor[2] <= w.to[2] then 56 | current = #ret 57 | end 58 | end 59 | return ret, current 60 | end 61 | 62 | ---@param count number 63 | ---@param cycle? boolean 64 | function M.words.jump(count, cycle) 65 | local words, idx = M.words.get() 66 | if not idx then 67 | return 68 | end 69 | idx = idx + count 70 | if cycle then 71 | idx = (idx - 1) % #words + 1 72 | end 73 | local target = words[idx] 74 | if target then 75 | vim.api.nvim_win_set_cursor(0, target.from) 76 | end 77 | end 78 | 79 | return M 80 | -------------------------------------------------------------------------------- /home/.config/proxy.pac.coffee: -------------------------------------------------------------------------------- 1 | # template 2 | 3 | CHINA = ... 4 | SCHOOL = ... 5 | DEFAULT = ... 6 | 7 | FactorOracle = (s) -> 8 | @oracle = new Array(s.length+1) 9 | pi = new Array(s.length+1) 10 | @oracle[0] = {} 11 | pi[0] = -1 12 | for c, i in s 13 | @oracle[i][c] = i+1 14 | k = pi[i] 15 | while k >= 0 and c not of @oracle[k] 16 | @oracle[k][c] = i+1 17 | k = pi[k] 18 | pi[i+1] = (if k == -1 then 0 else @oracle[k][c]) 19 | @oracle[i+1] = {} 20 | @ 21 | 22 | FactorOracle::find = (s) -> 23 | k = 0 24 | for c in s 25 | k = @oracle[k][c] 26 | unless k? 27 | return false 28 | true 29 | 30 | hosts_local = [ 31 | '' 32 | 'localhost' 33 | '127.0.0.1' 34 | '127.1' 35 | '' 36 | ] 37 | 38 | hosts_school = [ 39 | '' 40 | 'example.com' 41 | '' 42 | ] 43 | 44 | hosts_china = [ 45 | '' 46 | 'example.com' 47 | '' 48 | ] 49 | 50 | oracle_local = new FactorOracle(hosts_local.join(',')) 51 | oracle_school = new FactorOracle(hosts_school.join(',')) 52 | oracle_china = new FactorOracle(hosts_china.join(',')) 53 | 54 | FindProxyForURL = (url, host) -> 55 | parts = host.replace(/:.*/,'').split '.' 56 | if parts.length > 2 57 | host = "#{parts[parts.length-2]}.#{parts[parts.length-1]}" 58 | key = ",#{host}," 59 | if oracle_local.find key 60 | 'DIRECT' 61 | else if oracle_school.find key 62 | SCHOOL 63 | else if oracle_china.find key 64 | CHINA 65 | else 66 | DEFAULT 67 | -------------------------------------------------------------------------------- /home/.config/radare2/radare2rc: -------------------------------------------------------------------------------- 1 | # requires radare2-extras/keystone 2 | e asm.assembler = x86.ks 3 | e cfg.newtab = true 4 | e scr.prompt.sect = true 5 | e scr.color = 3 6 | e scr.utf8 = true 7 | eco onedark 8 | -------------------------------------------------------------------------------- /home/.config/redshift.conf: -------------------------------------------------------------------------------- 1 | ; Global settings for redshift 2 | [redshift] 3 | ; Set the day and night screen temperatures 4 | temp-day=5700 5 | temp-night=4800 6 | 7 | ; Enable/Disable a smooth transition between day and night 8 | ; 0 will cause a direct change from day to night screen temperature. 9 | ; 1 will gradually increase or decrease the screen temperature. 10 | transition=1 11 | 12 | ; Set the screen brightness. Default is 1.0. 13 | ;brightness=0.9 14 | ; It is also possible to use different settings for day and night 15 | ; since version 1.8. 16 | ;brightness-day=0.7 17 | ;brightness-night=0.4 18 | ; Set the screen gamma (for all colors, or each color channel 19 | ; individually) 20 | gamma=0.8 21 | ;gamma=0.8:0.7:0.8 22 | ; This can also be set individually for day and night since 23 | ; version 1.10. 24 | ;gamma-day=0.8:0.7:0.8 25 | ;gamma-night=0.6 26 | 27 | ; Set the location-provider: 'geoclue', 'geoclue2', 'manual' 28 | ; type 'redshift -l list' to see possible values. 29 | ; The location provider settings are in a different section. 30 | location-provider=manual 31 | 32 | ; Set the adjustment-method: 'randr', 'vidmode' 33 | ; type 'redshift -m list' to see all possible values. 34 | ; 'randr' is the preferred method, 'vidmode' is an older API. 35 | ; but works in some cases when 'randr' does not. 36 | ; The adjustment method settings are in a different section. 37 | adjustment-method=randr 38 | 39 | ; Configuration of the location-provider: 40 | ; type 'redshift -l PROVIDER:help' to see the settings. 41 | ; ex: 'redshift -l manual:help' 42 | ; Keep in mind that longitudes west of Greenwich (e.g. the Americas) 43 | ; are negative numbers. 44 | [manual] 45 | lat=37.4 46 | lon=-122.1 47 | 48 | ; Configuration of the adjustment-method 49 | ; type 'redshift -m METHOD:help' to see the settings. 50 | ; ex: 'redshift -m randr:help' 51 | ; In this example, randr is configured to adjust screen 1. 52 | ; Note that the numbering starts from 0, so this is actually the 53 | ; second screen. If this option is not specified, Redshift will try 54 | ; to adjust _all_ screens. 55 | [randr] 56 | screen=0 57 | -------------------------------------------------------------------------------- /home/.config/rofi/config: -------------------------------------------------------------------------------- 1 | include "/usr/share/rofi/themes/glue_pro_blue.rasi" 2 | -------------------------------------------------------------------------------- /home/.config/skhd/skhdrc: -------------------------------------------------------------------------------- 1 | cmd - 1 : open -a "Google Chrome" 2 | cmd - 2 : open -a Wezterm 3 | cmd - 3 : open -a "Microsoft Teams" 4 | cmd - 4 : open -a "Microsoft Outlook" 5 | -------------------------------------------------------------------------------- /home/.config/systemd/user/break.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Break Service 3 | 4 | [Service] 5 | Type=simple 6 | ExecStart=/usr/bin/notify-send 'Time for a Break' 'Take a walk, get some hot bevarage, you know what to do...' 7 | 8 | [Install] 9 | WantedBy=graphical.target 10 | -------------------------------------------------------------------------------- /home/.config/systemd/user/break.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Break Encouragement 3 | 4 | [Timer] 5 | OnBootSec=60min 6 | OnUnitActiveSec=60min 7 | 8 | [Install] 9 | WantedBy=timers.target 10 | -------------------------------------------------------------------------------- /home/.config/systemd/user/default.target.wants/offlineimap@Ray.service: -------------------------------------------------------------------------------- 1 | ../offlineimap@.service -------------------------------------------------------------------------------- /home/.config/systemd/user/default.target.wants/rdm.service: -------------------------------------------------------------------------------- 1 | /usr/lib/systemd/user/rdm.service -------------------------------------------------------------------------------- /home/.config/systemd/user/default.target.wants/ssh-agent.service: -------------------------------------------------------------------------------- 1 | ../ssh-agent.service -------------------------------------------------------------------------------- /home/.config/systemd/user/default.target.wants/udiskie.service: -------------------------------------------------------------------------------- 1 | ../udiskie.service -------------------------------------------------------------------------------- /home/.config/systemd/user/fcitx.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Flexible Input Method Framwork 3 | Documentation=man:fcitx(1) 4 | 5 | [Service] 6 | Environment=XMODIFIERS=@im=fcitx GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx 7 | ExecStart=/usr/bin/fcitx5 -D 8 | 9 | [Install] 10 | WantedBy=graphical.target 11 | -------------------------------------------------------------------------------- /home/.config/systemd/user/graphical.target: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Graphical Interface 3 | AllowIsolate=yes 4 | -------------------------------------------------------------------------------- /home/.config/systemd/user/graphical.target.wants/fcitx.service: -------------------------------------------------------------------------------- 1 | ../fcitx.service -------------------------------------------------------------------------------- /home/.config/systemd/user/graphical.target.wants/keynav.service: -------------------------------------------------------------------------------- 1 | ../keynav.service -------------------------------------------------------------------------------- /home/.config/systemd/user/graphical.target.wants/notify-server.service: -------------------------------------------------------------------------------- 1 | ../notify-server.service -------------------------------------------------------------------------------- /home/.config/systemd/user/graphical.target.wants/redshift-gtk.service: -------------------------------------------------------------------------------- 1 | ../redshift-gtk.service -------------------------------------------------------------------------------- /home/.config/systemd/user/graphical.target.wants/taskbar.service: -------------------------------------------------------------------------------- 1 | ../taskbar.service -------------------------------------------------------------------------------- /home/.config/systemd/user/graphical.target.wants/xscreensaver.service: -------------------------------------------------------------------------------- 1 | ../xscreensaver.service -------------------------------------------------------------------------------- /home/.config/systemd/user/inotify-tmp-screen.path: -------------------------------------------------------------------------------- 1 | [Path] 2 | PathModified=/tmp/screen.jpg 3 | 4 | [Install] 5 | WantedBy=graphical.target 6 | -------------------------------------------------------------------------------- /home/.config/systemd/user/inotify-tmp-screen.service: -------------------------------------------------------------------------------- 1 | [Service] 2 | Type=oneshot 3 | ExecStart=/usr/bin/rsync -a /tmp/screen.jpg linode-ca:/tmp/ 4 | -------------------------------------------------------------------------------- /home/.config/systemd/user/inotify-tmp-wallpaper.path: -------------------------------------------------------------------------------- 1 | [Path] 2 | PathModified=/tmp/wallpaper.jpg 3 | 4 | [Install] 5 | WantedBy=graphical.target 6 | -------------------------------------------------------------------------------- /home/.config/systemd/user/inotify-tmp-wallpaper.service: -------------------------------------------------------------------------------- 1 | [Service] 2 | Description=Set /tmp/wallpaper.jpg as wallpaper 3 | Type=oneshot 4 | ExecStart=/usr/bin/feh --bg-scale /tmp/wallpaper.jpg 5 | -------------------------------------------------------------------------------- /home/.config/systemd/user/kanata.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Kanata keyboard remapper 3 | Documentation=https://github.com/jtroo/kanata 4 | 5 | [Service] 6 | Environment=DISPLAY=:0 7 | Type=simple 8 | ExecStart=/usr/bin/sh -c 'exec $${HOME}/.cargo/bin/kanata --cfg $${HOME}/.config/kanata/config.kbd' 9 | Restart=no 10 | 11 | [Install] 12 | WantedBy=default.target 13 | -------------------------------------------------------------------------------- /home/.config/systemd/user/keynav.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=keynav 3 | Documentation=man:keynav(1) 4 | 5 | [Service] 6 | ExecStart=/home/ray/.local/bin/keynav 7 | 8 | [Install] 9 | WantedBy=graphical.target 10 | -------------------------------------------------------------------------------- /home/.config/systemd/user/notify-server.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=notify-client -> notify-server -> notify-send 3 | 4 | [Service] 5 | ExecStart=/home/ray/bin/notify-server 6 | 7 | [Install] 8 | WantedBy=graphical.target 9 | -------------------------------------------------------------------------------- /home/.config/systemd/user/offlineimap@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=OfflineIMAP IMAP/Maildir Synchronization 3 | Documentation=man:offlineimap 4 | 5 | [Service] 6 | ExecStart=/usr/bin/offlineimap -u quiet -a %i 7 | Restart=always 8 | RestartSec=600 9 | TimeoutStopSec=10 10 | 11 | [Install] 12 | WantedBy=default.target 13 | -------------------------------------------------------------------------------- /home/.config/systemd/user/redshift-gtk.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Redshift display colour temperature adjustment (GUI) 3 | Documentation=http://jonls.dk/redshift/ 4 | After=display-manager.service 5 | 6 | [Service] 7 | ExecStart=/usr/bin/redshift-gtk -l 31.217:121.467 8 | 9 | [Install] 10 | WantedBy=graphical.target 11 | -------------------------------------------------------------------------------- /home/.config/systemd/user/socks5@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Create socks5 proxy 3 | After=network.target 4 | 5 | [Service] 6 | ExecStart=/usr/bin/autossh -N -M 0 -D 1088 -o ControlMaster=no -i /home/ray/.ssh/id_ed25519 %I 7 | Restart=always 8 | RestartSec=600 9 | 10 | [Install] 11 | WantedBy=default.target 12 | -------------------------------------------------------------------------------- /home/.config/systemd/user/ssh-agent.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=SSH key agent 3 | 4 | [Service] 5 | Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket 6 | ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK 7 | 8 | [Install] 9 | WantedBy=default.target 10 | -------------------------------------------------------------------------------- /home/.config/systemd/user/taskbar.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Taskbar 3 | 4 | [Service] 5 | ExecStart=/home/ray/bin/taskbar 6 | 7 | [Install] 8 | WantedBy=graphical.target 9 | -------------------------------------------------------------------------------- /home/.config/systemd/user/timers.target.wants/break.timer: -------------------------------------------------------------------------------- 1 | ../break.timer -------------------------------------------------------------------------------- /home/.config/systemd/user/timers.target.wants/nvchecker.timer: -------------------------------------------------------------------------------- 1 | ../nvchecker.timer -------------------------------------------------------------------------------- /home/.config/systemd/user/xscreensaver.service: -------------------------------------------------------------------------------- 1 | [Service] 2 | ExecStart=/usr/bin/xscreensaver -no-splash 3 | 4 | [Install] 5 | WantedBy=graphical.target 6 | -------------------------------------------------------------------------------- /home/.config/user-dirs.dirs: -------------------------------------------------------------------------------- 1 | # This file is written by xdg-user-dirs-update 2 | # If you want to change or add directories, just edit the line you're 3 | # interested in. All local changes will be retained on the next run 4 | # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped 5 | # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an 6 | # absolute path. No other format is supported. 7 | # 8 | XDG_DESKTOP_DIR="$HOME/Desktop" 9 | XDG_DOWNLOAD_DIR="$HOME/Downloads" 10 | XDG_TEMPLATES_DIR="$HOME/Templates" 11 | XDG_PUBLICSHARE_DIR="$HOME/Public" 12 | XDG_DOCUMENTS_DIR="$HOME/Documents" 13 | XDG_MUSIC_DIR="$HOME/Music" 14 | XDG_PICTURES_DIR="$HOME/Pictures" 15 | XDG_VIDEOS_DIR="$HOME/Videos" 16 | -------------------------------------------------------------------------------- /home/.config/user-dirs.locale: -------------------------------------------------------------------------------- 1 | en_US -------------------------------------------------------------------------------- /home/.config/vdirsyncer/config: -------------------------------------------------------------------------------- 1 | [general] 2 | status_path = "~/.local/share/vdirsyncer/status/" 3 | 4 | [pair google_calendar] 5 | a = "google_calendar_local" 6 | b = "google_calendar_remote" 7 | collections = ["from b"] 8 | conflict_resolution = "b wins" 9 | 10 | [storage google_calendar_local] 11 | type = "filesystem" 12 | path = "/home/ray/Calendar" 13 | fileext = ".ics" 14 | 15 | [storage google_calendar_remote] 16 | type = "google_calendar" 17 | token_file = "~/.local/share/vdirsyncer/google_calendar_remote_token_file.json" 18 | client_id = "yourpassword" 19 | client_secret = "yourpassword" 20 | -------------------------------------------------------------------------------- /home/.config/wezterm/wezterm.lua: -------------------------------------------------------------------------------- 1 | local wezterm = require 'wezterm' 2 | local config = wezterm.config_builder() 3 | -- local projects = require 'projects' 4 | local act = wezterm.action 5 | 6 | config.hide_tab_bar_if_only_one_tab = true 7 | config.harfbuzz_features = {"calt=0", "clig=0", "liga=0"} 8 | 9 | -- macOS: disable AltGr 10 | config.send_composed_key_when_right_alt_is_pressed = false 11 | 12 | config.color_scheme = 'Catppuccin Mocha' 13 | config.font = wezterm.font 'FantasqueSansM Nerd Font' 14 | config.font_size = 18 15 | 16 | config.leader = {mods = 'ALT', key = 'm'} 17 | config.keys = { 18 | {mods = 'LEADER|CTRL', key = 'a', action = act.SendKey { key = 'a', mods = 'CTRL'}}, 19 | {mods = 'LEADER', key = 'v', action = act.SplitHorizontal { domain = 'CurrentPaneDomain'}}, 20 | {mods = 'LEADER', key = "'", action = act.SplitVertical { domain = 'CurrentPaneDomain'}}, 21 | {mods = 'LEADER', key = 'h', action = act {ActivatePaneDirection='Left'}}, 22 | {mods = 'LEADER', key = 'j', action = act {ActivatePaneDirection='Down'}}, 23 | {mods = 'LEADER', key = 'k', action = act {ActivatePaneDirection='Up'}}, 24 | {mods = 'LEADER', key = 'l', action = act {ActivatePaneDirection='Right'}}, 25 | {mods = 'CTRL|SHIFT', key = 't', action = act.SpawnTab 'CurrentPaneDomain'}, 26 | {mods = 'CTRL|SHIFT', key = 'w', action = act.CloseCurrentTab {confirm=true}}, 27 | 28 | -- copy, paste, search -- 29 | { key = 'c', mods = 'SUPER', action = act.CopyTo 'Clipboard' }, 30 | { key = 'v', mods = 'SUPER', action = act.PasteFrom 'Clipboard' }, 31 | { key = 'f', mods = 'SHIFT|CTRL', action = act.Search 'CurrentSelectionOrEmptyString' }, 32 | -- { key = ' ', mods = 'SHIFT|CTRL', action = act.ActivateCopyMode }, 33 | 34 | -- { 35 | -- key = 'p', 36 | -- mods = 'LEADER', 37 | -- -- Present in to our project picker 38 | -- action = projects.choose_project(), 39 | -- }, 40 | { 41 | key = 'f', 42 | mods = 'LEADER', 43 | -- Present a list of existing workspaces 44 | action = wezterm.action.ShowLauncherArgs { flags = 'FUZZY|WORKSPACES' }, 45 | }, 46 | } 47 | 48 | return config 49 | -------------------------------------------------------------------------------- /home/.ctags: -------------------------------------------------------------------------------- 1 | --recurse=yes 2 | --tag-relative=yes 3 | --totals=yes 4 | --exclude=.* 5 | --langdef=julia 6 | --langmap=julia:.jl 7 | --regex-julia=/^[ \t]*(([^ \t.({[]+\.)*@[^ \t({[]+[ \t]+)*(function|macro|abstract type|primitive type|struct|mutable struct|module)[ \t]+([^ \t({[]+).*$/\4/f,function/ 8 | --regex-julia=/^[ \t]*(([^ \t.({[]+\.)*@[^ \t({[]+[ \t]+)*(([^@#$ \t({[]+)|\(([^@#$ \t({[]+)\))[ \t]*[ \t]*\([^#]*\)([ \t]+where[ \t]+\{.*\})?[ \t]*=([^=].*)?$/\4\5/f,function/ 9 | --regex-julia=/^(([^ \t.({[]+\.)*@[^ \t({[]+[ \t]+)*(const[ \t]+)?(([^ \t.({[]+\.)*@[^ \t({[]+[ \t]+)*([^@#$ \t({[]+)[ \t]*=([^=].*)?$/\6/v,variable/ 10 | -------------------------------------------------------------------------------- /home/.gdb/call-trace: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | readelf -s ${1:-a.out} | gawk ' 3 | { 4 | if($4 == "FUNC" && $2 != 0) { 5 | print "# code for " $NF; 6 | print "b *0x" $2; 7 | print "commands"; 8 | print "silent"; 9 | print "bt 1"; 10 | print "c"; 11 | print "end"; 12 | print ""; 13 | } 14 | }' 15 | -------------------------------------------------------------------------------- /home/.gdb/gdbinit.algo: -------------------------------------------------------------------------------- 1 | # speed up display of strings 2 | set print null-stop 3 | 4 | define plist 5 | if $argc == 0 6 | help plist 7 | else 8 | set $h = $arg0 9 | set $c = 9 10 | while $h != 0 && $c > 0 11 | set $c-- 12 | print *$h 13 | set $h = $h->next 14 | end 15 | if $c > 0 16 | printf "...\n" 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /home/.gdb/gdbinit.asm: -------------------------------------------------------------------------------- 1 | #set output-radix 0x10 2 | #set input-radix 0x10 3 | #source ~/.gdb/peda/peda.py 4 | #source ~/.gdb/libheap/libheap.py 5 | 6 | #source ~/Dev/Bin/gef/gef.py 7 | source ~/Dev/Bin/pwndbg/gdbinit.py 8 | -------------------------------------------------------------------------------- /home/.gdb/gdbinit.gef: -------------------------------------------------------------------------------- 1 | source ~/Dev/Bin/gef/gef.py 2 | -------------------------------------------------------------------------------- /home/.gdb/gdbinit.pwndbg: -------------------------------------------------------------------------------- 1 | source ~/Dev/Bin/pwndbg/gdbinit.py 2 | -------------------------------------------------------------------------------- /home/.gdbinit: -------------------------------------------------------------------------------- 1 | # Options {{{1 2 | set debug-file-directory /usr/lib/debug 3 | set $ASM = 0 4 | 5 | set confirm off 6 | set verbose off 7 | 8 | set history save on 9 | set history size 100000 10 | set history filename ~/.history/gdb 11 | set history expansion on 12 | #set disassembly-flavor intel 13 | #set output-radix 16 14 | 15 | # prevent "Type to continue" 16 | set height 0 17 | # prevent line wrap 18 | set width 0 19 | 20 | handle SIGALRM nostop print nopass 21 | handle SIGBUS stop print nopass 22 | handle SIGPIPE nostop print nopass 23 | handle SIGSEGV stop print nopass 24 | 25 | set python print-stack full 26 | 27 | # Bindings {{{1 28 | 29 | alias var=info variables 30 | 31 | define li 32 | x/10i $pc 33 | 34 | end 35 | document li 36 | list machine instructions 37 | end 38 | 39 | alias dd=disassemble 40 | 41 | # Plugins {{{1 42 | 43 | #source ~/.gdb/pygdb-fork.py 44 | 45 | define b_a 46 | #b __asan_report_load1 47 | #b __asan_report_load2 48 | #b __asan_report_load4 49 | #b __asan_report_load8 50 | #b __asan_report_load16 51 | #b __asan_report_store1 52 | #b __asan_report_store2 53 | #b __asan_report_store4 54 | #b __asan_report_store8 55 | #b __asan_report_store16 56 | #b __asan_report_error 57 | b __asan::ReportGenericError 58 | end 59 | 60 | define b_u 61 | b __ubsan_handle_add_overflow 62 | b __ubsan_handle_mul_overflow 63 | b __ubsan_handle_negate_overflow 64 | 65 | b __ubsan_handle_builtin_unreachable 66 | b __ubsan_handle_divrem_overflow 67 | b __ubsan_handle_out_of_bounds 68 | 69 | b __ubsan_handle_float_cast_overflow 70 | b __ubsan_handle_shift_out_of_bounds 71 | 72 | b __ubsan_handle_function_type_mismatch 73 | b __ubsan_handle_sub_overflow 74 | 75 | b __ubsan_handle_load_invalid_value 76 | b __ubsan_handle_type_mismatch 77 | 78 | b __ubsan_handle_missing_return 79 | b __ubsan_handle_vla_bound_not_positive 80 | end 81 | 82 | #define nub 83 | # python nextUntilBreakpoint() 84 | #end 85 | 86 | define fs 87 | finish 88 | step 89 | end 90 | 91 | # 92 | # C++ related beautifiers (optional) 93 | # 94 | 95 | #set print pretty on 96 | #set print object on 97 | set print static-members off 98 | #set print vtbl on 99 | #set demangle-style gnu-v3 100 | 101 | skip -rfu ^std:: 102 | 103 | #python 104 | #import sys 105 | #sys.path.insert(0, '/usr/share/gdb/python/gdb/command') 106 | #import pretty_printers 107 | #pretty_printers.register_pretty_printer_commands() 108 | #end 109 | 110 | # -*- vim: set sts=2 sw=2 et fdm=marker: -*- 111 | -------------------------------------------------------------------------------- /home/.gemrc: -------------------------------------------------------------------------------- 1 | --- 2 | :backtrace: false 3 | :bulk_threshold: 1000 4 | :sources: 5 | #- https://ruby.taobao.org/ 6 | :update_sources: true 7 | :verbose: true 8 | benchmark: false 9 | install: --no-rdoc --no-ri 10 | update: --no-rdoc --no-ri 11 | -------------------------------------------------------------------------------- /home/.ghci: -------------------------------------------------------------------------------- 1 | -- https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci-commands.html 2 | 3 | :m Control.Applicative Control.Monad 4 | :set prompt "\ESC[1;36m\x256d\x2500\ESC[0;37m%s\n\ESC[1;36m\x2570\x2500\ESC[m" 5 | :set prompt2 ".." 6 | :seti -XDataKinds -XGADTs -XFlexibleContexts -XFlexibleInstances -XMagicHash -XOverloadedLabels -XTupleSections -XTypeOperators -XScopedTypeVariables 7 | 8 | :set +t 9 | :set stop :list 10 | 11 | let ghciEscapeShellArg arg = "'" ++ concatMap (\x -> if x == '\'' then "'\"'\"'" else [x]) arg ++ "'" 12 | :def! hoogle return . (":! hoogle --color --count=20 " ++) . ghciEscapeShellArg 13 | :def! hoogleAll return . (":! hoogle --color " ++) . ghciEscapeShellArg 14 | :def! doc return . (":! hoogle --info " ++) . ghciEscapeShellArg 15 | :def! hlint return . const (":! hlint .") 16 | :def! pf return . (":! pointfree " ++) . ghciEscapeShellArg 17 | -------------------------------------------------------------------------------- /home/.gnupg/gpg-agent.conf: -------------------------------------------------------------------------------- 1 | pinentry-program /usr/bin/pinentry-gtk-2 2 | default-cache-ttl 14400 3 | -------------------------------------------------------------------------------- /home/.goldendict/article-style.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | margin-top: 1px; 4 | margin-right: 3px; 5 | margin-left: 2px; 6 | margin-bottom: 3px; 7 | background: white; 8 | font-size: 18px; 9 | } 10 | 11 | .gdarticle 12 | { 13 | margin-top: 0.1em; 14 | margin-bottom: 0.4em; 15 | padding: 5px; 16 | border: 1px solid #d0dde2; 17 | border-radius: 8px; 18 | } 19 | 20 | .gdactivearticle 21 | { 22 | border: 1px solid #3399FF; 23 | } 24 | 25 | .gdarticleseparator + script + .gdactivearticle .gddictname 26 | { 27 | border-top: 1px solid #3399FF; 28 | } 29 | 30 | .gdarticleseparator 31 | { 32 | display: none; 33 | } 34 | 35 | .gddictname 36 | { 37 | font-size: 12px; 38 | font-weight: normal; 39 | float: right; 40 | border: 0px; 41 | border-top-right-radius: 8px; 42 | border-bottom-left-radius: 6px; 43 | margin: -6px; 44 | margin-bottom: 5px; 45 | margin-left: 2px; 46 | padding-right: 0.4em; 47 | color: #4480f8; 48 | background: #E0E8F0; 49 | 50 | -webkit-user-select: none; 51 | user-select: none; 52 | cursor: default; 53 | } 54 | 55 | .gdactivearticle .gddictname 56 | { 57 | font-size: 13px; 58 | font-weight: normal; 59 | margin: -6px; 60 | margin-bottom: 5px; 61 | margin-left: 2px; 62 | 63 | float: right; 64 | border: 1px solid #3399FF; 65 | color: #0066cc; 66 | background: #deecf8; 67 | } 68 | 69 | .gddicticon 70 | { 71 | display: inline; 72 | vertical-align: text-bottom; 73 | float: right; 74 | padding-right: 0em; 75 | padding-left: 0.3em; 76 | } 77 | 78 | /* The first headword in a (possibly) multi-headword DSL article */ 79 | .gdarticlebody > span:first-child .dsl_headwords, 80 | .gdarticlebody > h3:first-child 81 | { 82 | margin-top: -3px; 83 | display: inline-block; 84 | } 85 | 86 | .gdspellsuggestion 87 | { 88 | /* Add some vertical space before the article */ 89 | margin-top: 1.5em; 90 | } 91 | 92 | .dsl_ex 93 | { 94 | color: steelblue; 95 | } 96 | 97 | .dsl_stress 98 | { 99 | color: darkblue; 100 | } 101 | 102 | .dsl_stress_without_accent { 103 | display:inline; 104 | } 105 | 106 | .dsl_stress_with_accent { 107 | display: none; 108 | } 109 | 110 | .dsl_p .dsl_ex .dsl_lang 111 | { 112 | color: green; 113 | } 114 | 115 | ::selection { 116 | background:#cc0000; 117 | color:#fff; 118 | } 119 | 120 | code::selection { 121 | background: #333333; 122 | } 123 | 124 | .dsl_s_wav img, .lsa_play img, .forvo_play img[alt="Play"] { 125 | display: none; 126 | } 127 | 128 | .dsl_s_wav a, .lsa_play td:nth-of-type(1) a, .forvo_play td:nth-of-type(1) a { 129 | display: inline-block; 130 | width: 17px; 131 | height: 16px; 132 | background: url('file:///control_play_lingvo.png') no-repeat center; 133 | vertical-align: text-bottom; 134 | -webkit-user-select: none; 135 | user-select: none; 136 | } 137 | -------------------------------------------------------------------------------- /home/.gtkrc-2.0: -------------------------------------------------------------------------------- 1 | 2 | gtk-font-name="Sans 16" 3 | # gtk-toolbar-style = GTK_TOOLBAR_BOTH_HORIZ 4 | include "/usr/share/themes/Emacs/gtk-2.0-key/gtkrc" 5 | -------------------------------------------------------------------------------- /home/.history/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaskRay/Config/67d2cdf21c50798afa6da19b070ee18352ec56ac/home/.history/.keep -------------------------------------------------------------------------------- /home/.ideskrc: -------------------------------------------------------------------------------- 1 | table Config 2 | FontName: Monofur 3 | FontSize: 14 4 | Shadow: true 5 | FontColor: #deefff 6 | BackColorTip: #ffffff 7 | ToolTip.FontSize: 12 8 | ToolTip.FontName: Monofur 9 | ToolTip.ForeColor: #ffccff 10 | ToolTip.BackColor: #122334 11 | ToolTip.CaptionOnHover: true 12 | ToolTip.CaptionPlacement: Right 13 | Locked: false 14 | Transparency: 60 15 | IconSnap: true 16 | SnapWidth: 100 17 | SnapHeight: 100 18 | SnapOrigin: BottomRight 19 | FillStyle: FillInvert 20 | 21 | Background.Delay: 5 22 | Background.Source: /home/ray/Wallpapers 23 | Background.File: /home/ray/Wallpapers 24 | Background.Mode: Scale 25 | end 26 | 27 | table Actions 28 | Lock: control right doubleClk 29 | Reload: middle doubleClk 30 | Drag: right hold 31 | EndDrag: right singleClk 32 | Execute[0]: left singleClk 33 | Execute[1]: left doubleClk 34 | end 35 | -------------------------------------------------------------------------------- /home/.indent.pro: -------------------------------------------------------------------------------- 1 | -bap 2 | -nbbb 3 | -npcs 4 | -npsl 5 | -------------------------------------------------------------------------------- /home/.inputrc: -------------------------------------------------------------------------------- 1 | set meta-flag on 2 | set input-meta on 3 | set output-meta on 4 | set convert-meta off 5 | 6 | set bell-style none 7 | 8 | set completion-ignore-case on 9 | set completion-map-case on 10 | set completion-prefix-display-length 2 11 | set skip-completed-text on 12 | 13 | set visible-stats on 14 | 15 | set show-all-if-ambiguous on 16 | set show-all-if-unmodified on 17 | 18 | "\C-n": history-search-forward 19 | "\C-p": history-search-backward 20 | 21 | set keymap vi-insert 22 | "\C-a": vi-insert-beg 23 | "\C-b": backward-char 24 | "\C-e": end-of-line 25 | "\C-f": forward-char 26 | "\C-k": kill-line 27 | "\e.": yank-last-arg 28 | "\ef": vi-next-word 29 | "\eb": vi-prev-word 30 | "\ep": previous-history 31 | "\en": next-history 32 | "\e&": tilde-expand 33 | "\e.-C" capitalize-word 34 | 35 | set keymap vi-command 36 | "qq": start-kbd-macro 37 | "qe": end-kbd-macro 38 | "Q": call-last-kbd-macro 39 | 40 | # ipython 41 | set editing-mode emacs 42 | 43 | # https://github.com/cgdb/cgdb/issues/189 44 | set enable-bracketed-paste off 45 | -------------------------------------------------------------------------------- /home/.keynavrc: -------------------------------------------------------------------------------- 1 | # This is a keynavrc file. Yours should live in 2 | # $HOME/.keynavrc 3 | # 4 | # Lines beginning with '#' are comments. 5 | # Format is: 6 | # keysequence cmd1,cmd2,cmd3... 7 | # 8 | # Other special values are: 9 | # 'clear' on a line by itself (no quotes) will erase all keybindings 10 | # (including the defaults) 11 | # 'daemonize' on a line by itself (no quotes) will make keynav background 12 | # after parsing the configfile and having no critical errors. 13 | # 14 | # The 'start' command alone is handled specially, in that any key sequence 15 | # mapped to 'start' will be grabbed when keynav starts up so you can invoke it 16 | # to activate keynav. The remaining keys are only recognized while keynav is 17 | # active 18 | # 19 | # Project page; http://www.semicomplete.com/projects/keynav 20 | 21 | # Use 'clear' to blow away any previous keybindings 22 | #clear 23 | 24 | # Use 'daemonize' to background ourselves. 25 | #daemonize 26 | 27 | ctrl+bracketright start 28 | Escape end 29 | ctrl+bracketright end 30 | h cut-left 31 | j cut-down 32 | k cut-up 33 | l cut-right 34 | y cut-left,cut-up 35 | u cut-right,cut-up 36 | b cut-left,cut-down 37 | n cut-right,cut-down 38 | shift+h move-left 39 | shift+j move-down 40 | shift+k move-up 41 | shift+l move-right 42 | shift+y move-left,move-up 43 | shift+u move-right,move-up 44 | shift+b move-left,move-down 45 | shift+n move-right,move-down 46 | space warp,click 1,end 47 | semicolon warp,end 48 | 1 click 1 49 | 2 click 2 50 | 3 click 3 51 | 52 | # Zoom to the current window 53 | w windowzoom 54 | 55 | # Zoom to the cursor location with a given height and width 56 | c cursorzoom 200 200 57 | 58 | # Handy for holding ctrl while using keynav: 59 | ctrl+h cut-left 60 | ctrl+j cut-down 61 | ctrl+k cut-up 62 | ctrl+l cut-right 63 | ctrl+y cut-left,cut-up 64 | ctrl+u cut-right,cut-up 65 | ctrl+b cut-left,cut-down 66 | ctrl+n cut-right,cut-down 67 | 68 | # Record keynav actions 69 | q record 70 | 71 | ### Example using the 'sh' command. 72 | # Make firefox the active window 73 | f sh "xdotool windowactivate $(xdotool search -title -- '- Mozilla Firefox')", end 74 | # Make a new tab in google chrome: 75 | t sh "xdotool windowactivate $(xdotool search --title -- '- Google Chrome' | head -1); xdotool key ctrl+t",end 76 | # Paste 77 | v sh "xdotool key shift+Insert" 78 | 79 | ### Drag examples 80 | # Start drag holding the left mouse button 81 | #q drag 1 82 | # Start drag holding middle mouse + control and shift 83 | #w drag 2 ctrl+shift 84 | 85 | ### History 86 | a history-back 87 | 88 | ### Example of cut and move without the default values 89 | #h cut-left .75 90 | #j cut-down .75 91 | #k cut-up .75 92 | #l cut-right .75 93 | #shift+h move-left .50 94 | #shift+j move-down .50 95 | #shift+k move-up .50 96 | #shift+l move-right .50 97 | 98 | ### Example using a 2-row, 3-column grid, 99 | # mapped to Insert/Home/PageUp/etc... 100 | #6 grid 2x3 101 | #Insert cell-select 1x1 102 | #Home cell-select 1x2 103 | #Prior cell-select 1x3 # PageUp 104 | #Delete cell-select 2x1 105 | #End cell-select 2x2 106 | #Next cell-select 2x3 # PageDown 107 | 108 | ### Example using a 3x3 grid with nethack-vi keys 109 | #ctrl+semicolon start, grid 3x3 110 | #h cell-select 2x1 # left 111 | #j cell-select 3x2 # down 112 | #k cell-select 1x2 # up 113 | #l cell-select 2x3 # right 114 | #y cell-select 1x1 # up-left 115 | #u cell-select 1x3 # up-right 116 | #b cell-select 3x1 # down-left 117 | #n cell-select 3x3 # down-right 118 | #period cell-select 2x2 # center 119 | -------------------------------------------------------------------------------- /home/.lambda-term-inputrc: -------------------------------------------------------------------------------- 1 | [read-line] 2 | C-n: history-next 3 | C-p: history-prev 4 | C-left: complete-bar-prev 5 | C-right: complete-bar-next 6 | C-down: complete-bar 7 | -------------------------------------------------------------------------------- /home/.latexmkrc: -------------------------------------------------------------------------------- 1 | # tune `elsif (/^-xelatex$/) {` of latexmk 2 | $pdflatex = 'xelatex -shell-escape -interaction=nonstopmode -halt-on-error %O %S'; 3 | $pdf_mode = 1; 4 | $dvi_mode = $postscript_mode = 0; 5 | 6 | # with latexmk -pvc 7 | $pdf_previewer = 'llpp %S'; 8 | $pdf_update_method = 2; # send SIGHUP to llpp 9 | -------------------------------------------------------------------------------- /home/.lftp/rc: -------------------------------------------------------------------------------- 1 | set ftp:list-options -a 2 | set bmk:save-passwords 3 | -------------------------------------------------------------------------------- /home/.lldbinit: -------------------------------------------------------------------------------- 1 | settings set target.x86-disassembly-flavor intel 2 | 3 | # 't' was an abbreviation for 'thread select' 4 | command unalias t 5 | command regex t 's/^([0-9]+)[[:space:]]*$/thread select %1/' 's/(.*)/thread %1/' 6 | 7 | # 'r' was an abbreviation for 'process launch -c /bin/sh --' 8 | #command alias r process launch 9 | 10 | # 'd' 11 | #command alias d breakpoint delete 12 | #command alias delete breakpoint delete 13 | 14 | # 'dis' 15 | command alias dis breakpoint disable 16 | command alias disable breakpoint disable 17 | 18 | # 'en' 19 | # 'enable' 20 | command alias en breakpoint enable 21 | command alias enable breakpoint enable 22 | 23 | # ignore 24 | command alias ignore breakpoint modify -i %2 %1 25 | 26 | # 'u' 27 | command alias u _regexp-up 28 | 29 | # 'until' 30 | command alias until thread until 31 | -------------------------------------------------------------------------------- /home/.local/share/applications/dot.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Dot 3 | Exec=dot -T xlib %F 4 | Type=Application 5 | NoDisplay=true 6 | MimeType=application/msword-template 7 | -------------------------------------------------------------------------------- /home/.local/share/applications/feh.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Feh 3 | Exec=feh %F 4 | Type=Application 5 | NoDisplay=true 6 | MimeType=image/x-eps;image/vnd.microsoft.icon;image/jp2;image/vnd.fpx;image/vnd.sealed.png;image/x-freehand;image/cgm;image/vnd.adobe.photoshop;image/x-photoshop;image/x-fits;image/x-ms-bmp;image/x-xcursor;image/pcx;image/vnd.svf;image/x-coreldrawpattern;image/vnd.djvu;image/x-cmu-raster;image/x-wmf;image/x-cmx;image/example;image/t38;image/x-xbitmap;image/x-sgi;image/gif;image/x-portable-anymap;image/x-portable-bitmap;image/vnd.net-fpx;image/vnd.fujixerox.edmics-mmr;image/vnd.wap.wbmp;image/x-psd;image/x-psp;image/x-gimp-pat;image/x-gimp-gbr;image/g3fax;image/x-pict;image/x-portable-pixmap;image/vnd.radiance;image/x-jg;image/x-jng;image/tiff;image/x-xcf;image/vnd.fujixerox.edmics-rlc;image/vnd.mix;image/x-pcx;image/vnd.dxf;image/vnd.fastbidsheet;image/x-xwindowdump;image/jpx;image/vnd.dwg;image/jpm;image/vnd.sealedmedia.softseal.gif;image/x-xpixmap;image/x-compressed-xcf;image/vnd.sealedmedia.softseal.jpg;image/x-coreldraw;image/x-icon;image/jpeg2000;image/prs.pti;image/bmp;image/eps;image/x-portable-graymap;image/tiff-fx;image/svg+xml;image/fits;image/ief;image/x-rgb;image/naplps;image/vnd.cns.inf2;image/x-coreldrawtemplate;image/png;image/vnd.fst;image/x-corelphotopaint;image/prs.btif;image/vnd.ms-modi;image/x-gimp-gih;image/x-tga;image/vnd.globalgraphics.pgb;image/jpeg;image/vnd.xiff; 7 | -------------------------------------------------------------------------------- /home/.local/share/applications/mimeapps.list: -------------------------------------------------------------------------------- 1 | [Default Applications] 2 | x-scheme-handler/http=google-chrome.desktop 3 | x-scheme-handler/https=google-chrome.desktop 4 | x-scheme-handler/about=google-chrome.desktop 5 | x-scheme-handler/unknown=google-chrome.desktop 6 | application/msword-template=dot.desktop 7 | -------------------------------------------------------------------------------- /home/.local/share/applications/nvr.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=nvr 3 | Comment=neovim-remote 4 | # TODO xdg-open does not expand environment variables 5 | Exec=nvr --servername /run/user/1000/nvim -- %F 6 | Terminal=true 7 | Type=Application 8 | MimeType=text/c;text/plain 9 | Categories=Development; 10 | -------------------------------------------------------------------------------- /home/.local/share/fcitx5/rime/default.custom.yaml: -------------------------------------------------------------------------------- 1 | patch: 2 | schema_list: 3 | - schema: double_pinyin_mspy 4 | -------------------------------------------------------------------------------- /home/.local/share/parcellite/actions: -------------------------------------------------------------------------------- 1 | wikipediasearch <<< 'wikipedia:%s' wget -P /tmpwget -P /tmp %sgooglesearch <<< 'google:%s'hooglesearch <<< 'hoogle:%s' -------------------------------------------------------------------------------- /home/.local/share/xmonad/.keep: -------------------------------------------------------------------------------- 1 | xmonad 0.13 2 | If `$XDG_DATA_HOME/xmonad` does not exist, `.xmonad` will be created. 3 | -------------------------------------------------------------------------------- /home/.login_conf: -------------------------------------------------------------------------------- 1 | me:\ 2 | :setenv=MANWIDTH=tty,MANCOLOR=1,MANITALIC=1 3 | -------------------------------------------------------------------------------- /home/.mailcap: -------------------------------------------------------------------------------- 1 | ############### 2 | # Interactive # 3 | ############### 4 | 5 | # application/pdf; llpp %s; test=test -n "$DISPLAY"; description=Portable Document Format; nametemplate=%s.pdf 6 | application/pdf; xdg-open %s; needsterminal 7 | # application/postscript; zathura %s; test=test -n "$DISPLAY" 8 | application/postscript; xdg-open %s; needsterminal 9 | application/vnd.ms-excel; gnumeric %s; test=test -n "$DISPLAY" 10 | application/vnd.oasis.opendocument.text; wps %s; test=test -n "$DISPLAY" 11 | application/vnd.openxmlformats-officedocument.wordprocessingml.document; wps %s; test=test -n "$DISPLAY" 12 | 13 | application/x-gzip; zless; needsterminal 14 | application/x-bzip2; bzless; needsterminal 15 | application/x-xz; xzless; needsterminal 16 | 17 | #image/*; feh %s; test=test -n "$DISPLAY" 18 | #image/*; fbi %s 19 | # 20 | #audio/*; vlc %s; test=test -n "$DISPLAY" 21 | #video/*; vlc %s; test=test -n "$DISPLAY" 22 | 23 | image/* ; /usr/bin/xdg-open %s ; needsterminal 24 | audio/* ; /usr/bin/xdg-open %s ; needsterminal 25 | video/* ; /usr/bin/xdg-open %s ; needsterminal 26 | 27 | ########## 28 | # Inline # 29 | ########## 30 | 31 | application/x-shellscript; cat %s; copiousoutput 32 | application/x-tex; cat %s; copiousoutput 33 | text/html; t=%{charset} \; w3m -dump -I ${t/2312/18030} -T text/html %s | uniq; copiousoutput 34 | text/plain; cat %s; test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`" = utf-8 ; copiousoutput 35 | 36 | application/msword; catdoc %s; copiousoutput 37 | application/pdf; pdftotext -enc UTF-8 %s /dev/stdout; copiousoutput 38 | application/postscript; ps2ascii %s; copiousoutput 39 | 40 | application/x-gzip; zcat; copiousoutput 41 | application/x-cpio; cpio -tvF --quiet %s; copiousoutput 42 | application/x-tar; tar tvf %s; copiousoutput 43 | application/x-gtar; tar tvfz %s; copiousoutput 44 | application/rar; rar l %s | sed -n '/Name/,$p'; copiousoutput 45 | application/x-7z-compressed; 7z l %s | sed -n '/Date/,$p'; copiousoutput 46 | application/zip; 7z l %s | sed -n '/Date/,$p'; copiousoutput 47 | application/x-xz; tar tvf %s; copiousoutput 48 | 49 | #image/*; anytopnm %s | pnmscale -xsize 80 | convert - pbm:- | pbmtoascii; copiousoutput 50 | image/*; exiftool -common '%s'; copiousoutput 51 | -------------------------------------------------------------------------------- /home/.mlterm/aafont: -------------------------------------------------------------------------------- 1 | ISO10646_UCS4_1 = Monospace 26 2 | -------------------------------------------------------------------------------- /home/.modules/common: -------------------------------------------------------------------------------- 1 | if {[string length [info commands lmap]] == 0} { 2 | proc lmap {i xs cmd} { 3 | upvar $i x 4 | set r {} 5 | foreach x $xs { 6 | lappend r [uplevel "eval $cmd"] 7 | } 8 | return $r 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /home/.modules/deno: -------------------------------------------------------------------------------- 1 | #%Module 2 | prepend-path PATH $env(HOME)/.deno/bin 3 | -------------------------------------------------------------------------------- /home/.modules/go: -------------------------------------------------------------------------------- 1 | #%Module 2 | prepend-path PATH $env(HOME)/go/bin 3 | setenv GOPATH $env(HOME)/go 4 | -------------------------------------------------------------------------------- /home/.modules/intel/2015.2.164: -------------------------------------------------------------------------------- 1 | #%Module 2 | source $env(MODULEPATH)/common 3 | conflict gcc 4 | 5 | proc setI {args} { 6 | prepend-path -delim " " CPPFLAGS [lmap i $args {set _dummy -I$i}] 7 | } 8 | 9 | proc setL {args} { 10 | prepend-path -delim " " LDFLAGS [lmap i $args {set _dummy -L$i}] 11 | #prepend-path LD_RUN_PATH [join $args :] icc does not seem to recognize LD_RUN_PATH flags 12 | prepend-path LD_LIBRARY_PATH [join $args :] 13 | } 14 | 15 | set root10 /opt/intel/composer_xe_2015.2.164 16 | 17 | setenv CC icc 18 | setenv CXX icpc 19 | setenv FC ifort 20 | setenv F77 ifort 21 | setenv F90 ifort 22 | setenv F95 ifort 23 | setenv CPATH $root10/ipp/include:$root10/mkl/include:$root10/tbb/include 24 | prepend-path PATH $root10/bin/intel64 25 | prepend-path MANPATH $root10/man 26 | setI $root10/compiler/include $root10/mkl/include $root10/ipp/include $root10/tbb/include 27 | setL $root10/compiler/lib/intel64 $root10/ipp/lib/intel64 $root10/tbb/lib/intel64 $root10/mpirt/lib/intel64 $root10/mkl/lib/intel64 \ 28 | $root10/compiler/lib/mic $root10/ipp/lib/mic $root10/tbb/lib/mic $root10/mpirt/lib/mic $root10/mkl/lib/mic 29 | -------------------------------------------------------------------------------- /home/.modules/mingw: -------------------------------------------------------------------------------- 1 | #%Module 2 | # http://sourceforge.net/projects/mingwbuilds 3 | prepend-path PATH /opt/mingw/bin 4 | -------------------------------------------------------------------------------- /home/.modules/mpi/impi/4.1.3.049: -------------------------------------------------------------------------------- 1 | #%Module 2 | source $env(MODULEPATH)/common 3 | conflict openmpi 4 | 5 | proc setL {args} { 6 | prepend-path -delim " " LDFLAGS [lmap i $args {set _dummy -L$i}] 7 | #prepend-path LD_RUN_PATH [join $args :] icc does not seem to recognize LD_RUN_PATH flags 8 | prepend-path LD_LIBRARY_PATH [join $args :] 9 | } 10 | 11 | set root $env(HOME)/.local/opt/intel/impi/4.1.3.049 12 | setenv I_MPI_ROOT $root 13 | set main $root/intel64 14 | 15 | prepend-path PATH $main/bin 16 | setL $main/lib 17 | prepend-path MANPATH /home/ray/.local/opt/intel/impi/4.1.3.049/man 18 | -------------------------------------------------------------------------------- /home/.modules/nim: -------------------------------------------------------------------------------- 1 | #%Module 2 | prepend-path PATH $env(HOME)/.nimble/bin 3 | -------------------------------------------------------------------------------- /home/.modules/nodejs: -------------------------------------------------------------------------------- 1 | #%Module 2 | prepend-path PATH $env(HOME)/node_modules/.bin 3 | -------------------------------------------------------------------------------- /home/.modules/perl: -------------------------------------------------------------------------------- 1 | #%Module 2 | prepend-path PATH $env(HOME)/perl5/bin 3 | prepend-path PERL5LIB "$env(HOME)/perl5/lib/perl5" 4 | -------------------------------------------------------------------------------- /home/.modules/ruby/2.7.0: -------------------------------------------------------------------------------- 1 | #%Module 2 | prepend-path PATH $env(HOME)/.local/share/gem/ruby/3.1.0/bin 3 | -------------------------------------------------------------------------------- /home/.modules/rust: -------------------------------------------------------------------------------- 1 | #%Module 2 | prepend-path PATH $env(HOME)/.cargo/bin 3 | -------------------------------------------------------------------------------- /home/.modules/yarn: -------------------------------------------------------------------------------- 1 | #%Module 2 | prepend-path PATH $env(HOME)/.yarn/bin 3 | -------------------------------------------------------------------------------- /home/.mutt/local: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaskRay/Config/67d2cdf21c50798afa6da19b070ee18352ec56ac/home/.mutt/local -------------------------------------------------------------------------------- /home/.mutt/remote: -------------------------------------------------------------------------------- 1 | set imap_user=emacsray@gmail.com 2 | set imap_passive=yes 3 | set imap_keepalive=300 4 | set folder=imaps://imap.gmail.com 5 | unmailboxes * 6 | mailboxes =INBOX =[Gmail]/Drafts =[Gmail]/'Sent Mail' =[Gmail]/Spam 7 | set sendmail="sendmail" 8 | set spoolfile=+INBOX \ 9 | record=+ \ 10 | postponed=+[Gmail]/Drafts \ 11 | record=+[Gmail]/Drafts \ 12 | smtp_url=smtps://emacsray@smtp.gmail.com \ 13 | smtp_pass=$imap_pass \ 14 | from=emacsray@gmail.com 15 | -------------------------------------------------------------------------------- /home/.mutt/theme: -------------------------------------------------------------------------------- 1 | # set default 2 | color normal color250 default 3 | 4 | # main colors 5 | color status green default 6 | color indicator brightwhite color235 7 | color tree blue default 8 | color error brightred default 9 | color message brightyellow default 10 | 11 | # 12 | # message states 13 | # 14 | # order matters here since some states override others 15 | # 16 | 17 | # messages to me 18 | color index brightblack default "~P" 19 | color index brightred default "~F" 20 | 21 | # threads containing new messages 22 | color index brightcyan default "~(~N)" 23 | 24 | # new messages themselves 25 | color index yellow default "~N" 26 | color index brightyellow default "~N ~p" 27 | 28 | # tagged 29 | color index brightgreen default "~T" 30 | 31 | # deleted 32 | color index red default "~D" 33 | 34 | # set up the headers 35 | color header brightyellow default "^from:" 36 | color header yellow default "^to:" 37 | color header yellow default "^cc:" 38 | color header blue default "^date:" 39 | color header brightblue default "^subject:" 40 | 41 | # message bodies 42 | color attachment brightblack default 43 | color search red brightblack 44 | color signature cyan default 45 | color tilde blue default 46 | 47 | # urls 48 | color body brightblue default "(^|<| )mailto:[^ ]+@[^ ]( |>|$)" 49 | color body brightblue default "(^|<| )(http|https|ftp|file|telnet|news|finger)://[^ ]+( |>|$)" 50 | 51 | # smileys, the right way and the backward-ass euro way 52 | color body brightmagenta default "(^| )+(|[<>|])[8;:](|[^ ])[)(/|DOPS]( |$)+" 53 | color body brightmagenta default "(^| )+[)(/|DOPS](|[^ ])[8;:](|[<>|])( |$)+" 54 | 55 | # *bold*, _underline_, and /italic/ 56 | color body brightcyan default "(^| )\\*[^*]+\\*( |$)" 57 | color body brightcyan default "(^| )_[^_]+_( |$)" 58 | color body brightcyan default "(^| )/[^/]+/( |$)" 59 | 60 | # quote blocks 61 | color quoted magenta default 62 | color quoted1 cyan default 63 | color quoted2 green default 64 | color quoted3 magenta default 65 | color quoted4 cyan default 66 | color quoted5 green default 67 | color quoted6 magenta default 68 | color quoted7 cyan default 69 | 70 | # sidebar 71 | color sidebar_new yellow default 72 | -------------------------------------------------------------------------------- /home/.ncmpcpp/config: -------------------------------------------------------------------------------- 1 | # MPD 2 | mpd_music_dir = "/home/ray/Music" 3 | 4 | # Bars 5 | titles_visibility = "no" 6 | header_visibility = "no" 7 | statusbar_visibility = "yes" 8 | 9 | # Facility 10 | playlist_shorten_total_times = "yes" 11 | autocenter_mode = "yes" 12 | centered_cursor = "yes" 13 | fancy_scrolling = "yes" 14 | 15 | # Theme 16 | user_interface = "alternative" 17 | playlist_display_mode = "columns" 18 | browser_display_mode = "columns" 19 | search_engine_display_mode = "columns" 20 | playlist_editor_display_mode = "columns" 21 | colors_enabled = "yes" 22 | color1 = "red" 23 | color2 = "yellow" 24 | empty_tag_color = "red" 25 | main_window_color = "cyan" 26 | main_window_highlight_color = "blue" 27 | active_column_color = "green" 28 | active_window_border = "black" 29 | window_border_color = "red" 30 | header_window_color = "magenta" 31 | volume_color = "red" 32 | 33 | 34 | # Formats 35 | song_list_format = "{$3%l$9} - {$5%a$9} - {$3%t$9} - {$6%f$9}" 36 | song_columns_list_format = "(6)[green]{l} (24)[yellow]{a} (28)[cyan]{b} (50)[red]{t}" 37 | 38 | # Status bar 39 | statusbar_color = "red" 40 | song_status_format = "$b{$2%a$9 $3-$9 }$6{%t$9}" 41 | 42 | # Progress bar 43 | progressbar_color = "green" 44 | progressbar_look = "◾◾◽" 45 | 46 | # Misc 47 | enable_window_title = "no" 48 | regular_expressions = "extended" 49 | external_editor = "vim" 50 | use_console_editor = "yes" 51 | ignore_leading_the = "yes" 52 | clock_display_seconds = "yes" 53 | display_bitrate = "yes" 54 | jump_to_now_playing_song_at_start = "yes" 55 | ask_before_clearing_main_playlist = "no" 56 | follow_now_playing_lyrics = "yes" 57 | allow_physical_files_deletion = "yes" 58 | 59 | # State line 60 | state_flags_color = "blue" 61 | state_window_color ="blue" 62 | 63 | # Visualizer 64 | visualizer_fifo_path = "/run/mpd.fifo" 65 | visualizer_output_name = "visual" 66 | visualizer_sync_interval = "30" 67 | visualizer_type = "spectrum" 68 | visualizer_look = "◆▋" 69 | -------------------------------------------------------------------------------- /home/.ncmpcpp/keys: -------------------------------------------------------------------------------- 1 | key_page_down = 4 338 # C-d pagedown 2 | key_page_up = 21 339 # C-u pageup 3 | key_move_song_up = 'K' 4 | key_move_song_down = 'J' 5 | key_prev_column = 'h' 260 # left 6 | key_next_column = 'l' 261 # right 7 | key_clear = 'C' 8 | key_lyrics = 'r' 9 | key_toggle_repeat = 'R' 10 | key_go_to_parent_dir = '^' 11 | -------------------------------------------------------------------------------- /home/.npmrc: -------------------------------------------------------------------------------- 1 | prefix=/home/ray/.local 2 | tmp=/tmp 3 | viewer=man 4 | #registry=https://registry.npm.taobao.org/ 5 | #registry=https://npm.tuna.tsinghua.edu.cn/ 6 | progress=false 7 | #proxy=http://192.168.7.23:3128 8 | -------------------------------------------------------------------------------- /home/.ocamlinit: -------------------------------------------------------------------------------- 1 | (* Added by OPAM. *) 2 | 3 | let () = 4 | try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") 5 | with Not_found -> () 6 | ;; 7 | 8 | #use "topfind" 9 | (*#camlp4o 10 | #thread 11 | #require "core.top" 12 | #require "core.syntax" 13 | *) 14 | -------------------------------------------------------------------------------- /home/.pentadactyl/desert.penta: -------------------------------------------------------------------------------- 1 | " Pentadactyl color scheme 2 | " Name: Desert 3 | " Thanks: Based on the Vim color file "Desert" by Hans Fugal at http://hans.fugal.net/vim/colors/desert.vim 4 | " Maintainer: Jozsef Bakosi 5 | " Last Change: $Date: 2011/01/04 $ 6 | 7 | hi StatusLine color: #ffffff !important; background-color: #000000 !important; font-weight: bold !important; 8 | hi Normal color: #ffffff; background: #333333; font-weight: bold !important; 9 | hi CompItem[selected] color: #f0e685; background: #6b8e23; 10 | hi CompDesc color: #c6c6c6; width: 50%; font-weight: normal !important; 11 | hi CompTitle color: #78cee4 !important; background: #000000 !important; 12 | hi GradientLeft background-color: white; 13 | hi GradientRight background-color: black; 14 | hi Title color: #78cee4; background: #333333; font-weight: bold; 15 | hi NonText color: #add8e6; background: #4d4d4d; min-height: 16px; padding-left: 2px; 16 | hi Enabled color: #6b8e23; 17 | hi Disabled color: #bb493b; 18 | hi Boolean color: #ffa0a0; 19 | hi Number color: #ffa0a0; 20 | hi Null color: #ffa0a0; 21 | hi Function color: #ffffff; 22 | hi Object color: #ffffff; 23 | hi String color: #ffa0a0; white-space: pre; 24 | hi LineNr color: #78cee4 !important; background: white !important; 25 | hi Hint font-family: Verdana; font-size: 14px; font-weight: bold; color: red; background-color: white; border-style: solid; padding: 0px 1px 0px 1px; 26 | hi Indicator color: #c6c6c6; width: 1.5em; text-align: center; 27 | hi URL text-decoration: none; color: #78cee4; background: inherit; 28 | hi URL:hover text-decoration: underline; cursor: pointer; 29 | hi InfoMsg color: #ffffff !important; background: #333333 !important; 30 | hi LineNr color: #78cee4 !important; background: #333333 !important; 31 | hi ModeMsg color: #ffffff !important; background: #333333 !important; 32 | hi MoreMsg color: #6b8e23 !important; background: #333333 !important; 33 | hi Question color: #6b8e23 !important; background: #333333 !important; font-weight: bold !important; 34 | hi WarningMsg color: #ffa0a0 !important; background: #333333 !important; 35 | hi StatusQuestion color: #6b8e23 !important; background: inherit !important; 36 | -------------------------------------------------------------------------------- /home/.pip/pip.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | default-timeout = 60 3 | respect-virtualenv = true 4 | #download-cache = /tmp 5 | #index-url = http://pypi.tuna.tsinghua.edu.cn/simple 6 | -------------------------------------------------------------------------------- /home/.pythonstartup: -------------------------------------------------------------------------------- 1 | import datetime 2 | import functools 3 | import itertools 4 | import os 5 | import sys 6 | import time 7 | -------------------------------------------------------------------------------- /home/.railsrc: -------------------------------------------------------------------------------- 1 | --skip-test-unit 2 | -------------------------------------------------------------------------------- /home/.ripgreprc: -------------------------------------------------------------------------------- 1 | # Search hidden files and directories. 2 | --hidden 3 | 4 | --glob=!{.git,.jj,out,.ccls-cache} 5 | -------------------------------------------------------------------------------- /home/.rtorrent.rc: -------------------------------------------------------------------------------- 1 | directory = /tmp/ 2 | session = ~/Torrents/session/ 3 | schedule = books,5,5,"load_start=/tmp/*.torrent,d.set_directory=/tmp/" 4 | -------------------------------------------------------------------------------- /home/.sage/init.sage: -------------------------------------------------------------------------------- 1 | %colors Linux 2 | -------------------------------------------------------------------------------- /home/.sqliterc: -------------------------------------------------------------------------------- 1 | .mode column 2 | .headers on 3 | .nullvalue NULL 4 | -------------------------------------------------------------------------------- /home/.ssh/config: -------------------------------------------------------------------------------- 1 | Host * 2 | ServerAliveInterval 180 3 | HashKnownHosts no 4 | #AddressFamily inet 5 | Compression yes 6 | ControlMaster auto 7 | ControlPath /tmp/ssh_%r@%h:%p 8 | ControlPersist 2h 9 | ForwardAgent yes 10 | SendEnv LANG LC_ALL 11 | 12 | #Host remote 13 | # Hostname remote^gateway 14 | # Port remote_port 15 | 16 | Host *^* 17 | ProxyCommand ssh-chain %h %p 18 | 19 | Host * 20 | CanonicalizeHostname Yes 21 | CanonicalDomains n9.vc 22 | CanonicalizeMaxDots 1 23 | CanonicalizeFallbackLocal yes 24 | -------------------------------------------------------------------------------- /home/.taskrc: -------------------------------------------------------------------------------- 1 | data.location=~/.task 2 | 3 | # Color theme (uncomment one to use) 4 | #include /usr//usr/share/doc/task-2.1.2/rc/light-16.theme 5 | #include /usr//usr/share/doc/task-2.1.2/rc/light-256.theme 6 | #include /usr//usr/share/doc/task-2.1.2/rc/dark-16.theme 7 | #include /usr//usr/share/doc/task-2.1.2/rc/dark-256.theme 8 | #include /usr//usr/share/doc/task-2.1.2/rc/dark-red-256.theme 9 | #include /usr//usr/share/doc/task-2.1.2/rc/dark-green-256.theme 10 | #include /usr//usr/share/doc/task-2.1.2/rc/dark-blue-256.theme 11 | #include /usr/share/doc/task/rc/dark-violets-256.theme 12 | #include /usr//usr/share/doc/task-2.1.2/rc/dark-yellow-green.theme 13 | #include /usr//usr/share/doc/task-2.1.2/rc/dark-gray-256.theme 14 | 15 | #alias.l=long 16 | #alias.a=add 17 | #alias.w=waiting 18 | #alias.p=projects 19 | #alias.c=calendar 20 | #alias.r=recurring 21 | #alias.b=blocking 22 | #alias.u=unblocked 23 | #alias.t=timesheet 24 | #alias.n=next 25 | #dateformat=Y-M-D 26 | #dateformat.annotation=Y-M-D=H:N 27 | #dateformat.report=Y-M-D 28 | #dateformat.edit=Y-M-D=H:N 29 | #dateformat.info=Y-M-D=H:N 30 | #dateformat.holiday=YMD 31 | #journal.time=on 32 | #report.taskbar.columns=due.countdown,description.count 33 | #report.taskbar.sort=due+ 34 | #report.taskbar.filter=+READY 35 | # 36 | #report.list.description=Lists all tasks matching the specified criteria 37 | #report.list.columns=id,project,priority,due,recur,tags,description 38 | #report.list.labels=ID,Project,Pri,Due,Recur,Tags,Description & Annotation 39 | #report.list.sort=priority-,project+,due+ 40 | #report.list.filter=status:pending 41 | # 42 | #report.today.description=Lists all tasks matching the specified criteria 43 | #report.today.columns=id,project,priority,due,tags,description 44 | #report.today.labels=ID,Proj,Pri,Due,Tags,Description & Annotation 45 | #report.today.sort=due+,priority-,project+ 46 | #report.today.filter=status:pending '( scheduled.before:tomorrow or due.before:tom )' 47 | #report.today.dateformat=b.D 48 | 49 | #due=3 50 | #default.command=today 51 | #calendar.holidays=full 52 | -------------------------------------------------------------------------------- /home/.terminfo/x/xterm-24bits.terminfo: -------------------------------------------------------------------------------- 1 | xterm-24bits|xterm with 24-bit direct color mode, 2 | use=xterm-256color, 3 | setb24=\E[48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm, 4 | setf24=\E[38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm, 5 | 6 | tmux-24bits|tmux with 24-bit colors and italics, 7 | use=tmux-256color, 8 | Tc, 9 | -------------------------------------------------------------------------------- /home/.terminfo/x/xterm-termite-24bits.terminfo: -------------------------------------------------------------------------------- 1 | xterm-termite-24bits|xterm-termite with 24-bit direct color mode, 2 | use=xterm-termite, 3 | setb24=\E[48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm, 4 | setf24=\E[38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm, 5 | -------------------------------------------------------------------------------- /home/.urlview: -------------------------------------------------------------------------------- 1 | COMMAND xdg-open %s 2 | REGEXP ((https?|ftp|)://[^' <>"]+|www.[-a-z0-9.]+)[^' .,;<>":] 3 | -------------------------------------------------------------------------------- /home/.valgrindrc: -------------------------------------------------------------------------------- 1 | --memcheck:leak-check=yes 2 | --memcheck:show-possibly-lost=yes 3 | --memcheck:show-reachable=yes 4 | --memcheck:track-origins=yes 5 | --memcheck:dsymutil=yes 6 | --memcheck:track-fds=yes 7 | --memcheck:track-origins=yes 8 | --memcheck:gen-suppressions=all 9 | --massif:time-unit=B 10 | --massif:max-snapshots=128 11 | --massif:stacks=yes 12 | --massif:peak-inaccuracy=0.5 13 | --callgrind:dump-instr=yes 14 | --callgrind:compress-strings=no 15 | --callgrind:compress-pos=no 16 | --cachegrind:I1=32768,8,64 17 | --cachegrind:D1=32768,8,64 18 | --cachegrind:L2=2097152,8,64 19 | --cachegrind:branch-sim=yes 20 | -------------------------------------------------------------------------------- /home/.weechat/README.md: -------------------------------------------------------------------------------- 1 | allquery.py 2 | buffer_autoset.py 3 | buffers.pl 4 | highmon.pl 5 | iset.pl 6 | notify.py 7 | shell.py 8 | toggle_nicklist.py 9 | urlgrab.py 10 | urlserver.py 11 | -------------------------------------------------------------------------------- /home/.weechat/alias.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- alias.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [cmd] 13 | AAWAY = "allserv /away" 14 | AME = "allchan /me" 15 | AMSG = "allchan /msg *" 16 | ANICK = "allserv /nick" 17 | BEEP = "print -beep" 18 | BYE = "quit" 19 | C = "/close" 20 | CHAT = "dcc chat" 21 | CL = "buffer clear" 22 | CLOSE = "buffer close" 23 | EXIT = "quit" 24 | h = "/help" 25 | IG = "ignore" 26 | J = "join" 27 | K = "kick" 28 | KB = "kickban" 29 | LEAVE = "part" 30 | M = "msg" 31 | MSGBUF = "command -buffer $1 * /input send $2-" 32 | MUB = "unban *" 33 | N = "names" 34 | p = "/part" 35 | ptpburl = "/exec -hsignal ptpburl ptpb $*" 36 | Q = "query" 37 | REDRAW = "window refresh" 38 | s = "/dcc send $channel" 39 | SAY = "msg *" 40 | SIGNOFF = "quit" 41 | T = "topic" 42 | UB = "unban" 43 | UMODE = "mode $nick" 44 | V = "command core version" 45 | W = "who" 46 | WC = "window merge" 47 | WI = "whois" 48 | WII = "whois $1 $1" 49 | WW = "whowas" 50 | znc = "/quote znc" 51 | 52 | [completion] 53 | -------------------------------------------------------------------------------- /home/.weechat/aspell.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- aspell.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [color] 13 | misspelled = lightred 14 | suggestion = default 15 | suggestion_delimiter_dict = cyan 16 | suggestion_delimiter_word = cyan 17 | 18 | [check] 19 | commands = "ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic" 20 | default_dict = "" 21 | during_search = off 22 | enabled = off 23 | real_time = off 24 | suggestions = -1 25 | word_min_length = 2 26 | 27 | [dict] 28 | 29 | [look] 30 | suggestion_delimiter_dict = " / " 31 | suggestion_delimiter_word = "," 32 | 33 | [option] 34 | -------------------------------------------------------------------------------- /home/.weechat/autosort.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- autosort.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [sorting] 13 | case_sensitive = off 14 | group_irc = on 15 | replacements = "[["##", "#"]]" 16 | rules = "[["core", 0], ["irc", 2], ["*", 1], ["irc.irc_raw", 0], ["irc.server", 1]]" 17 | signals = "buffer_opened buffer_merged buffer_unmerged buffer_renamed" 18 | sort_on_config_change = on 19 | -------------------------------------------------------------------------------- /home/.weechat/buffer_autoset.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- buffer_autoset.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [look] 13 | instant = on 14 | timer = 1 15 | 16 | [buffer] 17 | irc.bitlbee.#twitter_haskray.highlight_regex = "." 18 | -------------------------------------------------------------------------------- /home/.weechat/buflist.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- buflist.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [look] 13 | auto_scroll = 50 14 | display_conditions = "${buffer.hidden}==0" 15 | enabled = on 16 | mouse_jump_visited_buffer = off 17 | mouse_move_buffer = on 18 | mouse_wheel = on 19 | nick_prefix = off 20 | nick_prefix_empty = on 21 | signals_refresh = "" 22 | sort = "number,-active" 23 | 24 | [format] 25 | buffer = "${format_number}${indent}${format_nick_prefix}${color_hotlist}${format_name}" 26 | buffer_current = "${color:,240}${format_buffer}" 27 | hotlist = " ${color:green}(${hotlist}${color:green})" 28 | hotlist_highlight = "${color:magenta}" 29 | hotlist_low = "${color:white}" 30 | hotlist_message = "${color:229}" 31 | hotlist_none = "${color:default}" 32 | hotlist_private = "${color:121}" 33 | hotlist_separator = "${color:default}," 34 | indent = " " 35 | lag = " ${color:green}[${color:brown}${lag}${color:green}]" 36 | name = "${name}" 37 | nick_prefix = "${color_nick_prefix}${nick_prefix}" 38 | number = "${color:green}${number}${if:${number_displayed}?.: }" 39 | -------------------------------------------------------------------------------- /home/.weechat/charset.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- charset.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [default] 13 | decode = "iso-8859-1" 14 | encode = "" 15 | 16 | [decode] 17 | 18 | [encode] 19 | -------------------------------------------------------------------------------- /home/.weechat/exec.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- exec.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [command] 13 | default_options = "" 14 | purge_delay = 0 15 | 16 | [color] 17 | flag_finished = lightred 18 | flag_running = lightgreen 19 | -------------------------------------------------------------------------------- /home/.weechat/iset.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- iset.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [color] 13 | bg_selected = red 14 | help_default_value = green 15 | help_option_name = white 16 | help_text = default 17 | option = default 18 | option_selected = white 19 | type = brown 20 | type_selected = yellow 21 | value = cyan 22 | value_diff = magenta 23 | value_diff_selected = lightmagenta 24 | value_selected = lightcyan 25 | value_undef = green 26 | value_undef_selected = lightgreen 27 | 28 | [help] 29 | show_help_bar = off 30 | show_help_extra_info = on 31 | show_plugin_description = on 32 | 33 | [look] 34 | scroll_horiz = 10 35 | show_current_line = on 36 | use_mute = off 37 | value_search_char = "=" 38 | -------------------------------------------------------------------------------- /home/.weechat/jabber.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- jabber.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [look] 13 | debug = off 14 | 15 | [color] 16 | message_join = green 17 | message_quit = red 18 | 19 | [server] 20 | 21 | [jid_aliases] 22 | -------------------------------------------------------------------------------- /home/.weechat/logger.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- logger.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [look] 13 | backlog = 50 14 | 15 | [color] 16 | backlog_end = 245 17 | backlog_line = 245 18 | 19 | [file] 20 | auto_log = on 21 | flush_delay = 120 22 | info_lines = off 23 | mask = "$plugin.$name.weechatlog" 24 | name_lower_case = on 25 | nick_prefix = "" 26 | nick_suffix = "" 27 | path = "~/irclogs" 28 | replacement_char = "_" 29 | time_format = "%H:%M" 30 | 31 | [level] 32 | 33 | [mask] 34 | irc = "$server/$channel/%Y-%m-%d.log" 35 | -------------------------------------------------------------------------------- /home/.weechat/lua/autoload/emoji.lua: -------------------------------------------------------------------------------- 1 | ../emoji.lua -------------------------------------------------------------------------------- /home/.weechat/perl/autoload/buffers.pl: -------------------------------------------------------------------------------- 1 | ../buffers.pl -------------------------------------------------------------------------------- /home/.weechat/perl/autoload/highmon.pl: -------------------------------------------------------------------------------- 1 | ../highmon.pl -------------------------------------------------------------------------------- /home/.weechat/perl/autoload/iset.pl: -------------------------------------------------------------------------------- 1 | ../iset.pl -------------------------------------------------------------------------------- /home/.weechat/python/autoload/allquery.py: -------------------------------------------------------------------------------- 1 | ../allquery.py -------------------------------------------------------------------------------- /home/.weechat/python/autoload/autosort.py: -------------------------------------------------------------------------------- 1 | ../autosort.py -------------------------------------------------------------------------------- /home/.weechat/python/autoload/buffer_autoset.py: -------------------------------------------------------------------------------- 1 | ../buffer_autoset.py -------------------------------------------------------------------------------- /home/.weechat/python/autoload/go.py: -------------------------------------------------------------------------------- 1 | ../go.py -------------------------------------------------------------------------------- /home/.weechat/python/autoload/jabber.py: -------------------------------------------------------------------------------- 1 | ../jabber.py -------------------------------------------------------------------------------- /home/.weechat/python/autoload/notify.py: -------------------------------------------------------------------------------- 1 | ../notify.py -------------------------------------------------------------------------------- /home/.weechat/python/autoload/pastebin.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | # pastebin 3 | 4 | import collections, re, subprocess 5 | import weechat as w 6 | 7 | SCRIPT_NAME = 'pastebin' 8 | SCRIPT_AUTHOR = 'MaskRay' 9 | SCRIPT_DESC = '/paste /tmp/a.{jpg,txt} to send its pastebin/imagebin URL to the current buffer' 10 | SCRIPT_VERSION = '0.0.0' 11 | SCRIPT_LICENSE = 'GPLv3' 12 | TIMEOUT = 10 * 1000 13 | 14 | process_output = '' 15 | buffers = collections.deque() 16 | 17 | def pastebin_process_cb(data, command, rc, out, err): 18 | #w.prnt('', '{} {} {} {} {}'.format(data, command, rc, out, err)) 19 | global process_output 20 | process_output += out 21 | if int(rc) >= 0: 22 | buffer = buffers.popleft() 23 | if re.match(r'^https?://', process_output): 24 | w.command(buffer, '/say '+process_output) 25 | else: 26 | w.prnt(buffer, str(process_output)) 27 | process_output = '' 28 | return w.WEECHAT_RC_OK 29 | 30 | 31 | def pastebin_cb(data, buffer, args): 32 | '''Callback for /paste command''' 33 | largs = args.split(' ') 34 | while '' in largs: 35 | largs.remove('') 36 | while ' ' in largs: 37 | largs.remove(' ') 38 | if len(largs) == 0: 39 | pass 40 | else: 41 | filename = largs[0] 42 | if re.search(r'\.(bmp|jpe?g|gif|png|webp)$', filename): 43 | cmd = 'curl -sF "name=@{}" http://img.vim-cn.com/'.format(filename) 44 | else: 45 | cmd = 'curl -sF "vimcn=<{}" http://cfp.vim-cn.com/'.format(filename) 46 | buffers.append(buffer) 47 | w.hook_process(cmd, TIMEOUT, pastebin_process_cb.__name__, '') 48 | return w.WEECHAT_RC_OK 49 | 50 | 51 | if w.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE, 52 | SCRIPT_DESC, '', ''): 53 | w.hook_command('paste', 54 | 'Send the pastebin/imagebin URL of a local file to the current buffer', 55 | '', 56 | '', 57 | '', 58 | pastebin_cb.__name__, '') 59 | -------------------------------------------------------------------------------- /home/.weechat/python/autoload/pushbullet.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | # pushbullet 3 | # 4 | # Adapted from pushover.pl by stfn 5 | 6 | import weechat as w 7 | 8 | import json, time, urllib2 9 | 10 | SCRIPT_NAME = 'pushbullet' 11 | SCRIPT_AUTHOR = 'MaskRay' 12 | SCRIPT_DESC = 'Send notifications to pushbullet.com on `notify_private,notify_highlight`' 13 | SCRIPT_VERSION = '0.0.0' 14 | SCRIPT_LICENSE = 'GPL3' 15 | 16 | DEFAULTS = { 17 | 'access_token': ('', 'Access Token obtained at https://www.pushbullet.com/#settings/account'), 18 | 'blacklist': ('', 'Comma separated list of buffers (`buffer_match_list`) to blacklist for notifications'), 19 | 'rate_limit': ('0', 'Rate limit in seconds (0 = unlimited), will send a maximum of 1 notification per time limit'), 20 | 'show_highlight': ('on', 'Notify on `notify_highlight`'), 21 | } 22 | CONFIG = {} 23 | last = {} 24 | 25 | 26 | def parse_config(): 27 | for option, (default, desc) in DEFAULTS.items(): 28 | if not w.config_is_set_plugin(option): 29 | w.config_set_plugin(option, default) 30 | w.config_set_desc_plugin(option, '{} (default: {!r})'.format(desc, default)) 31 | CONFIG['rate_limit'] = int(w.config_get_plugin('rate_limit')) 32 | for i in ('access_token', 'blacklist', 'show_highlight'): 33 | CONFIG[i] = w.config_get_plugin(i) 34 | return w.WEECHAT_RC_OK 35 | 36 | 37 | def config_cb(data, option, value): 38 | parse_config() 39 | return w.WEECHAT_RC_OK 40 | 41 | 42 | def print_cb(data, buffer, date, tags, displayed, highlight, prefix, message): 43 | global last 44 | is_private = w.buffer_get_string(buffer, 'localvar_type') == 'private' 45 | if (is_private or CONFIG['show_highlight'] == 'on' and highlight == 1) and \ 46 | (buffer not in last or time.time() - last[buffer] > CONFIG['rate_limit']) and \ 47 | not w.buffer_match_list(buffer, CONFIG['blacklist']): 48 | parsed = w.info_get_hashtable('irc_message_parse', {'message': message}) 49 | try: 50 | body = '<{}> {}'.format(prefix, message) 51 | if not is_private: 52 | body = '[{}] {}'.format(w.buffer_get_string(buffer, 'short_name'), body) 53 | data = json.dumps({ 54 | 'type': 'note', 55 | 'title': 'weechat', 56 | 'body': body, 57 | }) 58 | if CONFIG['access_token']: 59 | #w.prnt(buffer, '{}'.format(body)) 60 | urllib2.urlopen(urllib2.Request('https://api.pushbullet.com/v2/pushes', data=data, headers={'Access-Token': CONFIG['access_token'], 'Content-type': 'application/json'})) 61 | else: 62 | w.prnt('', 'Please get an Access Token at https://www.pushbullet.com/#settings/account and /set plugins.var.python.'+SCRIPT_NAME+'.access_token') 63 | except: 64 | return w.WEECHAT_RC_ERROR 65 | else: 66 | last[buffer] = time.time() 67 | return w.WEECHAT_RC_OK 68 | 69 | 70 | def mark_read_cb(_data, _signal, _signal_data): 71 | buffer = w.buffer_get_string(w.current_buffer(), 'name') 72 | last[buffer] = time.time() 73 | return w.WEECHAT_RC_OK 74 | 75 | 76 | if __name__ == '__main__': 77 | w.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE, 78 | SCRIPT_DESC, '', '') 79 | parse_config() 80 | w.hook_config('plugins.var.python.'+SCRIPT_NAME+'.*', 'config_cb', '') 81 | w.hook_print('', 'notify_private,notify_highlight', '', 1, 'print_cb', '') 82 | w.hook_signal('*,irc_out1_privmsg', 'mark_read_cb', '') 83 | w.hook_signal('buffer_switch', 'mark_read_cb', '') 84 | -------------------------------------------------------------------------------- /home/.weechat/python/autoload/shell.py: -------------------------------------------------------------------------------- 1 | ../shell.py -------------------------------------------------------------------------------- /home/.weechat/python/autoload/urlgrab.py: -------------------------------------------------------------------------------- 1 | ../urlgrab.py -------------------------------------------------------------------------------- /home/.weechat/python/autoload/zerotab.py: -------------------------------------------------------------------------------- 1 | ../zerotab.py -------------------------------------------------------------------------------- /home/.weechat/relay.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- relay.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [look] 13 | auto_open_buffer = on 14 | raw_messages = 256 15 | 16 | [color] 17 | client = 166 18 | status_active = 81 19 | status_auth_failed = 161 20 | status_connecting = 118 21 | status_disconnected = 161 22 | status_waiting_auth = brown 23 | text = 252 24 | text_bg = default 25 | text_selected = white 26 | 27 | [network] 28 | allow_empty_password = off 29 | allowed_ips = "" 30 | bind_address = "" 31 | clients_purge_delay = 0 32 | compression_level = 6 33 | ipv6 = on 34 | max_clients = 5 35 | password = "${sec.data.relay-password}" 36 | ssl_cert_key = "%h/ssl/relay.pem" 37 | ssl_priorities = "NORMAL:-VERS-SSL3.0" 38 | websocket_allowed_origins = "" 39 | 40 | [irc] 41 | backlog_max_minutes = 1440 42 | backlog_max_number = 256 43 | backlog_since_last_disconnect = on 44 | backlog_since_last_message = off 45 | backlog_tags = "irc_privmsg" 46 | backlog_time_format = "[%H:%M] " 47 | 48 | [port] 49 | weechat = 9005 50 | -------------------------------------------------------------------------------- /home/.weechat/script.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- script.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [look] 13 | columns = "%s %n %V %v %u | %d | %t" 14 | diff_color = on 15 | diff_command = "auto" 16 | display_source = on 17 | quiet_actions = on 18 | sort = "p,n" 19 | translate_description = on 20 | use_keys = on 21 | 22 | [color] 23 | status_autoloaded = cyan 24 | status_held = white 25 | status_installed = lightcyan 26 | status_obsolete = lightmagenta 27 | status_popular = yellow 28 | status_running = lightgreen 29 | status_unknown = lightred 30 | text = default 31 | text_bg = default 32 | text_bg_selected = red 33 | text_date = default 34 | text_date_selected = white 35 | text_delimiters = default 36 | text_description = default 37 | text_description_selected = white 38 | text_extension = default 39 | text_extension_selected = white 40 | text_name = cyan 41 | text_name_selected = lightcyan 42 | text_selected = white 43 | text_tags = brown 44 | text_tags_selected = yellow 45 | text_version = magenta 46 | text_version_loaded = default 47 | text_version_loaded_selected = white 48 | text_version_selected = lightmagenta 49 | 50 | [scripts] 51 | autoload = on 52 | cache_expire = 1440 53 | download_timeout = 30 54 | hold = "" 55 | path = "%h/script" 56 | url = "https://weechat.org/files/plugins.xml.gz" 57 | -------------------------------------------------------------------------------- /home/.weechat/trigger.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- trigger.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [look] 13 | enabled = on 14 | monitor_strip_colors = off 15 | 16 | [color] 17 | flag_command = lightgreen 18 | flag_conditions = yellow 19 | flag_post_action = lightblue 20 | flag_regex = lightcyan 21 | flag_return_code = lightmagenta 22 | regex = white 23 | replace = cyan 24 | trigger = green 25 | trigger_disabled = red 26 | 27 | [trigger] 28 | beep.arguments = "" 29 | beep.command = "/print -beep" 30 | beep.conditions = "${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})" 31 | beep.enabled = on 32 | beep.hook = print 33 | beep.post_action = none 34 | beep.regex = "" 35 | beep.return_code = ok 36 | cmd_pass.arguments = "5000|input_text_display;5000|history_add;5000|irc_command_auth" 37 | cmd_pass.command = "" 38 | cmd_pass.conditions = "" 39 | cmd_pass.enabled = on 40 | cmd_pass.hook = modifier 41 | cmd_pass.post_action = none 42 | cmd_pass.regex = "==^((/(msg|m|quote) +nickserv +(id|identify|ghost +[^ ]+|release +[^ ]+|regain +[^ ]+|recover +[^ ]+) +)|/oper +[^ ]+ +|/quote +pass +|/set +[^ ]*password[^ ]* +|/secure +(passphrase|decrypt|set +[^ ]+) +)(.*)==${re:1}${hide:*,${re:+}}" 43 | cmd_pass.return_code = ok 44 | cmd_pass_register.arguments = "5000|input_text_display;5000|history_add;5000|irc_command_auth" 45 | cmd_pass_register.command = "" 46 | cmd_pass_register.conditions = "" 47 | cmd_pass_register.enabled = on 48 | cmd_pass_register.hook = modifier 49 | cmd_pass_register.post_action = none 50 | cmd_pass_register.regex = "==^(/(msg|m|quote) +nickserv +register +)([^ ]+)(.*)==${re:1}${hide:*,${re:3}}${re:4}" 51 | cmd_pass_register.return_code = ok 52 | msg_auth.arguments = "5000|irc_message_auth" 53 | msg_auth.command = "" 54 | msg_auth.conditions = "" 55 | msg_auth.enabled = on 56 | msg_auth.hook = modifier 57 | msg_auth.post_action = none 58 | msg_auth.regex = "==^(.*(id|identify|register|ghost +[^ ]+|release +[^ ]+|regain +[^ ]+|recover +[^ ]+) +)(.*)==${re:1}${hide:*,${re:+}}" 59 | msg_auth.return_code = ok 60 | ptpburl.arguments = "ptpburl" 61 | ptpburl.command = "/command -buffer ${buffer.full_name} core /input delete_line;/command -buffer ${buffer.full_name} core /input insert ${out}" 62 | ptpburl.conditions = "" 63 | ptpburl.enabled = on 64 | ptpburl.hook = hsignal 65 | ptpburl.post_action = none 66 | ptpburl.regex = "" 67 | ptpburl.return_code = ok 68 | redirect_newsbin_to_news.arguments = "weechat_print" 69 | redirect_newsbin_to_news.command = "/print -buffer irc.linode-ca.##news ${tg_prefix}\t${tg_message}" 70 | redirect_newsbin_to_news.conditions = "${tg_buffer} == irc.freenode.#newsbin && ${tg_tag_nick} == slack3r" 71 | redirect_newsbin_to_news.enabled = on 72 | redirect_newsbin_to_news.hook = modifier 73 | redirect_newsbin_to_news.post_action = none 74 | redirect_newsbin_to_news.regex = "/.*//" 75 | redirect_newsbin_to_news.return_code = ok 76 | server_pass.arguments = "5000|input_text_display;5000|history_add" 77 | server_pass.command = "" 78 | server_pass.conditions = "" 79 | server_pass.enabled = on 80 | server_pass.hook = modifier 81 | server_pass.post_action = none 82 | server_pass.regex = "==^(/(server|connect) .*-(sasl_)?password=)([^ ]+)(.*)==${re:1}${hide:*,${re:4}}${re:5}" 83 | server_pass.return_code = ok 84 | -------------------------------------------------------------------------------- /home/.weechat/urlgrab.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- urlgrab.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [color] 13 | color_bg_selected = green 14 | color_buffer = red 15 | color_buffer_selected = red 16 | color_time = cyan 17 | color_time_selected = cyan 18 | color_url = blue 19 | color_url_selected = blue 20 | 21 | [default] 22 | copycmd = "xsel -i" 23 | historysize = 10 24 | localcmd = "firefox '%s'" 25 | method = "local" 26 | output_main_buffer = on 27 | remotecmd = "ssh -x localhost -i ~/.ssh/id_rsa -C "export DISPLAY=":0.0" && firefox '%s'"" 28 | time_format = "%H:%M:%S" 29 | url_log = "~/.weechat/urls.log" 30 | -------------------------------------------------------------------------------- /home/.weechat/xfer.conf: -------------------------------------------------------------------------------- 1 | # 2 | # weechat -- xfer.conf 3 | # 4 | # WARNING: It is NOT recommended to edit this file by hand, 5 | # especially if WeeChat is running. 6 | # 7 | # Use /set or similar command to change settings in WeeChat. 8 | # 9 | # For more info, see: https://weechat.org/doc/quickstart 10 | # 11 | 12 | [look] 13 | auto_open_buffer = on 14 | progress_bar_size = 20 15 | pv_tags = "notify_private" 16 | 17 | [color] 18 | status_aborted = lightred 19 | status_active = lightblue 20 | status_connecting = yellow 21 | status_done = lightgreen 22 | status_failed = lightred 23 | status_waiting = lightcyan 24 | text = default 25 | text_bg = default 26 | text_selected = white 27 | 28 | [network] 29 | blocksize = 65536 30 | fast_send = on 31 | own_ip = "" 32 | port_range = "" 33 | speed_limit = 0 34 | timeout = 300 35 | 36 | [file] 37 | auto_accept_chats = off 38 | auto_accept_files = off 39 | auto_accept_nicks = "" 40 | auto_check_crc32 = off 41 | auto_rename = on 42 | auto_resume = on 43 | convert_spaces = on 44 | download_path = "%h/xfer" 45 | upload_path = "~" 46 | use_nick_in_filename = on 47 | -------------------------------------------------------------------------------- /home/.wgetrc: -------------------------------------------------------------------------------- 1 | #continue = on 2 | #timestamping = on 3 | -------------------------------------------------------------------------------- /home/.xbindkeysrc.scm: -------------------------------------------------------------------------------- 1 | (define (delete-duplicates l) 2 | (cond ((null? l) '()) 3 | ((memq (car l) (cdr l)) (delete-duplicates (cdr l))) 4 | (else (cons (car l) (delete-duplicates (cdr l)))) 5 | ) 6 | ) 7 | 8 | (define global-map '()) 9 | 10 | (define (register keys action) 11 | (define (loop getmap setmap keys) 12 | (if (null? keys) 13 | (setmap action) 14 | (let ((k (car keys))) 15 | (if (eq? #f (assoc k (getmap))) 16 | (setmap (assoc-set! (getmap) k '()))) 17 | (loop (lambda () (cdr (assoc k (getmap)))) 18 | (lambda (m) (setmap (assoc-set! (getmap) k m))) 19 | (cdr keys)) 20 | ) 21 | ) 22 | ) 23 | (loop (lambda () global-map) (lambda (m) (set! global-map m)) keys) 24 | ) 25 | 26 | (define (grab keymap) 27 | (define (proc k) 28 | (define action (cdr (assoc k keymap))) 29 | (ungrab-all-keys) 30 | (remove-all-keys) 31 | (if (string? action) 32 | (begin 33 | (run-command action) 34 | (reset-first-binding) 35 | ) 36 | (grab action) 37 | ) 38 | (grab-all-keys) 39 | ) 40 | (map (lambda (k) 41 | (xbindkey-function k (lambda () (proc k))) 42 | ) (delete-duplicates (map car keymap))) 43 | (if (not (eq? global-map keymap)) 44 | (xbindkey-function '(control g) (lambda () (reset-first-binding))) 45 | ) 46 | ) 47 | 48 | (define (first-binding) 49 | (grab global-map) 50 | ) 51 | 52 | (define (reset-first-binding) 53 | (ungrab-all-keys) 54 | (remove-all-keys) 55 | (first-binding) 56 | (grab-all-keys)) 57 | 58 | (define (simple s) 59 | (string-concatenate `("wmctrl -xa " ,s "||" ,s)) 60 | ) 61 | 62 | (register '((control semicolon) x) (simple "xterm")) 63 | (register '((control semicolon) u) "wmctrl -xa urxvt || urxvtc -e tmux attach -t default") 64 | (register '((control semicolon) e) "wmctrl -xa Emacs || emacsclient -c -n") 65 | (register '((control semicolon) v) "wmctrl -xa Vim || gvim") 66 | (register '((control semicolon) f) (simple "firefox")) 67 | (register '((control semicolon) i) (simple "evince")) 68 | 69 | (first-binding) 70 | -------------------------------------------------------------------------------- /home/.xinitrc: -------------------------------------------------------------------------------- 1 | # source xinitc.d scripts 2 | if [ -d /etc/X11/xinit/xinitrc.d ]; then 3 | for f in /etc/X11/xinit/xinitrc.d/*; do 4 | [ -x "$f" ] && . "$f" 5 | done 6 | unset f 7 | fi 8 | 9 | export BROWSER=chromium 10 | export XMONAD_CACHE_DIR=~/.local/share/xmonad 11 | 12 | xset s off dpms 600 600 600 13 | #xset r rate 200 50 14 | xset m 8 3 15 | 16 | systemctl --user start graphical.target 17 | 18 | # tap once: click 19 | # two twice: right click 20 | # two thice middle click 21 | synclient TapButton1=1 TapButton2=3 TapButton3=2 22 | 23 | # speed 24 | synclient MinSpeed=1.5 MaxSpeed=3.5 AccelFactor=0.1 25 | 26 | # scrolling using two fingers 27 | synclient VertTwoFingerScroll=1 HorizTwoFingerScroll=1 28 | 29 | exec xmonad 30 | -------------------------------------------------------------------------------- /home/.xmobarrc: -------------------------------------------------------------------------------- 1 | Config { 2 | font = "xft:DejaVu Sans:bold:size=13,Source Han Sans:bold:size=13" 3 | , border = NoBorder 4 | , borderColor = "black" 5 | , bgColor = "black" 6 | , fgColor = "grey" 7 | --, position = TopP 160 0 8 | , position = TopSize R 50 30 9 | , lowerOnStart = True 10 | , commands = [ -- Run MultiCpu ["-L","10","-H","50","--low","#808080","--normal","#83AD2E","--high","#FF0000"] 50 11 | Run BatteryP ["BAT0"] ["-t","","-L","30","-H","80","-l","red","-n","orange","-h","#00c000"] 300 12 | , Run Com "ponymix" ["get-volume"] "volume" 50 13 | , Run Date "%H:%M %a %y-%m-%d " "date" 50 14 | -- , Run Mail [ ("INBOX", "~/Maildir/INBOX")] "mail" 15 | , Run Memory ["-H","50","--low","#808080","--normal","#83AD2E","--high","#FF0000","-t","Mem: %"] 50 16 | , Run StdinReader 17 | -- , Run Wireless "wlp3s0" [ "-t", "" ] 60 18 | ] 19 | --, iconRoot = "/home/ray/.xmonad/icons" 20 | 21 | -- layout 22 | , sepChar = "%" 23 | , alignSep = "}{" 24 | -- , template = "%StdinReader% }{ Vol: %volume% | %memory% | Bat: %battery% | %wlp3s0wi% | %mail% %date%" 25 | , template = "%StdinReader% }{ Vol: %volume% | %memory% | Bat: %battery% | %date%" 26 | 27 | -- general behavior 28 | , hideOnStart = False 29 | , allDesktops = True 30 | , overrideRedirect = True 31 | , pickBroadest = True 32 | , persistent = False 33 | } 34 | -------------------------------------------------------------------------------- /home/.zprofile: -------------------------------------------------------------------------------- 1 | export EDITOR=nvim 2 | export LESS="-FiMRwX --shift 5 -z-4" 3 | export MENUCONFIG_COLOR=blackbg 4 | export SUDO_PROMPT=$'[\e[31;5msudo\e[m] password for \e[33;1m%p\e[m: ' 5 | export PAGER='less -s' # squeeze blank lines 6 | export PYTHONSTARTUP=$HOME/.pythonstartup 7 | export NVIM_TUI_ENABLE_TRUE_COLOR=1 # neovim true color 8 | export QT_QPA_PLATFORMTHEME=qt5ct 9 | 10 | #export LESS_TERMCAP_mb=$'\E[01;31m' 11 | # Start bold mode 12 | if [[ $TERM =~ 256 ]] { 13 | export LESS_TERMCAP_md=$'\e[1;38;5;178m' 14 | } else { 15 | export LESS_TERMCAP_md=$'\e[1;31m' 16 | } 17 | # End all mode 18 | export LESS_TERMCAP_me=$'\e[0m' 19 | # Start standout mode e.g. prompt, matches 20 | if [[ $TERM =~ 256 ]] { 21 | export LESS_TERMCAP_so=$'\e[1;38;5;81m' 22 | } else { 23 | export LESS_TERMCAP_so=$'\e[1;36m' 24 | } 25 | # End standout mode 26 | export LESS_TERMCAP_se=$'\e[0m' 27 | # Start underlining 28 | if [[ $TERM =~ 256 ]] { 29 | export LESS_TERMCAP_us=$'\e[4;1;38;5;71m' 30 | } else { 31 | export LESS_TERMCAP_us=$'\e[4;1;32m' 32 | } 33 | # End underlining 34 | export LESS_TERMCAP_ue=$'\e[0m' 35 | -------------------------------------------------------------------------------- /home/.zsh/functions/jump-target: -------------------------------------------------------------------------------- 1 | # Jump to a character in the command line 2 | () { 3 | typeset -g ZSH_JUMP_TARGET_CHOICES 4 | typeset -g ZSH_JUMP_TARGET_STYLE 5 | 6 | : ${ZSH_JUMP_TARGET_CHOICES:="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"} 7 | : ${ZSH_JUMP_TARGET_STYLE:="fg=red,bold,underline"} 8 | 9 | local orig_buffer=$BUFFER 10 | local -a orig_region_highlight 11 | orig_region_highlight=("${region_highlight[@]}") 12 | 13 | { 14 | zle -R "Char:" 15 | local char 16 | read -k char 17 | 18 | integer buffer_idx 19 | local target_choices_len=$#ZSH_JUMP_TARGET_CHOICES 20 | local target_idx=1 21 | local target_choice 22 | local -A target_to_buffer_idx 23 | local start 24 | region_highlight=() 25 | while buffer_idx=${BUFFER[(ib:buffer_idx+1:)$char]} 26 | (( buffer_idx <= $#BUFFER )) 27 | do 28 | target_choice=${ZSH_JUMP_TARGET_CHOICES[target_idx]} 29 | BUFFER[buffer_idx]=$target_choice 30 | target_to_buffer_idx[$target_choice]=$buffer_idx 31 | (( start = buffer_idx - 1 )) 32 | region_highlight+=( "$start $buffer_idx $ZSH_JUMP_TARGET_STYLE" ) 33 | (( target_idx++ )) 34 | if (( target_idx > target_choices_len )); then 35 | break 36 | fi 37 | done 38 | 39 | if (( target_idx == 1 )); then 40 | return 0 41 | fi 42 | 43 | zle -R "Target:" 44 | read -k target_choice 45 | 46 | if (( ${+target_to_buffer_idx[$target_choice]} )); then 47 | (( CURSOR = target_to_buffer_idx[$target_choice] - 1 )) 48 | fi 49 | 50 | } always { 51 | BUFFER=$orig_buffer 52 | region_highlight=("${orig_region_highlight[@]}") 53 | zle -cR '' 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /home/abs/nvchecker.ini: -------------------------------------------------------------------------------- 1 | [__config__] 2 | oldver = old_ver.txt 3 | newver = new_ver.txt 4 | 5 | [bitlbee-libpurple-unicode-channel] 6 | archpkg = bitlbee 7 | 8 | #[tmux-fullwidth-backspace] 9 | #archpkg = tmux 10 | 11 | [vte3-ng-fullwidth-emoji] 12 | url = https://api.github.com/repos/thestinger/vte-ng/branches 13 | regex = (\d+\.\d+\.\d+) 14 | user_agent = lilydjwg/nvchecker 15 | 16 | [webwxapp] 17 | url = https://wx.qq.com 18 | regex = index_(.{7})\.js 19 | -------------------------------------------------------------------------------- /home/bin/alldot: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | T=$(mktemp) 4 | trap "rm $T" 0 5 | cat > $T <<'e' 6 | #!/usr/bin/expect -- 7 | eval spawn [lrange $argv 0 end] 8 | 9 | #send "/diff --git\r" 10 | send "/--- a\/\r" 11 | 12 | interact s { 13 | exec tmux splitw -h 14 | } Q { 15 | exit 13 16 | } 17 | e 18 | 19 | t=$[$(date +%s)-24*60*60] 20 | printf '%s\0' ~/projects/dotfiles/*(/) | xargs -n1 -P8 -0i zsh -c "cd {} && (( \$(stat -c %Y .git/FETCH_HEAD) > $t )) || git fetch" 21 | 22 | for r in ~/projects/dotfiles/*(/); do 23 | echo --${r##*/}-- 24 | cd $r 25 | [[ $(git rev-parse master) != $(git rev-parse origin/master) ]] && expect $T git diff master origin/master 26 | r=$? 27 | [[ $r -eq 0 || $r -eq 13 ]] && git pull 28 | [[ $r -eq 13 ]] && exit 29 | done 30 | exit 0 31 | -------------------------------------------------------------------------------- /home/bin/allvim: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | t=$[$(date +%s)-24*60*60] 4 | printf '%s\0' ~/.vim/bundle/*(/) | xargs -n1 -P8 -0i zsh -c "cd {}; (( \$(stat -c %Y .git/FETCH_HEAD) > $t )) || git pull || echo {} error" 5 | -------------------------------------------------------------------------------- /home/bin/archpkg: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | f=~/config/arch-packages.list 3 | if [[ $1 == -h ]]; then 4 | echo "Usage: $(basename $0) [write to $f unless empty]" 5 | exit 6 | fi 7 | [[ -n $1 ]] && echo writing to $f && exec > $f 8 | echo '# native' 9 | pacman -Qen | cut -d' ' -f1 10 | echo '\n# foreign' 11 | pacman -Qem | cut -d' ' -f1 12 | -------------------------------------------------------------------------------- /home/bin/bbs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # -*- tcl -*- \ 3 | exec tclsh "$0" "$@" 4 | package require Expect 5 | 6 | trap { 7 | set rows [stty rows] 8 | set cols [stty columns] 9 | stty rows $rows columns $cols < $spawn_out(slave,name) 10 | } WINCH 11 | 12 | spawn luit -encoding gbk ssh -2 -p22 yaray@bbs.net9.org 13 | set fp [open ~/Sed/bbs] 14 | set password [read -nonewline $fp] 15 | close $fp 16 | expect { 17 | "password:" { send "$password\r"; exp_continue } 18 | -re "酸甜苦辣板|欢迎光临|上次连线时间|欢迎关注|今天夜间|本日十大衷心祝福" { send "\r"; exp_continue } 19 | "主选单" { send "f\r" } 20 | } 21 | interact { 22 | -o 23 | # menu move down 24 | #-re {\033\[\d+;28H\033\[44m } { send_user $interact_out(0,string); send_user "\010" } 25 | #-re {\033\[\d+D\010\010\033\[44m } { send_user $interact_out(0,string); send_user " "} 26 | ## menu move up 27 | #-re {\033\[\d+A\010\010 } { send_user [string range $interact_out(0,string) 0 end]; send_user "\010" } 28 | #-re {\033\[44m ◆} { send_user [string range $interact_out(0,string) 0 end-1]; send_user " "; send_user [string index $interact_out(0,string) end] } 29 | # 主选单 30 | #-re {\015\│ ◆} { send_user [string range $interact_out(0,string) 0 end-1]; send_user " "; send_user [string index $interact_out(0,string) end] } 31 | #-re {\033\[\d+;4H\033\[m } { send_user $interact_out(0,string); send_user "\010" } 32 | # 讨论区选单 33 | #-re {(\033\[K\033\[\d+;)7H} { send_user $interact_out(1,string)6H } 34 | ## 分类讨论区 35 | #-re {\033\[\d+;23H\033\[m } { send_user $interact_out(0,string); send_user "\010"} 36 | #-re {\033\[\d+;23H } { send_user $interact_out(0,string); send_user "\010"} 37 | #-re {\033\[16C\│ ◆} { send_user [string range $interact_out(0,string) 0 end-1]; send_user " "; send_user [string index $interact_out(0,string) end] } 38 | #-nobuffer "离开本BBS站" { send "\r\r" } 39 | -re {\033\[37m] 离开本BBS站} { send "\r\r" } 40 | -re {\033\[m9#BBS 竭 诚} { send "\r"; close; break } 41 | "Shared connection to bbs.net9.org closed." exit 42 | } 43 | -------------------------------------------------------------------------------- /home/bin/byzanz: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | XWININFO=$(xwininfo) 3 | read X < <(awk -F: '/Absolute upper-left X/{print $2}' <<< "$XWININFO") 4 | read Y < <(awk -F: '/Absolute upper-left Y/{print $2}' <<< "$XWININFO") 5 | read W < <(awk -F: '/Width/{print $2}' <<< "$XWININFO") 6 | read H < <(awk -F: '/Height/{print $2}' <<< "$XWININFO") 7 | byzanz-record --verbose --x=$X --y=$Y --width=$W --height=$H --duration=${1:-10} /tmp/recorded.gif 8 | -------------------------------------------------------------------------------- /home/bin/change-wallpaper: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ocaml 2 | open Printf;; 3 | 4 | Random.self_init ();; 5 | 6 | (* randomly choose a wallpaper *) 7 | let pics = Sys.readdir "/home/ray/Wallpapers" in 8 | let s = "/home/ray/Wallpapers/" ^ (Array.get pics (Random.int (Array.length pics))) in 9 | let oc = open_out "/tmp/wallpaper" in 10 | fprintf oc "wallpaper: %s\n" s; 11 | close_out oc; 12 | Sys.command ("feh --bg-scale " ^ s ^ " &") 13 | -------------------------------------------------------------------------------- /home/bin/change_backlight: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | display() { 4 | hh=$(xrandr | awk '{sub(",","",$10);print $10;exit}') 5 | h=120 6 | light=$( /sys/class/backlight/intel_backlight/brightness" 8 | dzen2 -p 1 -y $[(hh-h)/2] -h $h -fn "-*-dejavu sans-*-*-*-*-$h-*-*-*-*-*-*-*" <<< "Backlight: $( pre') 41 | outpre = e('.output > pre') 42 | assert len(inpre) == len(outpre) 43 | for inpre, outpre in zip(inpre, outpre): 44 | input = [inpre.text.rstrip()] 45 | for br in inpre: 46 | if br.tail is not None: 47 | input.append(br.tail.rstrip()) 48 | output = [outpre.text.rstrip()] 49 | for br in outpre: 50 | if br.tail is not None: 51 | output.append(br.tail.rstrip()) 52 | dump(options, case, input, output) 53 | case += 1 54 | 55 | else: 56 | data = sys.stdin.read() 57 | for line in data.splitlines(): 58 | if state == 0: 59 | if line == 'Examples': 60 | state = 1 61 | elif state == 1: 62 | if line == 'input': 63 | state = 2 64 | elif state == 2: 65 | if not line: 66 | state = 0 67 | elif line == 'output': 68 | state = 3 69 | else: 70 | input.append(line.rstrip()) 71 | else: 72 | if re.match(r'(Note|)$', line): 73 | state = 0 74 | elif line == 'input': 75 | state = 2 76 | else: 77 | output.append(line.rstrip()) 78 | if state != 3: 79 | dump(options, case, input, output) 80 | case += 1 81 | input.clear() 82 | output.clear() 83 | 84 | 85 | if __name__ == '__main__': 86 | sys.exit(main()) 87 | -------------------------------------------------------------------------------- /home/bin/contact: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # Gmail: More -> Export -> Google CSV 3 | require 'csv' 4 | 5 | pinyin_initial = {} 6 | File.open(File.expand_path '~/.vim/bundle/vim-PinyinSearch/PinyinSearch.dict') {|h| 7 | while l = h.gets 8 | fs = l.split 9 | if fs.size == 2 10 | pinyin_initial[fs[0]] = fs[1] 11 | end 12 | end 13 | } 14 | to_pinyin = ->s { 15 | s[/ /] ? '' : s.chars.map {|c| pinyin_initial.fetch c, c }.join 16 | } 17 | 18 | # Google CSV 19 | ## remove/rename columns 20 | google = CSV.read(ARGV[0] || '/tmp/google.csv', encoding: 'bom|utf-16').map {|l| l.map {|c| c and c.encode 'utf-8' } }.transpose 21 | google.reject! {|x| x[0] =~ /Prefix|Suffix|Given|Family|Type|Organization|IM/ || x[0] =~ /Address/ && x[0] !~ /Formatted/ } 22 | google.each {|x| 23 | x[0].gsub!(/(\S+) \d - Value/) { $1.gsub('-', '') } 24 | x[0].gsub! /Address.*/, 'Address' 25 | x[0].gsub! /Additional Name/, 'Alias' 26 | } 27 | google = google.transpose 28 | 29 | ## filter records with Name & Email fields 30 | email_idx = google[0].each_index.select {|i| google[0][i] =~ /Email/ } 31 | google = google.select {|x| x[0] && x.values_at(*email_idx).any? } # Name is empty 32 | google.reject! {|x| x.values_at(*email_idx).grep(/no-reply/).size > 0 } # Email: no-reply@... 33 | 34 | ## generate pinyin Alias from Name 35 | google[1..-1].each {|x| 36 | begin 37 | x[1] = to_pinyin[x[0]] 38 | rescue 39 | end 40 | } 41 | 42 | # Mutt aliases 43 | File.open(File.expand_path('~/.mutt/aliases'), 'w') {|h| 44 | google[1..-1].each {|x| 45 | email_idx.each_with_index {|i,j| 46 | h.puts "alias #{x[1]}#{j>0 ? j : ''} #{x[0]} <#{x[i]}>" if x[i] 47 | } 48 | } 49 | } 50 | 51 | # contacts.rec 52 | File.open(File.expand_path('~/.mutt/contacts.rec'), 'w') {|rec| 53 | rec.write < $tmp 4 | 5 | read -r -d '' lisp <(xclip -i) 10 | else 11 | echo cannot access $1 12 | fi 13 | -------------------------------------------------------------------------------- /home/bin/llvm-push: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | setopt local_options no_case_match 3 | branch=$(git branch --show-current) 4 | if [[ $(git log -1 --pretty=%B) =~ 'WIP' ]]; then 5 | echo wip, dont push 6 | exit 1 7 | fi 8 | 9 | git pull --rebase origin main && git commit --amend --date=now --no-edit && git push origin HEAD:main && git fetch origin main:main && git switch main || exit 1 10 | [[ $branch != main ]] && git branch -D $branch 11 | -------------------------------------------------------------------------------- /home/bin/mkreproduce: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | dry_run= 3 | if [[ $1 == --dry-run ]]; then dry_run=1; shift; fi 4 | 5 | autoload -U regexp-replace 6 | f() { 7 | for f in $1/*(ND.^x); do 8 | [[ ${f##*/} =~ '^\.|\.o$' ]] && continue 9 | ff=$f 10 | regexp-replace ff '^\./' '' 11 | if [[ -n $dry_run ]]; then 12 | echo $ff 13 | elif [[ $(wc -l < $f) == 1 ]]; then 14 | echo "echo '$(<$f)' > $ff" 15 | else 16 | if [[ ${f##*/} == Makefile ]]; then 17 | printf '%s\n' "sed 's/^ /\\t/' > $ff <<'eof'" 18 | else 19 | echo "cat > $ff <<'eof'" 20 | fi 21 | cat $f 22 | echo eof 23 | fi 24 | done 25 | for d in $1/*(ND/); do 26 | [[ $d =~ '^\.[^/]|/\.' ]] && continue 27 | echo mkdir -p $d 28 | f $d 29 | done 30 | } 31 | 32 | f ${1:-.} 33 | -------------------------------------------------------------------------------- /home/bin/mouse: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | [[ $EUID -ne 0 ]] && exec sudo "$0" "$@" 3 | 4 | f() { 5 | #for i in /sys/class/input/event*; do 6 | # name="$i/device/name" 7 | # See http://www.mattfischer.com/blog/?p=182 for robust solutions 8 | # if grep -si 'usb.*mouse' "$name"; then 9 | # : 10 | # fi 11 | #done 12 | #exit 13 | device=$(sudo systool -b usb -A product | awk -vIGNORECASE=1 -F"\n" -vRS="\n\n" '$2~/usb.*mouse/{split($1,a,"\"");print a[2]}') 14 | if [[ -n $device ]]; then 15 | echo echo "$1" '>' /sys/bus/usb/devices/$device/power/control 16 | echo "$1" > /sys/bus/usb/devices/$device/power/control 17 | fi 18 | 19 | device=$(sudo systool -b usb -A product | awk -vIGNORECASE=1 -F"\n" -vRS="\n\n" '$2~/usb.*key.oard/{split($1,a,"\"");print a[2]}') 20 | if [[ -n $device ]]; then 21 | echo echo "$1" '>' /sys/bus/usb/devices/$device/power/control 22 | echo "$1" > /sys/bus/usb/devices/$device/power/control 23 | else 24 | echo echo "$1" '>' /sys/bus/usb/devices/3-1/power/control 25 | echo "$1" > /sys/bus/usb/devices/3-1/power/control 26 | fi 27 | } 28 | 29 | case "$1" in 30 | 0|auto) 31 | f auto 32 | ;; 33 | 1|on) 34 | f on 35 | ;; 36 | esac 37 | -------------------------------------------------------------------------------- /home/bin/mutt-notmuch: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | tmpdir=/tmp/.notmuch 3 | rm -rf $tmpdir/{cur,new} 4 | mkdir -p $tmpdir/{cur,new,tmp} 5 | echo 'notmuch search terms:' 6 | read 7 | notmuch search --output=files "$REPLY" . | awk 'NR<=50;NR==50{system("notify-send -i ~/Icons/gmail.png Mail \"Too many results\"")}' | xargs -r ln -sft $tmpdir/cur 8 | -------------------------------------------------------------------------------- /home/bin/notify-server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import json, socket, subprocess, threading, traceback 3 | 4 | def client(clisock): 5 | # assume it fits in a single packet 6 | data = clisock.recv(4096).decode() 7 | if data[0] == '{': 8 | data = json.loads(data) 9 | title, body = data['title'], data['body'] 10 | else: 11 | data = data.split(' ', 1) 12 | if len(data) == 1: 13 | title, body = '', data 14 | else: 15 | title, body = data 16 | # for Python 3.4 17 | subprocess.call(['notify-send', '-a', title, '--', body]) 18 | 19 | sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) 20 | sock.bind(('127.0.0.1', 9010)) 21 | sock.listen(5) 22 | while 1: 23 | clisock, _ = sock.accept() 24 | thr = threading.Thread(target=client, args=(clisock,), daemon=True) 25 | thr.start() 26 | -------------------------------------------------------------------------------- /home/bin/ptpb: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | if (($# != 1)); then 4 | exit 1 5 | fi 6 | url= 7 | curl -sSF c=@- https://ptpb.pw/ < $1 | while read line; do 8 | print -u 2 -- $line 9 | a=($=line) 10 | if [[ $a[1] == url: ]]; then 11 | url=$a[2] 12 | if [[ $1 =~ '\w+\.(\w+)' ]]; then 13 | suffix=$match[1] 14 | declare -A a 15 | a[c]=/c 16 | a[cc]=/cpp 17 | a[el]=/elisp 18 | a[hs]=/haskell 19 | a[py]=/python 20 | a[rb]=/ruby 21 | a[sh]=/zsh 22 | a[gif]=.gif 23 | a[jpg]=.jpg 24 | a[png]=.png 25 | ((${+a[$suffix]})) && url=$url$a[$suffix] 26 | fi 27 | fi 28 | done 29 | print -- $url 30 | xclip -i <<< $url 31 | -------------------------------------------------------------------------------- /home/bin/rofi-file-browser: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | f=$2 3 | prev=/tmp/.rofi-file-browser 4 | n=5000 5 | 6 | my_find() { 7 | if [[ -n ${commands[bfs]} ]]; then 8 | bfs -mindepth 1 -printf '%P\n' | head -n $n 9 | else 10 | find -mindepth 1 -printf '%P\n' | head -n $n 11 | fi 12 | } 13 | 14 | if [[ -z $f ]]; then 15 | rm -f $prev 16 | cd $1 17 | echo .. 18 | [[ $PWD != /tmp* ]] && echo /tmp 19 | my_find 20 | else 21 | if [[ -f $prev ]]; then 22 | cd $(<$prev) 23 | else 24 | cd $1 25 | fi 26 | if [[ -d $f ]]; then 27 | cd $f 28 | print -r -- $PWD > $prev 29 | echo .. 30 | [[ $PWD != /tmp* ]] && echo /tmp 31 | my_find 32 | else 33 | rm -f $prev 34 | coproc xdg-open $f 35 | disown 36 | fi 37 | fi 38 | -------------------------------------------------------------------------------- /home/bin/ror: -------------------------------------------------------------------------------- 1 | #!/bin/zsh -e 2 | sudo systemctl start readonly-root 3 | pid=$(systemctl show readonly-root --property ExecMainPID | grep -Po '\d+') 4 | if [[ -n $TMUX && ( -d "$d$PWD" || $PWD =~ /tmp/* ) ]]; then 5 | (sleep 0.2; tmux send "cd ${(q)PWD}" Enter) & 6 | fi 7 | (($#)) || set -- su $USER 8 | sudo HOST=read-only-rootfs-with-shares HOME=$HOME nsenter -t $pid -m "$@" 9 | -------------------------------------------------------------------------------- /home/bin/ror-bindfs: -------------------------------------------------------------------------------- 1 | #!/bin/zsh -e 2 | d=/tmp/roroot 3 | bind=(/dev /proc /tmp ~/.history ~/.local/share) 4 | 5 | CYAN='\e[1;36m' 6 | RST='\e[0m' 7 | 8 | cyan() { 9 | echo "$CYAN$*$RST" 10 | } 11 | 12 | hostname=read-only-rootfs-with-shares 13 | 14 | while getopts d opt; do 15 | case $opt in 16 | d) 17 | read -r "delete?umount -R $d? (y/n) " 18 | if [[ $delete == y ]]; then 19 | sudo umount -R $d 20 | rmdir $d 21 | echo Unmounted 22 | fi 23 | exit 24 | ;; 25 | \?) 26 | exit 1 27 | ;; 28 | esac 29 | done 30 | 31 | if ! mountpoint -q $d; then 32 | mkdir -p $d 33 | bindfs -r / $d 34 | cyan "/ bind read-only to $d" 35 | for i in "${bind[@]}"; do 36 | sudo mount --rbind $i $d/$i 37 | done 38 | fi 39 | #sudo HOST=$hostname HOME=/home/$user chroot --userspec $user: "$d" /bin/zsh -c 'export HOST=read-only; zsh #cd /tmp && tmux -L roroot a -t roroot || tmux -L roroot new -s roroot' 40 | if [[ -n $TMUX && ( -d "$d$PWD" || $PWD =~ /tmp/* ) ]]; then 41 | (sleep 0.2; tmux send "cd ${(q)PWD}" Enter) & 42 | fi 43 | sudo HOST=$hostname HOME=$HOME chroot --userspec $USER: $d /bin/zsh -i 44 | -------------------------------------------------------------------------------- /home/bin/rrr: -------------------------------------------------------------------------------- 1 | #!/usr/bin/expect -f 2 | set timeout 120 3 | spawn rr replay -d cgdb {*}$argv 4 | expect { 5 | "Type " {send "\r"; exp_continue} 6 | "(rr)" {send "b main\r"} 7 | } 8 | expect "(rr)" {send "c\r"} 9 | interact 10 | -------------------------------------------------------------------------------- /home/bin/sec: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | archive=~/Sed/sed.zip 4 | dir=/tmp/sed 5 | 6 | while getopts h opt; do 7 | case $opt in 8 | d) delete=1;; 9 | h) change=1;; 10 | esac 11 | done 12 | shift $[$OPTIND-1] 13 | 14 | case $1 in 15 | e) 16 | [[ -d $dir ]] || mkdir $dir 17 | echo 'Enter encryption password' 18 | while :; do 19 | read -rs 'pass?Password: ' 20 | if [[ -f $archive ]] && unzip -P $pass -t $archive |& grep -qm1 'incorrect password'; then 21 | if [[ -n $change && -d $dir ]]; then 22 | echo Change password 23 | fi 24 | echo 'Incorrect password' >&2 25 | continue 26 | fi 27 | break 28 | done 29 | tmp=$(mktemp -u) 30 | if (cd $dir && find . | zip -@ -P $pass $tmp) && mv $tmp $archive; then 31 | [[ -n $delete ]] && rm -r $dir 32 | fi 33 | : 34 | ;; 35 | d) 36 | [[ -d $dir ]] || mkdir $dir 37 | read -rs 'pass?Password: ' 38 | unzip -P $pass $archive -d $dir && chmod 700 $dir 39 | ;; 40 | r) 41 | rm -r $dir 42 | ;; 43 | *) 44 | cat <&-; exit' INT TERM 5 | 6 | agenda() { 7 | script=$(cat </dev/null 21 | } 22 | 23 | old= 24 | pid= 25 | while :; do 26 | width=$(xrandr -q | awk 'NR==1{print $8}') 27 | # tasks=(${(f)"$(task taskbar | sed -n '4,/^$/{/^$/!p}')"}) 28 | tasks=(${(f)"$(agenda | awk -vFPAT='([^,]*)|(\"[^\"]+\")' 'NR>1 && $4=="TODO"{s=$6; if($7){sub("\\.{6}","",$7); s=s" "$7} if($1)print s" "$2; }')"}) 29 | if [[ $tasks != $old ]]; then 30 | echo new 31 | [[ -n $pid ]] && kill $pid 32 | dzen2 -p -ta l -x 160 -w $[width/2-160] -h 32 -fg '#a8a3f7' -fn 'WenQuanYi Micro Hei Mono-18' -l $[${#tasks[@]}-1] <<< ${(F)tasks} & 33 | pid=$! 34 | old=("${tasks[@]}") 35 | fi 36 | 37 | # 'sleep 300' does not work because zsh will count the number of SIGTERM rather than trigger the handler immediately 38 | sleep 300 & 39 | wait $! 40 | done 41 | -------------------------------------------------------------------------------- /home/bin/timein: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | ### Usage 3 | # timein Shanghai 4 | # timein hang 5 | # timein berl 6 | # 7 | 8 | d=/usr/share/zoneinfo 9 | 10 | if [[ $# -eq 0 ]]; then 11 | [[ $(realpath /etc/localtime) =~ [^/]+/[^/]+$ ]] || exit 1 12 | tz=$MATCH 13 | elif [[ $1 = l || $1 = list ]]; then 14 | cd $d 15 | find . -type f -print | cut -c3- 16 | exit 0 17 | fi 18 | 19 | matches=($(find $d -name right -prune -or -ipath \*$1\* -type f -print)) 20 | cnt=${#matches} 21 | if ((cnt>0)); then 22 | if ((cnt<=10)); then 23 | matches=($(xargs -n1 <<< $matches | sed "s,$d/,,")) 24 | maxl=0 25 | for i in $matches; do 26 | if ((${#i} > maxl)); then 27 | maxl=${#i} 28 | fi 29 | done 30 | if ((200)); then 37 | tput cuf $c 38 | fi 39 | TZ=$i date +'%F %T %Z (%z)' 40 | done 41 | else 42 | echo Too many matches for \"$1\" >&2 43 | echo "Use 'list' to see all known regions and time zones" >&2 44 | exit 2 45 | fi 46 | else 47 | echo No match for \"$1\" >&2 48 | exit 1 49 | fi 50 | -------------------------------------------------------------------------------- /home/bin/tmuxwords.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'optparse' 4 | require 'set' 5 | 6 | opts = { :panes => :visible } 7 | op = OptionParser.new do |o| 8 | o.banner = "usage: #{$0} [OPTIONS]" 9 | o.separator '' 10 | o.on('-A', '--all', 'All panes') { |v| opts[:panes] = :all } 11 | o.on('-a', '--all-but-current', 12 | 'All panes but the active one') { |v| opts[:panes] = :others } 13 | o.on('-s NUM', '--scroll NUM', 'Scroll back') { |v| opts[:scroll] = v } 14 | o.on('-p STR', '--prefix STR', 'Prefix') { |v| opts[:prefix] = v } 15 | o.on('-m NUM', '--min NUM', 'Minimum length') { |v| opts[:min] = v.to_i } 16 | o.separator '' 17 | o.on('-h', '--help', 'Show this message') { puts o; exit } 18 | o.separator '' 19 | end 20 | 21 | begin 22 | op.parse! 23 | rescue OptionParser::InvalidOption => x 24 | $stderr.puts x 25 | $stderr.puts op 26 | exit 1 27 | end 28 | 29 | def list_panes cond 30 | fmt = '#{window_active}#{pane_active} #{pane_id}' 31 | `tmux list-panes -a -F '#{fmt}'`.split($/).map { |e| e.split }.select { |pair| 32 | status = pair.first 33 | case cond 34 | when :all then true 35 | when :visible then status =~ /^1/ 36 | when :others then status !~ /^11/ 37 | end 38 | }.map { |pair| pair.last } 39 | end 40 | 41 | system "tmux capture-pane -p &> /dev/null" 42 | if $?.exitstatus == 0 43 | def capture_pane pane_id, scroll 44 | `tmux capture-pane #{"-S -#{scroll}" if scroll} -t #{pane_id} -p` 45 | end 46 | else 47 | def capture_pane pane_id, scroll 48 | `tmux capture-pane #{"-S -#{scroll}" if scroll} -t #{pane_id} && 49 | tmux show-buffer && tmux delete-buffer` 50 | end 51 | end 52 | 53 | def tokenize str, prefix, min 54 | set = Set.new 55 | set.merge(chunks = str.split(/\s+/)) 56 | set.merge(strip_chunks = chunks.map { |t| t.gsub(/^\W+|\W+$/, '') }) 57 | set.merge(lines = str.split($/).map { |e| e.strip }) 58 | set.merge(words = str.gsub(/\W/, ' ').split(/\s+/)) 59 | 60 | prefix &&= /^#{Regexp.escape prefix}/ 61 | case 62 | when prefix && min 63 | set.select { |t| t =~ prefix && t.length >= min } 64 | when prefix 65 | set.select { |t| t =~ prefix } 66 | when min 67 | set.select { |t| t.length >= min } 68 | else 69 | set 70 | end 71 | rescue 72 | [] 73 | end 74 | 75 | list_panes(opts[:panes]).inject(Set.new) { |set, pane_id| 76 | tokens = tokenize(capture_pane(pane_id, opts[:scroll]), 77 | opts[:prefix], opts[:min]) 78 | set.merge tokens 79 | }.each do |token| 80 | puts token 81 | end 82 | 83 | -------------------------------------------------------------------------------- /home/bin/toggle-invert: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | if pgrep -f 'compton --glx-no-stencil'; then 3 | pkill picom 4 | picom & 5 | else 6 | pkill picom 7 | picom --glx-no-stencil --invert-color-include r:e:browser --invert-color-include 'g:p:IDA|idaq|Wps|Wpp|libreoffice|GoldenDict|com-mathworks-util-PostVMInit|Skype|Telegram|Zeal' & 8 | fi 9 | -------------------------------------------------------------------------------- /home/bin/topcoder-data-parser.hs: -------------------------------------------------------------------------------- 1 | import Control.Arrow 2 | import Control.Monad.State 3 | import Control.Monad.Writer 4 | import Data.Char 5 | import System.Environment 6 | import System.FilePath 7 | import System.IO 8 | import Text.Regex 9 | import Text.Regex.Posix 10 | 11 | data Element = EInt Integer | EDouble Double | EStr String | EStack [Element] deriving Show 12 | 13 | type EZipper = (Element, [Element]) 14 | 15 | parse :: String -> Element 16 | parse s = reverseEStack $ fst $ evalState (parseHelper (EStack [], [])) s 17 | where reverseEStack (EStack xs) = EStack $ reverse $ map reverseEStack xs 18 | reverseEStack (EStr s) = EStr $ reverse s 19 | reverseEStack x = x 20 | 21 | showElement :: Element -> String 22 | showElement (EStack xs) = execWriter $ mapM_ traverse xs 23 | where traverse (EInt x) = tell $ show x ++ "\n" 24 | traverse (EDouble x) = tell $ show x ++ "\n" 25 | traverse (EStack xs) = tell (show (length xs) ++ "\n") >> mapM_ traverse xs 26 | traverse x = tell $ show x ++ "\n" 27 | 28 | parseHelper :: EZipper -> State String EZipper 29 | parseHelper z = do 30 | s <- get 31 | if null s 32 | then return z 33 | else 34 | do 35 | let (c:s') = s; (EStack xs, bs) = z 36 | modify (const s') 37 | case c of 38 | '"' -> let (s1, _:s2) = span (/='"') s' 39 | in modify (const s2) >> parseHelper (EStack $ EStr s1:xs, bs) 40 | ch | elem ch "-.0123456789" -> let (s1, s2) = span (`elem` "-.0123456789") s 41 | in modify (const s2) >> parseHelper (EStack $ (if elem '.' s1 then EDouble (read s1) else EInt (read s1)):xs, bs) 42 | '{' -> parseHelper (EStack [], EStack xs:bs) 43 | '}' -> let (EStack b:bs') = bs in parseHelper (EStack $ EStack xs:b, bs') 44 | _ -> parseHelper z 45 | where 46 | 47 | parseWeb :: String -> FilePath -> StateT (String, String) IO () 48 | parseWeb ls path = 49 | forM_ (map (dropWhile isSpace) (lines ls)) 50 | (\l -> do 51 | (idx, contents) <- get 52 | let s = l =~ "^[0-9]+\\)" :: String 53 | if not $ null s 54 | then do 55 | put (init $ l =~ "[0-9]+\\)", contents) 56 | else 57 | let match = l =~ "Returns: .*" :: String 58 | in if not $ null match 59 | then do 60 | put ("", "") 61 | lift $ withFile (path <.> idx <.> "in") WriteMode $ flip hPutStr (showElement . parse $ contents) 62 | lift $ withFile (path <.> idx <.> "out") WriteMode $ flip hPutStr (showElement . parse . drop 9 $ match) 63 | else 64 | when (not $ null idx) $ modify (second $ (++(l++","))) 65 | ) 66 | 67 | parseStatistics :: String -> FilePath -> IO () 68 | parseStatistics contents path = 69 | forM_ (zip [0..] (lines contents)) 70 | (\(idx, l) -> do 71 | let parts = filter (not . null) $ splitRegex (mkRegex "\t") l 72 | when (length parts == 3) $ do 73 | withFile (path <.> show idx <.> "in") WriteMode $ flip hPutStr (showElement . parse $ parts!!0) 74 | withFile (path <.> show idx <.> "out") WriteMode $ flip hPutStr (showElement . parse $ parts!!1) 75 | ) 76 | 77 | main = do 78 | args <- getArgs 79 | if null args 80 | then hPutStr stderr "usage: " 81 | else do 82 | classname <- fmap head getArgs 83 | contents <- getContents 84 | if contents =~ "^[0-9]+\\)" 85 | then evalStateT (parseWeb contents $ "/tmp" classname) ("", "") 86 | else parseStatistics contents $ "/tmp" classname 87 | -------------------------------------------------------------------------------- /home/bin/update-writefull: -------------------------------------------------------------------------------- 1 | #!/bin/zsh -e 2 | cd /tmp/Downloads || cd /tmp 3 | 7z x -aoa writefull_*.deb(on[-1]) data.tar 4 | rm -rf writefull 5 | mkdir writefull 6 | tar xf data.tar -Cwritefull 7 | rsync -a --delete writefull/usr/local/writefull/ ~/.local/opt/writefull/ 8 | -------------------------------------------------------------------------------- /home/bin/usaco: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$1" = "-r" ]; then 4 | sed '/\/\*/,/\*\//d;/^freopen/d' 5 | exit 6 | fi 7 | 8 | if [ -z $1 ]; then 9 | cat <([^<]+)', line) 30 | if m: 31 | text = m.group(1) 32 | m = re.search(r'([^<]+)', line) 33 | if m: 34 | text += ': '+m.group(1) 35 | while text: 36 | args.extend(['-draw', 'text {},{} "{}"'.format(100, 220+i*36, text[:LEN])]) 37 | i += 1 38 | text = text[LEN:] 39 | if not text: break 40 | text = ' '+text 41 | 42 | top, bottom = 180, 220+i*36 43 | left, right = 80, 1840 44 | 45 | img = Image.open(source).convert('RGB') 46 | width, height = img.size 47 | img = img.resize((1920, round(height/width*1920))) 48 | luminance, cnt = 0, 0 49 | for x in range(left, right): 50 | for y in range(top, bottom): 51 | r, g, b = img.getpixel((x, y)) 52 | luminance += 0.299*r + 0.587*g + 0.114*b 53 | cnt += 1 54 | luminance /= cnt 55 | 56 | command = ['convert', source, '-resize', '1920x', '-pointsize', '24'] 57 | command += ['-font', 'Source-Code-Pro'] 58 | if luminance > 128: 59 | command += ['-fill', 'white'] 60 | else: 61 | command += ['-fill', 'black'] 62 | command += ['-draw', 'fill-opacity 0.8 roundrectangle {},{} {},{} 10,10'.format(left, top, right, bottom)] 63 | if luminance > 128: 64 | command += ['-fill', 'black'] 65 | else: 66 | command += ['-fill', 'white'] 67 | command += args 68 | command += [WALLPAPER] 69 | 70 | print(luminance) 71 | subprocess.run(command) 72 | if len(sys.argv) > 1: 73 | subprocess.run(['feh', '--bg-scale', WALLPAPER]) 74 | 75 | main() 76 | -------------------------------------------------------------------------------- /home/bin/winprop: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Script to print common window properties in ManageHook format, 3 | # via xprop. All xprop options may be used, although anything other 4 | # than -display, -id, and -name is probably a bad idea. 5 | # 6 | # Written and placed into the public domain by Brandon S Allbery 7 | # KF8NH 8 | # 9 | 10 | exec xprop -notype \ 11 | -f WM_NAME 8s ':\n title =\? $0\n' \ 12 | -f WM_CLASS 8s ':\n appName =\? $0\n className =\? $1\n' \ 13 | -f WM_WINDOW_ROLE 8s ':\n stringProperty "WM_WINDOW_ROLE" =\? $0\n' \ 14 | WM_NAME WM_CLASS WM_WINDOW_ROLE \ 15 | ${1+"$@"} 16 | -------------------------------------------------------------------------------- /home/bin/wman: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaskRay/Config/67d2cdf21c50798afa6da19b070ee18352ec56ac/home/bin/wman -------------------------------------------------------------------------------- /install-utils.zsh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh -e 2 | 3 | typeset -A ubuntu_pkg 4 | ubuntu_pkg[pcre]=libpcre3-dev 5 | ubuntu_pkg[zlib]=libz-dev 6 | ubuntu_pkg[readline]=libreadline-dev 7 | ubuntu_pkg[ncurses]=ncurses-dev 8 | ubuntu_pkg[sqlite]=libsqlite3-dev 9 | ubuntu_pkg[uuid]=uuid-dev 10 | 11 | # versions 12 | 13 | # prepare 14 | 15 | DOWNLOAD=/tmp 16 | SRC=~/.local/src 17 | 18 | mkdir -p $DOWNLOAD 19 | mkdir -p $SRC 20 | cd $SRC 21 | 22 | # zsh config 23 | 24 | setopt extended_glob # expand *(xx) 25 | setopt equals # expand =program 26 | setopt magic_equal_subst # expand xx=~yy 27 | 28 | # functions 29 | 30 | info() { 31 | echo "\e[1;34m++++ $*\e[m" 32 | } 33 | 34 | error() { 35 | echo "\e[1;31m!!! $*\e[m" 36 | exit 1 37 | } 38 | 39 | bin() { 40 | [[ -n ${commands[$1]} ]] 41 | } 42 | 43 | # prepend PATH 44 | 45 | [[ $PATH =~ ~/.local/bin ]] && PATH=~/.local/bin:$PATH 46 | 47 | # download 48 | 49 | clone() { 50 | [[ -d $2 ]] || git clone $1 $2 51 | } 52 | 53 | clone https://github.com/syl20bnr/spacemacs ~/.emacs.d 54 | 55 | mkdir -p ~/Dev/Bin 56 | clone https://github.com/hugsy/gef ~/Dev/Bin/gef 57 | clone https://github.com/zachriggle/pwndbg ~/Dev/Bin/pwndbg 58 | clone https://github.com/Gallopsled/pwntools ~/Dev/Bin/pwntools 59 | 60 | # install 61 | 62 | install_system_pkgs() { 63 | info apt-get install ${(v)ubuntu_pkg} 64 | read 65 | } 66 | 67 | install_haskell() { 68 | # stack 69 | curl -sSL https://get.haskellstack.org/ | sh 70 | 71 | # structred-haskell-mode 72 | stack install structured-haskell-mode 73 | 74 | # intero 75 | # git clone https://github.com/commercialhaskell/intero 76 | # cd intero && stack build && stack install 77 | } 78 | 79 | preexec() { 80 | echo "\e[1;33m== $2\e[m" 81 | } 82 | 83 | ((${1+1})) && "$@" 84 | 85 | #install_stack 86 | #install_system_pkgs 87 | --------------------------------------------------------------------------------