Migrate to rcm
This commit is contained in:
3952
.rubocop.yml
3952
.rubocop.yml
File diff suppressed because it is too large
Load Diff
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Use [rcm](https://thoughtbot.github.io/rcm/rcm)
|
||||||
|
|
||||||
|
rcup -v
|
||||||
277
Xresources.d/ansi-us-colemak-dh-z.xmodmap
Normal file
277
Xresources.d/ansi-us-colemak-dh-z.xmodmap
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
! xmodmap for the Colemak Mod-DH layout (US, ANSI keyboard, Z angle mod).
|
||||||
|
! http://colemakmods.github.io/mod-dh/.
|
||||||
|
! Public domain.
|
||||||
|
|
||||||
|
keycode 49 = grave asciitilde dead_tilde asciitilde
|
||||||
|
keycode 10 = 1 exclam exclamdown onesuperior
|
||||||
|
keycode 11 = 2 at masculine twosuperior
|
||||||
|
keycode 12 = 3 numbersign ordfeminine threesuperior
|
||||||
|
keycode 13 = 4 dollar cent sterling
|
||||||
|
keycode 14 = 5 percent EuroSign yen
|
||||||
|
keycode 15 = 6 asciicircum hstroke Hstroke
|
||||||
|
keycode 16 = 7 ampersand eth ETH
|
||||||
|
keycode 17 = 8 asterisk thorn THORN
|
||||||
|
keycode 18 = 9 parenleft leftsinglequotemark leftdoublequotemark
|
||||||
|
keycode 19 = 0 parenright rightsinglequotemark rightdoublequotemark
|
||||||
|
keycode 20 = minus underscore endash emdash
|
||||||
|
keycode 21 = equal plus multiply division
|
||||||
|
|
||||||
|
keycode 24 = q Q adiaeresis Adiaeresis
|
||||||
|
keycode 25 = w W aring Aring
|
||||||
|
keycode 26 = f F atilde Atilde
|
||||||
|
keycode 27 = p P oslash Ooblique
|
||||||
|
keycode 28 = b B dead_breve asciitilde
|
||||||
|
keycode 29 = j J dstroke Dstroke
|
||||||
|
keycode 30 = l L lstroke Lstroke
|
||||||
|
keycode 31 = u U uacute Uacute
|
||||||
|
keycode 32 = y Y udiaeresis Udiaeresis
|
||||||
|
keycode 33 = semicolon colon odiaeresis Odiaeresis
|
||||||
|
keycode 34 = bracketleft braceleft guillemotleft U2039
|
||||||
|
keycode 35 = bracketright braceright guillemotright U203a
|
||||||
|
keycode 51 = backslash bar asciitilde asciitilde
|
||||||
|
|
||||||
|
keycode 38 = a A aacute Aacute
|
||||||
|
keycode 39 = r R dead_grave asciitilde
|
||||||
|
keycode 40 = s S ssharp asciitilde
|
||||||
|
keycode 41 = t T dead_acute dead_doubleacute
|
||||||
|
keycode 42 = g G dead_ogonek asciitilde
|
||||||
|
keycode 43 = k K dead_abovering asciitilde
|
||||||
|
keycode 44 = n N ntilde Ntilde
|
||||||
|
keycode 45 = e E eacute Eacute
|
||||||
|
keycode 46 = i I iacute Iacute
|
||||||
|
keycode 47 = o O oacute Oacute
|
||||||
|
keycode 48 = apostrophe quotedbl otilde Otilde
|
||||||
|
|
||||||
|
keycode 94 = minus underscore endash emdash
|
||||||
|
keycode 52 = x X dead_circumflex asciitilde
|
||||||
|
keycode 53 = c C ccedilla Ccedilla
|
||||||
|
keycode 54 = d D dead_diaeresis asciitilde
|
||||||
|
keycode 55 = v V oe OE
|
||||||
|
keycode 56 = z Z ae AE
|
||||||
|
keycode 57 = m M dead_macron asciitilde
|
||||||
|
keycode 58 = h H dead_caron asciitilde
|
||||||
|
keycode 59 = comma less dead_cedilla asciitilde
|
||||||
|
keycode 60 = period greater dead_abovedot asciitilde
|
||||||
|
keycode 61 = slash question questiondown asciitilde
|
||||||
|
|
||||||
|
keycode 65 = space space space nobreakspace
|
||||||
|
|
||||||
|
keycode 108 = Mode_switch Mode_switch
|
||||||
|
|
||||||
|
! Remove these 2 lines if you want caps lock unmodified
|
||||||
|
!keycode 66 = BackSpace BackSpace BackSpace BackSpace
|
||||||
|
!clear Lock
|
||||||
|
|
||||||
|
!clear Shift
|
||||||
|
!clear Control
|
||||||
|
!clear Mod1
|
||||||
|
!clear Mod2
|
||||||
|
!clear Mod3
|
||||||
|
!clear Mod4
|
||||||
|
!clear Mod5
|
||||||
|
|
||||||
|
!add Shift = Shift_L Shift_R
|
||||||
|
!add Control = Control_L Control_R
|
||||||
|
!add Mod1 = Alt_L Alt_R
|
||||||
|
!add Mod2 = Num_Lock
|
||||||
|
!add Mod4 = Meta_L Meta_R
|
||||||
|
!add Mod5 = Scroll_Lock
|
||||||
|
|
||||||
|
!keycode 9 = Escape
|
||||||
|
!keycode 22 = BackSpace Terminate_Server
|
||||||
|
!keycode 23 = Tab ISO_Left_Tab
|
||||||
|
!keycode 36 = Return
|
||||||
|
!keycode 37 = Control_L
|
||||||
|
!keycode 50 = Shift_L
|
||||||
|
!keycode 62 = Shift_R
|
||||||
|
!keycode 63 = KP_Multiply XF86_ClearGrab
|
||||||
|
!keycode 64 = Alt_L Meta_L
|
||||||
|
!keycode 67 = F1 XF86_Switch_VT_1
|
||||||
|
!keycode 68 = F2 XF86_Switch_VT_2
|
||||||
|
!keycode 69 = F3 XF86_Switch_VT_3
|
||||||
|
!keycode 70 = F4 XF86_Switch_VT_4
|
||||||
|
!keycode 71 = F5 XF86_Switch_VT_5
|
||||||
|
!keycode 72 = F6 XF86_Switch_VT_6
|
||||||
|
!keycode 73 = F7 XF86_Switch_VT_7
|
||||||
|
!keycode 74 = F8 XF86_Switch_VT_8
|
||||||
|
!keycode 75 = F9 XF86_Switch_VT_9
|
||||||
|
!keycode 76 = F10 XF86_Switch_VT_10
|
||||||
|
!keycode 95 = F11 XF86_Switch_VT_11
|
||||||
|
!keycode 96 = F12 XF86_Switch_VT_12
|
||||||
|
!keycode 77 = Num_Lock Pointer_EnableKeys
|
||||||
|
!keycode 78 = Scroll_Lock
|
||||||
|
!keycode 79 = KP_Home KP_7
|
||||||
|
!keycode 80 = KP_Up KP_8
|
||||||
|
!keycode 81 = KP_Prior KP_9
|
||||||
|
!keycode 82 = KP_Subtract XF86_Prev_VMode
|
||||||
|
!keycode 83 = KP_Left KP_4
|
||||||
|
!keycode 84 = KP_Begin KP_5
|
||||||
|
!keycode 85 = KP_Right KP_6
|
||||||
|
!keycode 86 = KP_Add XF86_Next_VMode
|
||||||
|
!keycode 87 = KP_End KP_1
|
||||||
|
!keycode 88 = KP_Down KP_2
|
||||||
|
!keycode 89 = KP_Next KP_3
|
||||||
|
!keycode 90 = KP_Insert KP_0
|
||||||
|
!keycode 91 = KP_Delete KP_Decimal
|
||||||
|
!keycode 92 = Print Sys_Req
|
||||||
|
!keycode 93 = Mode_switch
|
||||||
|
!keycode 97 = Home
|
||||||
|
!keycode 98 = Up
|
||||||
|
!keycode 99 = Prior
|
||||||
|
!keycode 100 = Left
|
||||||
|
!keycode 102 = Right
|
||||||
|
!keycode 103 = End
|
||||||
|
!keycode 104 = Down
|
||||||
|
!keycode 105 = Next
|
||||||
|
!keycode 106 = Insert
|
||||||
|
!keycode 107 = Delete
|
||||||
|
!keycode 108 = KP_Enter
|
||||||
|
!keycode 109 = Control_R
|
||||||
|
!keycode 110 = Pause Break
|
||||||
|
!keycode 111 = Print Sys_Req
|
||||||
|
!keycode 112 = KP_Divide XF86_Ungrab
|
||||||
|
!keycode 114 = Pause Break
|
||||||
|
!keycode 115 = Super_L
|
||||||
|
!keycode 116 = Super_R
|
||||||
|
!keycode 117 = Menu
|
||||||
|
!keycode 124 = ISO_Level3_Shift
|
||||||
|
!keycode 125 = NoSymbol Alt_L
|
||||||
|
!keycode 126 = KP_Equal
|
||||||
|
!keycode 127 = NoSymbol Super_L
|
||||||
|
!keycode 128 = NoSymbol Hyper_L
|
||||||
|
!keycode 156 = NoSymbol Meta_L
|
||||||
|
|
||||||
|
!keycode 8 =
|
||||||
|
!keycode 101 =
|
||||||
|
!keycode 118 =
|
||||||
|
!keycode 119 =
|
||||||
|
!keycode 120 =
|
||||||
|
!keycode 121 =
|
||||||
|
!keycode 122 =
|
||||||
|
!keycode 123 =
|
||||||
|
!keycode 129 =
|
||||||
|
!keycode 130 =
|
||||||
|
!keycode 131 =
|
||||||
|
!keycode 132 =
|
||||||
|
!keycode 133 =
|
||||||
|
!keycode 134 =
|
||||||
|
!keycode 135 =
|
||||||
|
!keycode 136 =
|
||||||
|
!keycode 137 =
|
||||||
|
!keycode 138 =
|
||||||
|
!keycode 139 =
|
||||||
|
!keycode 140 =
|
||||||
|
!keycode 141 =
|
||||||
|
!keycode 142 =
|
||||||
|
!keycode 143 =
|
||||||
|
!keycode 144 =
|
||||||
|
!keycode 145 =
|
||||||
|
!keycode 146 =
|
||||||
|
!keycode 147 =
|
||||||
|
!keycode 148 =
|
||||||
|
!keycode 149 =
|
||||||
|
!keycode 150 =
|
||||||
|
!keycode 151 =
|
||||||
|
!keycode 152 =
|
||||||
|
!keycode 153 =
|
||||||
|
!keycode 154 =
|
||||||
|
!keycode 155 =
|
||||||
|
!keycode 157 =
|
||||||
|
!keycode 158 =
|
||||||
|
!keycode 159 =
|
||||||
|
!keycode 160 =
|
||||||
|
!keycode 161 =
|
||||||
|
!keycode 162 =
|
||||||
|
!keycode 163 =
|
||||||
|
!keycode 164 =
|
||||||
|
!keycode 165 =
|
||||||
|
!keycode 166 =
|
||||||
|
!keycode 167 =
|
||||||
|
!keycode 168 =
|
||||||
|
!keycode 169 =
|
||||||
|
!keycode 170 =
|
||||||
|
!keycode 171 =
|
||||||
|
!keycode 172 =
|
||||||
|
!keycode 173 =
|
||||||
|
!keycode 174 =
|
||||||
|
!keycode 175 =
|
||||||
|
!keycode 176 =
|
||||||
|
!keycode 177 =
|
||||||
|
!keycode 178 =
|
||||||
|
!keycode 179 =
|
||||||
|
!keycode 180 =
|
||||||
|
!keycode 181 =
|
||||||
|
!keycode 182 =
|
||||||
|
!keycode 183 =
|
||||||
|
!keycode 184 =
|
||||||
|
!keycode 185 =
|
||||||
|
!keycode 186 =
|
||||||
|
!keycode 187 =
|
||||||
|
!keycode 188 =
|
||||||
|
!keycode 189 =
|
||||||
|
!keycode 190 =
|
||||||
|
!keycode 191 =
|
||||||
|
!keycode 192 =
|
||||||
|
!keycode 193 =
|
||||||
|
!keycode 194 =
|
||||||
|
!keycode 195 =
|
||||||
|
!keycode 196 =
|
||||||
|
!keycode 197 =
|
||||||
|
!keycode 198 =
|
||||||
|
!keycode 199 =
|
||||||
|
!keycode 200 =
|
||||||
|
!keycode 201 =
|
||||||
|
!keycode 202 =
|
||||||
|
!keycode 203 =
|
||||||
|
!keycode 204 =
|
||||||
|
!keycode 205 =
|
||||||
|
!keycode 206 =
|
||||||
|
!keycode 207 =
|
||||||
|
!keycode 208 =
|
||||||
|
!keycode 209 =
|
||||||
|
!keycode 210 =
|
||||||
|
!keycode 211 =
|
||||||
|
!keycode 212 =
|
||||||
|
!keycode 213 =
|
||||||
|
!keycode 214 =
|
||||||
|
!keycode 215 =
|
||||||
|
!keycode 216 =
|
||||||
|
!keycode 217 =
|
||||||
|
!keycode 218 =
|
||||||
|
!keycode 219 =
|
||||||
|
!keycode 220 =
|
||||||
|
!keycode 221 =
|
||||||
|
!keycode 222 =
|
||||||
|
!keycode 223 =
|
||||||
|
!keycode 224 =
|
||||||
|
!keycode 225 =
|
||||||
|
!keycode 226 =
|
||||||
|
!keycode 227 =
|
||||||
|
!keycode 228 =
|
||||||
|
!keycode 229 =
|
||||||
|
!keycode 230 =
|
||||||
|
!keycode 231 =
|
||||||
|
!keycode 232 =
|
||||||
|
!keycode 233 =
|
||||||
|
!keycode 234 =
|
||||||
|
!keycode 235 =
|
||||||
|
!keycode 236 =
|
||||||
|
!keycode 237 =
|
||||||
|
!keycode 238 =
|
||||||
|
!keycode 239 =
|
||||||
|
!keycode 240 =
|
||||||
|
!keycode 241 =
|
||||||
|
!keycode 242 =
|
||||||
|
!keycode 243 =
|
||||||
|
!keycode 244 =
|
||||||
|
!keycode 245 =
|
||||||
|
!keycode 246 =
|
||||||
|
!keycode 247 =
|
||||||
|
!keycode 248 =
|
||||||
|
!keycode 249 =
|
||||||
|
!keycode 250 =
|
||||||
|
!keycode 251 =
|
||||||
|
!keycode 252 =
|
||||||
|
!keycode 253 =
|
||||||
|
!keycode 254 =
|
||||||
|
!keycode 255 =
|
||||||
@@ -8,7 +8,7 @@ st.termname: xterm-256color
|
|||||||
! st.shell: /bin/sh
|
! st.shell: /bin/sh
|
||||||
|
|
||||||
! The following options options can be reloaded via USR1 signal.
|
! The following options options can be reloaded via USR1 signal.
|
||||||
st.font: Iosevka\ Term-11:medium:antialias=true:autohint=false:hintstyle=hintslight:rgba=rgba:lcdfilter:lcddefault;
|
st.font: Iosevka\ Term:Medium:pixelsize=14;
|
||||||
st.bold_font: 1
|
st.bold_font: 1
|
||||||
st.borderpx: 0
|
st.borderpx: 0
|
||||||
! Available cursor values: 2 4 6 7 = █ _ | ☃ ( 1 3 5 are blinking versions)
|
! Available cursor values: 2 4 6 7 = █ _ | ☃ ( 1 3 5 are blinking versions)
|
||||||
@@ -25,6 +25,7 @@ st.actionfps: 30
|
|||||||
st.mouseScrollLines: 1
|
st.mouseScrollLines: 1
|
||||||
! Kerning / character bounding-box height multiplier
|
! Kerning / character bounding-box height multiplier
|
||||||
st.chscale: 0.95
|
st.chscale: 0.95
|
||||||
|
! st.chscale: 1.0
|
||||||
! Kerning / character bounding-box width multiplier
|
! Kerning / character bounding-box width multiplier
|
||||||
st.cwscale: 1.0
|
st.cwscale: 1.0
|
||||||
! blinking timeout for terminal and cursor blinking (0 disables)
|
! blinking timeout for terminal and cursor blinking (0 disables)
|
||||||
248
Xresources.d/xmodmap.orig
Normal file
248
Xresources.d/xmodmap.orig
Normal file
@@ -0,0 +1,248 @@
|
|||||||
|
keycode 8 =
|
||||||
|
keycode 9 = Escape NoSymbol Escape
|
||||||
|
keycode 10 = 1 exclam 1 exclam
|
||||||
|
keycode 11 = 2 at 2 quotedbl
|
||||||
|
keycode 12 = 3 numbersign 3 numerosign
|
||||||
|
keycode 13 = 4 dollar 4 semicolon
|
||||||
|
keycode 14 = 5 percent 5 percent
|
||||||
|
keycode 15 = 6 asciicircum 6 colon
|
||||||
|
keycode 16 = 7 ampersand 7 question
|
||||||
|
keycode 17 = 8 asterisk 8 asterisk U20BD
|
||||||
|
keycode 18 = 9 parenleft 9 parenleft
|
||||||
|
keycode 19 = 0 parenright 0 parenright
|
||||||
|
keycode 20 = minus underscore minus underscore
|
||||||
|
keycode 21 = equal plus equal plus
|
||||||
|
keycode 22 = BackSpace BackSpace BackSpace BackSpace
|
||||||
|
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
|
||||||
|
keycode 24 = q Q Cyrillic_shorti Cyrillic_SHORTI
|
||||||
|
keycode 25 = w W Cyrillic_tse Cyrillic_TSE
|
||||||
|
keycode 26 = e E Cyrillic_u Cyrillic_U
|
||||||
|
keycode 27 = r R Cyrillic_ka Cyrillic_KA
|
||||||
|
keycode 28 = t T Cyrillic_ie Cyrillic_IE
|
||||||
|
keycode 29 = y Y Cyrillic_en Cyrillic_EN
|
||||||
|
keycode 30 = u U Cyrillic_ghe Cyrillic_GHE
|
||||||
|
keycode 31 = i I Cyrillic_sha Cyrillic_SHA
|
||||||
|
keycode 32 = o O Cyrillic_shcha Cyrillic_SHCHA
|
||||||
|
keycode 33 = p P Cyrillic_ze Cyrillic_ZE
|
||||||
|
keycode 34 = bracketleft braceleft Cyrillic_ha Cyrillic_HA
|
||||||
|
keycode 35 = bracketright braceright Cyrillic_hardsign Cyrillic_HARDSIGN
|
||||||
|
keycode 36 = Return NoSymbol Return
|
||||||
|
keycode 37 = Control_L NoSymbol Control_L
|
||||||
|
keycode 38 = a A Cyrillic_ef Cyrillic_EF
|
||||||
|
keycode 39 = s S Cyrillic_yeru Cyrillic_YERU
|
||||||
|
keycode 40 = d D Cyrillic_ve Cyrillic_VE
|
||||||
|
keycode 41 = f F Cyrillic_a Cyrillic_A
|
||||||
|
keycode 42 = g G Cyrillic_pe Cyrillic_PE
|
||||||
|
keycode 43 = h H Cyrillic_er Cyrillic_ER
|
||||||
|
keycode 44 = j J Cyrillic_o Cyrillic_O
|
||||||
|
keycode 45 = k K Cyrillic_el Cyrillic_EL
|
||||||
|
keycode 46 = l L Cyrillic_de Cyrillic_DE
|
||||||
|
keycode 47 = semicolon colon Cyrillic_zhe Cyrillic_ZHE
|
||||||
|
keycode 48 = apostrophe quotedbl Cyrillic_e Cyrillic_E
|
||||||
|
keycode 49 = grave asciitilde Cyrillic_io Cyrillic_IO
|
||||||
|
keycode 50 = Shift_L NoSymbol Shift_L
|
||||||
|
keycode 51 = backslash bar backslash slash
|
||||||
|
keycode 52 = z Z Cyrillic_ya Cyrillic_YA
|
||||||
|
keycode 53 = x X Cyrillic_che Cyrillic_CHE
|
||||||
|
keycode 54 = c C Cyrillic_es Cyrillic_ES
|
||||||
|
keycode 55 = v V Cyrillic_em Cyrillic_EM
|
||||||
|
keycode 56 = b B Cyrillic_i Cyrillic_I
|
||||||
|
keycode 57 = n N Cyrillic_te Cyrillic_TE
|
||||||
|
keycode 58 = m M Cyrillic_softsign Cyrillic_SOFTSIGN
|
||||||
|
keycode 59 = comma less Cyrillic_be Cyrillic_BE
|
||||||
|
keycode 60 = period greater Cyrillic_yu Cyrillic_YU
|
||||||
|
keycode 61 = slash question period comma
|
||||||
|
keycode 62 = Shift_R NoSymbol Shift_R
|
||||||
|
keycode 63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab KP_Multiply KP_Multiply XF86ClearGrab
|
||||||
|
keycode 64 = Alt_L Meta_L Alt_L Meta_L
|
||||||
|
keycode 65 = space ISO_Next_Group space ISO_Next_Group
|
||||||
|
keycode 66 = Escape NoSymbol Escape
|
||||||
|
keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1 F1 F1 XF86Switch_VT_1
|
||||||
|
keycode 68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2 F2 F2 XF86Switch_VT_2
|
||||||
|
keycode 69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3 F3 F3 XF86Switch_VT_3
|
||||||
|
keycode 70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4 F4 F4 XF86Switch_VT_4
|
||||||
|
keycode 71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5 F5 F5 XF86Switch_VT_5
|
||||||
|
keycode 72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6 F6 F6 XF86Switch_VT_6
|
||||||
|
keycode 73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7 F7 F7 XF86Switch_VT_7
|
||||||
|
keycode 74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8 F8 F8 XF86Switch_VT_8
|
||||||
|
keycode 75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9 F9 F9 XF86Switch_VT_9
|
||||||
|
keycode 76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10 F10 F10 XF86Switch_VT_10
|
||||||
|
keycode 77 = Num_Lock NoSymbol Num_Lock
|
||||||
|
keycode 78 = Scroll_Lock NoSymbol Scroll_Lock
|
||||||
|
keycode 79 = KP_Home KP_7 KP_Home KP_7
|
||||||
|
keycode 80 = KP_Up KP_8 KP_Up KP_8
|
||||||
|
keycode 81 = KP_Prior KP_9 KP_Prior KP_9
|
||||||
|
keycode 82 = KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode KP_Subtract KP_Subtract XF86Prev_VMode
|
||||||
|
keycode 83 = KP_Left KP_4 KP_Left KP_4
|
||||||
|
keycode 84 = KP_Begin KP_5 KP_Begin KP_5
|
||||||
|
keycode 85 = KP_Right KP_6 KP_Right KP_6
|
||||||
|
keycode 86 = KP_Add KP_Add KP_Add KP_Add KP_Add KP_Add XF86Next_VMode KP_Add KP_Add XF86Next_VMode
|
||||||
|
keycode 87 = KP_End KP_1 KP_End KP_1
|
||||||
|
keycode 88 = KP_Down KP_2 KP_Down KP_2
|
||||||
|
keycode 89 = KP_Next KP_3 KP_Next KP_3
|
||||||
|
keycode 90 = KP_Insert KP_0 KP_Insert KP_0
|
||||||
|
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Separator
|
||||||
|
keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
|
||||||
|
keycode 93 =
|
||||||
|
keycode 94 = less greater slash bar bar brokenbar
|
||||||
|
keycode 95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11 F11 F11 XF86Switch_VT_11
|
||||||
|
keycode 96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12 F12 F12 XF86Switch_VT_12
|
||||||
|
keycode 97 =
|
||||||
|
keycode 98 = Katakana NoSymbol Katakana
|
||||||
|
keycode 99 = Hiragana NoSymbol Hiragana
|
||||||
|
keycode 100 = Henkan_Mode NoSymbol Henkan_Mode
|
||||||
|
keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana
|
||||||
|
keycode 102 = Muhenkan NoSymbol Muhenkan
|
||||||
|
keycode 103 =
|
||||||
|
keycode 104 = KP_Enter NoSymbol KP_Enter
|
||||||
|
keycode 105 = Control_R NoSymbol Control_R
|
||||||
|
keycode 106 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab KP_Divide KP_Divide XF86Ungrab
|
||||||
|
keycode 107 = Print Sys_Req Print Sys_Req
|
||||||
|
keycode 108 = Alt_R Meta_R Alt_R Meta_R
|
||||||
|
keycode 109 = Linefeed NoSymbol Linefeed
|
||||||
|
keycode 110 = Home NoSymbol Home
|
||||||
|
keycode 111 = Up NoSymbol Up
|
||||||
|
keycode 112 = Prior NoSymbol Prior
|
||||||
|
keycode 113 = Left NoSymbol Left
|
||||||
|
keycode 114 = Right NoSymbol Right
|
||||||
|
keycode 115 = End NoSymbol End
|
||||||
|
keycode 116 = Down NoSymbol Down
|
||||||
|
keycode 117 = Next NoSymbol Next
|
||||||
|
keycode 118 = Insert NoSymbol Insert
|
||||||
|
keycode 119 = Delete NoSymbol Delete
|
||||||
|
keycode 120 =
|
||||||
|
keycode 121 = XF86AudioMute NoSymbol XF86AudioMute
|
||||||
|
keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
|
||||||
|
keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
|
||||||
|
keycode 124 = XF86PowerOff NoSymbol XF86PowerOff
|
||||||
|
keycode 125 = KP_Equal NoSymbol KP_Equal
|
||||||
|
keycode 126 = plusminus NoSymbol plusminus
|
||||||
|
keycode 127 = Pause Break Pause Break
|
||||||
|
keycode 128 = XF86LaunchA NoSymbol XF86LaunchA
|
||||||
|
keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal
|
||||||
|
keycode 130 = Hangul NoSymbol Hangul
|
||||||
|
keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja
|
||||||
|
keycode 132 =
|
||||||
|
keycode 133 = Super_L NoSymbol Super_L
|
||||||
|
keycode 134 = Super_R NoSymbol Super_R
|
||||||
|
keycode 135 = Menu NoSymbol Menu
|
||||||
|
keycode 136 = Cancel NoSymbol Cancel
|
||||||
|
keycode 137 = Redo NoSymbol Redo
|
||||||
|
keycode 138 = SunProps NoSymbol SunProps
|
||||||
|
keycode 139 = Undo NoSymbol Undo
|
||||||
|
keycode 140 = SunFront NoSymbol SunFront
|
||||||
|
keycode 141 = XF86Copy NoSymbol XF86Copy
|
||||||
|
keycode 142 = XF86Open NoSymbol XF86Open
|
||||||
|
keycode 143 = XF86Paste NoSymbol XF86Paste
|
||||||
|
keycode 144 = Find NoSymbol Find
|
||||||
|
keycode 145 = XF86Cut NoSymbol XF86Cut
|
||||||
|
keycode 146 = Help NoSymbol Help
|
||||||
|
keycode 147 = XF86MenuKB NoSymbol XF86MenuKB
|
||||||
|
keycode 148 = XF86Calculator NoSymbol XF86Calculator
|
||||||
|
keycode 149 =
|
||||||
|
keycode 150 = XF86Sleep NoSymbol XF86Sleep
|
||||||
|
keycode 151 = XF86WakeUp NoSymbol XF86WakeUp
|
||||||
|
keycode 152 = XF86Explorer NoSymbol XF86Explorer
|
||||||
|
keycode 153 = XF86Send NoSymbol XF86Send
|
||||||
|
keycode 154 =
|
||||||
|
keycode 155 = XF86Xfer NoSymbol XF86Xfer
|
||||||
|
keycode 156 = XF86Launch1 NoSymbol XF86Launch1
|
||||||
|
keycode 157 = XF86Launch2 NoSymbol XF86Launch2
|
||||||
|
keycode 158 = XF86WWW NoSymbol XF86WWW
|
||||||
|
keycode 159 = XF86DOS NoSymbol XF86DOS
|
||||||
|
keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver
|
||||||
|
keycode 161 = XF86RotateWindows NoSymbol XF86RotateWindows
|
||||||
|
keycode 162 = XF86TaskPane NoSymbol XF86TaskPane
|
||||||
|
keycode 163 = XF86Mail NoSymbol XF86Mail
|
||||||
|
keycode 164 = XF86Favorites NoSymbol XF86Favorites
|
||||||
|
keycode 165 = XF86MyComputer NoSymbol XF86MyComputer
|
||||||
|
keycode 166 = XF86Back NoSymbol XF86Back
|
||||||
|
keycode 167 = XF86Forward NoSymbol XF86Forward
|
||||||
|
keycode 168 =
|
||||||
|
keycode 169 = XF86Eject NoSymbol XF86Eject
|
||||||
|
keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject
|
||||||
|
keycode 171 = XF86AudioNext NoSymbol XF86AudioNext
|
||||||
|
keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
|
||||||
|
keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev
|
||||||
|
keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject
|
||||||
|
keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord
|
||||||
|
keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind
|
||||||
|
keycode 177 = XF86Phone NoSymbol XF86Phone
|
||||||
|
keycode 178 =
|
||||||
|
keycode 179 = XF86Tools NoSymbol XF86Tools
|
||||||
|
keycode 180 = XF86HomePage NoSymbol XF86HomePage
|
||||||
|
keycode 181 = XF86Reload NoSymbol XF86Reload
|
||||||
|
keycode 182 = XF86Close NoSymbol XF86Close
|
||||||
|
keycode 183 =
|
||||||
|
keycode 184 =
|
||||||
|
keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp
|
||||||
|
keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown
|
||||||
|
keycode 187 = parenleft NoSymbol parenleft
|
||||||
|
keycode 188 = parenright NoSymbol parenright
|
||||||
|
keycode 189 = XF86New NoSymbol XF86New
|
||||||
|
keycode 190 = Redo NoSymbol Redo
|
||||||
|
keycode 191 = XF86Tools NoSymbol XF86Tools
|
||||||
|
keycode 192 = XF86Launch5 NoSymbol XF86Launch5
|
||||||
|
keycode 193 = XF86Launch6 NoSymbol XF86Launch6
|
||||||
|
keycode 194 = XF86Launch7 NoSymbol XF86Launch7
|
||||||
|
keycode 195 = XF86Launch8 NoSymbol XF86Launch8
|
||||||
|
keycode 196 = XF86Launch9 NoSymbol XF86Launch9
|
||||||
|
keycode 197 =
|
||||||
|
keycode 198 = XF86AudioMicMute NoSymbol XF86AudioMicMute
|
||||||
|
keycode 199 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle
|
||||||
|
keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn
|
||||||
|
keycode 201 = XF86TouchpadOff NoSymbol XF86TouchpadOff
|
||||||
|
keycode 202 =
|
||||||
|
keycode 203 = Mode_switch NoSymbol Mode_switch
|
||||||
|
keycode 204 = NoSymbol Alt_L NoSymbol Alt_L
|
||||||
|
keycode 205 = NoSymbol Meta_L NoSymbol Meta_L
|
||||||
|
keycode 206 = NoSymbol Super_L NoSymbol Super_L
|
||||||
|
keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L
|
||||||
|
keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay
|
||||||
|
keycode 209 = XF86AudioPause NoSymbol XF86AudioPause
|
||||||
|
keycode 210 = XF86Launch3 NoSymbol XF86Launch3
|
||||||
|
keycode 211 = XF86Launch4 NoSymbol XF86Launch4
|
||||||
|
keycode 212 = XF86LaunchB NoSymbol XF86LaunchB
|
||||||
|
keycode 213 = XF86Suspend NoSymbol XF86Suspend
|
||||||
|
keycode 214 = XF86Close NoSymbol XF86Close
|
||||||
|
keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay
|
||||||
|
keycode 216 = XF86AudioForward NoSymbol XF86AudioForward
|
||||||
|
keycode 217 =
|
||||||
|
keycode 218 = Print NoSymbol Print
|
||||||
|
keycode 219 =
|
||||||
|
keycode 220 = XF86WebCam NoSymbol XF86WebCam
|
||||||
|
keycode 221 = XF86AudioPreset NoSymbol XF86AudioPreset
|
||||||
|
keycode 222 =
|
||||||
|
keycode 223 = XF86Mail NoSymbol XF86Mail
|
||||||
|
keycode 224 = XF86Messenger NoSymbol XF86Messenger
|
||||||
|
keycode 225 = XF86Search NoSymbol XF86Search
|
||||||
|
keycode 226 = XF86Go NoSymbol XF86Go
|
||||||
|
keycode 227 = XF86Finance NoSymbol XF86Finance
|
||||||
|
keycode 228 = XF86Game NoSymbol XF86Game
|
||||||
|
keycode 229 = XF86Shop NoSymbol XF86Shop
|
||||||
|
keycode 230 =
|
||||||
|
keycode 231 = Cancel NoSymbol Cancel
|
||||||
|
keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown
|
||||||
|
keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp
|
||||||
|
keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia
|
||||||
|
keycode 235 = XF86Display NoSymbol XF86Display
|
||||||
|
keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
|
||||||
|
keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
|
||||||
|
keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
|
||||||
|
keycode 239 = XF86Send NoSymbol XF86Send
|
||||||
|
keycode 240 = XF86Reply NoSymbol XF86Reply
|
||||||
|
keycode 241 = XF86MailForward NoSymbol XF86MailForward
|
||||||
|
keycode 242 = XF86Save NoSymbol XF86Save
|
||||||
|
keycode 243 = XF86Documents NoSymbol XF86Documents
|
||||||
|
keycode 244 = XF86Battery NoSymbol XF86Battery
|
||||||
|
keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth
|
||||||
|
keycode 246 = XF86WLAN NoSymbol XF86WLAN
|
||||||
|
keycode 247 =
|
||||||
|
keycode 248 =
|
||||||
|
keycode 249 =
|
||||||
|
keycode 250 =
|
||||||
|
keycode 251 = XF86MonBrightnessCycle NoSymbol XF86MonBrightnessCycle
|
||||||
|
keycode 252 =
|
||||||
|
keycode 253 =
|
||||||
|
keycode 254 = XF86WWAN NoSymbol XF86WWAN
|
||||||
|
keycode 255 = XF86RFKill NoSymbol XF86RFKill
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
---
|
---
|
||||||
BUNDLE_BUILD__NOKOGIRI: "--use-system-libraries"
|
BUNDLE_BUILD__NOKOGIRI: "--use-system-libraries"
|
||||||
|
BUNDLE_BUILD__SASSC: "--disable-lto"
|
||||||
BUNDLE_PATH: "vendor/bundle"
|
BUNDLE_PATH: "vendor/bundle"
|
||||||
BUNDLE_GEM__COC: "0"
|
BUNDLE_GEM__COC: "0"
|
||||||
BUNDLE_GEM__MIT: "1"
|
BUNDLE_GEM__MIT: "1"
|
||||||
BUNDLE_GEM__TEST: "rspec"
|
BUNDLE_GEM__TEST: "minitest"
|
||||||
BUNDLE_GIT__ALLOW_INSECURE: "true"
|
BUNDLE_GIT__ALLOW_INSECURE: "true"
|
||||||
BUNDLE_PREFER_GEMS_RB: "true"
|
BUNDLE_PREFER_GEMS_RB: "true"
|
||||||
BUNDLE_INIT_GEMS_RB: "true"
|
BUNDLE_INIT_GEMS_RB: "true"
|
||||||
|
BUNDLE_JOBS: "8"
|
||||||
665
config/alacritty/alacritty.yml
Normal file
665
config/alacritty/alacritty.yml
Normal file
@@ -0,0 +1,665 @@
|
|||||||
|
# Configuration for Alacritty, the GPU enhanced terminal emulator.
|
||||||
|
|
||||||
|
# Any items in the `env` entry below will be added as
|
||||||
|
# environment variables. Some entries may override variables
|
||||||
|
# set by alacritty itself.
|
||||||
|
#env:
|
||||||
|
# TERM variable
|
||||||
|
#
|
||||||
|
# This value is used to set the `$TERM` environment variable for
|
||||||
|
# each instance of Alacritty. If it is not present, alacritty will
|
||||||
|
# check the local terminfo database and use `alacritty` if it is
|
||||||
|
# available, otherwise `xterm-256color` is used.
|
||||||
|
#TERM: alacritty
|
||||||
|
env:
|
||||||
|
TERM: xterm-256color
|
||||||
|
|
||||||
|
#window:
|
||||||
|
# Window dimensions (changes require restart)
|
||||||
|
#
|
||||||
|
# Specified in number of columns/lines, not pixels.
|
||||||
|
# If both are `0`, this setting is ignored.
|
||||||
|
#dimensions:
|
||||||
|
# columns: 0
|
||||||
|
# lines: 0
|
||||||
|
|
||||||
|
# Window position (changes require restart)
|
||||||
|
#
|
||||||
|
# Specified in number of pixels.
|
||||||
|
# If the position is not set, the window manager will handle the placement.
|
||||||
|
#position:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
|
||||||
|
# Window padding (changes require restart)
|
||||||
|
#
|
||||||
|
# Blank space added around the window in pixels. This padding is scaled
|
||||||
|
# by DPI and the specified value is always added at both opposing sides.
|
||||||
|
#padding:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
|
||||||
|
# Spread additional padding evenly around the terminal content.
|
||||||
|
#dynamic_padding: false
|
||||||
|
|
||||||
|
# Window decorations
|
||||||
|
#
|
||||||
|
# Values for `decorations`:
|
||||||
|
# - full: Borders and title bar
|
||||||
|
# - none: Neither borders nor title bar
|
||||||
|
#
|
||||||
|
# Values for `decorations` (macOS only):
|
||||||
|
# - transparent: Title bar, transparent background and title bar buttons
|
||||||
|
# - buttonless: Title bar, transparent background, but no title bar buttons
|
||||||
|
#decorations: full
|
||||||
|
|
||||||
|
# Startup Mode (changes require restart)
|
||||||
|
#
|
||||||
|
# Values for `startup_mode`:
|
||||||
|
# - Windowed
|
||||||
|
# - Maximized
|
||||||
|
# - Fullscreen
|
||||||
|
#
|
||||||
|
# Values for `startup_mode` (macOS only):
|
||||||
|
# - SimpleFullscreen
|
||||||
|
#startup_mode: Windowed
|
||||||
|
|
||||||
|
# Window title
|
||||||
|
#title: Alacritty
|
||||||
|
|
||||||
|
# Window class (Linux/BSD only):
|
||||||
|
#class:
|
||||||
|
# Application instance name
|
||||||
|
#instance: Alacritty
|
||||||
|
# General application class
|
||||||
|
#general: Alacritty
|
||||||
|
|
||||||
|
# GTK theme variant (Linux/BSD only)
|
||||||
|
#
|
||||||
|
# Override the variant of the GTK theme. Commonly supported values are `dark` and `light`.
|
||||||
|
# Set this to `None` to use the default theme variant.
|
||||||
|
#gtk_theme_variant: None
|
||||||
|
|
||||||
|
#scrolling:
|
||||||
|
# Maximum number of lines in the scrollback buffer.
|
||||||
|
# Specifying '0' will disable scrolling.
|
||||||
|
#history: 10000
|
||||||
|
|
||||||
|
# Number of lines the viewport will move for every line scrolled when
|
||||||
|
# scrollback is enabled (history > 0).
|
||||||
|
#multiplier: 3
|
||||||
|
|
||||||
|
# Font configuration
|
||||||
|
#font:
|
||||||
|
# Normal (roman) font face
|
||||||
|
#normal:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# Default:
|
||||||
|
# - (macOS) Menlo
|
||||||
|
# - (Linux/BSD) monospace
|
||||||
|
# - (Windows) Consolas
|
||||||
|
#family: monospace
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
#style: Regular
|
||||||
|
|
||||||
|
# Bold font face
|
||||||
|
#bold:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the bold family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
#family: monospace
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
#style: Bold
|
||||||
|
|
||||||
|
# Italic font face
|
||||||
|
#italic:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the italic family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
#family: monospace
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
#style: Italic
|
||||||
|
|
||||||
|
# Bold italic font face
|
||||||
|
#bold_italic:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the bold italic family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
#family: monospace
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
#style: Bold Italic
|
||||||
|
|
||||||
|
# Point size
|
||||||
|
#size: 11.0
|
||||||
|
|
||||||
|
# Offset is the extra space around each character. `offset.y` can be thought of
|
||||||
|
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
|
||||||
|
#offset:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
|
||||||
|
# Glyph offset determines the locations of the glyphs within their cells with
|
||||||
|
# the default being at the bottom. Increasing `x` moves the glyph to the right,
|
||||||
|
# increasing `y` moves the glyph upwards.
|
||||||
|
#glyph_offset:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
|
||||||
|
# Thin stroke font rendering (macOS only)
|
||||||
|
#
|
||||||
|
# Thin strokes are suitable for retina displays, but for non-retina screens
|
||||||
|
# it is recommended to set `use_thin_strokes` to `false`
|
||||||
|
#
|
||||||
|
# macOS >= 10.14.x:
|
||||||
|
#
|
||||||
|
# If the font quality on non-retina display looks bad then set
|
||||||
|
# `use_thin_strokes` to `true` and enable font smoothing by running the
|
||||||
|
# following command:
|
||||||
|
# `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO`
|
||||||
|
#
|
||||||
|
# This is a global setting and will require a log out or restart to take
|
||||||
|
# effect.
|
||||||
|
#use_thin_strokes: true
|
||||||
|
|
||||||
|
font:
|
||||||
|
size: 9
|
||||||
|
normal:
|
||||||
|
family: Iosevka Term
|
||||||
|
style: Medium
|
||||||
|
bold:
|
||||||
|
family: Iosevka Term
|
||||||
|
style: Heavy
|
||||||
|
italic:
|
||||||
|
family: Iosevka Term
|
||||||
|
style: Medium Oblique
|
||||||
|
bold_italic:
|
||||||
|
family: Iosevka Term
|
||||||
|
style: Heavy Oblique
|
||||||
|
|
||||||
|
# If `true`, bold text is drawn using the bright color variants.
|
||||||
|
draw_bold_text_with_bright_colors: false
|
||||||
|
|
||||||
|
# Colors (Tomorrow Night Bright)
|
||||||
|
#colors:
|
||||||
|
# Default colors
|
||||||
|
#primary:
|
||||||
|
# background: '#000000'
|
||||||
|
# foreground: '#eaeaea'
|
||||||
|
|
||||||
|
# Bright and dim foreground colors
|
||||||
|
#
|
||||||
|
# The dimmed foreground color is calculated automatically if it is not present.
|
||||||
|
# If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`
|
||||||
|
# is `false`, the normal foreground color will be used.
|
||||||
|
#dim_foreground: '#9a9a9a'
|
||||||
|
#bright_foreground: '#ffffff'
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
#
|
||||||
|
# Colors which should be used to draw the terminal cursor. If these are unset,
|
||||||
|
# the cursor color will be the inverse of the cell color.
|
||||||
|
#cursor:
|
||||||
|
# text: '#000000'
|
||||||
|
# cursor: '#ffffff'
|
||||||
|
|
||||||
|
# Selection colors
|
||||||
|
#
|
||||||
|
# Colors which should be used to draw the selection area. If selection
|
||||||
|
# background is unset, selection color will be the inverse of the cell colors.
|
||||||
|
# If only text is unset the cell text color will remain the same.
|
||||||
|
#selection:
|
||||||
|
# text: '#eaeaea'
|
||||||
|
# background: '#404040'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
#normal:
|
||||||
|
# black: '#000000'
|
||||||
|
# red: '#d54e53'
|
||||||
|
# green: '#b9ca4a'
|
||||||
|
# yellow: '#e6c547'
|
||||||
|
# blue: '#7aa6da'
|
||||||
|
# magenta: '#c397d8'
|
||||||
|
# cyan: '#70c0ba'
|
||||||
|
# white: '#eaeaea'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
|
#bright:
|
||||||
|
# black: '#666666'
|
||||||
|
# red: '#ff3334'
|
||||||
|
# green: '#9ec400'
|
||||||
|
# yellow: '#e7c547'
|
||||||
|
# blue: '#7aa6da'
|
||||||
|
# magenta: '#b77ee0'
|
||||||
|
# cyan: '#54ced6'
|
||||||
|
# white: '#ffffff'
|
||||||
|
|
||||||
|
# Dim colors
|
||||||
|
#
|
||||||
|
# If the dim colors are not set, they will be calculated automatically based
|
||||||
|
# on the `normal` colors.
|
||||||
|
#dim:
|
||||||
|
# black: '#000000'
|
||||||
|
# red: '#8c3336'
|
||||||
|
# green: '#7a8530'
|
||||||
|
# yellow: '#97822e'
|
||||||
|
# blue: '#506d8f'
|
||||||
|
# magenta: '#80638e'
|
||||||
|
# cyan: '#497e7a'
|
||||||
|
# white: '#9a9a9a'
|
||||||
|
|
||||||
|
# Indexed Colors
|
||||||
|
#
|
||||||
|
# The indexed colors include all colors from 16 to 256.
|
||||||
|
# When these are not set, they're filled with sensible defaults.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# `- { index: 16, color: '#ff00ff' }`
|
||||||
|
#
|
||||||
|
#indexed_colors: []
|
||||||
|
|
||||||
|
# Colors (Gruvbox dark)
|
||||||
|
# colors:
|
||||||
|
# # Default colors
|
||||||
|
# primary:
|
||||||
|
# background: '#1d2021'
|
||||||
|
# foreground: '#d5c4a1'
|
||||||
|
#
|
||||||
|
# # Normal colors
|
||||||
|
# normal:
|
||||||
|
# black: '#1d2021'
|
||||||
|
# red: '#fb4934'
|
||||||
|
# green: '#b8bb26'
|
||||||
|
# yellow: '#fabd2f'
|
||||||
|
# blue: '#83a598'
|
||||||
|
# magenta: '#d3869b'
|
||||||
|
# cyan: '#8ec07c'
|
||||||
|
# white: '#d5c4a1'
|
||||||
|
#
|
||||||
|
# # Bright colors
|
||||||
|
# bright:
|
||||||
|
# black: '#665c54'
|
||||||
|
# red: '#fb4934'
|
||||||
|
# green: '#b8bb26'
|
||||||
|
# yellow: '#fabd2f'
|
||||||
|
# blue: '#83a598'
|
||||||
|
# magenta: '#d3869b'
|
||||||
|
# cyan: '#8ec07c'
|
||||||
|
# white: '#d5c4a1'
|
||||||
|
|
||||||
|
colors:
|
||||||
|
# Default colors
|
||||||
|
primary:
|
||||||
|
# background: '#282828'
|
||||||
|
# hard contrast:
|
||||||
|
background: '#1d2021'
|
||||||
|
# soft contrast: background = '#32302f'
|
||||||
|
foreground: '#d5c4a1'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
# normal:
|
||||||
|
# black: '#282828'
|
||||||
|
# red: '#cc241d'
|
||||||
|
# green: '#98971a'
|
||||||
|
# yellow: '#d79921'
|
||||||
|
# blue: '#458588'
|
||||||
|
# magenta: '#b16286'
|
||||||
|
# cyan: '#689d6a'
|
||||||
|
# white: '#a89984'
|
||||||
|
|
||||||
|
normal:
|
||||||
|
black: '#1d2021'
|
||||||
|
red: '#fb4934'
|
||||||
|
green: '#b8bb26'
|
||||||
|
yellow: '#fabd2f'
|
||||||
|
blue: '#83a598'
|
||||||
|
magenta: '#d3869b'
|
||||||
|
cyan: '#8ec07c'
|
||||||
|
white: '#ebdbb2'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
|
bright:
|
||||||
|
black: '#665c54'
|
||||||
|
red: '#fb4934'
|
||||||
|
green: '#b8bb26'
|
||||||
|
yellow: '#fabd2f'
|
||||||
|
blue: '#83a598'
|
||||||
|
magenta: '#d3869b'
|
||||||
|
cyan: '#8ec07c'
|
||||||
|
white: '#fbf1c7'
|
||||||
|
|
||||||
|
# Visual Bell
|
||||||
|
#
|
||||||
|
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
|
||||||
|
# rung, the terminal background will be set to white and transition back to the
|
||||||
|
# default background color. You can control the rate of this transition by
|
||||||
|
# setting the `duration` property (represented in milliseconds). You can also
|
||||||
|
# configure the transition function by setting the `animation` property.
|
||||||
|
#
|
||||||
|
# Values for `animation`:
|
||||||
|
# - Ease
|
||||||
|
# - EaseOut
|
||||||
|
# - EaseOutSine
|
||||||
|
# - EaseOutQuad
|
||||||
|
# - EaseOutCubic
|
||||||
|
# - EaseOutQuart
|
||||||
|
# - EaseOutQuint
|
||||||
|
# - EaseOutExpo
|
||||||
|
# - EaseOutCirc
|
||||||
|
# - Linear
|
||||||
|
#
|
||||||
|
# Specifying a `duration` of `0` will disable the visual bell.
|
||||||
|
#visual_bell:
|
||||||
|
# animation: EaseOutExpo
|
||||||
|
# duration: 0
|
||||||
|
# color: '#ffffff'
|
||||||
|
|
||||||
|
visual_bell:
|
||||||
|
animation: EaseOutExpo
|
||||||
|
duration: 100
|
||||||
|
color: '#292d2e'
|
||||||
|
|
||||||
|
# Background opacity
|
||||||
|
#
|
||||||
|
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||||
|
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||||
|
#background_opacity: 1.0
|
||||||
|
|
||||||
|
#selection:
|
||||||
|
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
||||||
|
|
||||||
|
# When set to `true`, selected text will be copied to the primary clipboard.
|
||||||
|
#save_to_clipboard: false
|
||||||
|
|
||||||
|
# Allow terminal applications to change Alacritty's window title.
|
||||||
|
#dynamic_title: true
|
||||||
|
|
||||||
|
#cursor:
|
||||||
|
# Cursor style
|
||||||
|
#
|
||||||
|
# Values for `style`:
|
||||||
|
# - ▇ Block
|
||||||
|
# - _ Underline
|
||||||
|
# - | Beam
|
||||||
|
#style: Block
|
||||||
|
|
||||||
|
# If this is `true`, the cursor will be rendered as a hollow box when the
|
||||||
|
# window is not focused.
|
||||||
|
#unfocused_hollow: true
|
||||||
|
|
||||||
|
# Live config reload (changes require restart)
|
||||||
|
live_config_reload: false
|
||||||
|
|
||||||
|
# Shell
|
||||||
|
#
|
||||||
|
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
|
||||||
|
# Entries in `shell.args` are passed unmodified as arguments to the shell.
|
||||||
|
#
|
||||||
|
# Default:
|
||||||
|
# - (macOS) /bin/bash --login
|
||||||
|
# - (Linux/BSD) user login shell
|
||||||
|
# - (Windows) powershell
|
||||||
|
#shell:
|
||||||
|
# program: /bin/bash
|
||||||
|
# args:
|
||||||
|
# - --login
|
||||||
|
shell:
|
||||||
|
program: shell
|
||||||
|
|
||||||
|
# Startup directory
|
||||||
|
#
|
||||||
|
# Directory the shell is started in. If this is unset, or `None`, the working
|
||||||
|
# directory of the parent process will be used.
|
||||||
|
#working_directory: None
|
||||||
|
|
||||||
|
# WinPTY backend (Windows only)
|
||||||
|
#
|
||||||
|
# Alacritty defaults to using the newer ConPTY backend if it is available,
|
||||||
|
# since it resolves a lot of bugs and is quite a bit faster. If it is not
|
||||||
|
# available, the the WinPTY backend will be used instead.
|
||||||
|
#
|
||||||
|
# Setting this option to `true` makes Alacritty use the legacy WinPTY backend,
|
||||||
|
# even if the ConPTY backend is available.
|
||||||
|
#winpty_backend: false
|
||||||
|
|
||||||
|
# Send ESC (\x1b) before characters when alt is pressed.
|
||||||
|
#alt_send_esc: true
|
||||||
|
|
||||||
|
#mouse:
|
||||||
|
# Click settings
|
||||||
|
#
|
||||||
|
# The `double_click` and `triple_click` settings control the time
|
||||||
|
# alacritty should wait for accepting multiple clicks as one double
|
||||||
|
# or triple click.
|
||||||
|
#double_click: { threshold: 300 }
|
||||||
|
#triple_click: { threshold: 300 }
|
||||||
|
|
||||||
|
# If this is `true`, the cursor is temporarily hidden when typing.
|
||||||
|
#hide_when_typing: false
|
||||||
|
|
||||||
|
#url:
|
||||||
|
# URL launcher
|
||||||
|
#
|
||||||
|
# This program is executed when clicking on a text which is recognized as a URL.
|
||||||
|
# The URL is always added to the command as the last parameter.
|
||||||
|
#
|
||||||
|
# When set to `None`, URL launching will be disabled completely.
|
||||||
|
#
|
||||||
|
# Default:
|
||||||
|
# - (macOS) open
|
||||||
|
# - (Linux/BSD) xdg-open
|
||||||
|
# - (Windows) explorer
|
||||||
|
#launcher:
|
||||||
|
# program: xdg-open
|
||||||
|
# args: []
|
||||||
|
|
||||||
|
# URL modifiers
|
||||||
|
#
|
||||||
|
# These are the modifiers that need to be held down for opening URLs when clicking
|
||||||
|
# on them. The available modifiers are documented in the key binding section.
|
||||||
|
#modifiers: None
|
||||||
|
|
||||||
|
# Mouse bindings
|
||||||
|
#
|
||||||
|
# Mouse bindings are specified as a list of objects, much like the key
|
||||||
|
# bindings further below.
|
||||||
|
#
|
||||||
|
# To trigger mouse bindings when an application running within Alacritty captures the mouse, the
|
||||||
|
# `Shift` modifier is automatically added as a requirement.
|
||||||
|
#
|
||||||
|
# Each mouse binding will specify a:
|
||||||
|
#
|
||||||
|
# - `mouse`:
|
||||||
|
#
|
||||||
|
# - Middle
|
||||||
|
# - Left
|
||||||
|
# - Right
|
||||||
|
# - Numeric identifier such as `5`
|
||||||
|
#
|
||||||
|
# - `action` (see key bindings)
|
||||||
|
#
|
||||||
|
# And optionally:
|
||||||
|
#
|
||||||
|
# - `mods` (see key bindings)
|
||||||
|
|
||||||
|
mouse_bindings:
|
||||||
|
- { mouse: Middle, action: PasteSelection }
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
#
|
||||||
|
# Key bindings are specified as a list of objects. For example, this is the
|
||||||
|
# default paste binding:
|
||||||
|
#
|
||||||
|
# `- { key: V, mods: Control|Shift, action: Paste }`
|
||||||
|
#
|
||||||
|
# Each key binding will specify a:
|
||||||
|
#
|
||||||
|
# - `key`: Identifier of the key pressed
|
||||||
|
#
|
||||||
|
# - A-Z
|
||||||
|
# - F1-F24
|
||||||
|
# - Key0-Key9
|
||||||
|
#
|
||||||
|
# A full list with available key codes can be found here:
|
||||||
|
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
|
||||||
|
#
|
||||||
|
# Instead of using the name of the keys, the `key` field also supports using
|
||||||
|
# the scancode of the desired key. Scancodes have to be specified as a
|
||||||
|
# decimal number. This command will allow you to display the hex scancodes
|
||||||
|
# for certain keys:
|
||||||
|
#
|
||||||
|
# `showkey --scancodes`.
|
||||||
|
#
|
||||||
|
# Then exactly one of:
|
||||||
|
#
|
||||||
|
# - `chars`: Send a byte sequence to the running application
|
||||||
|
#
|
||||||
|
# The `chars` field writes the specified string to the terminal. This makes
|
||||||
|
# it possible to pass escape sequences. To find escape codes for bindings
|
||||||
|
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
|
||||||
|
# of tmux. Note that applications use terminfo to map escape sequences back
|
||||||
|
# to keys. It is therefore required to update the terminfo when changing an
|
||||||
|
# escape sequence.
|
||||||
|
#
|
||||||
|
# - `action`: Execute a predefined action
|
||||||
|
#
|
||||||
|
# - Copy
|
||||||
|
# - Paste
|
||||||
|
# - PasteSelection
|
||||||
|
# - IncreaseFontSize
|
||||||
|
# - DecreaseFontSize
|
||||||
|
# - ResetFontSize
|
||||||
|
# - ScrollPageUp
|
||||||
|
# - ScrollPageDown
|
||||||
|
# - ScrollLineUp
|
||||||
|
# - ScrollLineDown
|
||||||
|
# - ScrollToTop
|
||||||
|
# - ScrollToBottom
|
||||||
|
# - ClearHistory
|
||||||
|
# - Hide
|
||||||
|
# - Minimize
|
||||||
|
# - Quit
|
||||||
|
# - ToggleFullscreen
|
||||||
|
# - SpawnNewInstance
|
||||||
|
# - ClearLogNotice
|
||||||
|
# - ReceiveChar
|
||||||
|
# - None
|
||||||
|
#
|
||||||
|
# (macOS only):
|
||||||
|
# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
|
||||||
|
#
|
||||||
|
# - `command`: Fork and execute a specified command plus arguments
|
||||||
|
#
|
||||||
|
# The `command` field must be a map containing a `program` string and an
|
||||||
|
# `args` array of command line parameter strings. For example:
|
||||||
|
# `{ program: "alacritty", args: ["-e", "vttest"] }`
|
||||||
|
#
|
||||||
|
# And optionally:
|
||||||
|
#
|
||||||
|
# - `mods`: Key modifiers to filter binding actions
|
||||||
|
#
|
||||||
|
# - Command
|
||||||
|
# - Control
|
||||||
|
# - Option
|
||||||
|
# - Super
|
||||||
|
# - Shift
|
||||||
|
# - Alt
|
||||||
|
#
|
||||||
|
# Multiple `mods` can be combined using `|` like this:
|
||||||
|
# `mods: Control|Shift`.
|
||||||
|
# Whitespace and capitalization are relevant and must match the example.
|
||||||
|
#
|
||||||
|
# - `mode`: Indicate a binding for only specific terminal reported modes
|
||||||
|
#
|
||||||
|
# This is mainly used to send applications the correct escape sequences
|
||||||
|
# when in different modes.
|
||||||
|
#
|
||||||
|
# - AppCursor
|
||||||
|
# - AppKeypad
|
||||||
|
# - Alt
|
||||||
|
#
|
||||||
|
# A `~` operator can be used before a mode to apply the binding whenever
|
||||||
|
# the mode is *not* active, e.g. `~Alt`.
|
||||||
|
#
|
||||||
|
# Bindings are always filled by default, but will be replaced when a new
|
||||||
|
# binding with the same triggers is defined. To unset a default binding, it can
|
||||||
|
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
|
||||||
|
# a no-op if you do not wish to receive input characters for that binding.
|
||||||
|
#
|
||||||
|
# If the same trigger is assigned to multiple actions, all of them are executed
|
||||||
|
# at once.
|
||||||
|
#key_bindings:
|
||||||
|
# (Windows, Linux, and BSD only)
|
||||||
|
#- { key: V, mods: Control|Shift, action: Paste }
|
||||||
|
#- { key: C, mods: Control|Shift, action: Copy }
|
||||||
|
#- { key: Insert, mods: Shift, action: PasteSelection }
|
||||||
|
#- { key: Key0, mods: Control, action: ResetFontSize }
|
||||||
|
#- { key: Equals, mods: Control, action: IncreaseFontSize }
|
||||||
|
#- { key: Add, mods: Control, action: IncreaseFontSize }
|
||||||
|
#- { key: Subtract, mods: Control, action: DecreaseFontSize }
|
||||||
|
#- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||||
|
|
||||||
|
# (Windows only)
|
||||||
|
#- { key: Return, mods: Alt, action: ToggleFullscreen }
|
||||||
|
|
||||||
|
# (macOS only)
|
||||||
|
#- { key: Key0, mods: Command, action: ResetFontSize }
|
||||||
|
#- { key: Equals, mods: Command, action: IncreaseFontSize }
|
||||||
|
#- { key: Add, mods: Command, action: IncreaseFontSize }
|
||||||
|
#- { key: Minus, mods: Command, action: DecreaseFontSize }
|
||||||
|
#- { key: K, mods: Command, action: ClearHistory }
|
||||||
|
#- { key: K, mods: Command, chars: "\x0c" }
|
||||||
|
#- { key: V, mods: Command, action: Paste }
|
||||||
|
#- { key: C, mods: Command, action: Copy }
|
||||||
|
#- { key: H, mods: Command, action: Hide }
|
||||||
|
#- { key: M, mods: Command, action: Minimize }
|
||||||
|
#- { key: Q, mods: Command, action: Quit }
|
||||||
|
#- { key: W, mods: Command, action: Quit }
|
||||||
|
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
|
||||||
|
|
||||||
|
#- { key: Paste, action: Paste }
|
||||||
|
#- { key: Copy, action: Copy }
|
||||||
|
#- { key: L, mods: Control, action: ClearLogNotice }
|
||||||
|
#- { key: L, mods: Control, chars: "\x0c" }
|
||||||
|
#- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt }
|
||||||
|
#- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt }
|
||||||
|
#- { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt }
|
||||||
|
#- { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt }
|
||||||
|
|
||||||
|
key_bindings:
|
||||||
|
- { key: V, mods: Control|Shift, action: Paste }
|
||||||
|
- { key: C, mods: Control|Shift, action: Copy }
|
||||||
|
- { key: Insert, mods: Shift, action: PasteSelection }
|
||||||
|
- { key: Key0, mods: Control, action: ResetFontSize }
|
||||||
|
- { key: Equals, mods: Control, action: IncreaseFontSize }
|
||||||
|
- { key: Add, mods: Control, action: IncreaseFontSize }
|
||||||
|
- { key: Subtract, mods: Control, action: DecreaseFontSize }
|
||||||
|
- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||||
|
|
||||||
|
#debug:
|
||||||
|
# Display the time it takes to redraw each frame.
|
||||||
|
#render_timer: false
|
||||||
|
|
||||||
|
# Keep the log file after quitting Alacritty.
|
||||||
|
#persistent_logging: false
|
||||||
|
|
||||||
|
# Log level
|
||||||
|
#
|
||||||
|
# Values for `log_level`:
|
||||||
|
# - None
|
||||||
|
# - Error
|
||||||
|
# - Warn
|
||||||
|
# - Info
|
||||||
|
# - Debug
|
||||||
|
# - Trace
|
||||||
|
#log_level: Warn
|
||||||
|
|
||||||
|
# Print all received window events.
|
||||||
|
#print_events: false
|
||||||
9
config/direnv/direnvrc
Normal file
9
config/direnv/direnvrc
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
use_ruby() {
|
||||||
|
local ruby_root=$HOME/.ruby/$1
|
||||||
|
load_prefix "$ruby_root"
|
||||||
|
layout_ruby
|
||||||
|
}
|
||||||
|
|
||||||
|
check_env() {
|
||||||
|
local ret=0; for var in "$@"; do [[ -v $var ]] || { echo "$var is missing"; ret=1; }; done; return $ret;
|
||||||
|
}
|
||||||
1
config/fish/completions/fisher.fish
Normal file
1
config/fish/completions/fisher.fish
Normal file
@@ -0,0 +1 @@
|
|||||||
|
fisher complete
|
||||||
6
config/fish/completions/kitty.fish
Normal file
6
config/fish/completions/kitty.fish
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
function __kitty_completions
|
||||||
|
# Send all words up to the one before the cursor
|
||||||
|
commandline -cop | kitty +complete fish
|
||||||
|
end
|
||||||
|
|
||||||
|
complete -f -c kitty -a "(__kitty_completions)"
|
||||||
320
config/fish/completions/task.fish
Normal file
320
config/fish/completions/task.fish
Normal file
@@ -0,0 +1,320 @@
|
|||||||
|
# Taskwarrior completions for the Fish shell <http://fishshell.org>
|
||||||
|
#
|
||||||
|
# taskwarrior - a command line task list manager.
|
||||||
|
#
|
||||||
|
# Completions should work out of box. If it isn't, fill the bug report on your
|
||||||
|
# operation system bug tracker.
|
||||||
|
#
|
||||||
|
# As a workaround you can copy this script to
|
||||||
|
# ~/.config/fish/completions/task.fish, and open a new shell.
|
||||||
|
#
|
||||||
|
# Objects completed:
|
||||||
|
# * Commands
|
||||||
|
# * Projects
|
||||||
|
# * Priorities
|
||||||
|
# * Tags
|
||||||
|
# * Attribute names and modifiers
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# You can override some default options in your config.fish:
|
||||||
|
#
|
||||||
|
# # Tab-completion of task descriptions.
|
||||||
|
# # Warning: This often creates a list of suggestions which spans several pages,
|
||||||
|
# # and it usually pushes some of the commands and attributes to the end of the
|
||||||
|
# # list.
|
||||||
|
# set -g task_complete_task yes
|
||||||
|
#
|
||||||
|
# # Tab-completion of task IDs outside of the "depends" attribute.
|
||||||
|
# # Warning: This often creates a list of suggestions which spans several pages,
|
||||||
|
# # and it pushes all commands and attributes to the end of the list.
|
||||||
|
# set -g task_complete_id yes
|
||||||
|
#
|
||||||
|
# # Attribute modifiers (DEPRECATED since 2.4.0)
|
||||||
|
# set -g task_complete_attribute_modifiers yes
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Copyright 2014 - 2019, Roman Inflianskas <infroma@gmail.com>
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included
|
||||||
|
# in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
# SOFTWARE.
|
||||||
|
#
|
||||||
|
# https://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
||||||
|
# NOTE: remember that sed on OS X is different in some aspects. E.g. it does
|
||||||
|
# not understand \t for tabs.
|
||||||
|
|
||||||
|
# convinience functions
|
||||||
|
|
||||||
|
function __fish.task.log
|
||||||
|
for line in $argv
|
||||||
|
echo $line >&2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.partial
|
||||||
|
set wrapped $argv[1]
|
||||||
|
set what $argv[2]
|
||||||
|
set -q argv[3]; and set f_argv $argv[3..-1]
|
||||||
|
set f __fish.task.$wrapped.$what
|
||||||
|
functions -q $f; and eval $f $f_argv
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.zsh
|
||||||
|
set -q argv[2]; and set task_argv $argv[2..-1]
|
||||||
|
task _zsh$argv[1] $task_argv | sed 's/:/ /'
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# command line state detection
|
||||||
|
|
||||||
|
function __fish.task.bare
|
||||||
|
test (count (commandline -c -o)) -eq 1
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.current.command
|
||||||
|
# find command in commandline by list intersection
|
||||||
|
begin; commandline -pco; and __fish.task.list._command all | cut -d ' ' -f 1; end | sort | uniq -d | xargs
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.before_command
|
||||||
|
test -z (__fish.task.current.command)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# checking need to complete
|
||||||
|
|
||||||
|
function __fish.task.need_to_complete.attr_name
|
||||||
|
__fish.task.need_to_complete.filter; or contains (__fish.task.current.command) (__fish.task.list.command_mods)
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.need_to_complete.attr_value
|
||||||
|
__fish.task.need_to_complete.attr_name
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.need_to_complete.command
|
||||||
|
switch $argv
|
||||||
|
case all
|
||||||
|
__fish.task.bare
|
||||||
|
case filter
|
||||||
|
__fish.task.before_command
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.need_to_complete.config
|
||||||
|
contains (__fish.task.current.command) 'config' 'show'
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.need_to_complete.filter
|
||||||
|
__fish.task.before_command
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.need_to_complete.id
|
||||||
|
__fish.task.need_to_complete.filter
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.need_to_complete.task
|
||||||
|
__fish.task.need_to_complete.filter
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.need_to_complete
|
||||||
|
__fish.task.partial need_to_complete $argv
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# list printers
|
||||||
|
|
||||||
|
function __fish.task.token_clean
|
||||||
|
sed 's/[^a-z_.]//g; s/^\.$//g'
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.attr_name
|
||||||
|
task _columns | sed 's/$/: attribute/g'
|
||||||
|
# BUG: doesn't support file completion
|
||||||
|
echo rc
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.attr_value
|
||||||
|
set token (commandline -ct | cut -d ':' -f 1 | cut -d '.' -f 1 | __fish.task.token_clean)
|
||||||
|
if test -n $token
|
||||||
|
set attr_names (__fish.task.list.attr_name | sed 's/: / /g' | grep '^'$token | cut -d ' ' -f 1)
|
||||||
|
for attr_name in $attr_names
|
||||||
|
if test -n $attr_name
|
||||||
|
__fish.task.list.attr_value_by_name $attr_name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
__fish.task.list.tag
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.attr_value_by_name
|
||||||
|
set attr $argv[1]
|
||||||
|
switch $attr
|
||||||
|
case 'rc'
|
||||||
|
__fish.task.list.rc
|
||||||
|
case 'depends' 'limit' 'priority' 'status'
|
||||||
|
__fish.task.combos_simple $attr (__fish.task.list $attr)
|
||||||
|
# case 'description' 'due' 'entry' 'end' 'start' 'project' 'recur' 'until' 'wait'
|
||||||
|
case '*'
|
||||||
|
if [ "$task_complete_attribute_modifiers" = 'yes' ]; and echo (commandline -ct) | grep -q '\.'
|
||||||
|
__fish.task.combos_with_mods $attr (__fish.task.list $attr)
|
||||||
|
else
|
||||||
|
__fish.task.combos_simple $attr (__fish.task.list $attr)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list._command
|
||||||
|
# Removed args until TW-1404 is fixed.
|
||||||
|
#__fish.task.zsh commands $argv
|
||||||
|
__fish.task.zsh commands
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.command
|
||||||
|
# ignore special commands
|
||||||
|
__fish.task.list._command $argv | command grep -Ev '^_'
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.command_mods
|
||||||
|
for command in 'add' 'annotate' 'append' 'delete' 'done' 'duplicate' 'log' 'modify' 'prepend' 'start' 'stop'
|
||||||
|
echo $command
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.config
|
||||||
|
task _config
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.depends
|
||||||
|
__fish.task.list.id with_description
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.description
|
||||||
|
__fish.task.zsh ids $argv | cut -d ' ' -f 2-
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.id
|
||||||
|
set show_type $argv[1]
|
||||||
|
if test -z $show_type
|
||||||
|
task _ids
|
||||||
|
else if [ $show_type = 'with_description' ]
|
||||||
|
__fish.task.zsh ids
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Attribure modifiers (DEPRECATED since 2.4.0)
|
||||||
|
function __fish.task.list.mod
|
||||||
|
for mod in 'before' 'after' 'over' 'under' 'none' 'is' 'isnt' 'has' 'hasnt' 'startswith' 'endswith' 'word' 'noword'
|
||||||
|
echo $mod
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.priority
|
||||||
|
for priority in 'H' 'M' 'L'
|
||||||
|
echo $priority
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.project
|
||||||
|
task _projects
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.rc
|
||||||
|
for value in (task _config)
|
||||||
|
echo rc.$value:
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.status
|
||||||
|
echo pending
|
||||||
|
echo completed
|
||||||
|
echo deleted
|
||||||
|
echo waiting
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.tag
|
||||||
|
for tag in (task _tags)
|
||||||
|
echo +$tag
|
||||||
|
echo -$tag
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list.task
|
||||||
|
__fish.task.zsh ids | sed -E 's/^(.*) (.*)$/\2 task [id = \1]/g'
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list
|
||||||
|
__fish.task.partial list $argv
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.results_var_name
|
||||||
|
echo $argv | sed 's/^/__fish.task.list /g; s/$/ results/g; s/[ .]/_/g;'
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fish.task.list_results
|
||||||
|
set var_name (__fish.task.results_var_name $name)
|
||||||
|
for line in $$var_name
|
||||||
|
echo $line
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# working with attributes
|
||||||
|
|
||||||
|
function __fish.task.combos_simple
|
||||||
|
set attr_name $argv[1]
|
||||||
|
set -q argv[2]; and set attr_values $argv[2..-1]
|
||||||
|
if [ (count $attr_values) -gt 0 ]
|
||||||
|
for attr_value in $attr_values
|
||||||
|
echo "$attr_name:$attr_value"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
echo "$attr_name:"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Attribure modifiers (DEPRECATED since 2.4.0)
|
||||||
|
function __fish.task.combos_with_mods
|
||||||
|
__fish.task.combos_simple $argv
|
||||||
|
for mod in (__fish.task.list.mod)
|
||||||
|
__fish.task.combos_simple $argv[1].$mod $argv[2..-1]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# actual completion
|
||||||
|
|
||||||
|
function __fish.task.complete
|
||||||
|
set what $argv
|
||||||
|
set list_command "__fish.task.list $what"
|
||||||
|
set check_function "__fish.task.need_to_complete $what"
|
||||||
|
complete -c task -u -f -n $check_function -a "(eval $list_command)"
|
||||||
|
end
|
||||||
|
|
||||||
|
__fish.task.complete command all
|
||||||
|
__fish.task.complete command filter
|
||||||
|
__fish.task.complete attr_value
|
||||||
|
__fish.task.complete attr_name
|
||||||
|
__fish.task.complete config
|
||||||
|
|
||||||
|
if [ "$task_complete_task" = 'yes' ]
|
||||||
|
__fish.task.complete task
|
||||||
|
end
|
||||||
|
|
||||||
|
if [ "$task_complete_id" = 'yes' ]
|
||||||
|
__fish.task.complete id with_description
|
||||||
|
end
|
||||||
38
config/fish/conf.d/aliases.fish
Normal file
38
config/fish/conf.d/aliases.fish
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# aliases
|
||||||
|
alias sdr="screen -aAdr"
|
||||||
|
alias ls='exa'
|
||||||
|
alias la="exa -a"
|
||||||
|
alias ll="exa -laF"
|
||||||
|
alias mkpasswd="head -c16 /dev/urandom | xxd -ps"
|
||||||
|
alias mc="mc -b"
|
||||||
|
alias cdp='cd (~/bin/cdp); clear'
|
||||||
|
|
||||||
|
if command -sq grc
|
||||||
|
alias ping="grc --colour=auto ping"
|
||||||
|
alias traceroute="grc --colour=auto traceroute"
|
||||||
|
alias make="grc --colour=auto make"
|
||||||
|
alias diff="grc --colour=auto diff"
|
||||||
|
alias cvs="grc --colour=auto cvs"
|
||||||
|
alias netstat="grc --colour=auto netstat"
|
||||||
|
alias mount="grc --colour=auto mount"
|
||||||
|
alias ifconfig="grc --colour=auto ifconfig"
|
||||||
|
alias dig="grc --colour=auto dig"
|
||||||
|
alias ps="grc --colour=auto ps"
|
||||||
|
end
|
||||||
|
|
||||||
|
alias rgrep="grep --exclude-dir=Godeps --exclude-dir=node_modules --exclude-dir=log --exclude-dir=vendor --exclude-dir=tmp --exclude-dir=public --exclude-dir=.git --exclude=.swp -rn"
|
||||||
|
alias grep="grep --exclude-dir=.git --color=auto"
|
||||||
|
|
||||||
|
alias ag="ag --path-to-ignore $HOME/.agignore --nogroup"
|
||||||
|
alias vim="nvim"
|
||||||
|
|
||||||
|
# Typos
|
||||||
|
alias igt="git"
|
||||||
|
alias gti="git"
|
||||||
|
alias gitst="git st"
|
||||||
|
|
||||||
|
# Ledger
|
||||||
|
# alias ledger="noglob ledger"
|
||||||
|
# alias "bin/ledger"="noglob bin/ledger"
|
||||||
|
#
|
||||||
|
# alias icat="kitty +kitten icat"
|
||||||
14
config/fish/conf.d/fzf.fish
Normal file
14
config/fish/conf.d/fzf.fish
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
set -q FZF_TMUX_HEIGHT; or set -U FZF_TMUX_HEIGHT "40%"
|
||||||
|
set -q FZF_DEFAULT_OPTS; or set -U FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT"
|
||||||
|
set -q FZF_LEGACY_KEYBINDINGS; or set -U FZF_LEGACY_KEYBINDINGS 1
|
||||||
|
set -q FZF_PREVIEW_FILE_CMD; or set -U FZF_PREVIEW_FILE_CMD "head -n 10"
|
||||||
|
set -q FZF_PREVIEW_DIR_CMD; or set -U FZF_PREVIEW_DIR_CMD "ls"
|
||||||
|
|
||||||
|
function fzf_uninstall -e fzf_uninstall
|
||||||
|
# disabled until we figure out a sensible way to ensure user overrides
|
||||||
|
# are not erased
|
||||||
|
# set -l _vars (set | command grep -E "^FZF.*\$" | command awk '{print $1;}')
|
||||||
|
# for var in $_vars
|
||||||
|
# eval (set -e $var)
|
||||||
|
# end
|
||||||
|
end
|
||||||
49
config/fish/conf.d/fzf_key_bindings.fish
Normal file
49
config/fish/conf.d/fzf_key_bindings.fish
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
if test "$FZF_LEGACY_KEYBINDINGS" -eq 1
|
||||||
|
bind \ct '__fzf_find_file'
|
||||||
|
bind \cr '__fzf_reverse_isearch'
|
||||||
|
bind \ec '__fzf_cd'
|
||||||
|
bind \eC '__fzf_cd --hidden'
|
||||||
|
bind \cg '__fzf_open'
|
||||||
|
bind \co '__fzf_open --editor'
|
||||||
|
|
||||||
|
if bind -M insert >/dev/null 2>/dev/null
|
||||||
|
bind -M insert \ct '__fzf_find_file'
|
||||||
|
bind -M insert \cr '__fzf_reverse_isearch'
|
||||||
|
bind -M insert \ec '__fzf_cd'
|
||||||
|
bind -M insert \eC '__fzf_cd --hidden'
|
||||||
|
bind -M insert \cg '__fzf_open'
|
||||||
|
bind -M insert \co '__fzf_open --editor'
|
||||||
|
end
|
||||||
|
else
|
||||||
|
bind \cf '__fzf_find_file'
|
||||||
|
bind \cr '__fzf_reverse_isearch'
|
||||||
|
bind \eo '__fzf_cd'
|
||||||
|
bind \eO '__fzf_cd --hidden'
|
||||||
|
bind \cg '__fzf_open'
|
||||||
|
bind \co '__fzf_open --editor'
|
||||||
|
|
||||||
|
if bind -M insert >/dev/null 2>/dev/null
|
||||||
|
bind -M insert \cf '__fzf_find_file'
|
||||||
|
bind -M insert \cr '__fzf_reverse_isearch'
|
||||||
|
bind -M insert \eo '__fzf_cd'
|
||||||
|
bind -M insert \eO '__fzf_cd --hidden'
|
||||||
|
bind -M insert \cg '__fzf_open'
|
||||||
|
bind -M insert \co '__fzf_open --editor'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -q FZF_COMPLETE
|
||||||
|
bind \t '__fzf_complete'
|
||||||
|
if bind -M insert >/dev/null 2>/dev/null
|
||||||
|
bind -M insert \t '__fzf_complete'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function fzf_key_bindings_uninstall -e fzf_key_bindings_uninstall
|
||||||
|
# disabled until we figure out a sensible way to ensure user overrides
|
||||||
|
# are not erased
|
||||||
|
# set -l _bindings (bind -a | sed -En "s/(')?__fzf.*\$//p" | sed 's/bind/bind -e/')
|
||||||
|
# for binding in $_bindings
|
||||||
|
# eval $binding
|
||||||
|
# end
|
||||||
|
end
|
||||||
5
config/fish/config.fish
Normal file
5
config/fish/config.fish
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/fish
|
||||||
|
|
||||||
|
# direnv
|
||||||
|
set -x DIRENV_LOG_FORMAT ""
|
||||||
|
direnv hook fish | source
|
||||||
39
config/fish/fish_variables
Normal file
39
config/fish/fish_variables
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# This file contains fish universal variable definitions.
|
||||||
|
# VERSION: 3.0
|
||||||
|
SETUVAR FZF_DEFAULT_OPTS:\x2d\x2dheight\x2040\x25
|
||||||
|
SETUVAR FZF_LEGACY_KEYBINDINGS:1
|
||||||
|
SETUVAR FZF_PREVIEW_DIR_CMD:ls
|
||||||
|
SETUVAR FZF_PREVIEW_FILE_CMD:head\x20\x2dn\x2010
|
||||||
|
SETUVAR FZF_TMUX_HEIGHT:40\x25
|
||||||
|
SETUVAR __fish_init_2_39_8:\x1d
|
||||||
|
SETUVAR __fish_init_2_3_0:\x1d
|
||||||
|
SETUVAR __fish_init_3_x:\x1d
|
||||||
|
SETUVAR fish_color_autosuggestion:969896
|
||||||
|
SETUVAR fish_color_cancel:\x2dr
|
||||||
|
SETUVAR fish_color_command:7aa6da
|
||||||
|
SETUVAR fish_color_comment:2a2a2a
|
||||||
|
SETUVAR fish_color_cwd:green
|
||||||
|
SETUVAR fish_color_cwd_root:red
|
||||||
|
SETUVAR fish_color_end:e7c547
|
||||||
|
SETUVAR fish_color_error:d54e53
|
||||||
|
SETUVAR fish_color_escape:00a6b2
|
||||||
|
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||||
|
SETUVAR fish_color_host:normal
|
||||||
|
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
|
||||||
|
SETUVAR fish_color_normal:normal
|
||||||
|
SETUVAR fish_color_operator:00a6b2
|
||||||
|
SETUVAR fish_color_param:b9ca4a
|
||||||
|
SETUVAR fish_color_quote:e78c45
|
||||||
|
SETUVAR fish_color_redirection:c397d8
|
||||||
|
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_status:red
|
||||||
|
SETUVAR fish_color_user:brgreen
|
||||||
|
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||||
|
SETUVAR fish_greeting:\x1d
|
||||||
|
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||||
|
SETUVAR fish_pager_color_completion:normal
|
||||||
|
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
|
||||||
|
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||||
|
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||||
|
SETUVAR pure_version:2\x2e1\x2e8
|
||||||
3
config/fish/fishfile
Normal file
3
config/fish/fishfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
rbenv/fish-rbenv
|
||||||
|
jethrokuan/fzf
|
||||||
|
jorgebucaran/fish-spark
|
||||||
49
config/fish/functions/__fzf_cd.fish
Normal file
49
config/fish/functions/__fzf_cd.fish
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
function __fzf_cd -d "Change directory"
|
||||||
|
set -l commandline (__fzf_parse_commandline)
|
||||||
|
set -l dir $commandline[1]
|
||||||
|
set -l fzf_query $commandline[2]
|
||||||
|
|
||||||
|
if not type -q argparse
|
||||||
|
# Fallback for fish shell version < 2.7
|
||||||
|
function argparse
|
||||||
|
functions -e argparse # deletes itself
|
||||||
|
end
|
||||||
|
if contains -- --hidden $argv; or contains -- -h $argv
|
||||||
|
set _flag_hidden "yes"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Fish shell version >= v2.7, use argparse
|
||||||
|
set -l options "h/hidden"
|
||||||
|
argparse $options -- $argv
|
||||||
|
|
||||||
|
set -l COMMAND
|
||||||
|
|
||||||
|
set -q FZF_CD_COMMAND
|
||||||
|
or set -l FZF_CD_COMMAND "
|
||||||
|
command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
|
||||||
|
-o -type d -print 2> /dev/null | sed 's@^\./@@'"
|
||||||
|
|
||||||
|
set -q FZF_CD_WITH_HIDDEN_COMMAND
|
||||||
|
or set -l FZF_CD_WITH_HIDDEN_COMMAND "
|
||||||
|
command find -L \$dir \
|
||||||
|
\\( -path '*/\\.git*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \
|
||||||
|
-o -type d -print 2> /dev/null | sed 1d | cut -b3-"
|
||||||
|
|
||||||
|
if set -q _flag_hidden
|
||||||
|
set COMMAND $FZF_CD_WITH_HIDDEN_COMMAND
|
||||||
|
else
|
||||||
|
set COMMAND $FZF_CD_COMMAND
|
||||||
|
end
|
||||||
|
|
||||||
|
eval "$COMMAND | "(__fzfcmd)" +m $FZF_DEFAULT_OPTS $FZF_CD_OPTS --query \"$fzf_query\"" | read -l select
|
||||||
|
|
||||||
|
if not test -z "$select"
|
||||||
|
builtin cd "$select"
|
||||||
|
|
||||||
|
# Remove last token from commandline.
|
||||||
|
commandline -t ""
|
||||||
|
end
|
||||||
|
|
||||||
|
commandline -f repaint
|
||||||
|
end
|
||||||
169
config/fish/functions/__fzf_complete.fish
Normal file
169
config/fish/functions/__fzf_complete.fish
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
##
|
||||||
|
# Use fzf as fish completion widget.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# When FZF_COMPLETE variable is set, fzf is used as completion
|
||||||
|
# widget for the fish shell by binding the TAB key.
|
||||||
|
#
|
||||||
|
# FZF_COMPLETE can have some special numeric values:
|
||||||
|
#
|
||||||
|
# `set FZF_COMPLETE 0` basic widget accepts with TAB key
|
||||||
|
# `set FZF_COMPLETE 1` extends 0 with candidate preview window
|
||||||
|
# `set FZF_COMPLETE 2` same as 1 but TAB walks on candidates
|
||||||
|
# `set FZF_COMPLETE 3` multi TAB selection, RETURN accepts selected ones.
|
||||||
|
#
|
||||||
|
# Any other value of FZF_COMPLETE is given directly as options to fzf.
|
||||||
|
#
|
||||||
|
# If you prefer to set more advanced options, take a look at the
|
||||||
|
# `__fzf_complete_opts` function and override that in your environment.
|
||||||
|
|
||||||
|
|
||||||
|
# modified from https://github.com/junegunn/fzf/wiki/Examples-(fish)#completion
|
||||||
|
function __fzf_complete -d 'fzf completion and print selection back to commandline'
|
||||||
|
# As of 2.6, fish's "complete" function does not understand
|
||||||
|
# subcommands. Instead, we use the same hack as __fish_complete_subcommand and
|
||||||
|
# extract the subcommand manually.
|
||||||
|
set -l cmd (commandline -co) (commandline -ct)
|
||||||
|
|
||||||
|
switch $cmd[1]
|
||||||
|
case env sudo
|
||||||
|
for i in (seq 2 (count $cmd))
|
||||||
|
switch $cmd[$i]
|
||||||
|
case '-*'
|
||||||
|
case '*=*'
|
||||||
|
case '*'
|
||||||
|
set cmd $cmd[$i..-1]
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l cmd_lastw $cmd[-1]
|
||||||
|
set cmd (string join -- ' ' $cmd)
|
||||||
|
|
||||||
|
set -l initial_query ''
|
||||||
|
test -n "$cmd_lastw"; and set initial_query --query="$cmd_lastw"
|
||||||
|
|
||||||
|
set -l complist (complete -C$cmd)
|
||||||
|
set -l result
|
||||||
|
|
||||||
|
# do nothing if there is nothing to select from
|
||||||
|
test -z "$complist"; and return
|
||||||
|
|
||||||
|
set -l compwc (echo $complist | wc -w)
|
||||||
|
if test $compwc -eq 1
|
||||||
|
# if there is only one option dont open fzf
|
||||||
|
set result "$complist"
|
||||||
|
else
|
||||||
|
|
||||||
|
set -l query
|
||||||
|
string join -- \n $complist \
|
||||||
|
| sort \
|
||||||
|
| eval (__fzfcmd) (string escape --no-quoted -- $initial_query) --print-query (__fzf_complete_opts) \
|
||||||
|
| cut -f1 \
|
||||||
|
| while read -l r
|
||||||
|
# first line is the user entered query
|
||||||
|
if test -z "$query"
|
||||||
|
set query $r
|
||||||
|
# rest of lines are selected candidates
|
||||||
|
else
|
||||||
|
set result $result $r
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# exit if user canceled
|
||||||
|
if test -z "$query" ;and test -z "$result"
|
||||||
|
commandline -f repaint
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
# if user accepted but no candidate matches, use the input as result
|
||||||
|
if test -z "$result"
|
||||||
|
set result $query
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set prefix (string sub -s 1 -l 1 -- (commandline -t))
|
||||||
|
for i in (seq (count $result))
|
||||||
|
set -l r $result[$i]
|
||||||
|
switch $prefix
|
||||||
|
case "'"
|
||||||
|
commandline -t -- (string escape -- $r)
|
||||||
|
case '"'
|
||||||
|
if string match '*"*' -- $r >/dev/null
|
||||||
|
commandline -t -- (string escape -- $r)
|
||||||
|
else
|
||||||
|
commandline -t -- '"'$r'"'
|
||||||
|
end
|
||||||
|
case '~'
|
||||||
|
commandline -t -- (string sub -s 2 (string escape -n -- $r))
|
||||||
|
case '*'
|
||||||
|
commandline -t -- $r
|
||||||
|
end
|
||||||
|
[ $i -lt (count $result) ]; and commandline -i ' '
|
||||||
|
end
|
||||||
|
|
||||||
|
commandline -f repaint
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fzf_complete_opts_common
|
||||||
|
if set -q FZF_DEFAULT_OPTS
|
||||||
|
echo $FZF_DEFAULT_OPTS
|
||||||
|
end
|
||||||
|
echo --cycle --reverse --inline-info
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fzf_complete_opts_tab_accepts
|
||||||
|
echo --bind tab:accept,btab:cancel
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fzf_complete_opts_tab_walks
|
||||||
|
echo --bind tab:down,btab:up
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fzf_complete_opts_preview
|
||||||
|
set -l file (status -f)
|
||||||
|
echo --with-nth=1 --preview-window=right:wrap --preview="fish\ '$file'\ __fzf_complete_preview\ '{1}'\ '{2..}'"
|
||||||
|
end
|
||||||
|
|
||||||
|
test "$argv[1]" = "__fzf_complete_preview"; and __fzf_complete_preview $argv[2..3]
|
||||||
|
|
||||||
|
function __fzf_complete_opts_0 -d 'basic single selection with tab accept'
|
||||||
|
__fzf_complete_opts_common
|
||||||
|
echo --no-multi
|
||||||
|
__fzf_complete_opts_tab_accepts
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fzf_complete_opts_1 -d 'single selection with preview and tab accept'
|
||||||
|
__fzf_complete_opts_0
|
||||||
|
__fzf_complete_opts_preview
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fzf_complete_opts_2 -d 'single selection with preview and tab walks'
|
||||||
|
__fzf_complete_opts_1
|
||||||
|
__fzf_complete_opts_tab_walks
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fzf_complete_opts_3 -d 'multi selection with preview'
|
||||||
|
__fzf_complete_opts_common
|
||||||
|
echo --multi
|
||||||
|
__fzf_complete_opts_preview
|
||||||
|
end
|
||||||
|
|
||||||
|
function __fzf_complete_opts -d 'fzf options for fish tab completion'
|
||||||
|
switch $FZF_COMPLETE
|
||||||
|
case 0
|
||||||
|
__fzf_complete_opts_0
|
||||||
|
case 1
|
||||||
|
__fzf_complete_opts_1
|
||||||
|
case 2
|
||||||
|
__fzf_complete_opts_2
|
||||||
|
case 3
|
||||||
|
__fzf_complete_opts_3
|
||||||
|
case '*'
|
||||||
|
echo $FZF_COMPLETE
|
||||||
|
end
|
||||||
|
if set -q FZF_COMPLETE_OPTS
|
||||||
|
echo $FZF_COMPLETE_OPTS
|
||||||
|
end
|
||||||
|
end
|
||||||
31
config/fish/functions/__fzf_complete_preview.fish
Normal file
31
config/fish/functions/__fzf_complete_preview.fish
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
function __fzf_complete_preview -d 'generate preview for completion widget.
|
||||||
|
argv[1] is the currently selected candidate in fzf
|
||||||
|
argv[2] is a string containing the rest of the output produced by `complete -Ccmd`
|
||||||
|
'
|
||||||
|
|
||||||
|
if test "$argv[2]" = "Redefine variable"
|
||||||
|
# show environment variables current value
|
||||||
|
set -l evar (echo $argv[1] | cut -d= -f1)
|
||||||
|
echo $argv[1]$$evar
|
||||||
|
else
|
||||||
|
echo $argv[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l path (string replace "~" $HOME -- $argv[1])
|
||||||
|
|
||||||
|
# list directories on preview
|
||||||
|
if test -d "$path"
|
||||||
|
eval $FZF_PREVIEW_DIR_CMD (string escape $path)
|
||||||
|
end
|
||||||
|
|
||||||
|
# show ten lines of non-binary files preview
|
||||||
|
if test -f "$path"; and grep -qI . "$path"
|
||||||
|
eval $FZF_PREVIEW_FILE_CMD (string escape $path)
|
||||||
|
end
|
||||||
|
|
||||||
|
# if fish knows about it, let it show info
|
||||||
|
type -q "$path" 2>/dev/null; and type -a "$path"
|
||||||
|
|
||||||
|
# show aditional data
|
||||||
|
echo $argv[2]
|
||||||
|
end
|
||||||
29
config/fish/functions/__fzf_find_file.fish
Normal file
29
config/fish/functions/__fzf_find_file.fish
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
function __fzf_find_file -d "List files and folders"
|
||||||
|
set -l commandline (__fzf_parse_commandline)
|
||||||
|
set -l dir $commandline[1]
|
||||||
|
set -l fzf_query $commandline[2]
|
||||||
|
|
||||||
|
set -q FZF_FIND_FILE_COMMAND
|
||||||
|
or set -l FZF_FIND_FILE_COMMAND "
|
||||||
|
command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
|
||||||
|
-o -type f -print \
|
||||||
|
-o -type d -print \
|
||||||
|
-o -type l -print 2> /dev/null | sed 's@^\./@@'"
|
||||||
|
|
||||||
|
begin
|
||||||
|
eval "$FZF_FIND_FILE_COMMAND | "(__fzfcmd) "-m $FZF_DEFAULT_OPTS $FZF_FIND_FILE_OPTS --query \"$fzf_query\"" | while read -l s; set results $results $s; end
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -z "$results"
|
||||||
|
commandline -f repaint
|
||||||
|
return
|
||||||
|
else
|
||||||
|
commandline -t ""
|
||||||
|
end
|
||||||
|
|
||||||
|
for result in $results
|
||||||
|
commandline -it -- (string escape $result)
|
||||||
|
commandline -it -- " "
|
||||||
|
end
|
||||||
|
commandline -f repaint
|
||||||
|
end
|
||||||
17
config/fish/functions/__fzf_get_dir.fish
Normal file
17
config/fish/functions/__fzf_get_dir.fish
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
function __fzf_get_dir -d 'Find the longest existing filepath from input string'
|
||||||
|
set dir $argv
|
||||||
|
|
||||||
|
# Strip all trailing slashes. Ignore if $dir is root dir (/)
|
||||||
|
if [ (string length $dir) -gt 1 ]
|
||||||
|
set dir (string replace -r '/*$' '' $dir)
|
||||||
|
end
|
||||||
|
|
||||||
|
# Iteratively check if dir exists and strip tail end of path
|
||||||
|
while [ ! -d "$dir" ]
|
||||||
|
# If path is absolute, this can keep going until ends up at /
|
||||||
|
# If path is relative, this can keep going until entire input is consumed, dirname returns "."
|
||||||
|
set dir (dirname "$dir")
|
||||||
|
end
|
||||||
|
|
||||||
|
echo $dir
|
||||||
|
end
|
||||||
63
config/fish/functions/__fzf_open.fish
Normal file
63
config/fish/functions/__fzf_open.fish
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
function __fzf_open -d "Open files and directories."
|
||||||
|
function __fzf_open_get_open_cmd -d "Find appropriate open command."
|
||||||
|
if type -q xdg-open
|
||||||
|
echo "xdg-open"
|
||||||
|
else if type -q open
|
||||||
|
echo "open"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l commandline (__fzf_parse_commandline)
|
||||||
|
set -l dir $commandline[1]
|
||||||
|
set -l fzf_query $commandline[2]
|
||||||
|
|
||||||
|
if not type -q argparse
|
||||||
|
set created_argparse
|
||||||
|
function argparse
|
||||||
|
functions -e argparse # deletes itself
|
||||||
|
end
|
||||||
|
if contains -- --editor $argv; or contains -- -e $argv
|
||||||
|
set _flag_editor "yes"
|
||||||
|
end
|
||||||
|
if contains -- --preview $argv; or contains -- -p $argv
|
||||||
|
set _flag_preview "yes"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l options "e/editor" "p/preview=?"
|
||||||
|
argparse $options -- $argv
|
||||||
|
|
||||||
|
set -l preview_cmd
|
||||||
|
if set -q FZF_ENABLE_OPEN_PREVIEW
|
||||||
|
set preview_cmd "--preview-window=right:wrap --preview='fish -c \"__fzf_complete_preview {}\"'"
|
||||||
|
end
|
||||||
|
|
||||||
|
set -q FZF_OPEN_COMMAND
|
||||||
|
or set -l FZF_OPEN_COMMAND "
|
||||||
|
command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \
|
||||||
|
-o -type f -print \
|
||||||
|
-o -type d -print \
|
||||||
|
-o -type l -print 2> /dev/null | sed 's@^\./@@'"
|
||||||
|
|
||||||
|
eval "$FZF_OPEN_COMMAND | "(__fzfcmd) $preview_cmd "-m $FZF_DEFAULT_OPTS $FZF_OPEN_OPTS --query \"$fzf_query\"" | read -l select
|
||||||
|
|
||||||
|
# set how to open
|
||||||
|
set -l open_cmd
|
||||||
|
if set -q _flag_editor
|
||||||
|
set open_cmd "$EDITOR"
|
||||||
|
else
|
||||||
|
set open_cmd (__fzf_open_get_open_cmd)
|
||||||
|
if test -z "$open_cmd"
|
||||||
|
echo "Couldn't find appropriate open command to use. Do you have 'xdg-open' or 'open' installed?"; and return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l open_status 0
|
||||||
|
if not test -z "$select"
|
||||||
|
commandline "$open_cmd \"$select\"" ;and commandline -f execute
|
||||||
|
set open_status $status
|
||||||
|
end
|
||||||
|
|
||||||
|
commandline -f repaint
|
||||||
|
return $open_status
|
||||||
|
end
|
||||||
23
config/fish/functions/__fzf_parse_commandline.fish
Normal file
23
config/fish/functions/__fzf_parse_commandline.fish
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
function __fzf_parse_commandline -d 'Parse the current command line token and return split of existing filepath and rest of token'
|
||||||
|
# eval is used to do shell expansion on paths
|
||||||
|
set -l commandline (eval "printf '%s' "(commandline -t))
|
||||||
|
|
||||||
|
if [ -z $commandline ]
|
||||||
|
# Default to current directory with no --query
|
||||||
|
set dir '.'
|
||||||
|
set fzf_query ''
|
||||||
|
else
|
||||||
|
set dir (__fzf_get_dir $commandline)
|
||||||
|
|
||||||
|
if [ "$dir" = "." -a (string sub -l 1 $commandline) != '.' ]
|
||||||
|
# if $dir is "." but commandline is not a relative path, this means no file path found
|
||||||
|
set fzf_query $commandline
|
||||||
|
else
|
||||||
|
# Also remove trailing slash after dir, to "split" input properly
|
||||||
|
set fzf_query (string replace -r "^$dir/?" '' "$commandline")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
echo $dir
|
||||||
|
echo $fzf_query
|
||||||
|
end
|
||||||
6
config/fish/functions/__fzf_reverse_isearch.fish
Normal file
6
config/fish/functions/__fzf_reverse_isearch.fish
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
function __fzf_reverse_isearch
|
||||||
|
history merge
|
||||||
|
history -z | eval (__fzfcmd) --read0 --tiebreak=index --toggle-sort=ctrl-r $FZF_DEFAULT_OPTS $FZF_REVERSE_ISEARCH_OPTS -q '(commandline)' | perl -pe 'chomp if eof' | read -lz result
|
||||||
|
and commandline -- $result
|
||||||
|
commandline -f repaint
|
||||||
|
end
|
||||||
9
config/fish/functions/__fzfcmd.fish
Normal file
9
config/fish/functions/__fzfcmd.fish
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
function __fzfcmd
|
||||||
|
set -q FZF_TMUX; or set FZF_TMUX 0
|
||||||
|
set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%
|
||||||
|
if [ $FZF_TMUX -eq 1 ]
|
||||||
|
echo "fzf-tmux -d$FZF_TMUX_HEIGHT"
|
||||||
|
else
|
||||||
|
echo "fzf"
|
||||||
|
end
|
||||||
|
end
|
||||||
97
config/fish/functions/fish_prompt.fish
Normal file
97
config/fish/functions/fish_prompt.fish
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
function fish_prompt --description 'Write out the prompt'
|
||||||
|
set -l last_status $status
|
||||||
|
|
||||||
|
if not set -q __fish_git_prompt_show_informative_status
|
||||||
|
set -g __fish_git_prompt_show_informative_status 1
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_hide_untrackedfiles
|
||||||
|
set -g __fish_git_prompt_hide_untrackedfiles 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if not set -q __fish_git_prompt_color_branch
|
||||||
|
set -g __fish_git_prompt_color_branch magenta --bold
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_showupstream
|
||||||
|
set -g __fish_git_prompt_showupstream "informative"
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_char_upstream_ahead
|
||||||
|
set -g __fish_git_prompt_char_upstream_ahead "↑"
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_char_upstream_behind
|
||||||
|
set -g __fish_git_prompt_char_upstream_behind "↓"
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_char_upstream_prefix
|
||||||
|
set -g __fish_git_prompt_char_upstream_prefix ""
|
||||||
|
end
|
||||||
|
|
||||||
|
if not set -q __fish_git_prompt_char_stagedstate
|
||||||
|
set -g __fish_git_prompt_char_stagedstate "●"
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_char_dirtystate
|
||||||
|
set -g __fish_git_prompt_char_dirtystate "✚"
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_char_untrackedfiles
|
||||||
|
set -g __fish_git_prompt_char_untrackedfiles "…"
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_char_invalidstate
|
||||||
|
set -g __fish_git_prompt_char_invalidstate "✖"
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_char_cleanstate
|
||||||
|
set -g __fish_git_prompt_char_cleanstate "✔"
|
||||||
|
end
|
||||||
|
|
||||||
|
if not set -q __fish_git_prompt_color_dirtystate
|
||||||
|
set -g __fish_git_prompt_color_dirtystate blue
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_color_stagedstate
|
||||||
|
set -g __fish_git_prompt_color_stagedstate yellow
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_color_invalidstate
|
||||||
|
set -g __fish_git_prompt_color_invalidstate red
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_color_untrackedfiles
|
||||||
|
set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal
|
||||||
|
end
|
||||||
|
if not set -q __fish_git_prompt_color_cleanstate
|
||||||
|
set -g __fish_git_prompt_color_cleanstate green --bold
|
||||||
|
end
|
||||||
|
|
||||||
|
if not set -q __fish_prompt_normal
|
||||||
|
set -g __fish_prompt_normal (set_color normal)
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l color_cwd
|
||||||
|
set -l prefix
|
||||||
|
set -l suffix
|
||||||
|
switch "$USER"
|
||||||
|
case root toor
|
||||||
|
if set -q fish_color_cwd_root
|
||||||
|
set color_cwd $fish_color_cwd_root
|
||||||
|
else
|
||||||
|
set color_cwd $fish_color_cwd
|
||||||
|
end
|
||||||
|
set suffix '#'
|
||||||
|
case '*'
|
||||||
|
set color_cwd $fish_color_cwd
|
||||||
|
set suffix '$'
|
||||||
|
end
|
||||||
|
|
||||||
|
# PWD
|
||||||
|
set_color $color_cwd
|
||||||
|
echo -n (prompt_pwd)
|
||||||
|
set_color normal
|
||||||
|
|
||||||
|
printf '%s ' (__fish_vcs_prompt)
|
||||||
|
|
||||||
|
if not test $last_status -eq 0
|
||||||
|
set_color $fish_color_error
|
||||||
|
echo -n "[$last_status] "
|
||||||
|
set_color normal
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -q SSH_TTY
|
||||||
|
set -g fish_color_host brred
|
||||||
|
end
|
||||||
|
|
||||||
|
echo -n "$suffix "
|
||||||
|
end
|
||||||
17
config/fish/functions/fish_right_prompt.fish
Normal file
17
config/fish/functions/fish_right_prompt.fish
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
function _rb_prompt
|
||||||
|
# rbenv local > /dev/null 2>&1 && echo " ["(rbenv local | awk '{print $1}')"]"
|
||||||
|
echo ''
|
||||||
|
end
|
||||||
|
|
||||||
|
function fish_right_prompt
|
||||||
|
set -l normal (set_color normal)
|
||||||
|
set -l cyan (set_color cyan)
|
||||||
|
set -l grey (set_color 3C3836)
|
||||||
|
set -l date (date "+%H:%M")
|
||||||
|
set -l date "$grey$date$normal"
|
||||||
|
|
||||||
|
set -l ruby_version $cyan(_rb_prompt)
|
||||||
|
set -l ruby_version "$ruby_version$normal"
|
||||||
|
|
||||||
|
echo -s $date$ruby_version
|
||||||
|
end
|
||||||
430
config/fish/functions/fisher.fish
Normal file
430
config/fish/functions/fisher.fish
Normal file
@@ -0,0 +1,430 @@
|
|||||||
|
set -g fisher_version 3.2.9
|
||||||
|
|
||||||
|
function fisher -a cmd -d "fish package manager"
|
||||||
|
set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache
|
||||||
|
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
|
||||||
|
|
||||||
|
set -g fish_config $XDG_CONFIG_HOME/fish
|
||||||
|
set -g fisher_cache $XDG_CACHE_HOME/fisher
|
||||||
|
set -g fisher_config $XDG_CONFIG_HOME/fisher
|
||||||
|
|
||||||
|
set -q fisher_path; or set -g fisher_path $fish_config
|
||||||
|
|
||||||
|
for path in {$fish_config,$fisher_path}/{functions,completions,conf.d} $fisher_cache
|
||||||
|
if test ! -d $path
|
||||||
|
command mkdir -p $path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if test ! -e $fisher_path/completions/fisher.fish
|
||||||
|
echo "fisher complete" >$fisher_path/completions/fisher.fish
|
||||||
|
_fisher_complete
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -e $fisher_path/conf.d/fisher.fish
|
||||||
|
switch "$version"
|
||||||
|
case \*-\*
|
||||||
|
command rm -f $fisher_path/conf.d/fisher.fish
|
||||||
|
case 2\*
|
||||||
|
case \*
|
||||||
|
command rm -f $fisher_path/conf.d/fisher.fish
|
||||||
|
end
|
||||||
|
else
|
||||||
|
switch "$version"
|
||||||
|
case \*-\*
|
||||||
|
case 2\*
|
||||||
|
echo "fisher copy-user-key-bindings" >$fisher_path/conf.d/fisher.fish
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
switch "$cmd"
|
||||||
|
case {,self-}complete
|
||||||
|
_fisher_complete
|
||||||
|
case copy-user-key-bindings
|
||||||
|
_fisher_copy_user_key_bindings
|
||||||
|
case ls
|
||||||
|
set -e argv[1]
|
||||||
|
if test -s "$fisher_path/fishfile"
|
||||||
|
set -l file (_fisher_fmt <$fisher_path/fishfile | _fisher_parse -R | command sed "s|@.*||")
|
||||||
|
_fisher_ls | _fisher_fmt | command awk -v FILE="$file" "
|
||||||
|
BEGIN { for (n = split(FILE, f); ++i <= n;) file[f[i]] } \$0 in file && /$argv[1]/
|
||||||
|
" | command sed "s|^$HOME|~|"
|
||||||
|
end
|
||||||
|
case self-update
|
||||||
|
_fisher_self_update (status -f)
|
||||||
|
case self-uninstall
|
||||||
|
_fisher_self_uninstall
|
||||||
|
case {,-}-v{ersion,}
|
||||||
|
echo "fisher version $fisher_version" (status -f | command sed "s|^$HOME|~|")
|
||||||
|
case {,-}-h{elp,}
|
||||||
|
_fisher_help
|
||||||
|
case ""
|
||||||
|
_fisher_commit --
|
||||||
|
case add rm
|
||||||
|
if not isatty
|
||||||
|
while read -l arg
|
||||||
|
set argv $argv $arg
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if test (count $argv) = 1
|
||||||
|
echo "fisher: invalid number of arguments" >&2
|
||||||
|
_fisher_help >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
_fisher_commit $argv
|
||||||
|
case \*
|
||||||
|
echo "fisher: unknown flag or command \"$cmd\"" >&2
|
||||||
|
_fisher_help >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_complete
|
||||||
|
complete -ec fisher
|
||||||
|
complete -xc fisher -n __fish_use_subcommand -a add -d "Add packages"
|
||||||
|
complete -xc fisher -n __fish_use_subcommand -a rm -d "Remove packages"
|
||||||
|
complete -xc fisher -n __fish_use_subcommand -a ls -d "List installed packages matching REGEX"
|
||||||
|
complete -xc fisher -n __fish_use_subcommand -a --help -d "Show usage help"
|
||||||
|
complete -xc fisher -n __fish_use_subcommand -a --version -d "$fisher_version"
|
||||||
|
complete -xc fisher -n __fish_use_subcommand -a self-update -d "Update to the latest version"
|
||||||
|
for pkg in (fisher ls)
|
||||||
|
complete -xc fisher -n "__fish_seen_subcommand_from rm" -a $pkg
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_copy_user_key_bindings
|
||||||
|
if functions -q fish_user_key_bindings
|
||||||
|
functions -c fish_user_key_bindings fish_user_key_bindings_copy
|
||||||
|
end
|
||||||
|
function fish_user_key_bindings
|
||||||
|
for file in $fisher_path/conf.d/*_key_bindings.fish
|
||||||
|
source $file >/dev/null 2>/dev/null
|
||||||
|
end
|
||||||
|
if functions -q fish_user_key_bindings_copy
|
||||||
|
fish_user_key_bindings_copy
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_ls
|
||||||
|
for pkg in $fisher_config/*/*/*
|
||||||
|
command readlink $pkg; or echo $pkg
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_fmt
|
||||||
|
command sed "s|^[[:space:]]*||;s|^$fisher_config/||;s|^~|$HOME|;s|^\.\/*|$PWD/|;s|^https*:/*||;s|^github\.com/||;s|/*\$||"
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_help
|
||||||
|
echo "usage: fisher add <package...> Add packages"
|
||||||
|
echo " fisher rm <package...> Remove packages"
|
||||||
|
echo " fisher Update all packages"
|
||||||
|
echo " fisher ls [<regex>] List installed packages matching <regex>"
|
||||||
|
echo " fisher --help Show this help"
|
||||||
|
echo " fisher --version Show the current version"
|
||||||
|
echo " fisher self-update Update to the latest version"
|
||||||
|
echo " fisher self-uninstall Uninstall from your system"
|
||||||
|
echo "examples:"
|
||||||
|
echo " fisher add jethrokuan/z rafaelrinaldi/pure"
|
||||||
|
echo " fisher add gitlab.com/foo/bar@v2"
|
||||||
|
echo " fisher add ~/path/to/local/pkg"
|
||||||
|
echo " fisher add <file"
|
||||||
|
echo " fisher rm rafaelrinaldi/pure"
|
||||||
|
echo " fisher ls | fisher rm"
|
||||||
|
echo " fisher ls fish-\*"
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_self_update -a file
|
||||||
|
set -l url "https://raw.githubusercontent.com/jorgebucaran/fisher/master/fisher.fish"
|
||||||
|
echo "fetching $url" >&2
|
||||||
|
command curl -s "$url?nocache" >$file.
|
||||||
|
|
||||||
|
set -l next_version (command awk '{ print $4 } { exit }' <$file.)
|
||||||
|
switch "$next_version"
|
||||||
|
case "" $fisher_version
|
||||||
|
command rm -f $file.
|
||||||
|
if test -z "$next_version"
|
||||||
|
echo "fisher: cannot update fisher -- are you offline?" >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
echo "fisher is already up-to-date" >&2
|
||||||
|
case \*
|
||||||
|
echo "linking $file" | command sed "s|$HOME|~|" >&2
|
||||||
|
command mv -f $file. $file
|
||||||
|
source $file
|
||||||
|
echo "updated to fisher $fisher_version -- hooray!" >&2
|
||||||
|
_fisher_complete
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_self_uninstall
|
||||||
|
for pkg in (_fisher_ls)
|
||||||
|
_fisher_rm $pkg
|
||||||
|
end
|
||||||
|
|
||||||
|
for file in $fisher_cache $fisher_config $fisher_path/{functions,completions,conf.d}/fisher.fish $fisher_path/fishfile
|
||||||
|
echo "removing $file"
|
||||||
|
command rm -Rf $file 2>/dev/null
|
||||||
|
end | command sed "s|$HOME|~|" >&2
|
||||||
|
|
||||||
|
for name in (set -n | command awk '/^fisher_/')
|
||||||
|
set -e "$name"
|
||||||
|
end
|
||||||
|
|
||||||
|
functions -e (functions -a | command awk '/^_fisher/') fisher
|
||||||
|
complete -c fisher --erase
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_commit -a cmd
|
||||||
|
set -e argv[1]
|
||||||
|
set -l elapsed (_fisher_now)
|
||||||
|
set -l fishfile $fisher_path/fishfile
|
||||||
|
|
||||||
|
if test ! -e "$fishfile"
|
||||||
|
command touch $fishfile
|
||||||
|
echo "created new fishfile in $fishfile" | command sed "s|$HOME|~|" >&2
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l old_pkgs (_fisher_ls | _fisher_fmt)
|
||||||
|
for pkg in (_fisher_ls)
|
||||||
|
_fisher_rm $pkg
|
||||||
|
end
|
||||||
|
command rm -Rf $fisher_config
|
||||||
|
command mkdir -p $fisher_config
|
||||||
|
|
||||||
|
set -l next_pkgs (_fisher_fmt <$fishfile | _fisher_parse -R $cmd (printf "%s\n" $argv | _fisher_fmt))
|
||||||
|
set -l actual_pkgs (_fisher_fetch $next_pkgs)
|
||||||
|
set -l updated_pkgs
|
||||||
|
for pkg in $old_pkgs
|
||||||
|
if contains -- $pkg $actual_pkgs
|
||||||
|
set updated_pkgs $updated_pkgs $pkg
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -z "$actual_pkgs$updated_pkgs$old_pkgs$next_pkgs"
|
||||||
|
echo "fisher: nothing to commit -- try adding some packages" >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l out_pkgs
|
||||||
|
if test "$cmd" = "rm"
|
||||||
|
set out_pkgs $next_pkgs
|
||||||
|
else
|
||||||
|
for pkg in $next_pkgs
|
||||||
|
if contains -- (echo $pkg | command sed "s|@.*||") $actual_pkgs
|
||||||
|
set out_pkgs $out_pkgs $pkg
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
printf "%s\n" (_fisher_fmt <$fishfile | _fisher_parse -W $cmd $out_pkgs | command sed "s|^$HOME|~|") >$fishfile
|
||||||
|
|
||||||
|
_fisher_complete
|
||||||
|
|
||||||
|
command awk -v A=(count $actual_pkgs) -v U=(count $updated_pkgs) -v O=(count $old_pkgs) -v E=(_fisher_now $elapsed) '
|
||||||
|
BEGIN {
|
||||||
|
res = fmt("removed", O - U, fmt("updated", U, fmt("added", A - U)))
|
||||||
|
printf((res ? res : "done") " in %.2fs\n", E / 1000)
|
||||||
|
}
|
||||||
|
function fmt(action, n, s) {
|
||||||
|
return n ? (s ? s ", " : s) action " " n " package" (n > 1 ? "s" : "") : s
|
||||||
|
}
|
||||||
|
' >&2
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_parse -a mode cmd
|
||||||
|
set -e argv[1..2]
|
||||||
|
command awk -v FS="[[:space:]]*#+" -v MODE="$mode" -v CMD="$cmd" -v ARGSTR="$argv" '
|
||||||
|
BEGIN {
|
||||||
|
for (n = split(ARGSTR, a, " "); i++ < n;) pkgs[getkey(a[i])] = a[i]
|
||||||
|
}
|
||||||
|
!NF { next } { k = getkey($1) }
|
||||||
|
MODE == "-R" && !(k in pkgs) && $0 = $1
|
||||||
|
MODE == "-W" && (/^#/ || k in pkgs || CMD != "rm") { print pkgs[k] (sub($1, "") ? $0 : "") }
|
||||||
|
MODE == "-W" || CMD == "rm" { delete pkgs[k] }
|
||||||
|
END {
|
||||||
|
for (k in pkgs) {
|
||||||
|
if (CMD != "rm" || MODE == "-W") print pkgs[k]
|
||||||
|
else print "fisher: cannot remove \""k"\" -- package is not in fishfile" > "/dev/stderr"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getkey(s, a) {
|
||||||
|
return (split(s, a, /@+|:/) > 2) ? a[2]"/"a[1]"/"a[3] : a[1]
|
||||||
|
}
|
||||||
|
'
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_fetch
|
||||||
|
set -l pkg_jobs
|
||||||
|
set -l out_pkgs
|
||||||
|
set -l next_pkgs
|
||||||
|
set -l local_pkgs
|
||||||
|
set -q fisher_user_api_token; and set -l curl_opts -u $fisher_user_api_token
|
||||||
|
|
||||||
|
for pkg in $argv
|
||||||
|
switch $pkg
|
||||||
|
case \~\* /\*
|
||||||
|
set -l path (echo "$pkg" | command sed "s|^~|$HOME|")
|
||||||
|
if test -e "$path"
|
||||||
|
set local_pkgs $local_pkgs $path
|
||||||
|
else
|
||||||
|
echo "fisher: cannot add \"$pkg\" -- is this a valid file?" >&2
|
||||||
|
end
|
||||||
|
continue
|
||||||
|
end
|
||||||
|
|
||||||
|
command awk -v PKG="$pkg" -v FS=/ '
|
||||||
|
BEGIN {
|
||||||
|
if (split(PKG, tmp, /@+|:/) > 2) {
|
||||||
|
if (tmp[4]) sub("@"tmp[4], "", PKG)
|
||||||
|
print PKG "\t" tmp[2]"/"tmp[1]"/"tmp[3] "\t" (tmp[4] ? tmp[4] : "master")
|
||||||
|
} else {
|
||||||
|
pkg = split(PKG, _, "/") <= 2 ? "github.com/"tmp[1] : tmp[1]
|
||||||
|
tag = tmp[2] ? tmp[2] : "master"
|
||||||
|
print (\
|
||||||
|
pkg ~ /^github/ ? "https://codeload."pkg"/tar.gz/"tag : \
|
||||||
|
pkg ~ /^gitlab/ ? "https://"pkg"/-/archive/"tag"/"tmp[split(pkg, tmp, "/")]"-"tag".tar.gz" : \
|
||||||
|
pkg ~ /^bitbucket/ ? "https://"pkg"/get/"tag".tar.gz" : pkg \
|
||||||
|
) "\t" pkg
|
||||||
|
}
|
||||||
|
}
|
||||||
|
' | read -l url pkg branch
|
||||||
|
|
||||||
|
if test ! -d "$fisher_config/$pkg"
|
||||||
|
fish -c "
|
||||||
|
echo fetching $url >&2
|
||||||
|
command mkdir -p $fisher_config/$pkg $fisher_cache/(command dirname $pkg)
|
||||||
|
if test ! -z \"$branch\"
|
||||||
|
command git clone $url $fisher_config/$pkg --branch $branch --depth 1 2>/dev/null
|
||||||
|
or echo fisher: cannot clone \"$url\" -- is this a valid url\? >&2
|
||||||
|
else if command curl $curl_opts -Ss -w \"\" $url 2>&1 | command tar -xzf- -C $fisher_config/$pkg 2>/dev/null
|
||||||
|
command rm -Rf $fisher_cache/$pkg
|
||||||
|
command mv -f $fisher_config/$pkg/* $fisher_cache/$pkg
|
||||||
|
command rm -Rf $fisher_config/$pkg
|
||||||
|
command cp -Rf {$fisher_cache,$fisher_config}/$pkg
|
||||||
|
else if test -d \"$fisher_cache/$pkg\"
|
||||||
|
echo fisher: cannot connect to server -- looking in \"$fisher_cache/$pkg\" | command sed 's|$HOME|~|' >&2
|
||||||
|
command cp -Rf $fisher_cache/$pkg $fisher_config/$pkg/..
|
||||||
|
else
|
||||||
|
command rm -Rf $fisher_config/$pkg
|
||||||
|
echo fisher: cannot add \"$pkg\" -- is this a valid package\? >&2
|
||||||
|
end
|
||||||
|
" >/dev/null &
|
||||||
|
set pkg_jobs $pkg_jobs (_fisher_jobs --last)
|
||||||
|
set next_pkgs $next_pkgs "$fisher_config/$pkg"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -q pkg_jobs[1]
|
||||||
|
while for job in $pkg_jobs
|
||||||
|
contains -- $job (_fisher_jobs); and break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for pkg in $next_pkgs
|
||||||
|
if test -d "$pkg"
|
||||||
|
set out_pkgs $out_pkgs $pkg
|
||||||
|
_fisher_add $pkg
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l local_prefix $fisher_config/local/$USER
|
||||||
|
if test ! -d "$local_prefix"
|
||||||
|
command mkdir -p $local_prefix
|
||||||
|
end
|
||||||
|
for pkg in $local_pkgs
|
||||||
|
set -l target $local_prefix/(command basename $pkg)
|
||||||
|
if test ! -L "$target"
|
||||||
|
command ln -sf $pkg $target
|
||||||
|
set out_pkgs $out_pkgs $pkg
|
||||||
|
_fisher_add $pkg --link
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -q out_pkgs[1]
|
||||||
|
_fisher_fetch (
|
||||||
|
for pkg in $out_pkgs
|
||||||
|
if test -s "$pkg/fishfile"
|
||||||
|
_fisher_fmt <$pkg/fishfile | _fisher_parse -R
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
printf "%s\n" $out_pkgs | _fisher_fmt
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_add -a pkg opts
|
||||||
|
for src in $pkg/{functions,completions,conf.d}/**.* $pkg/*.fish
|
||||||
|
set -l target (command basename $src)
|
||||||
|
switch $src
|
||||||
|
case $pkg/conf.d\*
|
||||||
|
set target $fisher_path/conf.d/$target
|
||||||
|
case $pkg/completions\*
|
||||||
|
set target $fisher_path/completions/$target
|
||||||
|
case $pkg/{functions,}\*
|
||||||
|
switch $target
|
||||||
|
case uninstall.fish
|
||||||
|
continue
|
||||||
|
case {init,key_bindings}.fish
|
||||||
|
set target $fisher_path/conf.d/(command basename $pkg)\_$target
|
||||||
|
case \*
|
||||||
|
set target $fisher_path/functions/$target
|
||||||
|
end
|
||||||
|
end
|
||||||
|
echo "linking $target" | command sed "s|$HOME|~|" >&2
|
||||||
|
if set -q opts[1]
|
||||||
|
command ln -sf $src $target
|
||||||
|
else
|
||||||
|
command cp -f $src $target
|
||||||
|
end
|
||||||
|
switch $target
|
||||||
|
case \*.fish
|
||||||
|
source $target >/dev/null 2>/dev/null
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_rm -a pkg
|
||||||
|
for src in $pkg/{conf.d,completions,functions}/**.* $pkg/*.fish
|
||||||
|
set -l target (command basename $src)
|
||||||
|
set -l filename (command basename $target .fish)
|
||||||
|
switch $src
|
||||||
|
case $pkg/conf.d\*
|
||||||
|
test "$filename.fish" = "$target"; and emit "$filename"_uninstall
|
||||||
|
set target conf.d/$target
|
||||||
|
case $pkg/completions\*
|
||||||
|
test "$filename.fish" = "$target"; and complete -ec $filename
|
||||||
|
set target completions/$target
|
||||||
|
case $pkg/{,functions}\*
|
||||||
|
test "$filename.fish" = "$target"; and functions -e $filename
|
||||||
|
switch $target
|
||||||
|
case uninstall.fish
|
||||||
|
source $src
|
||||||
|
continue
|
||||||
|
case {init,key_bindings}.fish
|
||||||
|
set target conf.d/(command basename $pkg)\_$target
|
||||||
|
case \*
|
||||||
|
set target functions/$target
|
||||||
|
end
|
||||||
|
end
|
||||||
|
command rm -f $fisher_path/$target
|
||||||
|
end
|
||||||
|
if not functions -q fish_prompt
|
||||||
|
source "$__fish_datadir$__fish_data_dir/functions/fish_prompt.fish"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_jobs
|
||||||
|
jobs $argv | command awk '/^[0-9]+\t/ { print $1 }'
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fisher_now -a elapsed
|
||||||
|
switch (command uname)
|
||||||
|
case Darwin \*BSD
|
||||||
|
command perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - $ARGV[0])' $elapsed
|
||||||
|
case \*
|
||||||
|
math (command date "+%s%3N") - "0$elapsed"
|
||||||
|
end
|
||||||
|
end
|
||||||
9
config/fish/functions/fuck.fish
Normal file
9
config/fish/functions/fuck.fish
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
function fuck -d "Correct your previous console command"
|
||||||
|
set -l fucked_up_command $history[1]
|
||||||
|
env TF_SHELL=fish TF_ALIAS=fuck PYTHONIOENCODING=utf-8 thefuck $fucked_up_command | read -l unfucked_command
|
||||||
|
if [ "$unfucked_command" != "" ]
|
||||||
|
eval $unfucked_command
|
||||||
|
builtin history delete --exact --case-sensitive -- $fucked_up_command
|
||||||
|
builtin history merge ^ /dev/null
|
||||||
|
end
|
||||||
|
end
|
||||||
57
config/fish/functions/gh.fish
Normal file
57
config/fish/functions/gh.fish
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# https://github.com/oguzbilgic/dotfiles/blob/master/config/fish/functions/gh.fish
|
||||||
|
# Save this as ./config/fish/functions/gh.fish
|
||||||
|
|
||||||
|
# Prints the remote url
|
||||||
|
# Example: git@github.com:oguzbilgic/dotfiles.git
|
||||||
|
function origin
|
||||||
|
echo (git remote get-url origin)
|
||||||
|
end
|
||||||
|
|
||||||
|
# Prints the origin and remote
|
||||||
|
# Example: oguzbilgic/dotfiles
|
||||||
|
function org_repo
|
||||||
|
echo (origin | python -c "import sys; url = sys.stdin.readlines()[0].strip(); print url.split(':')[1][:-4]")
|
||||||
|
end
|
||||||
|
|
||||||
|
# Prints the current branch name
|
||||||
|
# Example: master
|
||||||
|
function branch
|
||||||
|
echo (git rev-parse --abbrev-ref HEAD)
|
||||||
|
end
|
||||||
|
|
||||||
|
# Prints the current branch name
|
||||||
|
# Example: 2cc1aad3e961ca57f6d96498d5fe70a31d9f17f0
|
||||||
|
function commit
|
||||||
|
echo (git rev-parse HEAD)
|
||||||
|
end
|
||||||
|
|
||||||
|
# Easily open Github from your command line
|
||||||
|
#
|
||||||
|
# Commands:
|
||||||
|
# gh opens the current branch
|
||||||
|
# gh [file] opens the file for the current branch (ie. gh README.md)
|
||||||
|
# gh issues opens the issues page
|
||||||
|
# gh pulls opens the pull requests page
|
||||||
|
# gh actions opens the actions page
|
||||||
|
# gh compare opens the compare for the current branch
|
||||||
|
# gh commit opens the last commit of the current branch
|
||||||
|
# gh commits opens the commits page for the current branch
|
||||||
|
function gh
|
||||||
|
if test (count $argv) -lt 1
|
||||||
|
open "https://github.com/"(org_repo)"/tree/"(branch)
|
||||||
|
else if test -f $argv[1]
|
||||||
|
open "https://github.com/"(org_repo)"/blob/"(commit)"/"(echo $argv[1])
|
||||||
|
else if test $argv[1] = "issues"
|
||||||
|
open "https://github.com/"(org_repo)"/issues"
|
||||||
|
else if test $argv[1] = "pulls"
|
||||||
|
open "https://github.com/"(org_repo)"/issues"
|
||||||
|
else if test $argv[1] = "actions"
|
||||||
|
open "https://github.com/"(org_repo)"/issues"
|
||||||
|
else if test $argv[1] = "compare"
|
||||||
|
open "https://github.com/"(org_repo)"/compare/"(branch)
|
||||||
|
else if test $argv[1] = "commits"
|
||||||
|
open "https://github.com/"(org_repo)"/commits/"(branch)
|
||||||
|
else if test $argv[1] = "commit"
|
||||||
|
open "https://github.com/"(org_repo)"/commit/"(commit)
|
||||||
|
end
|
||||||
|
end
|
||||||
3
config/fish/functions/hors.fish
Normal file
3
config/fish/functions/hors.fish
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function hors
|
||||||
|
command hors -c "$argv"
|
||||||
|
end
|
||||||
51
config/fish/functions/spark.fish
Normal file
51
config/fish/functions/spark.fish
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
set -g spark_version 1.0.0
|
||||||
|
|
||||||
|
complete -xc spark -n __fish_use_subcommand -a --help -d "Show usage help"
|
||||||
|
complete -xc spark -n __fish_use_subcommand -a --version -d "$spark_version"
|
||||||
|
complete -xc spark -n __fish_use_subcommand -a --min -d "Minimum range value"
|
||||||
|
complete -xc spark -n __fish_use_subcommand -a --max -d "Maximum range value"
|
||||||
|
|
||||||
|
function spark -d "sparkline generator"
|
||||||
|
if isatty
|
||||||
|
switch "$argv"
|
||||||
|
case {,-}-v{ersion,}
|
||||||
|
echo "spark version $spark_version"
|
||||||
|
case {,-}-h{elp,}
|
||||||
|
echo "usage: spark [--min=<n> --max=<n>] <numbers...> Draw sparklines"
|
||||||
|
echo "examples:"
|
||||||
|
echo " spark 1 2 3 4"
|
||||||
|
echo " seq 100 | sort -R | spark"
|
||||||
|
echo " awk \\\$0=length spark.fish | spark"
|
||||||
|
case \*
|
||||||
|
echo $argv | spark $argv
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
command awk -v FS="[[:space:],]*" -v argv="$argv" '
|
||||||
|
BEGIN {
|
||||||
|
min = match(argv, /--min=[0-9]+/) ? substr(argv, RSTART + 6, RLENGTH - 6) + 0 : ""
|
||||||
|
max = match(argv, /--max=[0-9]+/) ? substr(argv, RSTART + 6, RLENGTH - 6) + 0 : ""
|
||||||
|
}
|
||||||
|
{
|
||||||
|
for (i = j = 1; i <= NF; i++) {
|
||||||
|
if ($i ~ /^--/) continue
|
||||||
|
if ($i !~ /^-?[0-9]/) data[count + j++] = ""
|
||||||
|
else {
|
||||||
|
v = data[count + j++] = int($i)
|
||||||
|
if (max == "" && min == "") max = min = v
|
||||||
|
if (max < v) max = v
|
||||||
|
if (min > v ) min = v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
count += j - 1
|
||||||
|
}
|
||||||
|
END {
|
||||||
|
n = split(min == max && max ? "▅ ▅" : "▁ ▂ ▃ ▄ ▅ ▆ ▇ █", blocks, " ")
|
||||||
|
scale = (scale = int(256 * (max - min) / (n - 1))) ? scale : 1
|
||||||
|
for (i = 1; i <= count; i++)
|
||||||
|
out = out (data[i] == "" ? " " : blocks[idx = int(256 * (data[i] - min) / scale) + 1])
|
||||||
|
print out
|
||||||
|
}
|
||||||
|
'
|
||||||
|
end
|
||||||
3
config/fish/functions/su.fish
Normal file
3
config/fish/functions/su.fish
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function su
|
||||||
|
command su --shell=/bin/fish $argv
|
||||||
|
end
|
||||||
3
config/fish/functions/sudosu.fish
Normal file
3
config/fish/functions/sudosu.fish
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function sudosu
|
||||||
|
command sudo su --shell=/bin/fish -
|
||||||
|
end
|
||||||
3
config/fish/functions/time.fish
Normal file
3
config/fish/functions/time.fish
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function time
|
||||||
|
command time --portability $argv
|
||||||
|
end
|
||||||
10
config/fontconfig/fonts.conf
Normal file
10
config/fontconfig/fonts.conf
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version='1.0'?>
|
||||||
|
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||||
|
<fontconfig>
|
||||||
|
<match>
|
||||||
|
<test name="family"><string>Iosevka Term</string></test>
|
||||||
|
<edit name="family" mode="assign" binding="strong">
|
||||||
|
<string>Iosevka Custom</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
</fontconfig>
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||||
# The parser is also very primitive, and not human-friendly.
|
# The parser is also very primitive, and not human-friendly.
|
||||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||||
sort_key=46
|
sort_key=47
|
||||||
sort_direction=1
|
sort_direction=1
|
||||||
hide_threads=0
|
hide_threads=0
|
||||||
hide_kernel_threads=0
|
hide_kernel_threads=0
|
||||||
hide_userland_threads=0
|
hide_userland_threads=0
|
||||||
shadow_other_users=1
|
shadow_other_users=1
|
||||||
show_thread_names=0
|
show_thread_names=0
|
||||||
show_program_path=0
|
show_program_path=1
|
||||||
highlight_base_name=1
|
highlight_base_name=1
|
||||||
highlight_megabytes=1
|
highlight_megabytes=1
|
||||||
highlight_threads=1
|
highlight_threads=1
|
||||||
BIN
config/i3/bg.jpg
Normal file
BIN
config/i3/bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
@@ -36,16 +36,17 @@ hide_edge_borders smart
|
|||||||
focus_follows_mouse no
|
focus_follows_mouse no
|
||||||
|
|
||||||
workspace_auto_back_and_forth no
|
workspace_auto_back_and_forth no
|
||||||
workspace_layout tabbed
|
workspace_layout default
|
||||||
|
|
||||||
for_window [class="(?i)firefox"] move container to workspace $ws1
|
for_window [class="(?i)firefox"] move container to workspace $ws1
|
||||||
for_window [class="(?i)thunderbird"] move container to workspace $ws1
|
for_window [class="(?i)thunderbird"] move container to workspace $ws1
|
||||||
|
for_window [class="(?i)telegram"] move container to workspace $ws2
|
||||||
# sticky enable
|
for_window [class="(?i)discord"] move container to workspace $ws2
|
||||||
|
for_window [class="mpv"] floating enable
|
||||||
|
|
||||||
# class border backgr. text indicator child_border
|
# class border backgr. text indicator child_border
|
||||||
client.focused #333333 #5f676a #ffffff #2e9ef4 #5f676a
|
client.focused #B8BB26 #B8BB26 #1D2021 #2e9ef4 #B8BB26
|
||||||
client.focused_inactive #665c54 #665c54 #fbf1c7 #484e50 #665c54
|
client.focused_inactive #83A598 #83A598 #1D2021 #484e50 #83A598
|
||||||
client.unfocused #333333 #222222 #bdae93 #292d2e #222222
|
client.unfocused #333333 #222222 #bdae93 #292d2e #222222
|
||||||
client.urgent #2f343a #900000 #fbf1c7 #900000 #900000
|
client.urgent #2f343a #900000 #fbf1c7 #900000 #900000
|
||||||
client.placeholder #000000 #0c0c0c #fbf1c7 #000000 #0c0c0c
|
client.placeholder #000000 #0c0c0c #fbf1c7 #000000 #0c0c0c
|
||||||
@@ -64,7 +65,7 @@ bindsym $mod+F2 exec "dmenu_run"
|
|||||||
# installed.
|
# installed.
|
||||||
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
||||||
|
|
||||||
bindsym $mod+F4 exec "kitty edit_project"
|
bindsym $mod+F4 exec "x edit_project"
|
||||||
bindsym $mod+v exec "passmenu"
|
bindsym $mod+v exec "passmenu"
|
||||||
|
|
||||||
# change focus
|
# change focus
|
||||||
@@ -87,12 +88,6 @@ bindsym $mod+Shift+j move down
|
|||||||
bindsym $mod+Shift+k move up
|
bindsym $mod+Shift+k move up
|
||||||
bindsym $mod+Shift+l move right
|
bindsym $mod+Shift+l move right
|
||||||
|
|
||||||
# colemak
|
|
||||||
# bindsym $mod+Shift+k move left
|
|
||||||
# bindsym $mod+Shift+n move down
|
|
||||||
# bindsym $mod+Shift+e move up
|
|
||||||
# bindsym $mod+Shift+i move right
|
|
||||||
|
|
||||||
mode "split" {
|
mode "split" {
|
||||||
# split in horizontal orientation
|
# split in horizontal orientation
|
||||||
bindsym h split h mode "default"
|
bindsym h split h mode "default"
|
||||||
@@ -120,7 +115,7 @@ bindsym $mod+Shift+space floating toggle
|
|||||||
bindsym $mod+Shift+0 sticky toggle
|
bindsym $mod+Shift+0 sticky toggle
|
||||||
|
|
||||||
# change focus between tiling / floating windows
|
# change focus between tiling / floating windows
|
||||||
# bindsym $mod+space focus mode_toggle
|
bindsym $mod+Tab focus mode_toggle
|
||||||
|
|
||||||
# focus the parent container
|
# focus the parent container
|
||||||
bindsym $mod+a focus parent
|
bindsym $mod+a focus parent
|
||||||
@@ -169,23 +164,22 @@ bindsym $mod+Shift+r restart
|
|||||||
# exit i3 (logs you out of your X session)
|
# exit i3 (logs you out of your X session)
|
||||||
bindsym $mod+Shift+x exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
bindsym $mod+Shift+x exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
||||||
|
|
||||||
bindsym $mod+Shift+z exec "stop_and_lock"
|
bindsym $mod+z exec "stop_and_lock"
|
||||||
|
bindsym $mod+Shift+z exec "suspend-and-lock"
|
||||||
|
|
||||||
# resize window (you can also use the mouse for that)
|
# resize window (you can also use the mouse for that)
|
||||||
mode "resize" {
|
mode "resize" {
|
||||||
# These bindings trigger as soon as you enter the resize mode
|
# These bindings trigger as soon as you enter the resize mode
|
||||||
|
|
||||||
# QWERTY
|
|
||||||
bindsym Left resize shrink width 3 px or 3 ppt
|
bindsym Left resize shrink width 3 px or 3 ppt
|
||||||
bindsym Down resize grow height 3 px or 3 ppt
|
bindsym Down resize grow height 3 px or 3 ppt
|
||||||
bindsym Up resize shrink height 3 px or 3 ppt
|
bindsym Up resize shrink height 3 px or 3 ppt
|
||||||
bindsym Right resize grow width 3 px or 3 ppt
|
bindsym Right resize grow width 3 px or 3 ppt
|
||||||
|
|
||||||
# colemak
|
bindsym h resize shrink width 3 px or 3 ppt
|
||||||
# bindsym k resize shrink width 3 px or 3 ppt
|
bindsym j resize grow height 3 px or 3 ppt
|
||||||
# bindsym n resize grow height 3 px or 3 ppt
|
bindsym k resize shrink height 3 px or 3 ppt
|
||||||
# bindsym e resize shrink height 3 px or 3 ppt
|
bindsym l resize grow width 3 px or 3 ppt
|
||||||
# bindsym i resize grow width 3 px or 3 ppt
|
|
||||||
|
|
||||||
# back to normal: Enter or Escape or $mod+r
|
# back to normal: Enter or Escape or $mod+r
|
||||||
bindsym Return mode "default"
|
bindsym Return mode "default"
|
||||||
@@ -205,14 +199,14 @@ bindsym $mod+space scratchpad show
|
|||||||
# finds out, if available)
|
# finds out, if available)
|
||||||
bar {
|
bar {
|
||||||
# strip_workspace_numbers yes
|
# strip_workspace_numbers yes
|
||||||
status_command i3status-rs ~/.config/i3status-rs/config.toml
|
status_command i3status-rs-with-env ~/.config/i3status-rs/config.toml
|
||||||
font pango:Iosevka Term, FontAwesome Bold 12px
|
font pango:Iosevka Term, FontAwesome Bold 12px
|
||||||
colors {
|
colors {
|
||||||
background #000000
|
background #000000
|
||||||
statusline #d5c4a1
|
statusline #d5c4a1
|
||||||
separator #666666
|
separator #666666
|
||||||
|
|
||||||
focused_workspace #83a598 #83a598 #3c3836
|
focused_workspace #B8BB26 #B8BB26 #3c3836
|
||||||
active_workspace #5f676a #5f676a #fbf1c7
|
active_workspace #5f676a #5f676a #fbf1c7
|
||||||
inactive_workspace #5f676a #5f676a #fbf1c7
|
inactive_workspace #5f676a #5f676a #fbf1c7
|
||||||
urgent_workspace #fb4934 #fb4934 #fbf1c7
|
urgent_workspace #fb4934 #fb4934 #fbf1c7
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user