all repos — dotfiles @ 9308f49dcbd0400f4fd0185b65dd729c3e372292

my *nix dotfiles

Add new shit

Signed-off-by: Anirudh Oppiliappan <x@icyphox.sh>
Anirudh Oppiliappan x@icyphox.sh
Sun, 19 Apr 2020 17:41:31 +0530
commit

9308f49dcbd0400f4fd0185b65dd729c3e372292

parent

a80c133d3c0d8e121b3ca1c04dfdddc0751c401e

D 2bwm/config.h

@@ -1,230 +0,0 @@

-///---User configurable stuff---/// - -///---Modifiers---/// -#define MOD XCB_MOD_MASK_4 /* Super/Windows key or check xmodmap(1) with -pm defined in /usr/include/xcb/xproto.h */ - -///--Speed---/// -/* Move this many pixels when moving or resizing with keyboard unless the window has hints saying otherwise. - *0)move step slow 1)move step fast - *2)mouse slow 3)mouse fast */ -static const uint16_t movements[] = { - 20, - 100, - 15, - 400 -}; - -/* resize by line like in mcwm -- jmbi */ -static const bool resize_by_line = false; - -/* the ratio used when resizing and keeping the aspect */ -static const float resize_keep_aspect_ratio= 1.03; - -///---Offsets---/// -/*0)offsetx 1)offsety - *2)maxwidth 3)maxheight */ -static const uint8_t offsets[] = {0,0,0,0}; - -///---Colors---/// -/*0)focuscol 1)unfocuscol - *2)fixedcol 3)unkilcol - *4)fixedunkilcol 5)outerbordercol - *6)emptycol */ -static const char *colors[] = { - "#35586c", - "#333333", - "#7a8c5c", - "#ff6666", - "#cc9933", - "#0d131a", - "#FAFAFA" -}; - -/* if this is set to true the inner border and outer borders colors will be swapped */ -static const bool inverted_colors = true; - -///---Cursor---/// -/* default position of the cursor: - * correct values are: - * TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, MIDDLE - * All these are relative to the current window. */ -#define CURSOR_POSITION MIDDLE - -///---Borders---/// -/*0) Outer border size. If you put this negative it will be a square. - *1) Full borderwidth 2) Magnet border size - *3) Resize border size */ -static const uint8_t borders[] = { - 0, - 0, - 5, - 4 -}; - -/* Windows that won't have a border. - * It uses substring comparison with what is found in the WM_NAME - * attribute of the window. You can test this using `xprop WM_NAME` - */ -#define LOOK_INTO "WM_NAME" -static const char *ignore_names[] = {"bar", "xclock"}; - -///--Menus and Programs---/// -static const char *terminal[] = {"st", NULL}; -static const char *dmenu[] = {"dmenu_run", NULL}; - -///--Custom foo---/// -static void halfandcentered(const Arg *arg) -{ - Arg arg2 = {.i=TWOBWM_MAXHALF_VERTICAL_LEFT}; - maxhalf(&arg2); - Arg arg3 = {.i=TWOBWM_TELEPORT_CENTER}; - teleport(&arg3); -} - - -///---Shortcuts---/// -/* Check /usr/include/X11/keysymdef.h for the list of all keys - * 0x000000 is for no modkey - * If you are having trouble finding the right keycode use the `xev` to get it - * For example: - * KeyRelease event, serial 40, synthetic NO, window 0x1e00001, - * root 0x98, subw 0x0, time 211120530, (128,73), root:(855,214), - * state 0x10, keycode 171 (keysym 0x1008ff17, XF86AudioNext), same_screen YES, - * XLookupString gives 0 bytes: - * XFilterEvent returns: False - * - * The keycode here is keysym 0x1008ff17, so use 0x1008ff17 - * - * - * For AZERTY keyboards XK_1...0 should be replaced by : - * DESKTOPCHANGE( XK_ampersand, 0) - * DESKTOPCHANGE( XK_eacute, 1) - * DESKTOPCHANGE( XK_quotedbl, 2) - * DESKTOPCHANGE( XK_apostrophe, 3) - * DESKTOPCHANGE( XK_parenleft, 4) - * DESKTOPCHANGE( XK_minus, 5) - * DESKTOPCHANGE( XK_egrave, 6) - * DESKTOPCHANGE( XK_underscore, 7) - * DESKTOPCHANGE( XK_ccedilla, 8) - * DESKTOPCHANGE( XK_agrave, 9)* - */ -#define DESKTOPCHANGE(K,N) \ -{ MOD , K, changeworkspace, {.i=N}}, \ -{ MOD |SHIFT, K, sendtoworkspace, {.i=N}}, -static key keys[] = { - /* modifier key function argument */ - // Focus to next/previous window - { ALT, XK_Tab, focusnext, {.i=TWOBWM_FOCUS_NEXT}}, - { ALT |SHIFT, XK_Tab, focusnext, {.i=TWOBWM_FOCUS_PREVIOUS}}, - // Kill a window - { MOD | SHIFT, XK_q, deletewin, {}}, - // Resize a window - { MOD |SHIFT, XK_k, resizestep, {.i=TWOBWM_RESIZE_UP}}, - { MOD |SHIFT, XK_j, resizestep, {.i=TWOBWM_RESIZE_DOWN}}, - { MOD |SHIFT, XK_l, resizestep, {.i=TWOBWM_RESIZE_RIGHT}}, - { MOD |SHIFT, XK_h, resizestep, {.i=TWOBWM_RESIZE_LEFT}}, - // Resize a window slower - { MOD |SHIFT|CONTROL,XK_k, resizestep, {.i=TWOBWM_RESIZE_UP_SLOW}}, - { MOD |SHIFT|CONTROL,XK_j, resizestep, {.i=TWOBWM_RESIZE_DOWN_SLOW}}, - { MOD |SHIFT|CONTROL,XK_l, resizestep, {.i=TWOBWM_RESIZE_RIGHT_SLOW}}, - { MOD |SHIFT|CONTROL,XK_h, resizestep, {.i=TWOBWM_RESIZE_LEFT_SLOW}}, - // Move a window - { MOD , XK_k, movestep, {.i=TWOBWM_MOVE_UP}}, - { MOD , XK_j, movestep, {.i=TWOBWM_MOVE_DOWN}}, - { MOD , XK_l, movestep, {.i=TWOBWM_MOVE_RIGHT}}, - { MOD , XK_h, movestep, {.i=TWOBWM_MOVE_LEFT}}, - // Move a window slower - { MOD |CONTROL, XK_k, movestep, {.i=TWOBWM_MOVE_UP_SLOW}}, - { MOD |CONTROL, XK_j, movestep, {.i=TWOBWM_MOVE_DOWN_SLOW}}, - { MOD |CONTROL, XK_l, movestep, {.i=TWOBWM_MOVE_RIGHT_SLOW}}, - { MOD |CONTROL, XK_h, movestep, {.i=TWOBWM_MOVE_LEFT_SLOW}}, - // Teleport the window to an area of the screen. - // Center: - { MOD , XK_g, teleport, {.i=TWOBWM_TELEPORT_CENTER}}, - // Center y: - { MOD |SHIFT, XK_g, teleport, {.i=TWOBWM_TELEPORT_CENTER_Y}}, - // Center x: - { MOD |CONTROL, XK_g, teleport, {.i=TWOBWM_TELEPORT_CENTER_X}}, - // Top left: - { MOD , XK_y, teleport, {.i=TWOBWM_TELEPORT_TOP_LEFT}}, - // Top right: - { MOD , XK_u, teleport, {.i=TWOBWM_TELEPORT_TOP_RIGHT}}, - // Bottom left: - { MOD , XK_b, teleport, {.i=TWOBWM_TELEPORT_BOTTOM_LEFT}}, - // Bottom right: - { MOD , XK_n, teleport, {.i=TWOBWM_TELEPORT_BOTTOM_RIGHT}}, - // Resize while keeping the window aspect - { MOD , XK_Home, resizestep_aspect, {.i=TWOBWM_RESIZE_KEEP_ASPECT_GROW}}, - { MOD , XK_End, resizestep_aspect, {.i=TWOBWM_RESIZE_KEEP_ASPECT_SHRINK}}, - // Maximize (ignore offset and no EWMH atom) - { MOD | SHIFT, XK_space, maximize, {}}, - // Full screen (disregarding offsets and adding EWMH atom) - { MOD |SHIFT , XK_x, fullscreen, {}}, - // Maximize vertically - { MOD , XK_m, maxvert_hor, {.i=TWOBWM_MAXIMIZE_VERTICALLY}}, - // Maximize horizontally - { MOD |SHIFT, XK_m, maxvert_hor, {.i=TWOBWM_MAXIMIZE_HORIZONTALLY}}, - // Maximize and move - // vertically left - { MOD |SHIFT, XK_y, maxhalf, {.i=TWOBWM_MAXHALF_VERTICAL_LEFT}}, - // vertically right - { MOD |SHIFT, XK_u, maxhalf, {.i=TWOBWM_MAXHALF_VERTICAL_RIGHT}}, - // horizontally left - { MOD |SHIFT, XK_b, maxhalf, {.i=TWOBWM_MAXHALF_HORIZONTAL_BOTTOM}}, - // horizontally right - { MOD |SHIFT, XK_n, maxhalf, {.i=TWOBWM_MAXHALF_HORIZONTAL_TOP}}, - //fold half vertically - { MOD |SHIFT|CONTROL,XK_y, maxhalf, {.i=TWOBWM_MAXHALF_FOLD_VERTICAL}}, - //fold half horizontally - { MOD |SHIFT|CONTROL,XK_b, maxhalf, {.i=TWOBWM_MAXHALF_FOLD_HORIZONTAL}}, - //unfold vertically - { MOD |SHIFT|CONTROL,XK_u, maxhalf, {.i=TWOBWM_MAXHALF_UNFOLD_VERTICAL}}, - //unfold horizontally - { MOD |SHIFT|CONTROL,XK_n, maxhalf, {.i=TWOBWM_MAXHALF_UNFOLD_HORIZONTAL}}, - // Next/Previous screen - { MOD , XK_comma, changescreen, {.i=TWOBWM_NEXT_SCREEN}}, - { MOD , XK_period, changescreen, {.i=TWOBWM_PREVIOUS_SCREEN}}, - // Raise or lower a window - { MOD , XK_r, raiseorlower, {}}, - // Next/Previous workspace - { MOD , XK_q, nextworkspace, {}}, - { MOD , XK_c, prevworkspace, {}}, - // Move to Next/Previous workspace - { MOD |SHIFT , XK_v, sendtonextworkspace,{}}, - { MOD |SHIFT , XK_c, sendtoprevworkspace,{}}, - // Make the window unkillable - { MOD , XK_a, unkillable, {}}, - // Make the window appear always on top - { MOD, XK_t, always_on_top, {}}, - // Make the window stay on all workspaces - { MOD , XK_f, fix, {}}, - // Move the cursor - { MOD , XK_Up, cursor_move, {.i=TWOBWM_CURSOR_UP_SLOW}}, - { MOD , XK_Down, cursor_move, {.i=TWOBWM_CURSOR_DOWN_SLOW}}, - { MOD , XK_Right, cursor_move, {.i=TWOBWM_CURSOR_RIGHT_SLOW}}, - { MOD , XK_Left, cursor_move, {.i=TWOBWM_CURSOR_LEFT_SLOW}}, - // Move the cursor faster - { MOD |SHIFT, XK_Up, cursor_move, {.i=TWOBWM_CURSOR_UP}}, - { MOD |SHIFT, XK_Down, cursor_move, {.i=TWOBWM_CURSOR_DOWN}}, - { MOD |SHIFT, XK_Right, cursor_move, {.i=TWOBWM_CURSOR_RIGHT}}, - { MOD |SHIFT, XK_Left, cursor_move, {.i=TWOBWM_CURSOR_LEFT}}, - // Start programs - { MOD , XK_Return, start, {.com = terminal}}, - { MOD , XK_d, start, {.com = dmenu}}, - // Exit or restart 2bwm - { MOD |CONTROL, XK_q, twobwm_exit, {.i=0}}, - { MOD |CONTROL, XK_r, twobwm_restart, {.i=0}}, - { MOD , XK_space, halfandcentered, {.i=0}}, - // Change current workspace - DESKTOPCHANGE( XK_1, 0) - DESKTOPCHANGE( XK_2, 1) - DESKTOPCHANGE( XK_3, 2) - DESKTOPCHANGE( XK_4, 3) - DESKTOPCHANGE( XK_5, 4) -}; -// the last argument makes it a root window only event -static Button buttons[] = { - { MOD ,XCB_BUTTON_INDEX_1, mousemotion, {.i=TWOBWM_MOVE}, false}, - { MOD ,XCB_BUTTON_INDEX_3, mousemotion, {.i=TWOBWM_RESIZE}, false}, - { MOD ,XCB_BUTTON_INDEX_1, raisewindow, {.i=TWOBWM_RESIZE}, false} -};
M home/.cwmrchome/.cwmrc

