├── 2bwm └── config.h ├── README.md ├── compton └── compton.conf ├── dmenu2 └── dmenu2_run ├── dots ├── .Xmodmap ├── .Xresources ├── .bash_profile ├── .bashrc ├── .xbindkeysrc └── .xinitrc ├── init.sh ├── lemonbar └── bar ├── nvim └── init.vim ├── scripts ├── a ├── cmusnp ├── git-status ├── playpause ├── popup ├── ufetch ├── update └── volume ├── st └── config.h ├── vis ├── comment.lua ├── complete.lua ├── diff_orig.lua ├── file_list.lua ├── fmt_tabs.lua ├── fzf-open.lua ├── git-lp.lua ├── header_info.lua ├── lexers │ ├── conf.lua │ ├── default-groups.lua │ ├── gitlog.lua │ ├── markdown.lua │ ├── navd.lua │ └── ninja.lua ├── navd_p.lua ├── reg_save.lua ├── serialize.lua ├── statusline.lua ├── tag_jump.lua ├── test.lua ├── themes │ ├── acme.lua │ └── base16-materia.lua ├── toggle.lua └── visrc.lua ├── wallpaper ├── New_York.jpg ├── Tokyo-City-Tilt-Shift-Lens-View.jpg ├── button_pressed.png ├── button_unpressed.png ├── circle.png ├── flower-iceland2.jpg └── popup.png └── zathura └── zathurarc /2bwm/config.h: -------------------------------------------------------------------------------- 1 | ///---User configurable stuff---/// 2 | ///---Modifiers---/// 3 | #define MOD XCB_MOD_MASK_1 /* Super/Windows key or check xmodmap(1) with -pm defined in /usr/include/xcb/xproto.h */ 4 | ///--Speed---/// 5 | /* Move this many pixels when moving or resizing with keyboard unless the window has hints saying otherwise. 6 | *0)move step slow 1)move step fast 7 | *2)mouse slow 3)mouse fast */ 8 | static const uint16_t movements[] = {50,90,15,400}; 9 | /* resize by line like in mcwm -- jmbi */ 10 | static const bool resize_by_line = false; 11 | /* the ratio used when resizing and keeping the aspect */ 12 | static const float resize_keep_aspect_ratio= 1.03; 13 | ///---Offsets---/// 14 | /*0)offsetx 1)offsety 15 | *2)maxwidth 3)maxheight */ 16 | static const uint8_t offsets[] = {0,0,0,40}; 17 | ///---Colors---/// 18 | /*0)focuscol 1)unfocuscol 19 | *2)fixedcol 3)unkilcol 20 | *4)fixedunkilcol 5)outerbordercol 21 | *6)emptycol */ 22 | static const char *colors[] = {"#304b59","#1e2e36","#f7cca1","#f0696f","fa9a6a","#121c21","#000000"}; 23 | /* if this is set to true the inner border and outer borders colors will be swapped */ 24 | static const bool inverted_colors = false; 25 | ///---Cursor---/// 26 | /* default position of the cursor: 27 | * correct values are: 28 | * TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, MIDDLE 29 | * All these are relative to the current window. */ 30 | #define CURSOR_POSITION BOTTOM_RIGHT 31 | ///---Borders---/// 32 | /*0) Outer border size. If you put this negative it will be a square. 33 | *1) Full borderwidth 2) Magnet border size 34 | *3) Resize border size */ 35 | static const uint8_t borders[] = {5,7,2,3}; 36 | /* Windows that won't have a border. 37 | * It uses substring comparison with what is found in the WM_NAME 38 | * attribute of the window. You can test this using `xprop WM_NAME` 39 | */ 40 | #define LOOK_INTO "WM_NAME" 41 | static const char *ignore_names[] = {"bar", "xclock"}; 42 | ///--Menus and Programs---/// 43 | static const char *menucmd[] = { "dmenu2_run", NULL }; 44 | static const char *terminalcmd[] = { "st", NULL }; 45 | #define WORKSPACES 5 46 | ///--Custom foo---/// 47 | static void halfandcentered(const Arg *arg) 48 | { 49 | Arg arg2 = {.i=TWOBWM_MAXHALF_VERTICAL_LEFT}; 50 | maxhalf(&arg2); 51 | Arg arg3 = {.i=TWOBWM_TELEPORT_CENTER}; 52 | teleport(&arg3); 53 | } 54 | ///---Shortcuts---/// 55 | /* Check /usr/include/X11/keysymdef.h for the list of all keys 56 | * 0x000000 is for no modkey 57 | * If you are having trouble finding the right keycode use the `xev` to get it 58 | * For example: 59 | * KeyRelease event, serial 40, synthetic NO, window 0x1e00001, 60 | * root 0x98, subw 0x0, time 211120530, (128,73), root:(855,214), 61 | * state 0x10, keycode 171 (keysym 0x1008ff17, XF86AudioNext), same_screen YES, 62 | * XLookupString gives 0 bytes: 63 | * XFilterEvent returns: False 64 | * 65 | * The keycode here is keysym 0x1008ff17, so use 0x1008ff17 66 | * 67 | * 68 | * For AZERTY keyboards XK_1...0 should be replaced by : 69 | * DESKTOPCHANGE( XK_ampersand, 0) 70 | * DESKTOPCHANGE( XK_eacute, 1) 71 | * DESKTOPCHANGE( XK_quotedbl, 2) 72 | * DESKTOPCHANGE( XK_apostrophe, 3) 73 | * DESKTOPCHANGE( XK_parenleft, 4) 74 | * DESKTOPCHANGE( XK_minus, 5) 75 | * DESKTOPCHANGE( XK_egrave, 6) 76 | * DESKTOPCHANGE( XK_underscore, 7) 77 | * DESKTOPCHANGE( XK_ccedilla, 8) 78 | * DESKTOPCHANGE( XK_agrave, 9)* 79 | */ 80 | #define DESKTOPCHANGE(K,N) \ 81 | { MOD , K, changeworkspace, {.i=N}}, \ 82 | { MOD |SHIFT, K, sendtoworkspace, {.i=N}}, 83 | static key keys[] = { 84 | /* modifier key function argument */ 85 | // Focus to next/previous window 86 | { MOD , XK_Tab, focusnext, {.i=TWOBWM_FOCUS_NEXT}}, 87 | { MOD |SHIFT, XK_Tab, focusnext, {.i=TWOBWM_FOCUS_PREVIOUS}}, 88 | // Kill a window 89 | { MOD , XK_q, deletewin, {}}, 90 | // Resize a window 91 | { MOD |SHIFT, XK_k, resizestep, {.i=TWOBWM_RESIZE_UP}}, 92 | { MOD |SHIFT, XK_j, resizestep, {.i=TWOBWM_RESIZE_DOWN}}, 93 | { MOD |SHIFT, XK_l, resizestep, {.i=TWOBWM_RESIZE_RIGHT}}, 94 | { MOD |SHIFT, XK_h, resizestep, {.i=TWOBWM_RESIZE_LEFT}}, 95 | // Resize a window slower 96 | { MOD |SHIFT|CONTROL,XK_k, resizestep, {.i=TWOBWM_RESIZE_UP_SLOW}}, 97 | { MOD |SHIFT|CONTROL,XK_j, resizestep, {.i=TWOBWM_RESIZE_DOWN_SLOW}}, 98 | { MOD |SHIFT|CONTROL,XK_l, resizestep, {.i=TWOBWM_RESIZE_RIGHT_SLOW}}, 99 | { MOD |SHIFT|CONTROL,XK_h, resizestep, {.i=TWOBWM_RESIZE_LEFT_SLOW}}, 100 | // Move a window 101 | { MOD , XK_k, movestep, {.i=TWOBWM_MOVE_UP}}, 102 | { MOD , XK_j, movestep, {.i=TWOBWM_MOVE_DOWN}}, 103 | { MOD , XK_l, movestep, {.i=TWOBWM_MOVE_RIGHT}}, 104 | { MOD , XK_h, movestep, {.i=TWOBWM_MOVE_LEFT}}, 105 | // Move a window slower 106 | { MOD |CONTROL, XK_k, movestep, {.i=TWOBWM_MOVE_UP_SLOW}}, 107 | { MOD |CONTROL, XK_j, movestep, {.i=TWOBWM_MOVE_DOWN_SLOW}}, 108 | { MOD |CONTROL, XK_l, movestep, {.i=TWOBWM_MOVE_RIGHT_SLOW}}, 109 | { MOD |CONTROL, XK_h, movestep, {.i=TWOBWM_MOVE_LEFT_SLOW}}, 110 | // Teleport the window to an area of the screen. 111 | // Center: 112 | { MOD , XK_g, teleport, {.i=TWOBWM_TELEPORT_CENTER}}, 113 | // Center y: 114 | { MOD |SHIFT, XK_g, teleport, {.i=TWOBWM_TELEPORT_CENTER_Y}}, 115 | // Center x: 116 | { MOD |CONTROL, XK_g, teleport, {.i=TWOBWM_TELEPORT_CENTER_X}}, 117 | // Top left: 118 | { MOD , XK_y, teleport, {.i=TWOBWM_TELEPORT_TOP_LEFT}}, 119 | // Top right: 120 | { MOD , XK_u, teleport, {.i=TWOBWM_TELEPORT_TOP_RIGHT}}, 121 | // Bottom left: 122 | { MOD , XK_b, teleport, {.i=TWOBWM_TELEPORT_BOTTOM_LEFT}}, 123 | // Bottom right: 124 | { MOD , XK_n, teleport, {.i=TWOBWM_TELEPORT_BOTTOM_RIGHT}}, 125 | // Resize while keeping the window aspect 126 | { MOD , XK_Home, resizestep_aspect, {.i=TWOBWM_RESIZE_KEEP_ASPECT_GROW}}, 127 | { MOD , XK_End, resizestep_aspect, {.i=TWOBWM_RESIZE_KEEP_ASPECT_SHRINK}}, 128 | // Full screen window without borders 129 | { MOD , XK_x, maximize, {}}, 130 | //Full screen window without borders overiding offsets 131 | { MOD |SHIFT , XK_x, fullscreen, {}}, 132 | // Maximize vertically 133 | { MOD , XK_m, maxvert_hor, {.i=TWOBWM_MAXIMIZE_VERTICALLY}}, 134 | // Maximize horizontally 135 | { MOD |SHIFT, XK_m, maxvert_hor, {.i=TWOBWM_MAXIMIZE_HORIZONTALLY}}, 136 | // Maximize and move 137 | // vertically left 138 | { MOD |SHIFT, XK_y, maxhalf, {.i=TWOBWM_MAXHALF_VERTICAL_LEFT}}, 139 | // vertically right 140 | { MOD |SHIFT, XK_u, maxhalf, {.i=TWOBWM_MAXHALF_VERTICAL_RIGHT}}, 141 | // horizontally left 142 | { MOD |SHIFT, XK_b, maxhalf, {.i=TWOBWM_MAXHALF_HORIZONTAL_BOTTOM}}, 143 | // horizontally right 144 | { MOD |SHIFT, XK_n, maxhalf, {.i=TWOBWM_MAXHALF_HORIZONTAL_TOP}}, 145 | //fold half vertically 146 | { MOD |SHIFT|CONTROL,XK_y, maxhalf, {.i=TWOBWM_MAXHALF_FOLD_VERTICAL}}, 147 | //fold half horizontally 148 | { MOD |SHIFT|CONTROL,XK_b, maxhalf, {.i=TWOBWM_MAXHALF_FOLD_HORIZONTAL}}, 149 | //unfold vertically 150 | { MOD |SHIFT|CONTROL,XK_u, maxhalf, {.i=TWOBWM_MAXHALF_UNFOLD_VERTICAL}}, 151 | //unfold horizontally 152 | { MOD |SHIFT|CONTROL,XK_n, maxhalf, {.i=TWOBWM_MAXHALF_UNFOLD_HORIZONTAL}}, 153 | // Next/Previous screen 154 | { MOD , XK_comma, changescreen, {.i=TWOBWM_NEXT_SCREEN}}, 155 | { MOD , XK_period, changescreen, {.i=TWOBWM_PREVIOUS_SCREEN}}, 156 | // Raise or lower a window 157 | { MOD , XK_r, raiseorlower, {}}, 158 | // Next/Previous workspace 159 | { MOD , XK_v, nextworkspace, {}}, 160 | { MOD , XK_c, prevworkspace, {}}, 161 | // Move to Next/Previous workspace 162 | { MOD |SHIFT , XK_v, sendtonextworkspace,{}}, 163 | { MOD |SHIFT , XK_c, sendtoprevworkspace,{}}, 164 | // Iconify the window 165 | //{ MOD , XK_i, hide, {}}, 166 | // Make the window unkillable 167 | { MOD , XK_a, unkillable, {}}, 168 | // Make the window appear always on top 169 | { MOD, XK_t, always_on_top, {}}, 170 | // Make the window stay on all workspaces 171 | { MOD , XK_f, fix, {}}, 172 | // Move the cursor 173 | { MOD , XK_Up, cursor_move, {.i=TWOBWM_CURSOR_UP_SLOW}}, 174 | { MOD , XK_Down, cursor_move, {.i=TWOBWM_CURSOR_DOWN_SLOW}}, 175 | { MOD , XK_Right, cursor_move, {.i=TWOBWM_CURSOR_RIGHT_SLOW}}, 176 | { MOD , XK_Left, cursor_move, {.i=TWOBWM_CURSOR_LEFT_SLOW}}, 177 | // Move the cursor faster 178 | { MOD |SHIFT, XK_Up, cursor_move, {.i=TWOBWM_CURSOR_UP}}, 179 | { MOD |SHIFT, XK_Down, cursor_move, {.i=TWOBWM_CURSOR_DOWN}}, 180 | { MOD |SHIFT, XK_Right, cursor_move, {.i=TWOBWM_CURSOR_RIGHT}}, 181 | { MOD |SHIFT, XK_Left, cursor_move, {.i=TWOBWM_CURSOR_LEFT}}, 182 | // Start programs 183 | { MOD , XK_p, start, {.com = menucmd}}, 184 | // Start terminal 185 | { MOD , XK_Return, start, {.com = terminalcmd}}, 186 | // Exit or restart 2bwm 187 | { MOD |CONTROL, XK_q, twobwm_exit, {.i=0}}, 188 | { MOD |CONTROL, XK_r, twobwm_restart, {.i=0}}, 189 | { MOD , XK_space, halfandcentered, {.i=0}}, 190 | // Change current workspace 191 | DESKTOPCHANGE( XK_1, 0) 192 | DESKTOPCHANGE( XK_2, 1) 193 | DESKTOPCHANGE( XK_3, 2) 194 | DESKTOPCHANGE( XK_4, 3) 195 | DESKTOPCHANGE( XK_5, 4) 196 | // DESKTOPCHANGE( XK_6, 5) 197 | // DESKTOPCHANGE( XK_7, 6) 198 | // DESKTOPCHANGE( XK_8, 7) 199 | // DESKTOPCHANGE( XK_9, 8) 200 | // DESKTOPCHANGE( XK_0, 9) 201 | }; 202 | // the last argument makes it a root window only event 203 | static Button buttons[] = { 204 | { MOD ,XCB_BUTTON_INDEX_1, mousemotion, {.i=TWOBWM_MOVE}, false}, 205 | { MOD ,XCB_BUTTON_INDEX_3, mousemotion, {.i=TWOBWM_RESIZE}, false}, 206 | { 0 ,XCB_BUTTON_INDEX_3, start, {.com = menucmd}, true}, 207 | { MOD|SHIFT, XCB_BUTTON_INDEX_1, changeworkspace, {.i=0}, false}, 208 | { MOD|SHIFT, XCB_BUTTON_INDEX_3, changeworkspace, {.i=1}, false}, 209 | { MOD|ALT, XCB_BUTTON_INDEX_1, changescreen, {.i=1}, false}, 210 | { MOD|ALT, XCB_BUTTON_INDEX_3, changescreen, {.i=0}, false} 211 | }; 212 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dotfiles 2 | 3 | Abandon all hope ye who enter here 4 | 5 | ## Stuff i use 6 | - **WM**: 2bwm 7 | - **Editor**: neovim (mostly) and sometimes vis or acme 8 | - **Font**: scientifica 9 | - **Bar**: lemonbar 10 | - **Icons**: Siji 11 | - **Terminal**: st 12 | - **Shell**: bash 13 | - **PDF viewer**: zathura 14 | - **Music player**: cmus 15 | - **Program launcher**: dmenu2 16 | - Plus a lot of crap i will find using errors. 17 | -------------------------------------------------------------------------------- /compton/compton.conf: -------------------------------------------------------------------------------- 1 | # _ _ _____ . . 2 | # / / \|\/||_)|/ \|\ | 3 | # \_\_/| || |\_/| \| 4 | # 5 | # Shadow 6 | shadow = false; 7 | no-dnd-shadow = true; 8 | no-dock-shadow = false; 9 | clear-shadow = true; 10 | shadow-radius = 9; 11 | shadow-offset-x = -12; 12 | shadow-offset-y = -12; 13 | shadow-opacity = 1; 14 | # shadow-red = 0.0; 15 | # shadow-green = 0.0; 16 | # shadow-blue = 0.0; 17 | shadow-exclude = [ 18 | "name = 'Notification'", 19 | "class_g = 'Conky'", 20 | "class_g ?= 'Notify-osd'", 21 | "class_g = 'Cairo-clock'", 22 | "window_type = 'bar'", 23 | "_GTK_FRAME_EXTENTS@:c" 24 | ]; 25 | # shadow-exclude = "n:e:Notification"; 26 | # shadow-exclude-reg = "x10+0+0"; 27 | # xinerama-shadow-crop = true; 28 | 29 | # Opacity 30 | menu-opacity = 1; 31 | inactive-opacity = 1; 32 | active-opacity = 1; 33 | frame-opacity = 1; 34 | inactive-opacity-override = false; 35 | alpha-step = 0.06; 36 | # inactive-dim-fixed = true; 37 | # blur-background = true; 38 | #blur-kern = "7x7box"; 39 | # blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; 40 | blur-background-exclude = [ 41 | "name = 'panel_overlay'", 42 | "window_type = 'window'", 43 | "window_type = 'dock'", 44 | "window_type = 'desktop'", 45 | # "window_type = 'bar'", 46 | "_GTK_FRAME_EXTENTS@:c" 47 | ]; 48 | # opacity-rule = [ "80:class_g = 'URxvt'" ]; 49 | 50 | # Fading 51 | fading = true; 52 | #fade-delta = 10; 53 | fade-in-step = 0.04; 54 | fade-out-step = 0.04; 55 | # no-fading-openclose = true; 56 | # no-fading-destroyed-argb = true; 57 | fade-exclude = [ ]; 58 | 59 | # Other 60 | backend = "xrender"; 61 | mark-wmwin-focused = true; 62 | mark-ovredir-focused = true; 63 | # use-ewmh-active-win = true; 64 | detect-rounded-corners = true; 65 | detect-client-opacity = true; 66 | refresh-rate = 0; 67 | vsync = "none"; 68 | dbe = false; 69 | paint-on-overlay = true; 70 | # sw-opti = true; 71 | # unredir-if-possible = true; 72 | # unredir-if-possible-delay = 5000; 73 | # unredir-if-possible-exclude = [ ]; 74 | focus-exclude = [ "class_g = 'Cairo-clock'" ]; 75 | detect-transient = true; 76 | detect-client-leader = true; 77 | invert-color-include = [ ]; 78 | # resize-damage = 1; 79 | 80 | # GLX backend 81 | # glx-no-stencil = true; 82 | glx-copy-from-front = false; 83 | # glx-use-copysubbuffermesa = true; 84 | # glx-no-rebind-pixmap = true; 85 | glx-swap-method = "undefined"; 86 | # glx-use-gpushader4 = true; 87 | # xrender-sync = true; 88 | # xrender-sync-fence = true; 89 | 90 | # Window type settings 91 | wintypes: 92 | { 93 | tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; }; 94 | }; 95 | -------------------------------------------------------------------------------- /dmenu2/dmenu2_run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | 3 | # Geometry 4 | menu_x=341 5 | menu_y=40 6 | menu_h=40 7 | menu_w=683 8 | underline_h=2 9 | geometry="-b -x ${menu_x} -h ${menu_y} -w ${menu_w} -uh ${underline_h}" 10 | 11 | 12 | 13 | # Font 14 | font='scientifica-11:bold' 15 | 16 | # Colors 17 | normal_bg="#121c21" 18 | normal_fg="#aaafb2" 19 | selection_bg="#1e2e36" 20 | selection_fg="#76a08c" 21 | underline_bg="#7b8e98" 22 | 23 | # Run 24 | dmenu_run -z ${geometry} -p Open: -fn ${font} -nb "#121c21" -nf "#aaafb2" -sb "#1e2e36" -sf "#76a08c" -uc "#7b8e98" 25 | -------------------------------------------------------------------------------- /dots/.Xmodmap: -------------------------------------------------------------------------------- 1 | clear lock 2 | clear control 3 | add control = Caps_Lock Control_L Control_R 4 | keycode 66 = Control_L Caps_Lock NoSymbol NoSymbol 5 | -------------------------------------------------------------------------------- /dots/.Xresources: -------------------------------------------------------------------------------- 1 | #define bg #242e32 2 | #define fg #c4c4b5 3 | #define blk #253034 4 | #define bblk #35444b 5 | #define red #a66959 6 | #define grn #769070 7 | #define ylw #ac8d6e 8 | #define blu #607a86 9 | #define mag #8a757e 10 | #define cyn #60867f 11 | #define wht #c4c4b5 12 | #define bred #a66959 13 | #define bgrn #769070 14 | #define bylw #ac8d6e 15 | #define bblu #607a86 16 | #define bmag #8a757e 17 | #define bcyn #60867f 18 | #define bwht #c4c4b5 19 | 20 | ! Colors 21 | *background: bg 22 | *foreground: fg 23 | *color0: blk 24 | *color8: bblk 25 | *color1: red 26 | *color9: bred 27 | *color2: grn 28 | *color10: bgrn 29 | *color3: ylw 30 | *color11: bylw 31 | *color4: blu 32 | *color12: bblu 33 | *color5: mag 34 | *color13: bmag 35 | *color6: cyn 36 | *color14: bcyn 37 | *color7: wht 38 | *color15: bwht 39 | 40 | URxvt*font: xft:scientifica:regular:size=11 41 | -------------------------------------------------------------------------------- /dots/.bash_profile: -------------------------------------------------------------------------------- 1 | # .bash_profile 2 | 3 | # Get the aliases and functions 4 | [ -f $HOME/.bashrc ] && . $HOME/.bashrc 5 | 6 | if [[ -z "$DISPLAY" ]]; then exec startx; fi 7 | -------------------------------------------------------------------------------- /dots/.bashrc: -------------------------------------------------------------------------------- 1 | # .bashrc 2 | 3 | # If not running interactively, don't do anything 4 | [[ $- != *i* ]] && return 5 | 6 | alias ls='ls --color=auto' 7 | PS1='$( 8 | [ $? -eq 0 ] && color=2 || color=1 9 | [ -z "${PWD##$HOME*}" ] && pwd="~${PWD#$HOME}" || pwd="$PWD" 10 | 11 | printf "\n" 12 | printf "\033[1;3%sm│\033[m %s%s\n" "\[$color\]" "$pwd" "$(git-status)" 13 | printf "\033[1;3%sm│\033[m" "\[$color\]" 14 | ) ' 15 | 16 | export FZF_DEFAULT_COMMAND='ag --depth 10 --hidden --ignore .git -f -g ""' 17 | 18 | export FZF_DEFAULT_OPTS='--height 40%' 19 | 20 | export PATH=$PATH:$HOME/bin 21 | export PATH=$PATH:/root/.local/bin 22 | 23 | set -o vi 24 | 25 | PLAN9=/home/natskyge/pkgsrc/plan9port export PLAN9 26 | PATH=$PATH:$PLAN9/bin export PATH 27 | 28 | alias r='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"' 29 | 30 | alias yt='youtube-viewer' 31 | alias zat='zathura $(fzf)' 32 | 33 | [ -f ~/.fzf.bash ] && source ~/.fzf.bash 34 | -------------------------------------------------------------------------------- /dots/.xbindkeysrc: -------------------------------------------------------------------------------- 1 | "~/bin/volume +" 2 | XF86AudioRaiseVolume 3 | 4 | "~/bin/volume -" 5 | XF86AudioLowerVolume 6 | 7 | "~/bin/volume !" 8 | XF86AudioMute 9 | 10 | "~/bin/popup $(~/bin/volume level)" 11 | XF86AudioRaiseVolume 12 | 13 | "~/bin/popup $(~/bin/volume level)" 14 | XF86AudioLowerVolume 15 | 16 | "~/bin/popup $(~/bin/volume level)" 17 | XF86AudioMute 18 | -------------------------------------------------------------------------------- /dots/.xinitrc: -------------------------------------------------------------------------------- 1 | # Load configs 2 | xrdb -merge ~/.Xresources 3 | xmodmap ~/.Xmodmap 4 | xbindkeys 5 | udiskie & 6 | 7 | xset +fp /home/natskyge/.fonts 8 | xset fp rehash 9 | 10 | # Background image 11 | feh --bg-fill "$HOME/usr/images/wallpaper/New_York.jpg" 12 | 13 | # Statusbar 14 | bar | lemonbar -a 5 -b -d -p -f "scientifica:size=11:style=bold" -f '-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1' -B "#121c21" -F "#aaafb2" -g 1366x40+0+0 | sh & 15 | 16 | # Compton 17 | compton --config ~/.config/compton/compton.conf -b 18 | 19 | # sxhkd 20 | # sxhkd -c $HOME/.config/sxhkd/sxhkdrc & 21 | 22 | #windowchef& 23 | 2bwm& 24 | exec st 25 | 26 | redshift 27 | -------------------------------------------------------------------------------- /init.sh: -------------------------------------------------------------------------------- 1 | echo "Attempting to create symbolic links" 2 | ln -s -f ~/dotfiles/2bwm/config.h ~/pkgsrc/2bwm/config.h 3 | ln -s -f ~/dotfiles/dmenu2/dmenu2_run ~/bin/dmenu2_run 4 | ln -s -f ~/dotfiles/dots/.Xmodmap ~/.Xmodmap 5 | ln -s -f ~/dotfiles/dots/.Xresources ~/.Xresources 6 | ln -s -f ~/dotfiles/dots/.bash_profile ~/.bash_profile 7 | ln -s -f ~/dotfiles/dots/.bashrc ~/.bashrc 8 | ln -s -f ~/dotfiles/dots/.xbindkeysrc ~/.xbindkeysrc 9 | ln -s -f ~/dotfiles/dots/.xinitrc ~/.xinitrc 10 | ln -s -f ~/dotfiles/lemonbar/bar ~/bin/bar 11 | ln -s -f ~/dotfiles/nvim/init.vim ~/.config/nvim/init.vim 12 | ln -s -f ~/dotfiles/scripts/a ~/bin/a 13 | ln -s -f ~/dotfiles/scripts/cmusnp ~/bin/cmusnp 14 | ln -s -f ~/dotfiles/scripts/git-status ~/bin/git-status 15 | ln -s -f ~/dotfiles/scripts/playpause ~/bin/playpause 16 | ln -s -f ~/dotfiles/scripts/popup ~/bin/popup 17 | ln -s -f ~/dotfiles/scripts/ufetch ~/bin/ufetch 18 | ln -s -f ~/dotfiles/scripts/update ~/bin/update 19 | ln -s -f ~/dotfiles/scripts/volume ~/bin/volume 20 | ln -s -f ~/dotfiles/st/config.h ~/pkgsrc/st/config.h 21 | ln -s -f ~/dotfiles/vis/visrc.lua ~/.config/vis/visrc.lua 22 | ln -s -f ~/dotfiles/zathura/zathurarc ~/.config/zathura/zathurarc 23 | echo "Success!" 24 | -------------------------------------------------------------------------------- /lemonbar/bar: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | #Colors 4 | colorAccent="#76a08c" 5 | grayAccent="#3f6173" 6 | defaultbg="#121c21" 7 | 8 | # State of popup, 0 off, 1 on 9 | poup=0 10 | pidof_popup=-1 11 | 12 | 13 | # Define the clock 14 | Clock() { 15 | TIME=$(date "+%R") 16 | 17 | echo -n -e "%{F${colorAccent}}\ue016%{F-} $TIME" 18 | } 19 | 20 | Battery() { 21 | battery="$( /dev/null 61 | then 62 | status=$( cmus-remote -Q | grep status\ | sed 's/status //' ) 63 | if [[ "$status" = *playing* ]] || [[ "$status" = *paused* ]] 64 | then 65 | artist=$( cmus-remote -Q | grep tag\ artist\ | sed 's/tag artist //' ) 66 | title=$( cmus-remote -Q | grep tag\ title\ | sed 's/tag title //' ) 67 | 68 | echo "$title - $artist%{O15}" 69 | elif [[ "$status" = *stopped* ]] 70 | then 71 | echo "" 72 | fi 73 | else 74 | echo 75 | fi 76 | } 77 | 78 | playPause() { 79 | if pgrep -x "cmus" > /dev/null 80 | then 81 | status=$( cmus-remote -Q | grep status\ | sed 's/status //' ) 82 | if [[ "$status" = *playing* ]] 83 | then 84 | echo -ne "%{A:sh | cmus-remote --pause:}%{F${colorAccent}}\ue059%{F-}%{A}" 85 | elif [[ "$status" = *paused* ]] 86 | then 87 | echo -ne "%{A:sh | cmus-remote --play:}%{F${colorAccent}}\ue058%{F-}%{A}" 88 | elif [[ "$status" = *stopped* ]] 89 | then 90 | echo -ne "%{A:sh | cmus-remote --play:}%{F${colorAccent}}\ue057%{F-}%{A}" 91 | fi 92 | else 93 | echo -ne " \ue057 " 94 | fi 95 | } 96 | 97 | prev() { 98 | echo -ne "%{A:sh | cmus-remote --prev:}%{F${colorAccent}}\ue055%{F-}%{A}" 99 | } 100 | 101 | next() { 102 | echo -ne "%{A:sh | cmus-remote --next:}%{F${colorAccent}}\ue05b%{F-}%{A}" 103 | } 104 | 105 | popupBar() { 106 | if [[ ${popup} = 0 ]] 107 | then 108 | popup=1 109 | pidof_popup=$(n30f -x 12 -y 40 ~/dotfiles/wallpaper/popup.png & echo $!) 110 | else 111 | popup=0 112 | fi 113 | } 114 | 115 | # Print the clock 116 | while true; do 117 | BAR_INPUT="%{l}%{B${colorAccent}}%{F${defaultbg}}%{O17}+%{O17}%{F-}%{B-} 118 | %{B${defaultbg}}%{O15}$(Clock)%{O15}$(Battery)%%{O15}%{B-} 119 | %{c}%{B${defaultbg}}%{O15}$(Tabs)%{O15}%{B-} 120 | %{r}%{O15}%{B${defaultbg}}%{O15}$(NowPlaying)$(prev)%{O15}$(playPause)%{O15}$(next)%{O15}%{B-}" 121 | echo $BAR_INPUT 122 | sleep 0.25 123 | done 124 | -------------------------------------------------------------------------------- /nvim/init.vim: -------------------------------------------------------------------------------- 1 | "dein Scripts----------------------------- 2 | if &compatible 3 | set nocompatible " Be iMproved 4 | endif 5 | 6 | " Required: 7 | set runtimepath+=/home/natskyge/.config/nvim/dein/repos/github.com/Shougo/dein.vim 8 | 9 | " Required: 10 | if dein#load_state('/home/natskyge/.config/nvim/dein') 11 | call dein#begin('/home/natskyge/.config/nvim/dein') 12 | 13 | " Let dein manage dein 14 | " Required: 15 | call dein#add('/home/natskyge/.config/nvim/dein/repos/github.com/Shougo/dein.vim') 16 | 17 | " Plugins 18 | call dein#add('ncm2/ncm2') 19 | call dein#add('roxma/nvim-yarp') 20 | call dein#add('ncm2/ncm2-bufword') 21 | call dein#add('ncm2/ncm2-path') 22 | call dein#add('raimondi/delimitmate') 23 | call dein#add('scrooloose/nerdtree') 24 | call dein#add('junegunn/fzf', { 'build': './install --all', 'merged': 0 }) 25 | call dein#add('junegunn/fzf.vim', { 'depends': 'fzf' }) 26 | call dein#add('ap/vim-buftabline') 27 | call dein#add('justinmk/vim-sneak') 28 | call dein#add('w0rp/ale') 29 | call dein#add('hkupty/iron.nvim') 30 | call dein#add('junegunn/rainbow_parentheses.vim') 31 | call dein#add('NLKNguyen/c-syntax.vim') 32 | call dein#add('chriskempson/base16-vim') 33 | call dein#add('lervag/vimtex') 34 | call dein#add('junegunn/goyo.vim') 35 | call dein#add('godlygeek/tabular') 36 | call dein#add('plasticboy/vim-markdown') 37 | call dein#add('vim-scripts/paredit.vim') 38 | 39 | " Required: 40 | call dein#end() 41 | call dein#save_state() 42 | endif 43 | 44 | " Required: 45 | filetype plugin indent on 46 | syntax enable 47 | 48 | " Install on startup 49 | if dein#check_install() 50 | call dein#install() 51 | endif 52 | 53 | "End dein Scripts------------------------- 54 | 55 | "Plugin setup----------------------------- 56 | 57 | "Deoplete 58 | "call deoplete#enable() 59 | " inoremap pumvisible() ? "\" : "\" 60 | " let g:deoplete#enable_at_startup = 1 61 | 62 | " ncm2 63 | " enable ncm2 for all buffers 64 | autocmd BufEnter * call ncm2#enable_for_buffer() 65 | 66 | " IMPORTANT: :help Ncm2PopupOpen for more information 67 | set completeopt=noinsert,menuone,noselect 68 | 69 | " suppress the annoying 'match x of y', 'The only match' and 'Pattern not 70 | " found' messages 71 | set shortmess+=c 72 | 73 | " CTRL-C doesn't trigger the InsertLeave autocmd . map to instead. 74 | inoremap 75 | 76 | " When the key is pressed while the popup menu is visible, it only 77 | " hides the menu. Use this mapping to close the menu and also start a new 78 | " line. 79 | inoremap (pumvisible() ? "\\" : "\") 80 | 81 | " Use to select the popup menu: 82 | inoremap pumvisible() ? "\" : "\" 83 | inoremap pumvisible() ? "\" : "\" 84 | 85 | "Confiugre with LaTeX 86 | augroup my_cm_setup 87 | autocmd! 88 | autocmd BufEnter * call ncm2#enable_for_buffer() 89 | autocmd Filetype tex call ncm2#register_source({ 90 | \ 'name' : 'vimtex-cmds', 91 | \ 'priority': 8, 92 | \ 'complete_length': -1, 93 | \ 'scope': ['tex'], 94 | \ 'matcher': {'name': 'prefix', 'key': 'word'}, 95 | \ 'word_pattern': '\w+', 96 | \ 'complete_pattern': g:vimtex#re#ncm2#cmds, 97 | \ 'on_complete': ['ncm2#on_complete#omni', 'vimtex#complete#omnifunc'], 98 | \ }) 99 | autocmd Filetype tex call ncm2#register_source({ 100 | \ 'name' : 'vimtex-labels', 101 | \ 'priority': 8, 102 | \ 'complete_length': -1, 103 | \ 'scope': ['tex'], 104 | \ 'matcher': {'name': 'combine', 105 | \ 'matchers': [ 106 | \ {'name': 'substr', 'key': 'word'}, 107 | \ {'name': 'substr', 'key': 'menu'}, 108 | \ ]}, 109 | \ 'word_pattern': '\w+', 110 | \ 'complete_pattern': g:vimtex#re#ncm2#labels, 111 | \ 'on_complete': ['ncm2#on_complete#omni', 'vimtex#complete#omnifunc'], 112 | \ }) 113 | autocmd Filetype tex call ncm2#register_source({ 114 | \ 'name' : 'vimtex-files', 115 | \ 'priority': 8, 116 | \ 'complete_length': -1, 117 | \ 'scope': ['tex'], 118 | \ 'matcher': {'name': 'combine', 119 | \ 'matchers': [ 120 | \ {'name': 'abbrfuzzy', 'key': 'word'}, 121 | \ {'name': 'abbrfuzzy', 'key': 'abbr'}, 122 | \ ]}, 123 | \ 'word_pattern': '\w+', 124 | \ 'complete_pattern': g:vimtex#re#ncm2#files, 125 | \ 'on_complete': ['ncm2#on_complete#omni', 'vimtex#complete#omnifunc'], 126 | \ }) 127 | autocmd Filetype tex call ncm2#register_source({ 128 | \ 'name' : 'bibtex', 129 | \ 'priority': 8, 130 | \ 'complete_length': -1, 131 | \ 'scope': ['tex'], 132 | \ 'matcher': {'name': 'combine', 133 | \ 'matchers': [ 134 | \ {'name': 'prefix', 'key': 'word'}, 135 | \ {'name': 'abbrfuzzy', 'key': 'abbr'}, 136 | \ {'name': 'abbrfuzzy', 'key': 'menu'}, 137 | \ ]}, 138 | \ 'word_pattern': '\w+', 139 | \ 'complete_pattern': g:vimtex#re#ncm2#bibtex, 140 | \ 'on_complete': ['ncm2#on_complete#omni', 'vimtex#complete#omnifunc'], 141 | \ }) 142 | augroup END 143 | 144 | 145 | "FZF 146 | let g:fzf_action = { 147 | \ 'ctrl-s': 'split', 148 | \ 'ctrl-v': 'vsplit' 149 | \ } 150 | let $FZF_DEFUALT_COMMAND='ag --depth 10 --hiden --ignore .git -f -g ""' 151 | au FileType fzf tnoremap 152 | 153 | "Delimitmate 154 | au FileType c let b:delimitMate_expand_cr = 1 155 | 156 | "Vim sneak 157 | map f Sneak_s 158 | map F Sneak_S 159 | 160 | "Buftabline 161 | let g:buftabline_numbers=2 162 | 163 | "LaTeX 164 | let g:tex_flavor = 'latex' 165 | let g:tex_fast = "bMpr" 166 | let g:vimtex_view_general_viewer = 'zathura' 167 | let g:vimtex_view_automatic = 0 168 | let g:vimtex_compiler_progname = 'nvr' 169 | 170 | "Paredit 171 | let g:paredit_electric_return = 0 172 | 173 | "End plugin setup------------------------- 174 | 175 | 176 | 177 | "Keybindings------------------------------ 178 | 179 | " Set to SPC 180 | let mapleader=" " 181 | 182 | " Buffers, use b + key too: 183 | "n - Switch to the next buffer 184 | nnoremap bn :bnext 185 | "p - Switch to the previouse buffer 186 | nnoremap bp :bprev 187 | " - Switch to buffer with number 188 | nmap b1 BufTabLine.Go(1) 189 | nmap b2 BufTabLine.Go(2) 190 | nmap b3 BufTabLine.Go(3) 191 | nmap b4 BufTabLine.Go(4) 192 | nmap b5 BufTabLine.Go(5) 193 | nmap b6 BufTabLine.Go(6) 194 | nmap b7 BufTabLine.Go(7) 195 | nmap b8 BufTabLine.Go(8) 196 | nmap b9 BufTabLine.Go(9) 197 | nmap b0 BufTabLine.Go(10) 198 | "d - kill current buffer 199 | nnoremap bd :bd 200 | nnoremap bD :bd! 201 | 202 | " Windows, use w + key too: 203 | set splitbelow 204 | set splitright 205 | "v - Opens a veritcal split on the right 206 | nnoremap wv :vsp 207 | nnoremap wV :vsp! 208 | "s - Opens a horizontal split below 209 | nnoremap ws :split 210 | nnoremap wS :split! 211 | "d - Close split 212 | nnoremap wd :close 213 | nnoremap wD :close! 214 | "h/j/k/l - Navigate among windows 215 | nnoremap wk :wincmd k 216 | nnoremap wj :wincmd j 217 | nnoremap wh :wincmd h 218 | nnoremap wl :wincmd l 219 | 220 | " Files, use f + key too: 221 | "f - Opens a buffer to search for files in the current directory. 222 | nnoremap ff :FZF 223 | nnoremap fF :FZF! 224 | "h - Opens a buffer to search for files in the home directory. 225 | nnoremap fh :FZF ~/ 226 | nnoremap fH :FZF! ~/ 227 | "s - Save the current file 228 | nnoremap fs :w 229 | nnoremap fS :w! 230 | "x - Save the current file and quit 231 | nnoremap fx :x 232 | nnoremap fX :x! 233 | "n - Create new file 234 | nnoremap fn :e 235 | nnoremap fN :e! 236 | "t - Open tree file browser 237 | nnoremap ft :NERDTreeToggle 238 | nnoremap fT :NERDTreeToggle! 239 | 240 | " The init.vim file 241 | " f e d - Open your init.vim 242 | nnoremap fed :e ~/.config/nvim/init.vim 243 | nnoremap feD :e! ~/.config/nvim/init.vim 244 | 245 | " Quit with q + key 246 | " Soft quit 247 | nnoremap qq :q 248 | nnoremap qQ :q! 249 | 250 | " Open command line with 251 | nnoremap : 252 | 253 | " Use l + letter to turn grammar checking on 254 | "d - Turn on danish grammar checking 255 | nnoremap lda :set spell spelllang=da 256 | "e - Turn on english grammar checking 257 | nnoremap len :set spell spelllang=en_us 258 | "n - Turn of grammar checking 259 | nnoremap lno :set spell spelllang="" 260 | 261 | " Use to exit terminal mode 262 | tnoremap 263 | 264 | " Iron.vim keybindings, use r + letter to: 265 | "s - Start repl 266 | nnoremap rs :IronRepl:resize 10a 267 | 268 | " Terminal 269 | nnoremap t :split:resize 10:term 270 | 271 | nnoremap lp :!lvprw %:p & 272 | 273 | "End keybindings-------------------------- 274 | 275 | 276 | "Colorscheme------------------------------ 277 | 278 | "hi Normal ctermbg=none 279 | set termguicolors 280 | set cursorline 281 | set background=light 282 | colorscheme agila 283 | 284 | " Solarized 285 | "hi BufTabLineActive guibg=#073642 guifg=#839496 286 | "hi BufTabLineCurrent guibg=#002b36 guifg=#839496 287 | "hi BufTabLineHidden guibg=#073642 guifg=#839496 288 | "hi BufTabLineFill guibg=#073642 guifg=#073642 289 | 290 | set listchars=tab:│\ ,nbsp:␣,trail:∙,extends:>,precedes:<,eol:¬ 291 | set fillchars=vert:\│ 292 | set list 293 | 294 | "End colorscheme-------------------------- 295 | 296 | 297 | "Misc------------------------------------- 298 | 299 | "Set number linee 300 | set nu 301 | 302 | "Set hidden 303 | set hidden 304 | 305 | " Set width to 80 and highlight text a columne 81 306 | set textwidth=80 307 | 2mat ErrorMsg '\%81v.' 308 | 309 | "Set unicode encoding, just to be sure 310 | set encoding=utf-8 311 | 312 | set wildignore+=.git,.hg,.svn 313 | set wildignore+=*.aux,*.out,*.toc 314 | set wildignore+=*.o,*.obj,*.exe,*.dll,*.manifest,*.rbc,*.class 315 | set wildignore+=*.ai,*.bmp,*.gif,*.ico,*.jpg,*.jpeg,*.png,*.psd,*.webp 316 | set wildignore+=*.avi,*.divx,*.mp4,*.webm,*.mov,*.m2ts,*.mkv,*.vob,*.mpg,*.mpeg 317 | set wildignore+=*.mp3,*.oga,*.ogg,*.wav,*.flac 318 | set wildignore+=*.eot,*.otf,*.ttf,*.woff 319 | set wildignore+=*.doc,*.pdf,*.cbr,*.cbz 320 | set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz,*.kgb 321 | set wildignore+=*.swp,.lock,.DS_Store,._* 322 | 323 | set shiftwidth=4 " indent = 4 spaces 324 | set noexpandtab " tabs are tabs 325 | set tabstop=4 " tab = 4 spaces 326 | set softtabstop=4 " backspace through spaces 327 | 328 | " Fold 329 | set foldmethod=marker 330 | 331 | "End misc--------------------------------- 332 | -------------------------------------------------------------------------------- /scripts/a: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export SHELL="$PLAN9/bin/rc" 4 | export acmeshell="$PLAN9/bin/rc" 5 | export BROWSER=safari 6 | export tabstop=4 7 | export TERM=dumb 8 | export PAGER=nobs 9 | 10 | # Path to 'a' script itself 11 | acme_bin_dir=$( cd $(dirname $0) && pwd ) 12 | 13 | # Where are the plumber rules? 14 | acme_plumber_rules="$acme_bin_dir/../plumbing" 15 | 16 | if [ "$(pgrep plumber)" ]; then 17 | echo plumber is running 18 | else 19 | echo starting plumber 20 | plumber 21 | cat "$acme_plumber_rules" "$PLAN9/plumb/basic" | 9p write plumb/rules 22 | fi 23 | 24 | acme -a -f /mnt/font/'DejaVu Sans Mono'/10a/font $1 25 | -------------------------------------------------------------------------------- /scripts/cmusnp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if pgrep -x "cmus" > /dev/null 4 | then 5 | status=$( cmus-remote -Q | grep status\ | sed 's/status //' ) 6 | if [[ "$status" = *playing* ]] || [[ "$status" = *paused* ]] 7 | then 8 | artist=$( cmus-remote -Q | grep tag\ artist\ | sed 's/tag artist //' ) 9 | title=$( cmus-remote -Q | grep tag\ title\ | sed 's/tag title //' ) 10 | 11 | echo $title - $artist 12 | elif [[ "$status" = *stopped* ]] 13 | then 14 | echo " " 15 | fi 16 | else 17 | echo 18 | fi 19 | -------------------------------------------------------------------------------- /scripts/git-status: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | git rev-parse 2> /dev/null || exit 1 3 | 4 | git status --porcelain -b | awk ' 5 | 6 | /^## / { 7 | branch = $0; 8 | sub(/^## /, "", branch); 9 | sub(/\.\.\..*/, "", branch); 10 | 11 | if ($0 ~ /ahead /) { 12 | ahead = $0; 13 | sub(/.*ahead /, "", ahead); 14 | sub(/\].*|, .*/, "", ahead); 15 | } 16 | 17 | if ($0 ~ /behind /) { 18 | behind = $0; 19 | sub(/.*behind /, "", behind); 20 | sub(/\].*|, .*/, "", behind); 21 | } 22 | 23 | next; 24 | } 25 | 26 | /^\?\? / { untracked++; next; } 27 | /^U. / { conflicts++; next; } 28 | /^.U / { conflicts++; next; } 29 | /^DD / { conflicts++; next; } 30 | /^AA / { conflicts++; next; } 31 | /^.M / { changed++; } 32 | /^.D / { changed++; } 33 | /^[^ ]. / { staged++; } 34 | 35 | END { 36 | printf(" %s", branch); 37 | 38 | if (untracked) printf(" ?%d", untracked); 39 | if (conflicts) printf(" x%d", conflicts); 40 | if (changed ) printf(" +%d", changed); 41 | if (staged ) printf(" #%d", staged); 42 | if (behind ) printf(" v%d", behind); 43 | if (ahead ) printf(" ^%d", ahead); 44 | }' 45 | 46 | [ -d "$(git rev-parse --git-dir)/rebase-merge" ] && printf ' rebase' 47 | 48 | printf '\n' 49 | -------------------------------------------------------------------------------- /scripts/playpause: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if pgrep -x "cmus" > /dev/null 4 | then 5 | status=$( cmus-remote -Q | grep status\ | sed 's/status //' ) 6 | if [[ "$status" = *playing* ]] 7 | then 8 | echo -ne " %{F#70a070}\ue059 " 9 | elif [[ "$status" = *paused* ]] 10 | then 11 | echo -ne " %{F#70a070}\ue058 " 12 | elif [[ "$status" = *stopped* ]] 13 | then 14 | echo -ne " %{F#70a070}\ue057 " 15 | fi 16 | else 17 | echo -ne " \ue057 " 18 | fi 19 | -------------------------------------------------------------------------------- /scripts/popup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # how long should the popup remain? 4 | duration=3 5 | 6 | # define geometry 7 | barx=341 8 | bary=0 9 | barw=683 10 | barh=40 11 | 12 | # colors 13 | bar_bg='#121c21' 14 | bar_fg='#aaafb2' # white is default 15 | 16 | # font used 17 | bar_font='scientifica:size=11' 18 | 19 | # compute all this 20 | baropt="-b -g ${barw}x${barh}+${barx}+${bary} -B${bar_bg} -f ${bar_font}" 21 | 22 | # Create the popup and make it live for 3 seconds 23 | (echo "%{c}$@"; sleep ${duration}) | lemonbar ${baropt} 24 | -------------------------------------------------------------------------------- /scripts/ufetch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # ufetch-void - tiny system info for void linux 4 | # 5 | 6 | ## INFO 7 | 8 | # user is already defined 9 | hostname="$(hostname)" 10 | os='Void Linux' 11 | kernel="$(uname -sr)" 12 | uptime="$(uptime -p | sed 's/up //')" 13 | packages="$(xbps-query -l | wc -l)" 14 | shell="$(basename ${SHELL})" 15 | WM='2bwm' 16 | 17 | ## DEFINE COLORS 18 | 19 | # probably don't change these 20 | bc="$(tput bold)" # bold 21 | c0="$(tput setaf 0)" # black 22 | c1="$(tput setaf 1)" # red 23 | c2="$(tput setaf 2)" # green 24 | c3="$(tput setaf 3)" # yellow 25 | c4="$(tput setaf 4)" # blue 26 | c5="$(tput setaf 5)" # magenta 27 | c6="$(tput setaf 6)" # cyan 28 | c7="$(tput setaf 7)" # white 29 | rc="$(tput sgr0)" # reset 30 | 31 | # you can change these 32 | lc="${rc}${bc}${c1}" # labels 33 | nc="${rc}${bc}${c4}" # user and hostname 34 | ic="${rc}${bc}${c7}" # info 35 | fc="${rc}${bc}${c2}" # first color 36 | sc="${rc}${c2}" # second color 37 | 38 | ## OUTPUT 39 | 40 | cat </dev/null;; 23 | -) amixer set Master 5%- >/dev/null;; 24 | !) amixer set Master toggle >/dev/null;; 25 | state|level) $1;; 26 | *) amixer set Master $1 >/dev/null;; 27 | esac 28 | -------------------------------------------------------------------------------- /st/config.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | 3 | 4 | /* 5 | * appearance 6 | * 7 | * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html 8 | */ 9 | //char font[] = "-misc-tamzen-medium-r-normal--14-101-100-100-c-70-iso8859-1:pixelsize=14:antialias=false:autohint=true"; 10 | //char font[] = "Spectra:pixelsize=14:antialias=false:autohint=true"; 11 | //char font[] = "scientifica:pixelsize=11:antialias=false:autohint=true"; 12 | //char font[] = "-Misc-Tamsyn-Medium-R-Normal--20-145-100-100-C-100-ISO8859-1:pixelsize=15:antialias=false:autohint=true"; 13 | char font[] = "cherry:pixelsize=11:antialias=false:autohint=true"; 14 | int borderpx = 25; 15 | 16 | /* 17 | * What program is execed by st depends of these precedence rules: 18 | * 1: program passed with -e 19 | * 2: utmp option 20 | * 3: SHELL environment variable 21 | * 4: value of shell in /etc/passwd 22 | * 5: value of shell in config.h 23 | */ 24 | static char shell[] = "/bin/sh"; 25 | static char *utmp = NULL; 26 | static char stty_args[] = "stty raw pass8 nl -echo -iexten -cstopb 38400"; 27 | 28 | /* identification sequence returned in DA and DECID */ 29 | static char vtiden[] = "\033[?6c"; 30 | 31 | /* Kerning / character bounding-box multipliers */ 32 | float cwscale = 1.0; 33 | float chscale = 1.0; 34 | 35 | /* 36 | * word delimiter string 37 | * 38 | * More advanced example: " `'\"()[]{}" 39 | */ 40 | static char worddelimiters[] = " "; 41 | 42 | /* selection timeouts (in milliseconds) */ 43 | unsigned int doubleclicktimeout = 300; 44 | unsigned int tripleclicktimeout = 600; 45 | 46 | /* alt screens */ 47 | int allowaltscreen = 1; 48 | 49 | /* frames per second st should at maximum draw to the screen */ 50 | unsigned int xfps = 120; 51 | unsigned int actionfps = 30; 52 | 53 | /* 54 | * blinking timeout (set to 0 to disable blinking) for the terminal blinking 55 | * attribute. 56 | */ 57 | unsigned int blinktimeout = 800; 58 | 59 | /* 60 | * thickness of underline and bar cursors 61 | */ 62 | unsigned int cursorthickness = 2; 63 | 64 | /* 65 | * bell volume. It must be a value between -100 and 100. Use 0 for disabling 66 | * it 67 | */ 68 | static int bellvolume = 0; 69 | 70 | /* default TERM value */ 71 | char termname[] = "st-256color"; 72 | 73 | /* 74 | * spaces per tab 75 | * 76 | * When you are changing this value, don't forget to adapt the »it« value in 77 | * the st.info and appropriately install the st.info in the environment where 78 | * you use this st version. 79 | * 80 | * it#$tabspaces, 81 | * 82 | * Secondly make sure your kernel is not expanding tabs. When running `stty 83 | * -a` »tab0« should appear. You can tell the terminal to not expand tabs by 84 | * running following command: 85 | * 86 | * stty tabs 87 | */ 88 | static unsigned int tabspaces = 8; 89 | 90 | /* Terminal colors (16 first used in escape sequence) */ 91 | const char *colorname[] = { 92 | 93 | /* ----- agila ----- */ 94 | "#1e2e36", /* base01 */ 95 | "#f0696f", /* base08 */ 96 | "#76a08c", /* base0B */ 97 | "#f7cca1", /* base0A */ 98 | "#718c97", /* base0D */ 99 | "#877366", /* base0F */ 100 | "#bcd9e8", /* base0C */ 101 | "#dae0ed", /* base06 */ 102 | "#121c21", /* base00 */ 103 | "#fa9a6a", /* base09 */ 104 | "#304b59", /* base02 */ 105 | "#3f6173", /* base03 */ 106 | "#7b8e98", /* base04 */ 107 | "#ceb5ce", /* base0E */ 108 | "#aaafb2", /* base05 */ 109 | "#cfcfcf", /* base07 */ 110 | 111 | ///* ---- designr ---- */ 112 | //"#253034", /* base01 */ 113 | //"#a66959", /* base08 */ 114 | //"#769070", /* base0B */ 115 | //"#ac8d6e", /* base0A */ 116 | //"#607a86", /* base0D */ 117 | //"#907B63", /* base0F */ 118 | //"#60867f", /* base0C */ 119 | //"#242e32", /* base06 */ 120 | //"#242e32", /* base00 */ 121 | //"#a97b63", /* base09 */ 122 | //"#2B373C", /* base02 */ 123 | //"#35444b", /* base03 */ 124 | //"#838a85", /* base04 */ 125 | //"#8a757e", /* base0E */ 126 | //"#c4c4b5", /* base05 */ 127 | //"#c4c4b5", /* base07 */ 128 | }; 129 | 130 | /* 131 | * Default colors (colorname index) 132 | * foreground, background, cursor, reverse cursor 133 | */ 134 | unsigned int defaultfg = 14; 135 | unsigned int defaultbg = 8; 136 | unsigned int defaultcs = 14; 137 | unsigned int defaultrcs = 15; 138 | 139 | /* 140 | * Default shape of cursor 141 | * 2: Block ("█") 142 | * 4: Underline ("_") 143 | * 6: Bar ("|") 144 | * 7: Snowman ("☃") 145 | */ 146 | unsigned int cursorshape = 2; 147 | 148 | /* 149 | * Default columns and rows numbers 150 | */ 151 | 152 | unsigned int cols = 80; 153 | unsigned int rows = 24; 154 | 155 | /* 156 | * Default colour and shape of the mouse cursor 157 | */ 158 | unsigned int mouseshape = XC_xterm; 159 | unsigned int mousefg = 7; 160 | unsigned int mousebg = 0; 161 | 162 | /* 163 | * Color used to display font attributes when fontconfig selected a font which 164 | * doesn't match the ones requested. 165 | */ 166 | unsigned int defaultattr = 11; 167 | 168 | /* 169 | * Internal mouse shortcuts. 170 | * Beware that overloading Button1 will disable the selection. 171 | */ 172 | MouseShortcut mshortcuts[] = { 173 | /* button mask string */ 174 | { Button4, XK_ANY_MOD, "\031" }, 175 | { Button5, XK_ANY_MOD, "\005" }, 176 | }; 177 | 178 | /* Internal keyboard shortcuts. */ 179 | #define MODKEY Mod1Mask 180 | #define TERMMOD (ControlMask|ShiftMask) 181 | 182 | Shortcut shortcuts[] = { 183 | /* mask keysym function argument */ 184 | { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, 185 | { ControlMask, XK_Print, toggleprinter, {.i = 0} }, 186 | { ShiftMask, XK_Print, printscreen, {.i = 0} }, 187 | { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, 188 | { TERMMOD, XK_Prior, zoom, {.f = +1} }, 189 | { TERMMOD, XK_Next, zoom, {.f = -1} }, 190 | { TERMMOD, XK_Home, zoomreset, {.f = 0} }, 191 | { TERMMOD, XK_C, clipcopy, {.i = 0} }, 192 | { TERMMOD, XK_V, clippaste, {.i = 0} }, 193 | { TERMMOD, XK_Y, selpaste, {.i = 0} }, 194 | { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, 195 | { TERMMOD, XK_I, iso14755, {.i = 0} }, 196 | { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} }, 197 | { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} }, 198 | }; 199 | 200 | /* 201 | * Special keys (change & recompile st.info accordingly) 202 | * 203 | * Mask value: 204 | * * Use XK_ANY_MOD to match the key no matter modifiers state 205 | * * Use XK_NO_MOD to match the key alone (no modifiers) 206 | * appkey value: 207 | * * 0: no value 208 | * * > 0: keypad application mode enabled 209 | * * = 2: term.numlock = 1 210 | * * < 0: keypad application mode disabled 211 | * appcursor value: 212 | * * 0: no value 213 | * * > 0: cursor application mode enabled 214 | * * < 0: cursor application mode disabled 215 | * crlf value 216 | * * 0: no value 217 | * * > 0: crlf mode is enabled 218 | * * < 0: crlf mode is disabled 219 | * 220 | * Be careful with the order of the definitions because st searches in 221 | * this table sequentially, so any XK_ANY_MOD must be in the last 222 | * position for a key. 223 | */ 224 | 225 | /* 226 | * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF) 227 | * to be mapped below, add them to this array. 228 | */ 229 | static KeySym mappedkeys[] = { -1 }; 230 | 231 | /* 232 | * State bits to ignore when matching key or button events. By default, 233 | * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored. 234 | */ 235 | static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; 236 | 237 | /* 238 | * Override mouse-select while mask is active (when MODE_MOUSE is set). 239 | * Note that if you want to use ShiftMask with selmasks, set this to an other 240 | * modifier, set to 0 to not use it. 241 | */ 242 | uint forceselmod = ShiftMask; 243 | 244 | /* 245 | * This is the huge key array which defines all compatibility to the Linux 246 | * world. Please decide about changes wisely. 247 | */ 248 | static Key key[] = { 249 | /* keysym mask string appkey appcursor crlf */ 250 | { XK_KP_Home, ShiftMask, "\033[2J", 0, -1, 0}, 251 | { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, 252 | { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, 253 | { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, 254 | { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0, 0}, 255 | { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1, 0}, 256 | { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1, 0}, 257 | { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0, 0}, 258 | { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1, 0}, 259 | { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1, 0}, 260 | { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0, 0}, 261 | { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1, 0}, 262 | { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1, 0}, 263 | { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0, 0}, 264 | { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1, 0}, 265 | { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1, 0}, 266 | { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, 267 | { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, 268 | { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0, 0}, 269 | { XK_KP_End, ControlMask, "\033[J", -1, 0, 0}, 270 | { XK_KP_End, ControlMask, "\033[1;5F", +1, 0, 0}, 271 | { XK_KP_End, ShiftMask, "\033[K", -1, 0, 0}, 272 | { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0, 0}, 273 | { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, 274 | { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, 275 | { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, 276 | { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0, 0}, 277 | { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0, 0}, 278 | { XK_KP_Insert, ControlMask, "\033[L", -1, 0, 0}, 279 | { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0, 0}, 280 | { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0}, 281 | { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0}, 282 | { XK_KP_Delete, ControlMask, "\033[M", -1, 0, 0}, 283 | { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, 284 | { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0, 0}, 285 | { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, 286 | { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, 287 | { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0}, 288 | { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0, 0}, 289 | { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0, 0}, 290 | { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0, 0}, 291 | { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0, -1}, 292 | { XK_KP_Enter, XK_ANY_MOD, "\r\n", -1, 0, +1}, 293 | { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0, 0}, 294 | { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0, 0}, 295 | { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0, 0}, 296 | { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0, 0}, 297 | { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0, 0}, 298 | { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0, 0}, 299 | { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0, 0}, 300 | { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0, 0}, 301 | { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0, 0}, 302 | { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0, 0}, 303 | { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0, 0}, 304 | { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0, 0}, 305 | { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0, 0}, 306 | { XK_Up, ShiftMask, "\033[1;2A", 0, 0, 0}, 307 | { XK_Up, Mod1Mask, "\033[1;3A", 0, 0, 0}, 308 | { XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0, 0}, 309 | { XK_Up, ControlMask, "\033[1;5A", 0, 0, 0}, 310 | { XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0, 0}, 311 | { XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0, 0}, 312 | { XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0, 0}, 313 | { XK_Up, XK_ANY_MOD, "\033[A", 0, -1, 0}, 314 | { XK_Up, XK_ANY_MOD, "\033OA", 0, +1, 0}, 315 | { XK_Down, ShiftMask, "\033[1;2B", 0, 0, 0}, 316 | { XK_Down, Mod1Mask, "\033[1;3B", 0, 0, 0}, 317 | { XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0, 0}, 318 | { XK_Down, ControlMask, "\033[1;5B", 0, 0, 0}, 319 | { XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0, 0}, 320 | { XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0, 0}, 321 | { XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0, 0}, 322 | { XK_Down, XK_ANY_MOD, "\033[B", 0, -1, 0}, 323 | { XK_Down, XK_ANY_MOD, "\033OB", 0, +1, 0}, 324 | { XK_Left, ShiftMask, "\033[1;2D", 0, 0, 0}, 325 | { XK_Left, Mod1Mask, "\033[1;3D", 0, 0, 0}, 326 | { XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0, 0}, 327 | { XK_Left, ControlMask, "\033[1;5D", 0, 0, 0}, 328 | { XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0, 0}, 329 | { XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0, 0}, 330 | { XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0, 0}, 331 | { XK_Left, XK_ANY_MOD, "\033[D", 0, -1, 0}, 332 | { XK_Left, XK_ANY_MOD, "\033OD", 0, +1, 0}, 333 | { XK_Right, ShiftMask, "\033[1;2C", 0, 0, 0}, 334 | { XK_Right, Mod1Mask, "\033[1;3C", 0, 0, 0}, 335 | { XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0, 0}, 336 | { XK_Right, ControlMask, "\033[1;5C", 0, 0, 0}, 337 | { XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0, 0}, 338 | { XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0, 0}, 339 | { XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0, 0}, 340 | { XK_Right, XK_ANY_MOD, "\033[C", 0, -1, 0}, 341 | { XK_Right, XK_ANY_MOD, "\033OC", 0, +1, 0}, 342 | { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0, 0}, 343 | { XK_Return, Mod1Mask, "\033\r", 0, 0, -1}, 344 | { XK_Return, Mod1Mask, "\033\r\n", 0, 0, +1}, 345 | { XK_Return, XK_ANY_MOD, "\r", 0, 0, -1}, 346 | { XK_Return, XK_ANY_MOD, "\r\n", 0, 0, +1}, 347 | { XK_Insert, ShiftMask, "\033[4l", -1, 0, 0}, 348 | { XK_Insert, ShiftMask, "\033[2;2~", +1, 0, 0}, 349 | { XK_Insert, ControlMask, "\033[L", -1, 0, 0}, 350 | { XK_Insert, ControlMask, "\033[2;5~", +1, 0, 0}, 351 | { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0}, 352 | { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0}, 353 | { XK_Delete, ControlMask, "\033[M", -1, 0, 0}, 354 | { XK_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, 355 | { XK_Delete, ShiftMask, "\033[2K", -1, 0, 0}, 356 | { XK_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, 357 | { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, 358 | { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0}, 359 | { XK_BackSpace, XK_NO_MOD, "\177", 0, 0, 0}, 360 | { XK_BackSpace, Mod1Mask, "\033\177", 0, 0, 0}, 361 | { XK_Home, ShiftMask, "\033[2J", 0, -1, 0}, 362 | { XK_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, 363 | { XK_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, 364 | { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, 365 | { XK_End, ControlMask, "\033[J", -1, 0, 0}, 366 | { XK_End, ControlMask, "\033[1;5F", +1, 0, 0}, 367 | { XK_End, ShiftMask, "\033[K", -1, 0, 0}, 368 | { XK_End, ShiftMask, "\033[1;2F", +1, 0, 0}, 369 | { XK_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, 370 | { XK_Prior, ControlMask, "\033[5;5~", 0, 0, 0}, 371 | { XK_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, 372 | { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, 373 | { XK_Next, ControlMask, "\033[6;5~", 0, 0, 0}, 374 | { XK_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, 375 | { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, 376 | { XK_F1, XK_NO_MOD, "\033OP" , 0, 0, 0}, 377 | { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0, 0}, 378 | { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0, 0}, 379 | { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0, 0}, 380 | { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0, 0}, 381 | { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0, 0}, 382 | { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0, 0}, 383 | { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0, 0}, 384 | { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0, 0}, 385 | { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0, 0}, 386 | { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0, 0}, 387 | { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0, 0}, 388 | { XK_F3, XK_NO_MOD, "\033OR" , 0, 0, 0}, 389 | { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0, 0}, 390 | { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0, 0}, 391 | { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0, 0}, 392 | { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0, 0}, 393 | { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0, 0}, 394 | { XK_F4, XK_NO_MOD, "\033OS" , 0, 0, 0}, 395 | { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0, 0}, 396 | { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0, 0}, 397 | { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0, 0}, 398 | { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0, 0}, 399 | { XK_F5, XK_NO_MOD, "\033[15~", 0, 0, 0}, 400 | { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0, 0}, 401 | { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0, 0}, 402 | { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0, 0}, 403 | { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0, 0}, 404 | { XK_F6, XK_NO_MOD, "\033[17~", 0, 0, 0}, 405 | { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0, 0}, 406 | { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0, 0}, 407 | { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0, 0}, 408 | { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0, 0}, 409 | { XK_F7, XK_NO_MOD, "\033[18~", 0, 0, 0}, 410 | { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0, 0}, 411 | { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0, 0}, 412 | { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0, 0}, 413 | { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0, 0}, 414 | { XK_F8, XK_NO_MOD, "\033[19~", 0, 0, 0}, 415 | { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0, 0}, 416 | { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0, 0}, 417 | { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0, 0}, 418 | { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0, 0}, 419 | { XK_F9, XK_NO_MOD, "\033[20~", 0, 0, 0}, 420 | { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0, 0}, 421 | { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0, 0}, 422 | { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0, 0}, 423 | { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0, 0}, 424 | { XK_F10, XK_NO_MOD, "\033[21~", 0, 0, 0}, 425 | { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0, 0}, 426 | { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0, 0}, 427 | { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0, 0}, 428 | { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0, 0}, 429 | { XK_F11, XK_NO_MOD, "\033[23~", 0, 0, 0}, 430 | { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0, 0}, 431 | { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0, 0}, 432 | { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0, 0}, 433 | { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0, 0}, 434 | { XK_F12, XK_NO_MOD, "\033[24~", 0, 0, 0}, 435 | { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0, 0}, 436 | { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0, 0}, 437 | { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0, 0}, 438 | { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0, 0}, 439 | { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0, 0}, 440 | { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0, 0}, 441 | { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0, 0}, 442 | { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0, 0}, 443 | { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0, 0}, 444 | { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0, 0}, 445 | { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0, 0}, 446 | { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0, 0}, 447 | { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0, 0}, 448 | { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0, 0}, 449 | { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0, 0}, 450 | { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0, 0}, 451 | { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0, 0}, 452 | { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0, 0}, 453 | { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0, 0}, 454 | { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0, 0}, 455 | { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0, 0}, 456 | { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0, 0}, 457 | { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0, 0}, 458 | { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0, 0}, 459 | { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0, 0}, 460 | { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0, 0}, 461 | { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0, 0}, 462 | }; 463 | 464 | /* 465 | * Selection types' masks. 466 | * Use the same masks as usual. 467 | * Button1Mask is always unset, to make masks match between ButtonPress. 468 | * ButtonRelease and MotionNotify. 469 | * If no match is found, regular selection is used. 470 | */ 471 | uint selmasks[] = { 472 | [SEL_RECTANGULAR] = Mod1Mask, 473 | }; 474 | 475 | /* 476 | * Printable characters in ASCII, used to estimate the advance width 477 | * of single wide characters. 478 | */ 479 | char ascii_printable[] = 480 | " !\"#$%&'()*+,-./0123456789:;<=>?" 481 | "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" 482 | "`abcdefghijklmnopqrstuvwxyz{|}~"; 483 | 484 | -------------------------------------------------------------------------------- /vis/comment.lua: -------------------------------------------------------------------------------- 1 | -- Created: Thu 26 May 2016 2 | -- Modified: Mon 17 Jul 2017 3 | -- Author: Josh Wainwright 4 | -- Filename: comment.lua 5 | 6 | local dict = { 7 | bash = '#', 8 | c = '//', 9 | conf = '#', 10 | cpp = '//', 11 | dosbatch = '::', 12 | dot = '//', 13 | gitconfig = '#', 14 | gnuplot = '#', 15 | haskell = '--', 16 | java = '//', 17 | lua = '--', 18 | mail = '> ', 19 | make = '#', 20 | markdown = '