├── bash ├── bash_profile └── bashrc ├── dunst └── dunstrc ├── feh └── themes ├── fish └── config.fish ├── git └── config ├── i3 ├── config ├── i3status.conf └── scripts │ ├── i3-focus-output │ └── i3-workspace-menu ├── libinput-gestures.conf ├── mpv ├── input.conf ├── mpv.conf └── script-opts │ └── osc.conf ├── ranger ├── commands.py └── rc.conf ├── rofi └── config.rasi ├── tmux └── tmux.conf ├── vim └── vimrc ├── youtube-dl └── config └── zathura └── zathurarc /bash/bash_profile: -------------------------------------------------------------------------------- 1 | export PATH="$HOME/bin:$PATH" 2 | export LANG='en_US.UTF-8' 3 | export EDITOR='vim' 4 | export INTERACTIVE_SHELL='fish' 5 | export BROWSER='quickactions' 6 | 7 | [[ -f ~/.bashrc ]] && . ~/.bashrc 8 | -------------------------------------------------------------------------------- /bash/bashrc: -------------------------------------------------------------------------------- 1 | case $- in 2 | *i*) [[ -n "$INTERACTIVE_SHELL" ]] && [[ -z "$FORCE_BASH" ]] && exec "$INTERACTIVE_SHELL" ;; 3 | # If not running interactively, don't do anything 4 | *) return;; 5 | esac 6 | 7 | # don't put duplicate lines or lines starting with space in the history. 8 | HISTCONTROL=ignoreboth 9 | 10 | # append to the history file, don't overwrite it 11 | shopt -s histappend 12 | 13 | # check the window size after each command and, if necessary, 14 | # update the values of LINES and COLUMNS. 15 | shopt -s checkwinsize 16 | 17 | alias ls='ls --color=auto --indicator-style=classify' 18 | alias grep='grep --color=auto' 19 | alias fgrep='fgrep --color=auto' 20 | alias egrep='egrep --color=auto' 21 | alias ll='ls -lh' 22 | alias tree='tree -FC' 23 | alias uptime='uptime -p' 24 | 25 | function __bash__prompt { 26 | local RED="\[\033[0;31m\]" 27 | local GREEN="\[\033[0;32m\]" 28 | local RESET="\[\033[0m\]" 29 | if [ -n "$SSH_CONNECTION" ]; then 30 | printf '%s[%s]%s ' "$RED" "$(uname -n)" "$RESET" 31 | fi 32 | printf '%s\w%s $ ' "$GREEN" "$RESET" 33 | } 34 | 35 | export PS1="$(__bash__prompt)" 36 | -------------------------------------------------------------------------------- /dunst/dunstrc: -------------------------------------------------------------------------------- 1 | [global] 2 | follow = keyboard 3 | max_icon_size = 64 4 | -------------------------------------------------------------------------------- /feh/themes: -------------------------------------------------------------------------------- 1 | feh \ 2 | --scale-down \ 3 | --auto-rotate \ 4 | --action1 ';[copy file]ctrlc %F' \ 5 | --action2 ';[copy path]echo %F | ctrlc' 6 | -------------------------------------------------------------------------------- /fish/config.fish: -------------------------------------------------------------------------------- 1 | # Fish git prompt 2 | set __fish_git_prompt_showdirtystate 'yes' 3 | set __fish_git_prompt_showstashstate 'yes' 4 | set __fish_git_prompt_showuntrackedfiles 'yes' 5 | set __fish_git_prompt_showupstream 'yes' 6 | set __fish_git_prompt_color_branch yellow 7 | set __fish_git_prompt_color_upstream_ahead green 8 | set __fish_git_prompt_color_upstream_behind red 9 | 10 | # Status Chars 11 | set __fish_git_prompt_char_dirtystate '/' 12 | set __fish_git_prompt_char_stagedstate '>' 13 | set __fish_git_prompt_char_untrackedfiles 'u' 14 | set __fish_git_prompt_char_stashstate 's' 15 | set __fish_git_prompt_char_upstream_ahead '+' 16 | set __fish_git_prompt_char_upstream_behind '-' 17 | 18 | function fish_user_key_bindings 19 | # bind shift-up and shift-down to attribute search 20 | # these are bound to alt-up and alt-down in the defaults 21 | # but we use them in tmux, so we add these alternatives here 22 | bind $argv \e\[1\;2A history-token-search-backward 23 | bind $argv \e\[1\;2B history-token-search-forward 24 | end 25 | 26 | function fish_prompt 27 | set last_status $status 28 | if test -n "$SSH_CONNECTION" 29 | set_color $fish_color_cwd_root 30 | printf '[%s] ' (uname -n) 31 | set_color normal 32 | end 33 | set_color $fish_color_cwd 34 | printf '%s' (prompt_pwd) 35 | set_color normal 36 | printf '%s ' (__fish_git_prompt) 37 | set_color normal 38 | end 39 | 40 | alias uptime='uptime -p' 41 | alias tree='tree -FC' 42 | -------------------------------------------------------------------------------- /git/config: -------------------------------------------------------------------------------- 1 | [user] 2 | email = awalgarg@gmail.com 3 | name = Awal Garg 4 | [push] 5 | default = nothing 6 | [pull] 7 | rebase = true 8 | [alias] 9 | lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C(magenta)(%an)%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative --left-right 10 | [diff] 11 | tool = vimdiff 12 | [difftool] 13 | prompt = false 14 | [rerere] 15 | enabled = true 16 | -------------------------------------------------------------------------------- /i3/config: -------------------------------------------------------------------------------- 1 | # Config variables 2 | 3 | set $dir_i3_conf ~/.config/i3 4 | set $dir_i3_scripts ~/.config/i3/scripts 5 | 6 | set $mod Mod4 7 | 8 | # Looks 9 | 10 | set $highlight_txt #ffffff 11 | set $dim_txt #888888 12 | set $subtle_bg #2d2d2d 13 | set $dim_bg #888888 14 | set $highlight_border #444444 15 | set $dim_border #222222 16 | 17 | ### class border background text indicator child_border 18 | client.focused $subtle_bg $subtle_bg $highlight_txt $dim_txt $highlight_border 19 | client.focused_inactive $subtle_bg $subtle_bg $highlight_txt $dim_txt $dim_border 20 | client.unfocused $subtle_bg $subtle_bg $dim_txt $dim_txt $dim_border 21 | client.urgent $subtle_bg $subtle_bg $dim_txt $dim_txt #ff0000 22 | client.placeholder $subtle_bg $subtle_bg $dim_txt $dim_txt $dim_border 23 | client.background $subtle_bg 24 | 25 | font pango:Droid Sans Mono 8 26 | 27 | new_window pixel 0 28 | hide_edge_borders both 29 | 30 | # Behavior 31 | 32 | force_focus_wrapping yes 33 | focus_follows_mouse no 34 | 35 | for_window [class="feh"] floating enable 36 | 37 | bar { 38 | status_command i3status -c $dir_i3_conf/i3status.conf 39 | colors { 40 | background $subtle_bg 41 | statusline $highlight_txt 42 | } 43 | position top 44 | mode hide 45 | modifier none 46 | } 47 | 48 | # Keybindings 49 | 50 | floating_modifier $mod 51 | 52 | ## Launching applications 53 | 54 | bindsym $mod+Return exec st 55 | bindsym $mod+d exec "rofi -show run -modi run,window,calc -sidebar-mode" 56 | bindsym F2 exec "rofi -show window -modi run,window,calc -sidebar-mode" 57 | bindsym $mod+shift+Return exec tmux-menu 58 | bindsym $mod+b exec browser-menu 59 | bindsym $mod+c exec quickclips-action 60 | bindsym $mod+n exec notifications-history 61 | 62 | ## Window and workspace management 63 | 64 | bindsym $mod+Shift+q kill 65 | bindsym $mod+Shift+w exec $dir_i3_scripts/i3-workspace-menu --mode=rename 66 | 67 | ### Moving focus 68 | 69 | bindsym $mod+Left focus left 70 | bindsym $mod+Down focus down 71 | bindsym $mod+Up focus up 72 | bindsym $mod+Right focus right 73 | 74 | bindsym $mod+a focus parent 75 | bindsym $mod+Shift+a focus child 76 | 77 | bindsym $mod+Tab workspace next_on_output 78 | bindsym $mod+Shift+Tab workspace prev_on_output 79 | 80 | bindsym $mod+s exec $dir_i3_scripts/i3-workspace-menu 81 | bindsym $mod+Escape workspace back_and_forth 82 | bindsym $mod+o exec $dir_i3_scripts/i3-focus-output --next 83 | bindsym $mod+Shift+o exec $dir_i3_scripts/i3-focus-output --prev 84 | 85 | bindsym $mod+space focus mode_toggle 86 | bindsym $mod+minus scratchpad show 87 | 88 | ### Moving windows 89 | 90 | bindsym $mod+Shift+Left move left 91 | bindsym $mod+Shift+Down move down 92 | bindsym $mod+Shift+Up move up 93 | bindsym $mod+Shift+Right move right 94 | 95 | bindsym $mod+Shift+s exec $dir_i3_scripts/i3-workspace-menu --mode=move 96 | 97 | bindsym $mod+Shift+minus move scratchpad 98 | 99 | ### Changing layout 100 | 101 | bindsym $mod+h split h 102 | bindsym $mod+v split v 103 | bindsym $mod+e layout toggle split 104 | bindsym $mod+w layout tabbed 105 | bindsym $mod+f fullscreen toggle 106 | bindsym $mod+Shift+space floating toggle 107 | 108 | ## Misc keybindings 109 | 110 | bindsym F1 bar hidden_state toggle 111 | 112 | bindsym XF86AudioMute exec amixer -D pulse -q set Master toggle 113 | bindsym XF86AudioLowerVolume exec amixer -D pulse -q set Master 5%- unmute 114 | bindsym XF86AudioRaiseVolume exec amixer -D pulse -q set Master 5%+ unmute 115 | bindsym XF86MonBrightnessDown exec xbacklight -dec 5 116 | bindsym XF86MonBrightnessUp exec xbacklight -inc 5 117 | 118 | bindsym $mod+Shift+l exec xlock 119 | bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Exit i3?' -b 'Yes' 'i3-msg exit'" 120 | bindsym $mod+Shift+r restart 121 | bindsym $mod+Shift+c reload 122 | 123 | bindsym $mod+r mode "resize" 124 | bindsym $mod+Shift+Escape mode "nobind" 125 | 126 | mode "resize" { 127 | bindsym Left resize shrink width 5 px or 5 ppt 128 | bindsym Down resize grow height 5 px or 5 ppt 129 | bindsym Up resize shrink height 5 px or 5 ppt 130 | bindsym Right resize grow width 5 px or 5 ppt 131 | 132 | bindsym Escape mode "default" 133 | } 134 | 135 | mode "nobind" { 136 | bindsym $mod+Shift+Escape mode "default" 137 | } 138 | -------------------------------------------------------------------------------- /i3/i3status.conf: -------------------------------------------------------------------------------- 1 | general { 2 | colors = true 3 | output_format = "i3bar" 4 | interval = 1 5 | } 6 | 7 | order += "wireless _first_" 8 | order += "battery 0" 9 | order += "volume master" 10 | order += "tztime local" 11 | 12 | wireless _first_ { 13 | format_up = "WiFi: up" 14 | format_down = "WiFi: down" 15 | } 16 | 17 | battery 0 { 18 | format = "Battery: %percentage%status" 19 | format_down = " (down)" 20 | status_chr = " (charging)" 21 | status_bat = "" 22 | status_full = " (max)" 23 | status_unk = "" 24 | low_threshold = 20 25 | } 26 | 27 | tztime local { 28 | format = "%A %d %B %r" 29 | } 30 | 31 | volume master { 32 | format = "Volume: %volume" 33 | format_muted = "Volume: %volume (muted)" 34 | device = "pulse" 35 | } 36 | -------------------------------------------------------------------------------- /i3/scripts/i3-focus-output: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # filename: i3-focus-output 4 | # author: Awal Garg 5 | # license: wtfpl 6 | 7 | # i3's "focus output" command doesn't have next/previous sub-commands :| 8 | # And this script should probably be in python but meh 9 | 10 | TARGET_OUTPUT="" 11 | 12 | if [ "--prev" == "$1" ]; then 13 | TARGET_OUTPUT="$(i3-msg -t get_workspaces \ 14 | | jq -r '[ .[] | select (.visible) 15 | | { output: .output, focused: .focused } ] 16 | | .[path(.[] | select(.focused == true))[0] - 1] //.[-1] | .output')" 17 | else 18 | TARGET_OUTPUT="$(i3-msg -t get_workspaces \ 19 | | jq -r '[ .[] | select (.visible) 20 | | { output: .output, focused: .focused } ] 21 | | .[path(.[] | select(.focused == true))[0] + 1] //.[0] | .output')" 22 | fi 23 | 24 | i3-msg -t command focus output "$TARGET_OUTPUT" 25 | -------------------------------------------------------------------------------- /i3/scripts/i3-workspace-menu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # filename: i3-workspace-menu 4 | # author: Awal Garg 5 | # license: wtfpl 6 | 7 | from subprocess import Popen, PIPE, DEVNULL 8 | import json 9 | import sys 10 | 11 | MODE_MOVE = 'move' 12 | MODE_SWAP = 'swap' 13 | MODE_FOCUS = 'focus' 14 | MODE_RENAME = 'rename' 15 | MODE_MOVE_WORKSPACE = 'move-workspace' 16 | 17 | WORKSPACE_NAME_SUGGESTIONS = set(['browse', 'misc', 'work', 'media']) 18 | 19 | def main(mode): 20 | workspaces = i3_get('workspaces') 21 | 22 | if mode == MODE_MOVE_WORKSPACE: 23 | current_workspace_output = [ workspace['output'] for workspace in workspaces if workspace['focused'] ][0] 24 | outputs = [ output['name'] for output in i3_get('outputs') if output['active'] and output['name'] != current_workspace_output ] 25 | output, _ = get_user_choice(outputs, f'i3-{mode}') 26 | if not output: 27 | return 28 | i3_move_to_output(output) 29 | return 30 | 31 | filtered_suggestions = list(WORKSPACE_NAME_SUGGESTIONS - set(map(lambda w: w['name'], workspaces))) 32 | 33 | if mode == MODE_RENAME: 34 | suggestion, new_workspace_name = get_user_choice(filtered_suggestions, 'i3-rename') 35 | if suggestion or new_workspace_name: 36 | i3_rename_workspace(suggestion or new_workspace_name) 37 | return 38 | 39 | filtered_workspaces = [ workspace for workspace in workspaces if not workspace['focused'] ] 40 | 41 | if mode == MODE_SWAP: 42 | focused_workspace = [ workspace for workspace in workspaces if workspace['focused'] ][0] 43 | filtered_workspaces = [ workspace for workspace in filtered_workspaces if workspace['output'] != focused_workspace['output'] ] 44 | swap_target_workspace, _ = get_user_choice(filtered_workspaces, f'i3-{mode}', format_i3_workspace) 45 | if not swap_target_workspace: 46 | return 47 | 48 | swap_target_output = swap_target_workspace['output'] 49 | workspace_visible_on_swap_target_output = [ workspace for workspace in workspaces if workspace['output'] == swap_target_output and workspace['visible'] ][0] 50 | 51 | i3_move_to_output(swap_target_workspace['output']) 52 | i3_focus_workspace(swap_target_workspace['name']) 53 | i3_move_to_output(focused_workspace['output']) 54 | i3_focus_workspace(workspace_visible_on_swap_target_output['name']) 55 | i3_focus_workspace(swap_target_workspace['name']) 56 | return 57 | 58 | filtered_workspaces += filtered_suggestions 59 | workspace_or_suggestion, new_workspace_name = get_user_choice(filtered_workspaces, f'i3-{mode}', lambda w: w if type(w) == str else format_i3_workspace(w)) 60 | 61 | target_workspace_name = ( 62 | new_workspace_name 63 | or type(workspace_or_suggestion) == str and workspace_or_suggestion 64 | or type(workspace_or_suggestion) == dict and workspace_or_suggestion['name'] 65 | ) 66 | 67 | if not target_workspace_name: 68 | return 69 | 70 | if mode == MODE_MOVE: 71 | i3_move_to_workspace(target_workspace_name) 72 | elif mode == MODE_FOCUS: 73 | i3_focus_workspace(target_workspace_name) 74 | 75 | def i3_get(resource_name): 76 | raw_json = Popen(['i3-msg', '-t', 'get_' + resource_name], stdout=PIPE).communicate()[0] 77 | return json.loads(raw_json) 78 | 79 | def i3_command(command): 80 | assert Popen(['i3-msg'] + command).wait() == 0 81 | 82 | def i3_move_to_workspace(workspace_name): 83 | i3_command(['move', 'container', 'to', 'workspace', workspace_name]) 84 | 85 | def i3_focus_workspace(workspace_name): 86 | i3_command(['workspace', workspace_name]) 87 | 88 | def i3_rename_workspace(new_workspace_name): 89 | i3_command(['rename', 'workspace', 'to', new_workspace_name]) 90 | 91 | def i3_move_to_output(output_name): 92 | i3_command(['move', 'workspace', 'to', 'output', output_name]) 93 | 94 | def format_i3_workspace(workspace): 95 | return '{name} | {visibility_status} on {output} {focused_status} {urgency_status}'.format( 96 | name=workspace.get('name', ''), 97 | visibility_status='Visible' if workspace.get('visible', False) else 'Backgrounded', 98 | output=workspace.get('output', ''), 99 | focused_status='[focused]' if workspace.get('focused') else '[not focused]' if workspace.get('visible', False) else '', 100 | urgency_status='[urgent]' if workspace.get('urgent', False) else '', 101 | ).strip() 102 | 103 | def get_user_choice(available_choices, menu_hint, format_choice=str): 104 | menu_command = ['dmenu', '-i', '-p', menu_hint, '-sb', '#333', '-nb', '#222', '-l', '20', '-fn', 'Inconsolata'] 105 | formatted_choices = [ format_choice(choice) for choice in available_choices ] 106 | menu_proc = Popen(menu_command, stdin=PIPE, stdout=PIPE, stderr=DEVNULL) 107 | menu_proc_stdout = menu_proc.communicate('\n'.join(formatted_choices).encode())[0].decode() 108 | user_choice_str = menu_proc_stdout.strip().split('\n')[0] 109 | if not user_choice_str: 110 | return (None, None) 111 | try: 112 | return (available_choices[formatted_choices.index(user_choice_str)], None) 113 | except (IndexError, ValueError): 114 | return (None, user_choice_str) 115 | 116 | if __name__ == '__main__': 117 | for mode in [ MODE_FOCUS, MODE_MOVE, MODE_SWAP, MODE_RENAME, MODE_MOVE_WORKSPACE ]: 118 | if f'--mode={mode}' in sys.argv: 119 | main(mode) 120 | break 121 | else: main(MODE_FOCUS) 122 | -------------------------------------------------------------------------------- /libinput-gestures.conf: -------------------------------------------------------------------------------- 1 | gesture swipe left 3 i3-msg workspace prev_on_output 2 | gesture swipe right 3 i3-msg workspace next_on_output 3 | gesture swipe down 3 i3-msg bar hidden_state show 4 | gesture swipe up 3 i3-msg bar hidden_state hide 5 | -------------------------------------------------------------------------------- /mpv/input.conf: -------------------------------------------------------------------------------- 1 | Alt+l cycle-values loop-playlist "inf" "no" 2 | Alt+h playlist-shuffle 3 | Alt+c show_text ${chapter-list} 4 | -------------------------------------------------------------------------------- /mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | ytdl-format=bestvideo[height<=?720][fps<=?30]+bestaudio/best 2 | ytdl-raw-options=sub-lang=en,write-auto-sub= 3 | 4 | [extension.mp3] 5 | no-audio-display 6 | -------------------------------------------------------------------------------- /mpv/script-opts/osc.conf: -------------------------------------------------------------------------------- 1 | layout=box 2 | -------------------------------------------------------------------------------- /ranger/commands.py: -------------------------------------------------------------------------------- 1 | from ranger.api.commands import * 2 | 3 | # Source: https://github.com/ranger/ranger/wiki/Custom-Commands#fzf-integration 4 | class fzf_select(Command): 5 | """ 6 | :fzf_select 7 | 8 | Find a file using fzf. 9 | 10 | With a prefix argument select only directories. 11 | 12 | See: https://github.com/junegunn/fzf 13 | """ 14 | def execute(self): 15 | import subprocess 16 | import os.path 17 | if self.quantifier: 18 | # match only directories 19 | command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \ 20 | -o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m --reverse -i -e" 21 | else: 22 | # match files and directories 23 | command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \ 24 | -o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m --reverse -i -e" 25 | fzf = self.fm.execute_command(command, universal_newlines=True, stdout=subprocess.PIPE) 26 | stdout, stderr = fzf.communicate() 27 | if fzf.returncode == 0: 28 | fzf_file = os.path.abspath(stdout.rstrip('\n')) 29 | if os.path.isdir(fzf_file): 30 | self.fm.cd(fzf_file) 31 | else: 32 | self.fm.select_file(fzf_file) 33 | -------------------------------------------------------------------------------- /ranger/rc.conf: -------------------------------------------------------------------------------- 1 | set preview_max_size 50000000 2 | 3 | map F fzf_select 4 | -------------------------------------------------------------------------------- /rofi/config.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | font: "inconsolata 16"; 3 | bw: 0; 4 | terminal: "st"; 5 | line-margin: 0; 6 | separator-style: "none"; 7 | 8 | color-normal: "#202020, #bbbbbb, #202020, #303030, #bbbbbb"; 9 | color-active: "#202020, #bbbbbb, #202020, #303030, #bbbbbb"; 10 | color-urgent: "#202020, #bbbbbb, #202020, #303030, #bbbbbb"; 11 | color-window: "#202020, #202020, #202020"; 12 | 13 | display-run: "Run"; 14 | display-drun: "Launch"; 15 | kb-row-down: "Down"; 16 | kb-row-tab: ""; 17 | kb-row-select: "Tab"; 18 | 19 | window-match-fields: "title,name,desktop"; 20 | monitor: "-4"; 21 | matching-negate-char: '\0'; 22 | run-command: "sh -c \"{cmd}\""; 23 | max-history-size: 100; 24 | } 25 | -------------------------------------------------------------------------------- /tmux/tmux.conf: -------------------------------------------------------------------------------- 1 | ## Prefix 2 | unbind C-b 3 | set-option -g prefix M-` 4 | bind-key M-` send-prefix 5 | 6 | ## Misc 7 | set -g base-index 1 8 | set -g history-limit 4096 9 | set -g set-titles on 10 | 11 | # tmux starts login shells by default, which causes login specific 12 | # scripts to run everytime. this is wasteful and pollutes PATH, 13 | # hence we override the default command to simply launch the shell 14 | set -g default-command "exec $SHELL" 15 | 16 | # by default escape takes a while before registering 17 | # no idea why that makes sense, but this disables it 18 | set -g escape-time 0 19 | 20 | # when a window is closed and the window number is freed, 21 | # the following windows are renumbered using this 22 | set -g renumber-windows on 23 | 24 | # to let vim and other apps use ctrl keys properly 25 | set-window-option -g xterm-keys on 26 | 27 | set -g mouse on 28 | 29 | # see https://superuser.com/a/972232 why "alternate_on" thing is needed 30 | bind -n WheelUpPane \ 31 | if-shell -F -t = "#{?pane_in_mode,1,#{mouse_any_flag}}" \ 32 | "send-keys -M" \ 33 | "if-shell -F -t = '#{alternate_on}'\ 34 | 'send-keys Up' \ 35 | 'copy-mode -e'" 36 | # -e switch indicates copy mode should exit when scrolled to end 37 | 38 | bind -n WheelDownPane \ 39 | if-shell -F -t = "#{?pane_in_mode,1,#{mouse_any_flag}}" \ 40 | "send-keys -M" \ 41 | "send-keys Down" 42 | 43 | ## Shortcuts 44 | # toggle hiding the status bar, sometimes handy 45 | bind-key Space set status 46 | 47 | # Alt-t for horizontal split 48 | bind-key -n M-t split-window -h -c "#{pane_current_path}" 49 | # Alt-Shift-t for vertical split 50 | bind-key -n M-T split-window -c "#{pane_current_path}" 51 | 52 | # change focus with Alt-arrow_key 53 | bind-key -n M-Up select-pane -U 54 | bind-key -n M-Right select-pane -R 55 | bind-key -n M-Down select-pane -D 56 | bind-key -n M-Left select-pane -L 57 | 58 | # move focused pane with Alt-Shift-arrow_key 59 | bind-key -n M-S-Up swap-pane -U 60 | bind-key -n M-S-Right swap-pane -D 61 | bind-key -n M-S-Down swap-pane -D 62 | bind-key -n M-S-Left swap-pane -U 63 | 64 | # toggle fullscreen with Alt-f 65 | bind-key -n M-f resize-pane -Z 66 | 67 | # break to own window with Alt-b 68 | bind-key -n M-b break-pane 69 | 70 | # reload config with Alt-Shift-c 71 | bind-key -n M-C source-file -F '#{config_files}' 72 | 73 | # kill pane with Alt-Shift-q 74 | bind-key -n M-Q kill-pane 75 | 76 | # detach from session with Alt-d 77 | bind-key -n M-d detach-client 78 | 79 | # create new window with Alt-n 80 | bind-key -n M-n new-window 81 | 82 | # switch to nth window with Alt-n 83 | bind-key -n M-1 select-window -t :=1 84 | bind-key -n M-2 select-window -t :=2 85 | bind-key -n M-3 select-window -t :=3 86 | bind-key -n M-4 select-window -t :=4 87 | bind-key -n M-5 select-window -t :=5 88 | bind-key -n M-6 select-window -t :=6 89 | bind-key -n M-7 select-window -t :=7 90 | bind-key -n M-8 select-window -t :=8 91 | bind-key -n M-9 select-window -t :=9 92 | 93 | # switch to next window with Alt-Tab 94 | bind-key -n M-Tab select-window -n 95 | 96 | # switch to previous window with Alt-Ctrl-Tab. 97 | # unfortunately binding Alt-Shift-Tab seems to not work 98 | bind-key -n M-C-Tab select-window -p 99 | 100 | # move active pane to nth window to Alt-Shift-n 101 | bind-key -n "M-!" join-pane -t :1 102 | bind-key -n "M-@" join-pane -t :2 103 | bind-key -n "M-#" join-pane -t :3 104 | bind-key -n "M-\$" join-pane -t :4 105 | bind-key -n "M-%" join-pane -t :5 106 | bind-key -n "M-^" join-pane -t :6 107 | bind-key -n "M-&" join-pane -t :7 108 | bind-key -n "M-*" join-pane -t :8 109 | bind-key -n "M-(" join-pane -t :9 110 | 111 | # horizontal split current window and open vim in cwd with Alt-e 112 | bind-key -n M-e split-window -h -c '#{pane_current_path}' 'vim .' 113 | 114 | # vertical split current window and open vim in cwd with Alt-Shift-e 115 | bind-key -n M-E split-window -c '#{pane_current_path}' 'vim .' 116 | 117 | # copy current buffer to x11 clipboard with Alt-c 118 | bind-key -n M-c run-shell -b 'tmux save-buffer - | ctrlc' 119 | 120 | ## Appearance 121 | 122 | # formats 123 | 124 | set -g status-right '[#{session_name}] @#{host_short}' 125 | set -g status-left '' 126 | 127 | set -g window-status-format ' #F#I:#W ' # spaces for padding 128 | set -g window-status-current-format ' #F#I:#W ' # spaces for padding 129 | 130 | # positioning 131 | 132 | set -g status-position bottom 133 | set -g status-justify left 134 | 135 | # colors 136 | 137 | set -g window-status-style 'bg=colour235,fg=colour137' 138 | set -g window-status-current-style 'bg=colour137,fg=colour235' 139 | set -g window-status-bell-style 'bg=colour1,fg=colour255' 140 | set -g status-style 'bg=colour235,fg=colour137' 141 | set -g pane-border-style 'fg=colour233' 142 | set -g pane-active-border-style 'fg=colour137' 143 | 144 | set -g message-style 'bg=colour137,fg=colour232' 145 | 146 | # workarounds 147 | 148 | # XXX: st's terminfo bug, https://bugs.archlinux.org/task/57596 149 | set -as terminal-overrides ',st*:Ss@' 150 | -------------------------------------------------------------------------------- /vim/vimrc: -------------------------------------------------------------------------------- 1 | filetype plugin indent on 2 | syntax enable 3 | 4 | if !isdirectory($HOME . "/.vim/backup") && exists("*mkdir") 5 | call mkdir($HOME . "/.vim/backup", "p") 6 | endif 7 | 8 | set hlsearch 9 | set incsearch 10 | set autoindent 11 | set belloff=all 12 | set tabstop=4 13 | set shiftwidth=4 14 | set title 15 | set backup 16 | set backupdir=~/.vim/backup// 17 | set backupskip=/tmp* 18 | set directory=~/.vim/backup// 19 | set writebackup 20 | set mouse=a 21 | set wildmenu 22 | set wildmode=full 23 | set shell=/bin/sh 24 | 25 | cnoreabbrev W w 26 | 27 | nnoremap :tabprevious 28 | nnoremap :tabnext 29 | nnoremap i**=strftime('%A %d %B %Y %r')** 30 | nnoremap :nohlsearch 31 | vnoremap "+y 32 | inoremap "+p 33 | xnoremap @ :call ExecuteMacroOverVisualRange() 34 | 35 | highlight TrailingWhitespace ctermbg=darkgray guibg=darkgray 36 | match TrailingWhitespace /\s\+$\| \+\ze\t/ 37 | 38 | let g:seoul256_background = 235 39 | silent! colorscheme seoul256 40 | 41 | function! ExecuteMacroOverVisualRange() 42 | echo "@".getcmdline() 43 | execute ":'<,'>normal @".nr2char(getchar()) 44 | endfunction 45 | 46 | if &term =~ '^screen' 47 | " tmux will send xterm-style keys when its xterm-keys option is on 48 | execute "set =\e[1;*A" 49 | execute "set =\e[1;*B" 50 | execute "set =\e[1;*C" 51 | execute "set =\e[1;*D" 52 | endif 53 | -------------------------------------------------------------------------------- /youtube-dl/config: -------------------------------------------------------------------------------- 1 | --netrc 2 | -------------------------------------------------------------------------------- /zathura/zathurarc: -------------------------------------------------------------------------------- 1 | set selection-clipboard clipboard 2 | --------------------------------------------------------------------------------