@@ -33,7 +33,7 @@ bind-key 4S-h window-snap-left

bind-key 4S-l window-snap-right bind-key 4S-r restart bind-key 4S-e quit -bind-key 4S-k window-vmaximize +bind-key 4S-u window-vmaximize # mousebinds unbind-mouse all
M home/.xsessionhome/.xsession

@@ -10,6 +10,7 @@

setxkbmap -option 'grp:alt_shift_toggle' -layout us,ru -variant ',phonetic' -option 'compose:caps' & eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info")" export LC_CTYPE="en_US.UTF-8" +export ENV="$HOME/.kshrc" # sxhkd & ~/.fehbg & xrdb -l ~/.Xresources &
A ksh/.kshrc

@@ -0,0 +1,30 @@

+HISTFILE=$HOME/.ksh_history +HISTSIZE=20000 + +set -o emacs + +red="\033[31m" +grn="\033[32m" +ylw="\033[33m" +cyn="\033[36m" +blu="\033[34m" +prp="\033[35m" +bprp="\033[35;1m" +gry="\033[94m" +rst="\033[0m" + +prompt_pwd() { + printf '%b' "\001${cyn}\002$(pwd)\001${rst}\002" +} + +rootornot() { + [[ "$(id -u)" -eq 0 ]] && + printf '%b' "\001${red}\002#\001${rst}\002" +} + +PS1='\n$(prompt_pwd)\n▲$(rootornot) ' +PS2="> " + +for i in ~/.kshrc.d/[0-9]*; do + . "$i" +done
A ksh/.kshrc.d/04-exports.ksh

