Skip to content

xatier/rc-files

Repository files navigation

my rcfiles

Usage

Clone the repo and put the config files to proper locations.

git clone [email protected]:xatier/rc-files.git
cp rc-files/xxx ~/.xxx

License(s)

All codes are under their own license(s) from the original projects.

Other codes written by myself are under GPL.

Config files

bashrc, bash_profile, and inputrc

My settings and aliases for bash and readline.

bin

My collections of little programs

vpngate and v.sh

  • VPN scripts

  • requirements

pacman -S perl perl-libwww openvpn shadowsocks chromium openconnect

srandr

Simple xrandr

A dirty script to manage my notebook's screen output using xrandr.

Original script is from @PkmX

Usage: srandr [lvds|vga|lvds-vga|vga-lvds|mirror|debug]

  • or like this => srandr[l|v|lv|vl|m]

conky.conf

Conky configuration (~/.config/conky/conky.conf).

emacs & prelude-modules.el

Emacs stuff, probably outdated, didn't use emacs for a while.

gdbinit

GDB debugger settings

gitconfig, gitattributes, and gitmessage

Global git config

Global git attributes config

Global commit.template

hammerspoon

Hammerspoon config ~/.hammerspoon/init.lua.

Try to port some of my AwesomeWM config (rc.lua) stuff to macOS. Totally a game changer for my Macs!

mpv

MPV Media player (~/.config/mpv/mpv.conf)

python

PYTHONSTARTUP is set to $HOME/.pythonrc.py in bashrc.

ipython profile create to create default ipython config.

Put ipython_config.py under ~/.ipython/profile_default/.

See pip for user pip setup.

ranger

ranger file manager

rc.lua

Configuration file for the awesome wm

  • awesome 4.3

  • disable some layouts

  • use vim and urxvt as editor and terminal (with urxvt daemon)

  • add some widgets

    • network usage
    • text clock
    • CPU usage
    • memory usage
    • and so on ...
  • Installation

    • vicious widgets

      pacman -S vicious
    • pick up a great wallpaper

      beautiful.wallpaper = "/home/xatierlike/Pictures/something.jpg"
    • urxvt terminal emulator

      pacman -S rxvt-unicode urxvt-perl
      • add urxvtd -q -o -f to .xinitrc
    • check battery name in vicious.register(batwidget, vicious.widgets.bat, '$2% $3[$1]', 2, 'BAT1')

      To get the battery name (BAT0 or BAT1 for example)

      ls /sys/class/power_supply/
    • shutter-project

      pacman -S shutter

ripgrep

ripgrep configurations (~/.config/ripgrep/rc)

Ref: GUIDE.md

screenrc

Screen settings, didn't use screen for a long long while.

tmux.conf

  • use Ctrl-b for prefix key
  • vi-like key bindings
  • use Shift + <-/-> to switch windows

Vimium

Vimium The hacker's browser.

Custom key mappings

defaultKeyMappings can be found here.

map b Vomnibar.activateInNewTab
map o Vomnibar.activateInNewTab
map t Vomnibar.activateTabSelection

Custom search engines

Use the script to import search engine from Edge.

anime: https://ani.gamer.com.tw/search.php?kw=%s  ani.gamer.com.tw
aur: https://aur.archlinux.org/packages/?O=0&K=%s  aur.archlinux.org
ccc: https://camelcamelcamel.com/search?sq=%s  camelcamelcamel.com
code: https://cs.github.com?q=%s  GitHub
ddg: https://duckduckgo.com/?q=%s&kg=p&kp=-2&kl=tw-tzh&k1=-1&kz=1&kc=1&kav=1&kn=1&kh=1&kg=p  DuckDuckGo
dmhy: http://share.dmhy.org/topics/list?keyword=%s  动漫花园
doc: https://devdocs.io/#q=%s  DevDocs
docs: https://devdocs.io/#q=%s  DevDocs
e: https://www.ecosia.org/search?q=%s&addon=opensearch  Ecosia
emoji: https://emojipedia.org/search/?q=%s&utm_source=opensearch  Emojipedia
g: https://www.google.com/search?hl=zh-TW&lr=lang_en%7Clang_zh-TW%7Clang_ja&q=%s  Google(en)
github: https://github.com/search?q=%s&ref=opensearch  GitHub
lex: https://www.lexico.com/search?utf8=%E2%9C%93&filter=noad&dictionary=en&s=t&query=%s  lexico.com
man: https://man.archlinux.org/search?q=%s&go=Go  man.archlinux.org
pacman: https://archlinux.org/packages/?q=%s  Arch
q: https://www.qwant.com/?r=US&sr=en&l=en_gb&h=0&s=0&a=1&b=1&vt=1&hc=0&smartNews=1&theme=0&i=1&q=%s  Qwant
tw: https://itaigi.tw/k/%s  itaigi.tw
twitter: https://twitter.com/search?q=%s  Twitter
w: https://<whoogle>/search?q=%s  Whoogle
wolf: https://www.wolframalpha.com/input/?i=%s  Wolfram|Alpha
youtube: https://www.youtube.com/results?search_query=%s&page=&utm_source=opensearch  YouTube

vimrc

My vimrc, simple stuff

Suggest installing fzf and ale.

pacman -S fzf

mkdir -p ~/.vim/pack/git-plugins/start
git clone --depth 1 https://github.com/dense-analysis/ale.git ~/.vim/pack/git-plugins/start/ale

VS Code

  • Recommend installing visual-studio-code-bin from AUR (Microsoft-branded release)
  • settings locations
# Linux
~/.config/Code/User/settings.json

# Mac
~/Library/Application\ Support/Code\ -\ Insiders/User/settings.json

# Linux remote
~/.vscode-server-insiders/data/Machine/settings.json
  • list installed extensions
  • install extensions
code --install-extension <extension ID>

xinitrc

  • HIME for input method

  • xmodmap to swap Capslock and Ctrl

  • launch some applications

  • launch the awesome wm and keep logs

xmodmap

Swap CapsLock and Control\_L

Usage: xmodmap ~/.xmodmap

  • or run bin/swapcaps

Xresources

rxvt-unicode configurations

yamllint

yamllint configurations (~/.config/yamllint/config)