@@ -0,0 +1,29 @@

+# export thingys +export BROWSER=/usr/local/bin/vimb +export EDITOR=/usr/local/bin/nvim +export SSH_KEY_PATH="~/.ssh/id_rsa" +export PATH=$HOME/bin:$PATH +export GPG_TTY=$(tty) +export INPUTRC=~/.inputrc +#export PATH=$PATH:$HOME/leet/Nim/bin +export PATH=$PATH:$HOME/.nimble/bin +export PATH=$PATH:$HOME/.local/bin +export PATH=$PATH:/usr/local/go/bin +export PATH=$PATH:/usr/local/pgsql/bin +export PW_DIR=~/passwords +export PW_KEY=x@icyphox.sh +export _Z_CMD="j" +export MOZ_ACCELERATED=1 +export CFLAGS="-O3 -pipe -march=native" +export CXXFLAGS="-O3 -pipe -march=native" +export MAKEFLAGS="-j4" + +# gpg-agent + +[[ -f "$HOME/.gpg-agent-info" ]] && { + . "$HOME/.gpg-agent-info" + export GPG_AGENT_INFO + export SSH_AUTH_SOCK + export SSH_AGENT_PID +} +
A ksh/.kshrc.d/90-aliases.ksh

@@ -0,0 +1,48 @@

+alias gah='sudo $(fc -ln -1)' +alias vime="vim ~/.vimrc" +alias o="xdg-open" +alias gc="git commit -v -s" +alias ga="git add" +alias gd="git diff --minimal" +alias gl="git log --oneline --decorate --graph" +alias ls="colorls -G" +alias vim="nvim" + +socks() { + pkill ssh + ssh -D 8008 emerald -fN +} + +gst() { + branch="$(git branch)" + printf '%s\n' "$branch" + git status --short +} + +up() { + ~/bin/icyup.sh "$1" +} + +nvmon() { + source ~/.nvm/nvm.sh +} + +envac() { + . .env/bin/activate +} + +vpn() { + ~/bin/vpnon.sh +} + +dt() { + time.sh -n +} + +ggp() { + git push "$(git remote show)" "$(git branch --show-current)" +} + +gcl() { + git clone "$@" +}
A ksh/.kshrc.d/99-prompt.ksh

@@ -0,0 +1,24 @@

+set -o emacs + +red="\033[31m" +grn="\033[32m" +ylw="\033[33m" +cyn="\033[36m" +blu="\033[34m" +prp="\033[35m" +bprp="\033[35;1m" +gry="\033[94m" +rst="\033[0m" + +prompt_pwd() { + printf '%b' "\001${cyn}\002$(pwd)\001${rst}\002" +} + +rootornot() { + [[ "$(id -u)" -eq 0 ]] && + printf '%b' "\001${red}\002#\001${rst}\002" +} + +PS1='\n$(prompt_pwd)\n▲$(rootornot) ' +PS2="> " +
M weechat/weechat.confweechat/weechat.conf

@@ -90,6 +90,7 @@ mouse = on

mouse_timer_delay = 100 nick_color_force = "" nick_color_hash = djb2 +nick_color_hash_salt = "" nick_color_stop_chars = "_|[" nick_prefix = " " nick_suffix = ""

@@ -132,8 +133,8 @@ separator_vertical = " "

tab_width = 1 time_format = "%a, %d %b %Y %T" window_auto_zoom = off -window_separator_horizontal = on -window_separator_vertical = on +window_separator_horizontal = off +window_separator_vertical = off window_title = "WeeChat ${info:version}" word_chars_highlight = "!\u00A0,-,_,|,alnum" word_chars_input = "!\u00A0,-,_,|,alnum"

@@ -341,7 +342,7 @@ nicklist.color_fg = 8

nicklist.conditions = "nicklist" nicklist.filling_left_right = vertical nicklist.filling_top_bottom = columns_vertical -nicklist.hidden = on +nicklist.hidden = off nicklist.items = "buffer_nicklist" nicklist.position = right nicklist.priority = 200

@@ -385,15 +386,13 @@ default.buffer = "irc;server.rizon;1"

default.buffer = "irc;freenode.#kisslinux;2" default.buffer = "irc;freenode.#lobsters;3" default.buffer = "irc;freenode.#cmpwn;4" -default.buffer = "irc;freenode.#lobsters-boil;5" -default.buffer = "irc;freenode.##russian;6" -default.buffer = "irc;freenode.#hardenedbsd;7" -default.buffer = "irc;freenode.#openbsd;8" -default.buffer = "irc;rizon.#crimson;9" -default.buffer = "irc;rizon.#rice;10" -default.buffer = "irc;rizon.#homescreen;11" -default.buffer = "irc;rizon.eskimo;12" -default.buffer = "irc;rizon.Taigabot;13" +default.buffer = "irc;freenode.##russian;5" +default.buffer = "irc;freenode.#hardenedbsd;6" +default.buffer = "irc;freenode.#openbsd;7" +default.buffer = "irc;rizon.#crimson;8" +default.buffer = "irc;rizon.#rice;9" +default.buffer = "irc;rizon.#homescreen;10" +default.buffer = "irc;freenode.#aerc;11" default.window = "1;0;0;0;irc;rizon.Carp" default.current = on