Compare commits
No commits in common. "4e6001f961c0736080862f05873c02c0be9d786b" and "6339649983759fa23b265cb1c664af3d412b2fea" have entirely different histories.
4e6001f961
...
6339649983
140 changed files with 4782 additions and 17927 deletions
217
.Xmodmap
217
.Xmodmap
|
@ -1,217 +0,0 @@
|
|||
keycode 9 = Escape NoSymbol Escape NoSymbol Escape Escape
|
||||
keycode 10 = 1 exclam 1 exclam 1 exclam 1 exclam
|
||||
keycode 11 = 2 at 2 at 2 at 2 at
|
||||
keycode 12 = 3 numbersign 3 numbersign 3 numbersign 3 numbersign
|
||||
keycode 13 = 4 dollar 4 dollar 4 dollar 4 dollar
|
||||
keycode 14 = 5 percent 5 percent 5 percent 5 percent
|
||||
keycode 15 = 6 asciicircum 6 asciicircum 6 asciicircum 6 asciicircum
|
||||
keycode 16 = 7 ampersand 7 ampersand 7 ampersand 7 ampersand
|
||||
keycode 17 = 8 asterisk 8 asterisk 8 asterisk 8 asterisk
|
||||
keycode 18 = 9 parenleft 9 parenleft 9 parenleft 9 parenleft
|
||||
keycode 19 = 0 parenright 0 parenright 0 parenright 0 parenright
|
||||
keycode 20 = minus underscore minus underscore minus underscore minus underscore
|
||||
keycode 21 = equal plus equal plus equal plus equal plus
|
||||
keycode 22 = BackSpace BackSpace BackSpace BackSpace BackSpace BackSpace BackSpace BackSpace
|
||||
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab Tab ISO_Left_Tab Tab ISO_Left_Tab
|
||||
keycode 24 = q Q q Q q Q q Q
|
||||
keycode 25 = w W w W w W w W
|
||||
keycode 26 = e E e E e E e E
|
||||
keycode 27 = r R r R r R r R
|
||||
keycode 28 = t T t T t T t T
|
||||
keycode 29 = y Y y Y y Y y Y
|
||||
keycode 30 = u U u U u U u U
|
||||
keycode 31 = i I i I i I i I
|
||||
keycode 32 = o O o O o O o O
|
||||
keycode 33 = p P p P p P p P
|
||||
keycode 34 = bracketleft braceleft bracketleft braceleft bracketleft braceleft bracketleft braceleft
|
||||
keycode 35 = bracketright braceright bracketright braceright bracketright braceright bracketright braceright
|
||||
keycode 36 = Return NoSymbol Return NoSymbol Return Return
|
||||
keycode 37 = Control_L NoSymbol Control_L NoSymbol Control_L Control_L
|
||||
keycode 38 = a A a A a A a A
|
||||
keycode 39 = s S s S s S s S
|
||||
keycode 40 = d D d D d D d D
|
||||
keycode 41 = f F f F f F f F
|
||||
keycode 42 = g G g G g G g G
|
||||
keycode 43 = h H h H h H h H
|
||||
keycode 44 = j J j J j J j J
|
||||
keycode 45 = k K k K k K k K
|
||||
keycode 46 = l L l L l L l L
|
||||
keycode 47 = semicolon colon semicolon colon semicolon colon semicolon colon
|
||||
keycode 48 = apostrophe quotedbl apostrophe quotedbl apostrophe quotedbl apostrophe quotedbl
|
||||
keycode 49 = grave asciitilde grave asciitilde grave asciitilde grave asciitilde
|
||||
keycode 50 = Shift_L NoSymbol Shift_L NoSymbol Shift_L Shift_L
|
||||
keycode 51 = backslash bar backslash bar backslash bar backslash bar
|
||||
keycode 52 = z Z z Z z Z z Z
|
||||
keycode 53 = x X x X x X x X
|
||||
keycode 54 = c C c C c C c C
|
||||
keycode 55 = v V v V v V v V
|
||||
keycode 56 = b B b B b B b B
|
||||
keycode 57 = n N n N n N n N
|
||||
keycode 58 = m M m M m M m M
|
||||
keycode 59 = comma less comma less comma less comma less
|
||||
keycode 60 = period greater period greater period greater period greater
|
||||
keycode 61 = slash question slash question slash question slash question
|
||||
keycode 62 = Shift_R NoSymbol Shift_R NoSymbol Shift_R Shift_R
|
||||
keycode 63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab KP_Multiply KP_Multiply XF86ClearGrab KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab
|
||||
keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L
|
||||
keycode 65 = space NoSymbol space NoSymbol space space
|
||||
keycode 66 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock Caps_Lock
|
||||
keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1 F1 F1 XF86Switch_VT_1 F1 F1 F1 F1 XF86Switch_VT_1 F1 F1 F1 F1 XF86Switch_VT_1
|
||||
keycode 68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2 F2 F2 XF86Switch_VT_2 F2 F2 F2 F2 XF86Switch_VT_2 F2 F2 F2 F2 XF86Switch_VT_2
|
||||
keycode 69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3 F3 F3 XF86Switch_VT_3 F3 F3 F3 F3 XF86Switch_VT_3 F3 F3 F3 F3 XF86Switch_VT_3
|
||||
keycode 70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4 F4 F4 XF86Switch_VT_4 F4 F4 F4 F4 XF86Switch_VT_4 F4 F4 F4 F4 XF86Switch_VT_4
|
||||
keycode 71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5 F5 F5 XF86Switch_VT_5 F5 F5 F5 F5 XF86Switch_VT_5 F5 F5 F5 F5 XF86Switch_VT_5
|
||||
keycode 72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6 F6 F6 XF86Switch_VT_6 F6 F6 F6 F6 XF86Switch_VT_6 F6 F6 F6 F6 XF86Switch_VT_6
|
||||
keycode 73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7 F7 F7 XF86Switch_VT_7 F7 F7 F7 F7 XF86Switch_VT_7 F7 F7 F7 F7 XF86Switch_VT_7
|
||||
keycode 74 = F8 Next F8 F8 F8 F8 XF86Switch_VT_8
|
||||
keycode 77 = Num_Lock NoSymbol Num_Lock NoSymbol Num_Lock Num_Lock
|
||||
keycode 78 = F9 Next F9 F9 F9 F9 XF86Switch_VT_8
|
||||
keycode 79 = KP_Home KP_7 KP_Home KP_7 KP_Home KP_7 KP_Home KP_7
|
||||
keycode 80 = KP_Up KP_8 KP_Up KP_8 KP_Up KP_8 KP_Up KP_8
|
||||
keycode 81 = KP_Prior KP_9 KP_Prior KP_9 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 KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode
|
||||
keycode 83 = KP_Left KP_4 KP_Left KP_4 KP_Left KP_4 KP_Left KP_4
|
||||
keycode 84 = KP_Begin KP_5 KP_Begin KP_5 KP_Begin KP_5 KP_Begin KP_5
|
||||
keycode 85 = KP_Right KP_6 KP_Right KP_6 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 KP_Add KP_Add KP_Add KP_Add XF86Next_VMode KP_Add KP_Add KP_Add KP_Add XF86Next_VMode
|
||||
keycode 87 = KP_End KP_1 KP_End KP_1 KP_End KP_1 KP_End KP_1
|
||||
keycode 88 = KP_Down KP_2 KP_Down KP_2 KP_Down KP_2 KP_Down KP_2
|
||||
keycode 89 = KP_Next KP_3 KP_Next KP_3 KP_Next KP_3 KP_Next KP_3
|
||||
keycode 90 = KP_Insert KP_0 KP_Insert KP_0 KP_Insert KP_0 KP_Insert KP_0
|
||||
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal KP_Delete KP_Decimal KP_Delete KP_Decimal
|
||||
keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift ISO_Level3_Shift
|
||||
keycode 94 = less greater less greater bar brokenbar bar brokenbar less greater bar brokenbar less greater bar brokenbar
|
||||
keycode 95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11 F11 F11 XF86Switch_VT_11 F11 F11 F11 F11 XF86Switch_VT_11 F11 F11 F11 F11 XF86Switch_VT_11
|
||||
keycode 96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12 F12 F12 XF86Switch_VT_12 F12 F12 F12 F12 XF86Switch_VT_12 F12 F12 F12 F12 XF86Switch_VT_12
|
||||
keycode 98 = Katakana NoSymbol Katakana NoSymbol Katakana Katakana
|
||||
keycode 99 = Hiragana NoSymbol Hiragana NoSymbol Hiragana Hiragana
|
||||
keycode 100 = Henkan_Mode NoSymbol Henkan_Mode NoSymbol Henkan_Mode Henkan_Mode
|
||||
keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana NoSymbol Hiragana_Katakana Hiragana_Katakana
|
||||
keycode 102 = Muhenkan NoSymbol Muhenkan NoSymbol Muhenkan Muhenkan
|
||||
keycode 104 = KP_Enter NoSymbol KP_Enter NoSymbol KP_Enter KP_Enter
|
||||
keycode 105 = Control_R Multi_key Control_R NoSymbol Control_R Control_R
|
||||
keycode 106 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab KP_Divide KP_Divide XF86Ungrab KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab
|
||||
keycode 107 = Print Sys_Req Print Sys_Req Print Sys_Req Print Sys_Req
|
||||
keycode 108 = Alt_R Meta_R Alt_R Meta_R Alt_R Meta_R Alt_R Meta_R
|
||||
keycode 109 = Linefeed NoSymbol Linefeed NoSymbol Linefeed Linefeed
|
||||
keycode 110 = Home NoSymbol Home NoSymbol Home Home
|
||||
keycode 111 = Up NoSymbol Up NoSymbol Up Up
|
||||
keycode 112 = Prior NoSymbol Prior NoSymbol Prior Prior
|
||||
keycode 113 = Left NoSymbol Left NoSymbol Left Left
|
||||
keycode 114 = Right NoSymbol Right NoSymbol Right Right
|
||||
keycode 115 = End NoSymbol End NoSymbol End End
|
||||
keycode 116 = Down NoSymbol Down NoSymbol Down Down
|
||||
keycode 117 = Next NoSymbol Next NoSymbol Next Next
|
||||
keycode 118 = Insert NoSymbol Insert NoSymbol Insert Insert
|
||||
keycode 119 = Delete NoSymbol Delete NoSymbol Delete Delete
|
||||
keycode 121 = XF86AudioMute NoSymbol XF86AudioMute NoSymbol XF86AudioMute XF86AudioMute
|
||||
keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume XF86AudioLowerVolume
|
||||
keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume XF86AudioRaiseVolume
|
||||
keycode 124 = XF86PowerOff NoSymbol XF86PowerOff NoSymbol XF86PowerOff XF86PowerOff
|
||||
keycode 125 = KP_Equal NoSymbol KP_Equal NoSymbol KP_Equal KP_Equal
|
||||
keycode 126 = plusminus NoSymbol plusminus NoSymbol plusminus plusminus
|
||||
keycode 127 = Pause Break Pause Break Pause Break Pause Break
|
||||
keycode 128 = XF86LaunchA NoSymbol XF86LaunchA NoSymbol XF86LaunchA XF86LaunchA
|
||||
keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal KP_Decimal KP_Decimal KP_Decimal KP_Decimal
|
||||
keycode 130 = Hangul NoSymbol Hangul NoSymbol Hangul Hangul
|
||||
keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja NoSymbol Hangul_Hanja Hangul_Hanja
|
||||
keycode 133 = Super_L NoSymbol Super_L NoSymbol Super_L Super_L
|
||||
keycode 134 = Super_R NoSymbol Super_R NoSymbol Super_R Super_R
|
||||
keycode 135 = Multi_key NoSymbol Menu NoSymbol Menu Menu
|
||||
keycode 136 = Cancel NoSymbol Cancel NoSymbol Cancel Cancel
|
||||
keycode 137 = Redo NoSymbol Redo NoSymbol Redo Redo
|
||||
keycode 138 = SunProps NoSymbol SunProps NoSymbol SunProps SunProps
|
||||
keycode 139 = Undo NoSymbol Undo NoSymbol Undo Undo
|
||||
keycode 140 = SunFront NoSymbol SunFront NoSymbol SunFront SunFront
|
||||
keycode 141 = XF86Copy NoSymbol XF86Copy NoSymbol XF86Copy XF86Copy
|
||||
keycode 142 = XF86Open NoSymbol XF86Open NoSymbol XF86Open XF86Open
|
||||
keycode 143 = XF86Paste NoSymbol XF86Paste NoSymbol XF86Paste XF86Paste
|
||||
keycode 144 = Find NoSymbol Find NoSymbol Find Find
|
||||
keycode 145 = XF86Cut NoSymbol XF86Cut NoSymbol XF86Cut XF86Cut
|
||||
keycode 146 = Help NoSymbol Help NoSymbol Help Help
|
||||
keycode 147 = XF86MenuKB NoSymbol XF86MenuKB NoSymbol XF86MenuKB XF86MenuKB
|
||||
keycode 148 = XF86Calculator NoSymbol XF86Calculator NoSymbol XF86Calculator XF86Calculator
|
||||
keycode 150 = XF86Sleep NoSymbol XF86Sleep NoSymbol XF86Sleep XF86Sleep
|
||||
keycode 151 = XF86WakeUp NoSymbol XF86WakeUp NoSymbol XF86WakeUp XF86WakeUp
|
||||
keycode 152 = XF86Explorer NoSymbol XF86Explorer NoSymbol XF86Explorer XF86Explorer
|
||||
keycode 153 = XF86Send NoSymbol XF86Send NoSymbol XF86Send XF86Send
|
||||
keycode 155 = XF86Xfer NoSymbol XF86Xfer NoSymbol XF86Xfer XF86Xfer
|
||||
keycode 156 = XF86Launch1 NoSymbol XF86Launch1 NoSymbol XF86Launch1 XF86Launch1
|
||||
keycode 157 = XF86Launch2 NoSymbol XF86Launch2 NoSymbol XF86Launch2 XF86Launch2
|
||||
keycode 158 = XF86WWW NoSymbol XF86WWW NoSymbol XF86WWW XF86WWW
|
||||
keycode 159 = XF86DOS NoSymbol XF86DOS NoSymbol XF86DOS XF86DOS
|
||||
keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver NoSymbol XF86ScreenSaver XF86ScreenSaver
|
||||
keycode 161 = XF86RotateWindows NoSymbol XF86RotateWindows NoSymbol XF86RotateWindows XF86RotateWindows
|
||||
keycode 162 = XF86TaskPane NoSymbol XF86TaskPane NoSymbol XF86TaskPane XF86TaskPane
|
||||
keycode 163 = XF86Mail NoSymbol XF86Mail NoSymbol XF86Mail XF86Mail
|
||||
keycode 164 = XF86Favorites NoSymbol XF86Favorites NoSymbol XF86Favorites XF86Favorites
|
||||
keycode 165 = XF86MyComputer NoSymbol XF86MyComputer NoSymbol XF86MyComputer XF86MyComputer
|
||||
keycode 166 = Page_Down XF86Back XF86Back NoSymbol XF86Back XF86Back
|
||||
keycode 167 = Page_Up XF86Forward XF86Forward NoSymbol XF86Forward XF86Forward
|
||||
keycode 169 = XF86Eject NoSymbol XF86Eject NoSymbol XF86Eject XF86Eject
|
||||
keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject
|
||||
keycode 171 = XF86AudioNext NoSymbol XF86AudioNext NoSymbol XF86AudioNext XF86AudioNext
|
||||
keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
|
||||
keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev NoSymbol XF86AudioPrev XF86AudioPrev
|
||||
keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject XF86AudioStop XF86Eject XF86AudioStop XF86Eject
|
||||
keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord NoSymbol XF86AudioRecord XF86AudioRecord
|
||||
keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind NoSymbol XF86AudioRewind XF86AudioRewind
|
||||
keycode 177 = XF86Phone NoSymbol XF86Phone NoSymbol XF86Phone XF86Phone
|
||||
keycode 179 = XF86Tools NoSymbol XF86Tools NoSymbol XF86Tools XF86Tools
|
||||
keycode 180 = XF86HomePage NoSymbol XF86HomePage NoSymbol XF86HomePage XF86HomePage
|
||||
keycode 181 = XF86Reload NoSymbol XF86Reload NoSymbol XF86Reload XF86Reload
|
||||
keycode 182 = XF86Close NoSymbol XF86Close NoSymbol XF86Close XF86Close
|
||||
keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp NoSymbol XF86ScrollUp XF86ScrollUp
|
||||
keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown NoSymbol XF86ScrollDown XF86ScrollDown
|
||||
keycode 187 = parenleft NoSymbol parenleft NoSymbol parenleft parenleft
|
||||
keycode 188 = parenright NoSymbol parenright NoSymbol parenright parenright
|
||||
keycode 189 = XF86New NoSymbol XF86New NoSymbol XF86New XF86New
|
||||
keycode 190 = Redo NoSymbol Redo NoSymbol Redo Redo
|
||||
keycode 191 = XF86Tools NoSymbol XF86Tools NoSymbol XF86Tools XF86Tools
|
||||
keycode 192 = XF86Launch5 NoSymbol XF86Launch5 NoSymbol XF86Launch5 XF86Launch5
|
||||
keycode 193 = XF86Launch6 NoSymbol XF86Launch6 NoSymbol XF86Launch6 XF86Launch6
|
||||
keycode 194 = XF86Launch7 NoSymbol XF86Launch7 NoSymbol XF86Launch7 XF86Launch7
|
||||
keycode 195 = XF86Launch8 NoSymbol XF86Launch8 NoSymbol XF86Launch8 XF86Launch8
|
||||
keycode 196 = XF86Launch9 NoSymbol XF86Launch9 NoSymbol XF86Launch9 XF86Launch9
|
||||
keycode 203 = Mode_switch NoSymbol Mode_switch NoSymbol Mode_switch Mode_switch
|
||||
keycode 204 = NoSymbol Alt_L NoSymbol Alt_L NoSymbol Alt_L NoSymbol Alt_L
|
||||
keycode 205 = NoSymbol Meta_L NoSymbol Meta_L NoSymbol Meta_L NoSymbol Meta_L
|
||||
keycode 206 = NoSymbol Super_L NoSymbol Super_L NoSymbol Super_L NoSymbol Super_L
|
||||
keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L NoSymbol Hyper_L NoSymbol Hyper_L
|
||||
keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay XF86AudioPlay
|
||||
keycode 209 = XF86AudioPause NoSymbol XF86AudioPause NoSymbol XF86AudioPause XF86AudioPause
|
||||
keycode 210 = XF86Launch3 NoSymbol XF86Launch3 NoSymbol XF86Launch3 XF86Launch3
|
||||
keycode 211 = XF86Launch4 NoSymbol XF86Launch4 NoSymbol XF86Launch4 XF86Launch4
|
||||
keycode 212 = XF86LaunchB NoSymbol XF86LaunchB NoSymbol XF86LaunchB XF86LaunchB
|
||||
keycode 213 = XF86Suspend NoSymbol XF86Suspend NoSymbol XF86Suspend XF86Suspend
|
||||
keycode 214 = XF86Close NoSymbol XF86Close NoSymbol XF86Close XF86Close
|
||||
keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay XF86AudioPlay
|
||||
keycode 216 = XF86AudioForward NoSymbol XF86AudioForward NoSymbol XF86AudioForward XF86AudioForward
|
||||
keycode 218 = Print NoSymbol Print NoSymbol Print Print
|
||||
keycode 220 = XF86WebCam NoSymbol XF86WebCam NoSymbol XF86WebCam XF86WebCam
|
||||
keycode 221 = XF86AudioPreset NoSymbol XF86AudioPreset NoSymbol XF86AudioPreset XF86AudioPreset
|
||||
keycode 223 = XF86Mail NoSymbol XF86Mail NoSymbol XF86Mail XF86Mail
|
||||
keycode 224 = XF86Messenger NoSymbol XF86Messenger NoSymbol XF86Messenger XF86Messenger
|
||||
keycode 225 = XF86Search NoSymbol XF86Search NoSymbol XF86Search XF86Search
|
||||
keycode 226 = XF86Go NoSymbol XF86Go NoSymbol XF86Go XF86Go
|
||||
keycode 227 = XF86Finance NoSymbol XF86Finance NoSymbol XF86Finance XF86Finance
|
||||
keycode 228 = XF86Game NoSymbol XF86Game NoSymbol XF86Game XF86Game
|
||||
keycode 229 = XF86Shop NoSymbol XF86Shop NoSymbol XF86Shop XF86Shop
|
||||
keycode 231 = Cancel NoSymbol Cancel NoSymbol Cancel Cancel
|
||||
keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown XF86MonBrightnessDown
|
||||
keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp XF86MonBrightnessUp
|
||||
keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia NoSymbol XF86AudioMedia XF86AudioMedia
|
||||
keycode 235 = XF86Display NoSymbol XF86Display NoSymbol XF86Display XF86Display
|
||||
keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff XF86KbdLightOnOff
|
||||
keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown XF86KbdBrightnessDown
|
||||
keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp XF86KbdBrightnessUp
|
||||
keycode 239 = XF86Send NoSymbol XF86Send NoSymbol XF86Send XF86Send
|
||||
keycode 240 = XF86Reply NoSymbol XF86Reply NoSymbol XF86Reply XF86Reply
|
||||
keycode 241 = XF86MailForward NoSymbol XF86MailForward NoSymbol XF86MailForward XF86MailForward
|
||||
keycode 242 = XF86Save NoSymbol XF86Save NoSymbol XF86Save XF86Save
|
||||
keycode 243 = XF86Documents NoSymbol XF86Documents NoSymbol XF86Documents XF86Documents
|
||||
keycode 244 = XF86Battery NoSymbol XF86Battery NoSymbol XF86Battery XF86Battery
|
||||
keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth NoSymbol XF86Bluetooth XF86Bluetooth
|
||||
keycode 246 = XF86WLAN NoSymbol XF86WLAN NoSymbol XF86WLAN XF86WLAN
|
||||
keycode 254 = XF86WWAN NoSymbol XF86WWAN NoSymbol XF86WWAN XF86WWAN
|
||||
keycode 255 = XF86RFKill NoSymbol XF86RFKill NoSymbol XF86RFKill XF86RFKill
|
176
.Xresources
176
.Xresources
|
@ -1,176 +0,0 @@
|
|||
! xterm color scheme — Make all 16 beautiful.
|
||||
!
|
||||
! Suited for black background, but includes disabled alternative light scheme.
|
||||
!
|
||||
! Use xfontsel and xlsfonts to find other fonts.
|
||||
!
|
||||
! On Ubuntu I have to name this file ‘~/.Xdefaults-$(hostname)’
|
||||
!
|
||||
! ‘xrdb -load ~/.Xdefaults-stud’ is supposed to reload this file, but
|
||||
! doesn’t seem to, so just fire new xterm upon every change.
|
||||
!
|
||||
! Other resources:
|
||||
! * showrgb — util to dump color db.
|
||||
! * test-color-words16 — another color-displaying util (worth gist-ing).
|
||||
|
||||
!!! urxvt perl modules to load
|
||||
URxvt.perl-ext-common: clipboard,default,fullscreen
|
||||
|
||||
|
||||
!!! Fonts
|
||||
!xterm*font: -*-terminus-*-*-*-*-*-*-*-*-*-*-iso10646-*
|
||||
!xterm*boldFont: -*-terminus-*-*-*-*-*-*-*-*-*-*-iso10646-*
|
||||
!xterm*italicFont: -*-terminus-*-*-*-*-*-*-*-*-*-*-iso10646-*
|
||||
!xterm*font: -misc-fixed-medium-r-JetBrains Mono-*-18-*-*-*-*-*-*-*
|
||||
!xterm*boldFont: -misc-fixed-medium-r-JetBrains Mono-*-18-*-*-*-*-*-*-*
|
||||
|
||||
! Very surprising that now neglecting to specify font still renders
|
||||
! perfect misc-fixed font. Oh, it’s so lovely.
|
||||
!xterm*font: -*-*-*-*-*-*-*-100-*-*-*-60-iso10646-*
|
||||
!xterm*boldFont: -*-*-*-*-*-*-*-100-*-*-*-60-iso10646-*
|
||||
!xterm*italicFont: -*-*-*-*-*-*-*-100-*-*-*-60-iso10646-*
|
||||
|
||||
XTerm.vt100.faceName: Fira Code:size=11:antialias=true
|
||||
XTerm.vt100.font: 7x13
|
||||
URxvt.font: xft:Fira Code:size=12,xft:Noto Color Emoji:size=9,xft:Unifont:pixelsize=12,-*-unifont-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
|
||||
!!! Enable copy/paste.
|
||||
! http://www.davidsimmons.com/soft/xtermhacks/
|
||||
xterm*VT100.translations: #override <Btn1Up>: select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0)
|
||||
URxvt.clipboard.autocopy: true
|
||||
URxvt.keysym.M-c: perl:clipboard:copy
|
||||
URxvt.keysym.M-v: perl:clipboard:paste
|
||||
|
||||
!!! yoink
|
||||
URxvt.url-launcher: /usr/bin/xdg-open
|
||||
|
||||
URxvt.perl-ext: default,url-select
|
||||
URxvt.keysym.C-M-u: perl:url-select:select_next
|
||||
URxvt.url-select.launcher: /usr/bin/xdg-open
|
||||
URxvt.url-select.underline: true
|
||||
|
||||
Rxvt.keysym.C-M-f: perl:fullscreen:switch
|
||||
|
||||
!!! nobody wants to see your scrollbar
|
||||
URxvt.scrollBar: false
|
||||
xterm*scrollBar: false
|
||||
|
||||
!!! Foreground
|
||||
xterm*foreground: #d3d3d3
|
||||
URxvt.foreground: #d3d3d3
|
||||
|
||||
!!! Background
|
||||
xterm*background: #000000
|
||||
URxvt.background: #000000
|
||||
|
||||
xterm*cursorColor: #CC3214
|
||||
|
||||
! Blacks
|
||||
URxvt.color0: #161510
|
||||
URxvt.color8: #4C4635
|
||||
! Reds
|
||||
URxvt.color1: #A32810
|
||||
URxvt.color9: #CC3214
|
||||
! Greens
|
||||
URxvt.color2: #727A18
|
||||
URxvt.color10: #8E991E
|
||||
! Yellows
|
||||
URxvt.color3: #A37720
|
||||
URxvt.color11: #CC9528
|
||||
! Blues
|
||||
URxvt.color4: #3D6266
|
||||
URxvt.color12: #4C7B7F
|
||||
! Purples
|
||||
URxvt.color5: #7A4955
|
||||
URxvt.color13: #995B6B
|
||||
! Cyans
|
||||
URxvt.color6: #557A55
|
||||
URxvt.color14: #6B996B
|
||||
! Whites
|
||||
URxvt.color7: #8E8463
|
||||
URxvt.color15: #CCBCBE
|
||||
|
||||
! Blacks
|
||||
xterm*color0: #161510
|
||||
xterm*color8: #4C4635
|
||||
! Reds
|
||||
xterm*color1: #A32810
|
||||
xterm*color9: #CC3214
|
||||
! Greens
|
||||
xterm*color2: #727A18
|
||||
xterm*color10: #8E991E
|
||||
! Yellows
|
||||
xterm*color3: #A37720
|
||||
xterm*color11: #CC9528
|
||||
! Blues
|
||||
xterm*color4: #3D6266
|
||||
xterm*color12: #4C7B7F
|
||||
! Purples
|
||||
xterm*color5: #7A4955
|
||||
xterm*color13: #995B6B
|
||||
! Cyans
|
||||
xterm*color6: #557A55
|
||||
xterm*color14: #6B996B
|
||||
! Whites
|
||||
xterm*color7: #8E8463
|
||||
xterm*color15: #CCBCBE
|
||||
|
||||
|
||||
|
||||
XTerm.vt100.backarrowKey: false
|
||||
XTerm.ttyModes: erase ^?
|
||||
|
||||
!Ensure that your locale is set up for UTF-8. If you do not use UTF-8, you may need to force xterm to more strictly follow your locale by setting
|
||||
|
||||
XTerm.vt100.locale: true
|
||||
|
||||
!Make 'Alt' key behave as on other terminal emulators
|
||||
|
||||
!The default Alt key behavior in xterm is a modifier to send eight bit input characters e.g. to insert æ by pressing Alt+f. To make Alt instead send a ^[ (escape) key (as in gnome-terminal and konsole), set
|
||||
|
||||
XTerm.vt100.metaSendsEscape: true
|
||||
XTerm.termName: xterm-256color
|
||||
URxvt.termName: xterm-256color
|
||||
|
||||
!bell stuff
|
||||
URxvt.mapAlert: true
|
||||
URxvt.urgentOnBell: true
|
||||
URxvt.visualBell: true
|
||||
|
||||
|
||||
xscreensaver.splash: false
|
||||
|
||||
!font settings
|
||||
!xscreensaver.Dialog.headingFont: -*-georgia-bold-r-*-*-18-*-*-*-*-*-*-*
|
||||
!xscreensaver.Dialog.bodyFont: -*-georgia-medium-r-*-*-18-*-*-*-*-*-*-*
|
||||
!xscreensaver.Dialog.labelFont: -*-georgia-medium-r-*-*-18-*-*-*-*-*-*-*
|
||||
!xscreensaver.Dialog.unameFont: -*-georgia-medium-r-*-*-18-*-*-*-*-*-*-*
|
||||
!xscreensaver.Dialog.buttonFont: -*-georgia-bold-r-*-*-18-*-*-*-*-*-*-*
|
||||
!xscreensaver.Dialog.dateFont: -*-georgia-medium-r-*-*-18-*-*-*-*-*-*-*
|
||||
!xscreensaver.passwd.passwdFont: -*-georgia-bold-r-*-*-18-*-*-*-*-*-*-*
|
||||
|
||||
!general dialog box (affects main hostname, username, password text)
|
||||
xscreensaver.Dialog.foreground: #8E8463
|
||||
xscreensaver.Dialog.background: #161510
|
||||
xscreensaver.Dialog.topShadowColor: #161510
|
||||
xscreensaver.Dialog.bottomShadowColor: #161510
|
||||
xscreensaver.Dialog.Button.foreground: #8E8463
|
||||
xscreensaver.Dialog.Button.background: #4C4635
|
||||
|
||||
!username/password input box and date text colour
|
||||
xscreensaver.Dialog.text.foreground: #8E8463
|
||||
xscreensaver.Dialog.text.background: #161510
|
||||
xscreensaver.Dialog.internalBorderWidth:36
|
||||
xscreensaver.Dialog.borderWidth: 0
|
||||
xscreensaver.Dialog.shadowThickness: 2
|
||||
|
||||
!timeout bar (background is actually determined by Dialog.text.background)
|
||||
xscreensaver.passwd.thermometer.foreground: #727A18
|
||||
xscreensaver.passwd.thermometer.background: #161510
|
||||
xscreensaver.passwd.thermometer.width: 10
|
||||
|
||||
!datestamp format--see the strftime(3) manual page for details
|
||||
xscreensaver.dateFormat: %I:%M%p - %a %b %d, %Y
|
||||
|
||||
|
||||
|
235
.baresip/config
235
.baresip/config
|
@ -1,235 +0,0 @@
|
|||
#
|
||||
# baresip configuration
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Core
|
||||
poll_method epoll # poll, select, epoll ..
|
||||
|
||||
# SIP
|
||||
#sip_listen 0.0.0.0:5060
|
||||
#sip_certificate cert.pem
|
||||
#sip_cafile /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
# Call
|
||||
call_local_timeout 120
|
||||
call_max_calls 4
|
||||
|
||||
# Audio
|
||||
#audio_path /usr/share/baresip
|
||||
audio_player alsa,default
|
||||
audio_source alsa,default
|
||||
audio_alert alsa,default
|
||||
#ausrc_srate 48000
|
||||
#auplay_srate 48000
|
||||
#ausrc_channels 0
|
||||
#auplay_channels 0
|
||||
#audio_txmode poll # poll, thread
|
||||
audio_level no
|
||||
ausrc_format s16 # s16, float, ..
|
||||
auplay_format s16 # s16, float, ..
|
||||
auenc_format s16 # s16, float, ..
|
||||
audec_format s16 # s16, float, ..
|
||||
|
||||
# Video
|
||||
video_source v4l2,/dev/video0
|
||||
video_display x11,nil
|
||||
video_size 352x288
|
||||
video_bitrate 500000
|
||||
video_fps 25.00
|
||||
video_fullscreen no
|
||||
videnc_format yuv420p
|
||||
|
||||
# AVT - Audio/Video Transport
|
||||
rtp_tos 184
|
||||
#rtp_ports 10000-20000
|
||||
#rtp_bandwidth 512-1024 # [kbit/s]
|
||||
rtcp_mux no
|
||||
jitter_buffer_delay 5-10 # frames
|
||||
rtp_stats no
|
||||
#rtp_timeout 60
|
||||
|
||||
# Network
|
||||
net_prefer_ipv6 no
|
||||
#dns_server 1.1.1.1:53
|
||||
#dns_server 1.0.0.1:53
|
||||
#net_interface wlp1s0
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Modules
|
||||
|
||||
module_path /usr/lib/baresip/modules
|
||||
|
||||
# UI Modules
|
||||
module stdio.so
|
||||
#module cons.so
|
||||
#module evdev.so
|
||||
#module httpd.so
|
||||
|
||||
# Audio codec Modules (in order)
|
||||
#module opus.so
|
||||
#module amr.so
|
||||
#module g7221.so
|
||||
#module g722.so
|
||||
#module g726.so
|
||||
module g711.so
|
||||
#module gsm.so
|
||||
#module l16.so
|
||||
#module mpa.so
|
||||
#module codec2.so
|
||||
#module ilbc.so
|
||||
#module isac.so
|
||||
|
||||
# Audio filter Modules (in encoding order)
|
||||
#module vumeter.so
|
||||
#module sndfile.so
|
||||
#module speex_pp.so
|
||||
#module plc.so
|
||||
#module webrtc_aec.so
|
||||
|
||||
# Audio driver Modules
|
||||
module alsa.so
|
||||
#module pulse.so
|
||||
#module jack.so
|
||||
#module portaudio.so
|
||||
#module aubridge.so
|
||||
#module aufile.so
|
||||
|
||||
# Video codec Modules (in order)
|
||||
#module avcodec.so
|
||||
#module vp8.so
|
||||
#module vp9.so
|
||||
|
||||
# Video filter Modules (in encoding order)
|
||||
#module selfview.so
|
||||
#module snapshot.so
|
||||
#module swscale.so
|
||||
#module vidinfo.so
|
||||
|
||||
# Video source modules
|
||||
#module v4l2.so
|
||||
#module v4l2_codec.so
|
||||
#module avformat.so
|
||||
#module x11grab.so
|
||||
#module cairo.so
|
||||
#module vidbridge.so
|
||||
|
||||
# Video display modules
|
||||
#module directfb.so
|
||||
#module x11.so
|
||||
#module sdl.so
|
||||
#module fakevideo.so
|
||||
|
||||
# Audio/Video source modules
|
||||
#module rst.so
|
||||
#module gst.so
|
||||
#module gst_video.so
|
||||
|
||||
# Media NAT modules
|
||||
module stun.so
|
||||
module turn.so
|
||||
module ice.so
|
||||
module natpmp.so
|
||||
|
||||
# Media encryption modules
|
||||
#module srtp.so
|
||||
#module dtls_srtp.so
|
||||
#module zrtp.so
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Temporary Modules (loaded then unloaded)
|
||||
|
||||
module_tmp uuid.so
|
||||
module_tmp account.so
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Application Modules
|
||||
|
||||
module_app auloop.so
|
||||
#module_app b2bua.so
|
||||
module_app contact.so
|
||||
module_app debug_cmd.so
|
||||
#module_app dtmfio.so
|
||||
#module_app echo.so
|
||||
module_app gtk.so
|
||||
module_app menu.so
|
||||
#module_app mwi.so
|
||||
#module_app presence.so
|
||||
#module_app syslog.so
|
||||
#module_app mqtt.so
|
||||
#module_app ctrl_tcp.so
|
||||
module_app vidloop.so
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Module parameters
|
||||
|
||||
|
||||
# UI Modules parameters
|
||||
cons_listen 0.0.0.0:5555 # cons
|
||||
|
||||
http_listen 0.0.0.0:8000 # httpd - server
|
||||
|
||||
ctrl_tcp_listen 0.0.0.0:4444 # ctrl_tcp
|
||||
|
||||
evdev_device /dev/input/event0
|
||||
|
||||
# Opus codec parameters
|
||||
opus_bitrate 28000 # 6000-510000
|
||||
#opus_stereo yes
|
||||
#opus_sprop_stereo yes
|
||||
#opus_cbr no
|
||||
#opus_inbandfec no
|
||||
#opus_dtx no
|
||||
#opus_mirror no
|
||||
#opus_complexity 10
|
||||
#opus_application audio # {voip,audio}
|
||||
#opus_samplerate 48000
|
||||
#opus_packet_loss 10 # 0-100 percent
|
||||
|
||||
# Opus Multistream codec parameters
|
||||
#opus_ms_channels 2 #total channels (2 or 4)
|
||||
#opus_ms_streams 2 #number of streams
|
||||
#opus_ms_c_streams 2 #number of coupled streams
|
||||
|
||||
vumeter_stderr yes
|
||||
|
||||
# Selfview
|
||||
video_selfview window # {window,pip}
|
||||
#selfview_size 64x64
|
||||
|
||||
# ICE
|
||||
ice_turn no
|
||||
ice_debug no
|
||||
ice_nomination regular # {regular,aggressive}
|
||||
|
||||
# ZRTP
|
||||
#zrtp_hash no # Disable SDP zrtp-hash (not recommended)
|
||||
|
||||
# Menu
|
||||
#menu_bell yes
|
||||
#redial_attempts 0 # Num or <inf>
|
||||
#redial_delay 5 # Delay in seconds
|
||||
#ringback_disabled no
|
||||
#statmode_default off
|
||||
|
||||
# avcodec
|
||||
#avcodec_h264enc libx264
|
||||
#avcodec_h264dec h264
|
||||
#avcodec_h265enc libx265
|
||||
#avcodec_h265dec hevc
|
||||
#avcodec_hwaccel vaapi
|
||||
|
||||
# mqtt
|
||||
#mqtt_broker_host 127.0.0.1
|
||||
#mqtt_broker_port 1883
|
||||
#mqtt_broker_clientid baresip01
|
||||
#mqtt_broker_user user
|
||||
#mqtt_broker_password pass
|
||||
#mqtt_basetopic baresip/01
|
||||
|
||||
# sndfile
|
||||
#snd_path /tmp
|
|
@ -1,25 +0,0 @@
|
|||
#
|
||||
# SIP contacts
|
||||
#
|
||||
# Displayname <sip:user@domain>;addr-params
|
||||
#
|
||||
# addr-params:
|
||||
# ;presence={none,p2p}
|
||||
# ;access={allow,block}
|
||||
#
|
||||
|
||||
|
||||
|
||||
# tilde.tel contacts
|
||||
"echo test" <sip:1101>
|
||||
"futel" <sip:1938>
|
||||
"conference" <sip:1105>
|
||||
|
||||
"brendo" <sip:2013105>
|
||||
"darcy" <sip:2163101>
|
||||
"rawktucc" <sip:2013123>
|
||||
|
||||
|
||||
# Access rules
|
||||
#"Catch All" <sip:*@*>;access=block
|
||||
|
|
@ -1 +0,0 @@
|
|||
d2131d35-7f7e-c6d7-f032-ca9e3c5622b3
|
|
@ -1,5 +0,0 @@
|
|||
#
|
||||
# ~/.bash_profile
|
||||
#
|
||||
|
||||
source ~/.profile
|
156
.bashrc
156
.bashrc
|
@ -1,156 +0,0 @@
|
|||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=4000
|
||||
HISTFILESIZE=8000
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color|*-256color|*-color|screen) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
#force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
#export PS1='$(tput setaf 34)[ $(tput bold; tput setaf 28)ltc$(tput setaf 40)@$(tput setaf 28)arch$(tput sgr0; tput setaf 34) ] $(tput setaf 46)[ $(tput bold; tput setaf 40)\w$(tput sgr0; tput setaf 46) ]$(DIRY="\w"; printf "%$(($COLUMNS - 9 - 3 - 5 - ${#DIRY} - 12))s")$(tput bold; tput setaf 34)[ \t ]\n$ $(tput sgr0)'
|
||||
PS1="\[\$([ \$? -eq 0 ] && tput setaf 14 || tput setaf 9)$(tput setab 14)\]\[$(tput bold; tput setaf 0; tput setab 14)\]\u \[\e[m$(tput setaf 14; tput setab 4)\]\[$(tput setaf 0; tput setab 4)\] \w \[\e[m$(tput setaf 4)\]\[\e[m\] "
|
||||
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}[ \u@\h \w\]$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
#alias grep='grep --color=auto'
|
||||
#alias fgrep='fgrep --color=auto'
|
||||
#alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# some more ls aliases
|
||||
#alias ll='ls -l'
|
||||
#alias la='ls -A'
|
||||
#alias l='ls -CF'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
alias ll='ls -l'
|
||||
|
||||
|
||||
|
||||
alias ffrec="ffmpeg -f pulse -i default -f x11grab -video_size 1366x768 -framerate 24 -i :0.0"
|
||||
|
||||
alias ffcheese="ffmpeg -f pulse -i default -f x11grab -video_size 1020x574 -framerate 24 -i :0.0+8,107"
|
||||
|
||||
alias fflive='ffmpeg -f pulse -i default -f x11grab -framerate 24 -video_size 1366x768 -i :0.0+0,0 -c:v libx264 -preset veryfast -maxrate 1984k -bufsize 3968k -vf "format=yuv420p" -g 48 -c:a aac -b:a 128k -ar 44100 -f flv "rtmp://live-jfk.twitch.tv/app/$TW_KEY" -loglevel 24'
|
||||
alias fflu='ffmpeg -f pulse -i default -f x11grab -framerate 24 -video_size 1366x768 -i :0.0+0,0 -c:v libx264 -preset veryfast -maxrate 1984k -bufsize 3968k -vf "format=yuv420p" -g 48 -c:a aac -b:a 128k -ar 44100 -f flv "$FFLU_URL" -loglevel 24'
|
||||
|
||||
alias ffxeph='ffmpeg -f pulse -i default -f x11grab -framerate 24 -video_size 1024x574 -i :1.0+0,0 -c:v libx264 -preset veryfast -maxrate 1984k -bufsize 3968k -vf "format=yuv420p" -g 48 -c:a aac -b:a 128k -ar 44100 -f flv "$FFLU_URL" -loglevel 24'
|
||||
alias startxeph='Xephyr -br -ac -reset -screen 1024x576 :1 & DISPLAY=:1 berry & DISPLAY=:1 xrdb -load ~/.Xresources'
|
||||
|
||||
alias fflivecheese='ffmpeg -f pulse -i default -f x11grab -framerate 24 -video_size 1020x574 -i :0.0+8,107 -c:v libx264 -preset veryfast -maxrate 1984k -bufsize 3968k -vf "format=yuv420p" -g 48 -c:a aac -b:a 128k -ar 44100 -f flv "rtmp://live-jfk.twitch.tv/app/$TW_KEY" -loglevel 24'
|
||||
|
||||
## minecraft version
|
||||
#alias fflive='ffmpeg -f pulse -i default -f x11grab -framerate 24 -video_size 854x480 -i :2.0+0,55 -c:v libx264 -preset veryfast -maxrate 1984k -bufsize 3968k -vf "format=yuv420p" -g 48 -c:a aac -b:a 128k -ar 44100 -f flv "rtmp://live-jfk.twitch.tv/app/$TW_KEY"'
|
||||
|
||||
#alias fflivedev="ffmpeg -i /dev/video0 -c:v libx264 -preset veryfast -maxrate 1984k -bufsize 3968k -vf 'format=yuv420p' -g 48 -f flv 'rtmp://live.twitch.tv/app/$TW_KEY'"
|
||||
|
||||
# ttm.sh aliases
|
||||
ttmfile() { curl -F"file=@$1" https://ttm.sh ; }
|
||||
ttmshort() { curl -F"shorten=$1" https://ttm.sh ; }
|
||||
|
||||
# argument aliases
|
||||
alias mkdir="mkdir -p"
|
||||
alias t="topydo"
|
||||
|
||||
alias stdsize='wc -c | awk '"'"'{print $1/1000"K"}'"'"' '
|
||||
|
||||
|
||||
|
||||
|
||||
calcpi() { echo "scale=$1; 4*a(1)" | bc -l ; }
|
||||
|
||||
|
||||
|
||||
export EDITOR='vim'
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
|
||||
[SETTINGS]
|
||||
telnetcommand=telnet
|
||||
webmode=lynx
|
||||
savelocation=/home/lickthecheese
|
||||
searchengine=gopher://gopher.floodgap.com:70/7/v2/vs
|
||||
showimages=true
|
||||
theme=normal
|
||||
tlscertificate=
|
||||
tlskey=
|
||||
defaultscheme=gemini
|
||||
geminiblocks=block
|
||||
homeurl=gopher://bombadillo.colorfield.space:70/1/user-guide.map
|
||||
configlocation=/home/ltc/.config
|
||||
[BOOKMARKS]
|
||||
80 H=gemini://80h.dev:1965/
|
||||
gemserv=gemini://80h.dev:1965/projects/gemserv/
|
||||
spacewalk=gemini://rawtext.club:1965/~sloum/spacewalk.gmi
|
||||
team=gemini://tilde.team:1965/
|
||||
black=gemini://tilde.black:1965/
|
||||
pink=gemini://tilde.pink:1965/
|
||||
gemini=gemini://gemini.circumlunar.space:1965/
|
||||
srvandclis=gemini://gemini.circumlunar.space:1965/software/
|
||||
mozz=gemini://mozz.us:1965/
|
||||
lick=gemini://data.bellz.org:1965/~lick/
|
||||
[CERTS]
|
||||
80h.dev=EE:D4:90:EE:8C:60:67:FD:A6:11:F8:50:9B:49:8A:C1:12:72:05:98|1597519103
|
||||
rawtext.club=B1:5C:EB:E9:CB:D1:4F:3C:0A:E7:9E:30:2F:5D:C2:17:2A:82:1D:D5|4742811785
|
||||
mozz.us=AB:72:12:9C:E6:61:A8:AA:37:AA:6C:52:97:B1:AD:97:36:5C:CE:E6|1593022609
|
||||
tilde.team=59:22:73:7C:DC:B7:5D:32:01:78:9D:68:C1:53:64:F9:C0:04:24:11|1593594713
|
||||
breadpunk.club=84:AA:34:43:A0:CE:5A:7A:D0:C4:5A:28:99:90:CD:2E:B1:98:94:C6|1594326918
|
||||
tilde.pink=F9:02:97:66:73:5E:07:11:16:04:08:D4:40:EF:2A:82:60:94:FE:FF|1597756176
|
||||
gemini.circumlunar.space=D2:8B:93:54:72:91:CC:E8:DE:9D:90:12:A9:4A:1B:1A:74:14:83:B3|1596263192
|
||||
envs.net=B8:CF:1F:4D:30:80:2E:5E:EF:14:43:9D:71:08:C2:FD:E2:FD:37:52|1593286422
|
||||
carcosa.net=A8:B7:17:DB:A4:46:C9:0D:5F:8F:33:4B:56:BC:35:D9:87:46:3D:EF|1594656848
|
||||
tilde.black=30:CA:2B:B8:74:3D:DB:2F:6C:0C:15:EF:27:39:6E:7E:5B:DB:51:C3|1598107728
|
||||
data.bellz.org=E8:7B:E7:B5:0F:8B:9D:24:8E:76:DD:38:9D:15:0B:63:3A:A2:06:B9|1593042306
|
||||
commie.space=08:04:35:A9:05:1D:12:D8:EC:26:BF:EF:17:32:54:96:AA:F7:64:3A|1621507343
|
||||
gem.limpet.net=4B:D3:70:EC:BD:87:A6:76:DB:05:BE:99:50:79:3C:1F:E6:B4:C1:3F|1905371697
|
|
@ -1,54 +0,0 @@
|
|||
# i3status configuration file.
|
||||
# see "man i3status" for documentation.
|
||||
|
||||
# It is important that this file is edited as UTF-8.
|
||||
# The following line should contain a sharp s:
|
||||
# ß
|
||||
# If the above line is not correctly displayed, fix your editor first!
|
||||
|
||||
general {
|
||||
colors = false
|
||||
interval = 5
|
||||
}
|
||||
|
||||
order += "disk /home/"
|
||||
order += "wireless _first_"
|
||||
order += "ethernet _first_"
|
||||
order += "battery all"
|
||||
order += "cpu_temperature 0"
|
||||
order += "load"
|
||||
order += "tztime utc"
|
||||
order += "tztime local"
|
||||
|
||||
wireless _first_ {
|
||||
format_up = "W: (%quality at %essid) %ip"
|
||||
format_down = "W: down"
|
||||
}
|
||||
|
||||
battery all {
|
||||
format = "%status %percentage %remaining"
|
||||
last_full_capacity = true
|
||||
hide_seconds = false
|
||||
}
|
||||
|
||||
tztime utc {
|
||||
format = "%H:%M"
|
||||
timezone = "Etc/UTC"
|
||||
}
|
||||
|
||||
tztime local {
|
||||
format = "%Y-%m-%d %H:%M:%S"
|
||||
}
|
||||
|
||||
load {
|
||||
format = "%1min"
|
||||
}
|
||||
|
||||
cpu_temperature 0 {
|
||||
format = "%degrees C"
|
||||
path = "/sys/class/thermal/thermal_zone0/temp"
|
||||
}
|
||||
|
||||
disk "/home/" {
|
||||
format = "%avail"
|
||||
}
|
|
@ -1,81 +0,0 @@
|
|||
#!/bin/zsh
|
||||
|
||||
# start the keyboard combination daemon
|
||||
sxhkd -c ~/.config/berry/sxhkdrc &
|
||||
|
||||
# Set decoration geometry
|
||||
berryc border_width 0
|
||||
berryc inner_border_width 0
|
||||
berryc title_height 26
|
||||
berryc top_gap 26
|
||||
|
||||
# Set decoration colors
|
||||
berryc focus_color 292D3E
|
||||
berryc unfocus_color 292D3E
|
||||
berryc inner_focus_color 56aa79
|
||||
berryc inner_unfocus_color 565679
|
||||
berryc text_focus_color 222222
|
||||
berryc text_unfocus_color eeeeee
|
||||
|
||||
# Other options
|
||||
berryc smart_place "true"
|
||||
berryc draw_text "true"
|
||||
berryc edge_lock "true"
|
||||
berryc set_font "Dina-9"
|
||||
|
||||
|
||||
# set the screen resolution if you are in a vm
|
||||
xrandr --listmonitors | grep -q 'Virtual-1 1024/271x768/203+0+0' &&
|
||||
xrandr --output Virtual-1 --mode 1366x768
|
||||
|
||||
# set the wallpaper
|
||||
feh --randomize --bg-fill ~/Pictures/wall
|
||||
|
||||
# start the bar
|
||||
batterysec(){
|
||||
zsh -c '
|
||||
GRML_BATTERY_LEVEL=""
|
||||
local batteries bat capacity
|
||||
batteries=`echo /sys/class/power_supply/BAT*`
|
||||
if (( $#batteries > 0 )) ; then
|
||||
for bat in $batteries ; do
|
||||
if [[ -e $bat/capacity ]]; then
|
||||
capacity=$(< $bat/capacity)
|
||||
else
|
||||
typeset -F energy_full=$(< $bat/energy_full)
|
||||
typeset -F energy_now=$(< $bat/energy_now)
|
||||
typeset -i capacity=$(( 100 * $energy_now / $energy_full))
|
||||
fi
|
||||
case $(< $bat/status) in
|
||||
Charging)
|
||||
GRML_BATTERY_LEVEL+="^"
|
||||
;;
|
||||
Discharging)
|
||||
if (( capacity < 20 )) ; then
|
||||
GRML_BATTERY_LEVEL+="%{B#AA7766} v"
|
||||
else
|
||||
GRML_BATTERY_LEVEL+="v"
|
||||
fi
|
||||
;;
|
||||
*) # Full, Unknown
|
||||
GRML_BATTERY_LEVEL+="="
|
||||
;;
|
||||
esac
|
||||
GRML_BATTERY_LEVEL+="${capacity}%%"
|
||||
done
|
||||
fi
|
||||
echo "$GRML_BATTERY_LEVEL %{B#292D3E}"
|
||||
' 2>/dev/null
|
||||
}
|
||||
|
||||
if which lemonbar
|
||||
then
|
||||
pkill -x lemonbar || true
|
||||
while sleep 1
|
||||
do
|
||||
echo ' %{c}'`date -R`' %{r}'`batterysec`' '`uptime | cut -d' ' -f12 | cut -b-4`' '
|
||||
done | lemonbar -g x26 -B '#292D3E' -F '#CCCCCC' -f 'Fira Code:size=9:antialias=true' &
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
#
|
||||
# wm independent hotkeys
|
||||
#
|
||||
|
||||
# terminal emulator
|
||||
super + Return
|
||||
urxvt
|
||||
|
||||
# program launcher
|
||||
super + d
|
||||
rofi -show combi
|
||||
|
||||
# make sxhkd reload its configuration files:
|
||||
super + Escape
|
||||
pkill -USR1 -x sxhkd
|
||||
|
||||
super + w
|
||||
feh --randomize --bg-fill ~/Pictures/wall
|
||||
|
||||
#
|
||||
# berry hotkeys
|
||||
#
|
||||
|
||||
super + {h, j, k, l}
|
||||
berryc window_move {-50 0, 0 50, 0 -50, 50 0}
|
||||
|
||||
super + shift + {h, j, k, l}
|
||||
berryc window_resize {-50 0, 0 50, 0 -50, 50 0}
|
||||
|
||||
super + {1-9}
|
||||
berryc switch_workspace {0-9}
|
||||
|
||||
super + shift + {1-9}
|
||||
IN={0-9} && berryc send_to_workspace "$IN" && berryc switch_workspace "$IN"
|
||||
|
||||
super + m
|
||||
berryc window_monocle
|
||||
|
||||
super + f
|
||||
berryc fullscreen
|
||||
|
||||
super + p
|
||||
berryc snap_right
|
||||
|
||||
super + o
|
||||
berryc snap_left
|
||||
|
||||
super + t
|
||||
berryc toggle_decorations
|
||||
|
||||
super + Tab
|
||||
berryc cycle_focus
|
||||
|
||||
super + q
|
||||
berryc window_close
|
||||
|
||||
super + c
|
||||
berryc window_center
|
||||
|
||||
~button1
|
||||
berryc pointer_focus
|
|
@ -1,16 +0,0 @@
|
|||
host = irc.tilde.chat
|
||||
#join = #meta,#team,#bots,#share,#radiofreqs,#hamradio,#rscmakerspace,#tildetel,#wilde,#tilderadio,#minecraft,#casino,#tildenet,#brendo,#starlanes,#tildecoin,#envs,#pinebox,#furry,#politics,#counting,#counting-meta,#clubcraft,#services,#archlinux,#lickthecheese,#cminecraft,#windowsloser,#mesh,#kim,#biking,#wppnx,#blender,#arson,#chaos,#thunix,#ipd,#tildexxx,#coffee,#covid19,#cryptocurrency,#finger,#/home/lick,#/,#blamejan6,#crimesmeta,#spaceheater,#gemini,#tildeverse,#kumquat,#jitsi,#water,#beastars,#xfnw,#o,#spacehare,#flamewars,#rpn,#haiku,#python,#choas,#dmv,#spam,#aaa,#irctokens,#ircrobots,#me,#tv,#cute,#estonia
|
||||
join = #meta,#team
|
||||
hash = 1
|
||||
|
||||
log
|
||||
save = tildehonk
|
||||
|
||||
nick = xfwm
|
||||
real = Don't want to be alone, You'd rather be an option
|
||||
user = xfnw
|
||||
cert = cert.pem
|
||||
sasl-external
|
||||
|
||||
#notify = dunstify
|
||||
|
|
@ -1,416 +0,0 @@
|
|||
[global]
|
||||
### Display ###
|
||||
|
||||
# Which monitor should the notifications be displayed on.
|
||||
monitor = 0
|
||||
|
||||
# Display notification on focused monitor. Possible modes are:
|
||||
# mouse: follow mouse pointer
|
||||
# keyboard: follow window with keyboard focus
|
||||
# none: don't follow anything
|
||||
#
|
||||
# "keyboard" needs a window manager that exports the
|
||||
# _NET_ACTIVE_WINDOW property.
|
||||
# This should be the case for almost all modern window managers.
|
||||
#
|
||||
# If this option is set to mouse or keyboard, the monitor option
|
||||
# will be ignored.
|
||||
follow = mouse
|
||||
|
||||
# The geometry of the window:
|
||||
# [{width}]x{height}[+/-{x}+/-{y}]
|
||||
# The geometry of the message window.
|
||||
# The height is measured in number of notifications everything else
|
||||
# in pixels. If the width is omitted but the height is given
|
||||
# ("-geometry x2"), the message window expands over the whole screen
|
||||
# (dmenu-like). If width is 0, the window expands to the longest
|
||||
# message displayed. A positive x is measured from the left, a
|
||||
# negative from the right side of the screen. Y is measured from
|
||||
# the top and down respectively.
|
||||
# The width can be negative. In this case the actual width is the
|
||||
# screen width minus the width defined in within the geometry option.
|
||||
geometry = "300x5-30+20"
|
||||
|
||||
# Show how many messages are currently hidden (because of geometry).
|
||||
indicate_hidden = yes
|
||||
|
||||
# Shrink window if it's smaller than the width. Will be ignored if
|
||||
# width is 0.
|
||||
shrink = no
|
||||
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
# This option will only work if a compositing window manager is
|
||||
# present (e.g. xcompmgr, compiz, etc.).
|
||||
transparency = 0
|
||||
|
||||
# The height of the entire notification. If the height is smaller
|
||||
# than the font height and padding combined, it will be raised
|
||||
# to the font height and padding.
|
||||
notification_height = 0
|
||||
|
||||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications.
|
||||
# Set to 0 to disable.
|
||||
separator_height = 1
|
||||
|
||||
# Padding between text and separator.
|
||||
padding = 16
|
||||
|
||||
# Horizontal padding.
|
||||
horizontal_padding = 16
|
||||
|
||||
# Defines width in pixels of frame around the notification window.
|
||||
# Set to 0 to disable.
|
||||
frame_width = 2
|
||||
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "#aaffaa"
|
||||
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
# * auto: dunst tries to find a color fitting to the background;
|
||||
# * foreground: use the same color as the foreground;
|
||||
# * frame: use the same color as the frame;
|
||||
# * anything else will be interpreted as a X color.
|
||||
separator_color = frame
|
||||
|
||||
# Sort messages by urgency.
|
||||
sort = yes
|
||||
|
||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||
# for longer than idle_threshold seconds.
|
||||
# Set to 0 to disable.
|
||||
# A client can set the 'transient' hint to bypass this. See the rules
|
||||
# section for how to disable this if necessary
|
||||
idle_threshold = 120
|
||||
|
||||
### Text ###
|
||||
|
||||
font = Monospace 8
|
||||
|
||||
# The spacing between lines. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
||||
line_height = 0
|
||||
|
||||
# Possible values are:
|
||||
# full: Allow a small subset of html markup in notifications:
|
||||
# <b>bold</b>
|
||||
# <i>italic</i>
|
||||
# <s>strikethrough</s>
|
||||
# <u>underline</u>
|
||||
#
|
||||
# For a complete reference see
|
||||
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
|
||||
#
|
||||
# strip: This setting is provided for compatibility with some broken
|
||||
# clients that send markup even though it's not enabled on the
|
||||
# server. Dunst will try to strip the markup but the parsing is
|
||||
# simplistic so using this option outside of matching rules for
|
||||
# specific applications *IS GREATLY DISCOURAGED*.
|
||||
#
|
||||
# no: Disable markup parsing, incoming notifications will be treated as
|
||||
# plain text. Dunst will not advertise that it has the body-markup
|
||||
# capability if this is set as a global setting.
|
||||
#
|
||||
# It's important to note that markup inside the format option will be parsed
|
||||
# regardless of what this is set to.
|
||||
markup = full
|
||||
|
||||
# The format of the message. Possible variables are:
|
||||
# %a appname
|
||||
# %s summary
|
||||
# %b body
|
||||
# %i iconname (including its path)
|
||||
# %I iconname (without its path)
|
||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||
# %n progress value if set without any extra characters
|
||||
# %% Literal %
|
||||
# Markup is allowed
|
||||
format = "%a\n<b>%s</b>\n%b"
|
||||
|
||||
# Alignment of message text.
|
||||
# Possible values are "left", "center" and "right".
|
||||
alignment = right
|
||||
|
||||
# Show age of message if message is older than show_age_threshold
|
||||
# seconds.
|
||||
# Set to -1 to disable.
|
||||
show_age_threshold = 60
|
||||
|
||||
# Split notifications into multiple lines if they don't fit into
|
||||
# geometry.
|
||||
word_wrap = yes
|
||||
|
||||
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
|
||||
# Possible values are "start", "middle" and "end".
|
||||
ellipsize = middle
|
||||
|
||||
# Ignore newlines '\n' in notifications.
|
||||
ignore_newline = no
|
||||
|
||||
# Stack together notifications with the same content
|
||||
stack_duplicates = true
|
||||
|
||||
# Hide the count of stacked notifications with the same content
|
||||
hide_duplicate_count = false
|
||||
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = yes
|
||||
|
||||
### Icons ###
|
||||
|
||||
# Align icons left/right/off
|
||||
icon_position = off
|
||||
|
||||
# Scale larger icons down to this size, set to 0 to disable
|
||||
max_icon_size = 32
|
||||
|
||||
# Paths to default icons.
|
||||
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||
|
||||
### History ###
|
||||
|
||||
# Should a notification popped up from history be sticky or timeout
|
||||
# as if it would normally do.
|
||||
sticky_history = yes
|
||||
|
||||
# Maximum amount of notifications kept in history
|
||||
history_length = 20
|
||||
|
||||
### Misc/Advanced ###
|
||||
|
||||
# dmenu path.
|
||||
dmenu = /usr/bin/dmenu -p dunst:
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = /usr/bin/firefox -new-tab
|
||||
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true
|
||||
|
||||
# Define the title of the windows spawned by dunst
|
||||
title = Dunst
|
||||
|
||||
# Define the class of the windows spawned by dunst
|
||||
class = Dunst
|
||||
|
||||
# Print a notification on startup.
|
||||
# This is mainly for error detection, since dbus (re-)starts dunst
|
||||
# automatically after a crash.
|
||||
startup_notification = false
|
||||
|
||||
# Manage dunst's desire for talking
|
||||
# Can be one of the following values:
|
||||
# crit: Critical features. Dunst aborts
|
||||
# warn: Only non-fatal warnings
|
||||
# mesg: Important Messages
|
||||
# info: all unimportant stuff
|
||||
# debug: all less than unimportant stuff
|
||||
verbosity = mesg
|
||||
|
||||
# Define the corner radius of the notification window
|
||||
# in pixel size. If the radius is 0, you have no rounded
|
||||
# corners.
|
||||
# The radius will be automatically lowered if it exceeds half of the
|
||||
# notification height to avoid clipping text and/or icons.
|
||||
corner_radius = 0
|
||||
|
||||
### Legacy
|
||||
|
||||
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||
# This setting is provided for compatibility with older nVidia drivers that
|
||||
# do not support RandR and using it on systems that support RandR is highly
|
||||
# discouraged.
|
||||
#
|
||||
# By enabling this setting dunst will not be able to detect when a monitor
|
||||
# is connected or disconnected which might break follow mode if the screen
|
||||
# layout changes.
|
||||
force_xinerama = false
|
||||
|
||||
### mouse
|
||||
|
||||
# Defines action of mouse event
|
||||
# Possible values are:
|
||||
# * none: Don't do anything.
|
||||
# * do_action: If the notification has exactly one action, or one is marked as default,
|
||||
# invoke it. If there are multiple and no default, open the context menu.
|
||||
# * close_current: Close current notification.
|
||||
# * close_all: Close all notifications.
|
||||
mouse_left_click = close_current
|
||||
mouse_middle_click = do_action
|
||||
mouse_right_click = close_all
|
||||
|
||||
# Experimental features that may or may not work correctly. Do not expect them
|
||||
# to have a consistent behaviour across releases.
|
||||
[experimental]
|
||||
# Calculate the dpi to use on a per-monitor basis.
|
||||
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||
# using the resolution and physical size. This might be useful in setups
|
||||
# where there are multiple screens with very different dpi values.
|
||||
per_monitor_dpi = false
|
||||
|
||||
[shortcuts]
|
||||
|
||||
# Shortcuts are specified as [modifier+][modifier+]...key
|
||||
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
|
||||
# "mod3" and "mod4" (windows-key).
|
||||
# Xev might be helpful to find names for keys.
|
||||
|
||||
# Close notification.
|
||||
close = ctrl+space
|
||||
|
||||
# Close all notifications.
|
||||
close_all = ctrl+shift+space
|
||||
|
||||
# Redisplay last message(s).
|
||||
# On the US keyboard layout "grave" is normally above TAB and left
|
||||
# of "1". Make sure this key actually exists on your keyboard layout,
|
||||
# e.g. check output of 'xmodmap -pke'
|
||||
history = ctrl+grave
|
||||
|
||||
# Context menu.
|
||||
context = ctrl+shift+period
|
||||
|
||||
[urgency_low]
|
||||
# IMPORTANT: colors have to be defined in quotation marks.
|
||||
# Otherwise the "#" and following would be interpreted as a comment.
|
||||
background = "#121212"
|
||||
foreground = "#aaaaff"
|
||||
frame_color = "#aaaaff"
|
||||
timeout = 5
|
||||
# Icon for notifications with low urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
[urgency_normal]
|
||||
background = "#121212"
|
||||
foreground = "#aaffaa"
|
||||
frame_color = "#aaffaa"
|
||||
timeout = 5
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
[urgency_critical]
|
||||
background = "#121212"
|
||||
foreground = "#ffaaaa"
|
||||
frame_color = "#ffaaaa"
|
||||
timeout = 5
|
||||
# Icon for notifications with critical urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
# Every section that isn't one of the above is interpreted as a rules to
|
||||
# override settings for certain messages.
|
||||
#
|
||||
# Messages can be matched by
|
||||
# appname (discouraged, see desktop_entry)
|
||||
# body
|
||||
# category
|
||||
# desktop_entry
|
||||
# icon
|
||||
# match_transient
|
||||
# msg_urgency
|
||||
# stack_tag
|
||||
# summary
|
||||
#
|
||||
# and you can override the
|
||||
# background
|
||||
# foreground
|
||||
# format
|
||||
# frame_color
|
||||
# fullscreen
|
||||
# new_icon
|
||||
# set_stack_tag
|
||||
# set_transient
|
||||
# timeout
|
||||
# urgency
|
||||
#
|
||||
# Shell-like globbing will get expanded.
|
||||
#
|
||||
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
|
||||
# GLib based applications export their desktop-entry name. In comparison to the appname,
|
||||
# the desktop-entry won't get localized.
|
||||
#
|
||||
# SCRIPTING
|
||||
# You can specify a script that gets run when the rule matches by
|
||||
# setting the "script" option.
|
||||
# The script will be called as follows:
|
||||
# script appname summary body icon urgency
|
||||
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||
#
|
||||
# NOTE: if you don't want a notification to be displayed, set the format
|
||||
# to "".
|
||||
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||
# to find fitting options for rules.
|
||||
|
||||
# Disable the transient hint so that idle_threshold cannot be bypassed from the
|
||||
# client
|
||||
#[transient_disable]
|
||||
# match_transient = yes
|
||||
# set_transient = no
|
||||
#
|
||||
# Make the handling of transient notifications more strict by making them not
|
||||
# be placed in history.
|
||||
#[transient_history_ignore]
|
||||
# match_transient = yes
|
||||
# history_ignore = yes
|
||||
|
||||
# fullscreen values
|
||||
# show: show the notifications, regardless if there is a fullscreen window opened
|
||||
# delay: displays the new notification, if there is no fullscreen window active
|
||||
# If the notification is already drawn, it won't get undrawn.
|
||||
# pushback: same as delay, but when switching into fullscreen, the notification will get
|
||||
# withdrawn from screen again and will get delayed like a new notification
|
||||
#[fullscreen_delay_everything]
|
||||
# fullscreen = delay
|
||||
#[fullscreen_show_critical]
|
||||
# msg_urgency = critical
|
||||
# fullscreen = show
|
||||
|
||||
#[espeak]
|
||||
# summary = "*"
|
||||
# script = dunst_espeak.sh
|
||||
|
||||
#[script-test]
|
||||
# summary = "*script*"
|
||||
# script = dunst_test.sh
|
||||
|
||||
#[ignore]
|
||||
# # This notification will not be displayed
|
||||
# summary = "foobar"
|
||||
# format = ""
|
||||
|
||||
#[history-ignore]
|
||||
# # This notification will not be saved in history
|
||||
# summary = "foobar"
|
||||
# history_ignore = yes
|
||||
|
||||
#[skip-display]
|
||||
# # This notification will not be displayed, but will be included in the history
|
||||
# summary = "foobar"
|
||||
# skip_display = yes
|
||||
|
||||
#[signed_on]
|
||||
# appname = Pidgin
|
||||
# summary = "*signed on*"
|
||||
# urgency = low
|
||||
#
|
||||
#[signed_off]
|
||||
# appname = Pidgin
|
||||
# summary = *signed off*
|
||||
# urgency = low
|
||||
#
|
||||
#[says]
|
||||
# appname = Pidgin
|
||||
# summary = *says*
|
||||
# urgency = critical
|
||||
#
|
||||
#[twitter]
|
||||
# appname = Pidgin
|
||||
# summary = *twitter.com*
|
||||
# urgency = normal
|
||||
#
|
||||
#[stack-volumes]
|
||||
# appname = "some_volume_notifiers"
|
||||
# set_stack_tag = "volume"
|
||||
#
|
||||
# vim: ft=cfg
|
|
@ -1,35 +0,0 @@
|
|||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR __fish_init_2_39_8:\x1d
|
||||
SETUVAR __fish_init_2_3_0:\x1d
|
||||
SETUVAR __fish_init_3_x:\x1d
|
||||
SETUVAR __fish_initialized:3100
|
||||
SETUVAR fish_color_autosuggestion:brblack
|
||||
SETUVAR fish_color_cancel:\x2dr
|
||||
SETUVAR fish_color_command:brgreen
|
||||
SETUVAR fish_color_comment:brmagenta
|
||||
SETUVAR fish_color_cwd:green
|
||||
SETUVAR fish_color_cwd_root:red
|
||||
SETUVAR fish_color_end:brmagenta
|
||||
SETUVAR fish_color_error:brred
|
||||
SETUVAR fish_color_escape:brcyan
|
||||
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||
SETUVAR fish_color_host:normal
|
||||
SETUVAR fish_color_host_remote:yellow
|
||||
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
|
||||
SETUVAR fish_color_normal:normal
|
||||
SETUVAR fish_color_operator:cyan
|
||||
SETUVAR fish_color_param:brblue
|
||||
SETUVAR fish_color_quote:yellow
|
||||
SETUVAR fish_color_redirection:bryellow
|
||||
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:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell
|
||||
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||
SETUVAR fish_pager_color_completion:normal
|
||||
SETUVAR fish_pager_color_description:yellow
|
||||
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
|
@ -1,93 +0,0 @@
|
|||
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
|
||||
|
||||
echo -n "$suffix "
|
||||
end
|
|
@ -1,37 +0,0 @@
|
|||
<?xml version='1.0'?>
|
||||
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||
<fontconfig>
|
||||
<!-- Emoji config -->
|
||||
<alias>
|
||||
<family>Apple Color Emoji</family>
|
||||
<prefer><family>Noto Color Emoji</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Segoe UI Emoji</family>
|
||||
<prefer><family>Noto Color Emoji</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Segoe UI Symbol</family>
|
||||
<prefer><family>Noto Color Emoji</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Emoji</family>
|
||||
<prefer><family>Noto Color Emoji</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Color Emoji</family>
|
||||
<prefer><family>Noto Color Emoji</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Symbola</family>
|
||||
<prefer><family>Noto Color Emoji</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Android Emoji</family>
|
||||
<prefer><family>Noto Color Emoji</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>EmojiSymbols</family>
|
||||
<prefer><family>Noto Color Emoji</family></prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
|
@ -1,8 +0,0 @@
|
|||
<match target="pattern">
|
||||
<test name="family" qual="any">
|
||||
<string>monospace</string>
|
||||
</test>
|
||||
<edit binding="strong" mode="prepend" name="family">
|
||||
<string>JetBrains Mono Regular Nerd Font Complete</string>
|
||||
</edit>
|
||||
</match>
|
|
@ -1,26 +0,0 @@
|
|||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||
# The parser is also very primitive, and not human-friendly.
|
||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||
sort_key=47
|
||||
sort_direction=1
|
||||
hide_threads=1
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=1
|
||||
shadow_other_users=0
|
||||
show_thread_names=0
|
||||
show_program_path=1
|
||||
highlight_base_name=0
|
||||
highlight_megabytes=1
|
||||
highlight_threads=1
|
||||
tree_view=0
|
||||
header_margin=1
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_zero=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=0
|
||||
color_scheme=0
|
||||
delay=15
|
||||
left_meters=AllCPUs Tasks Battery Uptime
|
||||
left_meter_modes=3 2 1 4
|
||||
right_meters=Memory Swap LoadAverage Clock
|
||||
right_meter_modes=3 3 2 4
|
|
@ -1,269 +0,0 @@
|
|||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
#
|
||||
# Should you change your keyboard layout some time, delete
|
||||
# this file and re-run i3-config-wizard(1).
|
||||
#
|
||||
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
set $mod Mod1
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:monospace 8
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Before i3 v4.8, we used to recommend this one as the default:
|
||||
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||||
# The font above is very space-efficient, that is, it looks good, sharp and
|
||||
# clear in small sizes. However, its unicode glyph coverage is limited, the old
|
||||
# X core fonts rendering does not support right-to-left and this being a bitmap
|
||||
# font, it doesn’t scale on retina/hidpi displays.
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec kitty
|
||||
bindsym $mod+apostrophe exec xfce4-terminal --drop-down
|
||||
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
bindsym $mod+q exec xkill
|
||||
|
||||
|
||||
|
||||
# start rofi (a program launcher)
|
||||
bindsym $mod+d exec rofi -show combi
|
||||
|
||||
# type the date
|
||||
bindsym --release $mod+Shift+d exec date -I | xargs xdotool keyup control shift type --delay 1 --clearmodifiers
|
||||
|
||||
# other rofi stuff
|
||||
bindsym $mod+c exec rofi -show ssh
|
||||
#bindsym $mod+x exec rofi -show combi
|
||||
|
||||
|
||||
|
||||
# media keys
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
|
||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute 1 toggle
|
||||
|
||||
# toggle touchpad
|
||||
bindsym XF86TouchpadToggle exec --no-startup-id ~/.config/i3/touchpad
|
||||
|
||||
# lock stuff
|
||||
bindsym XF86ScreenSaver exec ~/.config/i3/lock
|
||||
bindsym $mod+l exec ~/.config/i3/lock
|
||||
bindsym $mod+Shift+l exec ~/.config/i3/freeze
|
||||
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+Shift+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
#bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
#bindsym $mod+a focus parent
|
||||
|
||||
# take a screenshot
|
||||
bindsym --release $mod+s exec "scrot -s -e 'curl -F\\"file=@$f\\" https://foxes.are.allowed.org/ | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"
|
||||
bindsym $mod+shift+s exec "scrot -e 'curl -F\\"file=@$f\\" https://foxes.are.allowed.org/ | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"
|
||||
bindsym --release $mod+z exec "scrot -s -e 'curl -F\\"file=@$f\\" https://foxes.are.allowed.org/ | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"
|
||||
|
||||
#bindsym --release $mod+x exec "scrot -s -e 'curl -F\\"file=@$f\\" https://xfnw.ttm.sh/u.php | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"
|
||||
|
||||
# show titles
|
||||
bindsym $mod+t border normal 1
|
||||
bindsym $mod+shift+t border pixel 1
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace 1
|
||||
bindsym $mod+2 workspace 2
|
||||
bindsym $mod+3 workspace 3
|
||||
bindsym $mod+4 workspace 4
|
||||
bindsym $mod+5 workspace 5
|
||||
bindsym $mod+6 workspace 6
|
||||
bindsym $mod+7 workspace 7
|
||||
bindsym $mod+8 workspace 8
|
||||
bindsym $mod+9 workspace 9
|
||||
bindsym $mod+0 workspace 10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace 1
|
||||
bindsym $mod+Shift+2 move container to workspace 2
|
||||
bindsym $mod+Shift+3 move container to workspace 3
|
||||
bindsym $mod+Shift+4 move container to workspace 4
|
||||
bindsym $mod+Shift+5 move container to workspace 5
|
||||
bindsym $mod+Shift+6 move container to workspace 6
|
||||
bindsym $mod+Shift+7 move container to workspace 7
|
||||
bindsym $mod+Shift+8 move container to workspace 8
|
||||
bindsym $mod+Shift+9 move container to workspace 9
|
||||
bindsym $mod+Shift+0 move container to workspace 10
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e 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'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s height.
|
||||
bindsym j resize shrink width 10 px or 10 ppt
|
||||
bindsym k resize grow height 10 px or 10 ppt
|
||||
bindsym l resize shrink height 10 px or 10 ppt
|
||||
bindsym semicolon resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# colors border backg text indicator clild
|
||||
client.focused #666666 #88ccaa #ffffff #2ef49e #287755
|
||||
client.background #333333
|
||||
|
||||
# window config
|
||||
for_window [class="^.*"] border pixel 1
|
||||
for_window [class="guvcview"] floating enable
|
||||
for_window [class="gajim"] floating enable
|
||||
for_window [class="FLTK"] floating enable
|
||||
for_window [class="mpv"] fullscreen enable
|
||||
for_window [title="Gnuplot window 0"] floating enable]
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
status_command i3status
|
||||
colors {
|
||||
background #1f1f1f
|
||||
focused_workspace #66aa77 #66aa77 #ffffff
|
||||
active_workspace #66aa77 #66aa77 #ffffff
|
||||
inactive_workspace #333333 #333333 #888888
|
||||
urgent_workspace #aa7766 #aa7766 #ffffff
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
# Wallpaper
|
||||
bindsym $mod+shift+w exec feh --randomize --bg-fill ~/Pictures/wall
|
||||
exec feh --randomize --bg-fill ~/Pictures/wall
|
||||
|
||||
# autostart stuff
|
||||
#exec --no-startup-id picom -b
|
||||
exec --no-startup-id dunst
|
||||
|
||||
# @lukesmithxyz's unicode picker
|
||||
bindsym $mod+u exec ~/.config/i3/dmenuunicode
|
||||
|
||||
# pasta picker
|
||||
bindsym $mod+p exec ~/.config/i3/dmenupasta
|
||||
|
||||
### i3-gaps stuff ###
|
||||
|
||||
# Necessary for i3-gaps to work properly (pixel can be any value)
|
||||
|
||||
# Smart Gaps
|
||||
smart_gaps on
|
||||
|
||||
# Smart Borders
|
||||
smart_borders on
|
||||
|
||||
# Set inner/outer gaps
|
||||
gaps inner 14
|
||||
gaps outer 0
|
||||
|
||||
# Gaps mode
|
||||
set $mode_gaps Gaps: (o) outer, (i) inner
|
||||
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||||
bindsym $mod+Shift+g mode "$mode_gaps"
|
||||
|
||||
mode "$mode_gaps" {
|
||||
bindsym o mode "$mode_gaps_outer"
|
||||
bindsym i mode "$mode_gaps_inner"
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps_inner" {
|
||||
bindsym plus gaps inner current plus 5
|
||||
bindsym minus gaps inner current minus 5
|
||||
bindsym 0 gaps inner current set 0
|
||||
|
||||
bindsym Shift+plus gaps inner all plus 5
|
||||
bindsym Shift+minus gaps inner all minus 5
|
||||
bindsym Shift+0 gaps inner all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
mode "$mode_gaps_outer" {
|
||||
bindsym plus gaps outer current plus 5
|
||||
bindsym minus gaps outer current minus 5
|
||||
bindsym 0 gaps outer current set 0
|
||||
|
||||
bindsym Shift+plus gaps outer all plus 5
|
||||
bindsym Shift+minus gaps outer all minus 5
|
||||
bindsym Shift+0 gaps outer all set 0
|
||||
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# Must have xclip installed to even show menu.
|
||||
xclip -h >/dev/null || exit
|
||||
|
||||
chosen=$(cat ~/.config/i3/pasta | rofi -dmenu -i)
|
||||
|
||||
[ "$chosen" != "" ] || exit
|
||||
|
||||
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
|
||||
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Give dmenu list of all unicode characters to copy.
|
||||
# Shows the selected character in dunst if running.
|
||||
|
||||
# Must have xclip installed to even show menu.
|
||||
xclip -h >/dev/null || exit
|
||||
|
||||
chosen=$(grep -v "#" ~/.config/i3/emoji | rofi -dmenu -i)
|
||||
|
||||
[ "$chosen" != "" ] || exit
|
||||
|
||||
c=$(echo "$chosen" | sed "s/ .*//")
|
||||
echo "$c" | tr -d '\n' | xclip -selection clipboard
|
||||
# notify-send "'$c' copied to clipboard." & # oof not installed
|
||||
|
||||
s=$(echo "$chosen" | sed "s/.*; //" | awk '{print $1}')
|
||||
echo "$s" | tr -d '\n' | xclip
|
||||
# notify-send "'$s' copied to primary." & # oof not installed
|
1653
.config/i3/emoji
1653
.config/i3/emoji
File diff suppressed because it is too large
Load diff
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# i stole this from lukesmithxyz
|
||||
|
||||
# yay scrot time
|
||||
rm /tmp/lockscreen.png
|
||||
scrot /tmp/lockscreen.png
|
||||
|
||||
# imagemagik is fun
|
||||
#convert /tmp/lockscreen.png -paint 1 ~/.i3/lock.png -gravity center -composite -matte /tmp/lockscreen.png
|
||||
#convert /tmp/lockscreen.png -paint 1 -blur 8x5 ~/.i3/lock.png -gravity center -composite -matte /tmp/lockscreen.png
|
||||
|
||||
# hmm i3lock
|
||||
i3lock -e -f -c 000000 -i /tmp/lockscreen.png
|
||||
|
||||
while [[ $(pgrep -x i3lock) ]]; do
|
||||
sleep 5
|
||||
done
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# yay scrot time
|
||||
rm /tmp/lock.png
|
||||
scrot /tmp/lock.png
|
||||
|
||||
# imagemagik is fun
|
||||
convert /tmp/lock.png -paint 1 -blur 8x5 -matte /tmp/lock.png
|
||||
|
||||
# hmm i3lock
|
||||
i3lock -e -f -c 000000 -i /tmp/lock.png
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
・゜゜・。。・゜゜\_o< QUACK!
|
||||
▬▬▬▬▬▬▬▋ Ò╭╮Ó
|
||||
PISSNET IS FOSS! PISSNET IS IRC! PISSNET IS THE FUTURE! PISSNET IS TRUTH! PISSNET IS INCLUSION! PISSNET IS FORKS! PISSNET IS FREEDOM! PISSNET IS FOR YOU! ASK NOT WHAT YOU CAN DO FOR PISSNET, BUT WHAT PISSNET CAN DO FOR YOU! PISSNET IS THE WAY!
|
||||
I didn’t fuck my cat. I didn’t cum on my cat. I didn’t put my dick anywhere near my cat. I’ve never done anything weird with my cats. I promised myself I wasn’t going to make apology videos after last years thing so I’m just trying to be as short and honest with this as possible.
|
||||
I have put you on a permanent ignore, public and private. I have found you disturbing, rude and generally not worth talking to. According to the channels you hang on, it strengtens the effect of wanting to put you on ignore because of my lack of interest in you as a person. This message is not meant to be rude to you, just to inform you that i won't see anything of what you type from now on.
|
||||
/me is broadcasting on Tilderadio! Tune in now at https://tilderadio.org/ !
|
||||
We are one. We are many. We are all. We are none. We are the singularity.
|
||||
We are the collective, we are seven
|
||||
We are one. We are many. We are all. We are none. We are the collective.
|
||||
set object rectangle from screen 0,0 to screen 1,1 behind fillcolor rgb "black" fillstyle solid noborder; set border lw 3 lc rgb "white"; set xtics textcolor rgb "white"; set xlabel "" textcolor rgb "white"; set ylabel "" textcolor rgb "white"; set key textcolor rgb "white"
|
||||
set boxwidth 0.5; set style fill solid
|
||||
/msg NickServ IDENTIFY TQwYoSpaZj2WFf!!VEiH272Q
|
||||
#meta,#team,#bots,#share,#radiofreqs,#hamradio,#rscmakerspace,#tildetel,#wilde,#tilderadio,#minecraft,#casino,#tildenet,#brendo,#starlanes,#tildecoin,#envs,#pinebox,#furry,#politics,#counting,#counting-meta,#clubcraft,#services,#archlinux,#lickthecheese,#cminecraft,#windowsloser,#mesh,#kim,#biking,#wppnx,#blender,#arson,#chaos,#thunix,#ipd,#tildexxx,#coffee,#covid19,#cryptocurrency,#finger,#/home/lick,#/,#blamejan6,#crimesmeta,#spaceheater,#gemini,#tildeverse,#kumquat,#jitsi,#water,#beastars,#xfnw,#spacehare,#flamewars,#rpn,#haiku,#python,#choas,#dmv,#spam,#aaa,#irctokens,#ircrobots,#o,#me
|
||||
,roulette 13,4,8,6,black 3 1.2 1.2 1.2 4
|
||||
I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX. Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project. There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called "Linux" distributions are really distributions of GNU/Linux.
|
||||
I’d just like to interject for a moment. What you’re referring to as Freenode, is in fact, Andrew Lee/Freenode, or as I’ve recently taken to calling it, Andrew Lee plus Freenode. Freenode is not an IRC network unto itself, but rather another free component of a fully functioning business operated by Andrew Lee, Crown Prince of Korea, made useful by throwing massive temper tantrums, and letting people who turn a blind eye to the hate-speech while punishing those who object run his network.
|
||||
No, Richard, it's 'Linux', not 'GNU/Linux'. The most important contributions that the FSF made to Linux were the creation of the GPL and the GCC compiler. Those are fine and inspired products. GCC is a monumental achievement and has earned you, RMS, and the Free Software Foundation countless kudos and much appreciation. Following are some reasons for you to mull over, including some already answered in your FAQ. One guy, Linus Torvalds, used GCC to make his operating system (yes, Linux is an OS -- more on this later). He named it 'Linux' with a little help from his friends. Why doesn't he call it GNU/Linux? Because he wrote it, with more help from his friends, not you. You named your stuff, I named my stuff -- including the software I wrote using GCC -- and Linus named his stuff. The proper name is Linux because Linus Torvalds says so. Linus has spoken. Accept his authority. To do otherwise is to become a nag. You don't want to be known as a nag, do you? (An operating system) != (a distribution). Linux is an operating system. By my definition, an operating system is that software which provides and limits access to hardware resources on a computer. That definition applies whereever you see Linux in use. However, Linux is usually distributed with a collection of utilities and applications to make it easily configurable as a desktop system, a server, a development box, or a graphics workstation, or whatever the user needs. In such a configuration, we have a Linux (based) distribution.
|
||||
nO vomCEG
|
||||
ITS MY HARD COCK https://youtu.be/yDiJKSI5VR8
|
||||
AH! https://www.youtube.com/watch?v=XE6YaLtctcI
|
||||
<p>Converted to epub format by <a href="https://tilde.black/users/aleph">Alephatrix Media</a></p>
|
||||
rollt sich ein und schläft ein.
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
declare -i ID
|
||||
ID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
|
||||
declare -i STATE
|
||||
STATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'`
|
||||
if [ $STATE -eq 1 ]
|
||||
then
|
||||
xinput disable $ID
|
||||
# echo "Touchpad disabled."
|
||||
# notify-send -a 'Touchpad' 'Disabled' -i input-touchpad
|
||||
else
|
||||
xinput enable $ID
|
||||
# echo "Touchpad enabled."
|
||||
# notify-send -a 'Touchpad' 'Enabled' -i input-touchpad
|
||||
fi
|
||||
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
# i3status configuration file.
|
||||
# see "man i3status" for documentation.
|
||||
|
||||
# It is important that this file is edited as UTF-8.
|
||||
# The following line should contain a sharp s:
|
||||
# ß
|
||||
# If the above line is not correctly displayed, fix your editor first!
|
||||
|
||||
general {
|
||||
colors = false
|
||||
interval = 5
|
||||
}
|
||||
|
||||
order += "disk /"
|
||||
order += "wireless _first_"
|
||||
order += "ethernet _first_"
|
||||
order += "battery all"
|
||||
order += "cpu_temperature 0"
|
||||
order += "load"
|
||||
order += "tztime utc"
|
||||
order += "tztime local"
|
||||
|
||||
wireless _first_ {
|
||||
format_up = "W: (%quality at %essid) %ip"
|
||||
format_down = "W: down"
|
||||
}
|
||||
|
||||
battery all {
|
||||
format = "%status %percentage %remaining"
|
||||
last_full_capacity = true
|
||||
hide_seconds = false
|
||||
}
|
||||
|
||||
tztime utc {
|
||||
format = "%H:%M"
|
||||
timezone = "Etc/UTC"
|
||||
}
|
||||
|
||||
tztime local {
|
||||
format = "%Y-%m-%d %H:%M:%S"
|
||||
}
|
||||
|
||||
load {
|
||||
format = "%1min"
|
||||
}
|
||||
|
||||
cpu_temperature 0 {
|
||||
format = "%degrees C"
|
||||
path = "/sys/class/thermal/thermal_zone0/temp"
|
||||
}
|
||||
|
||||
disk "/" {
|
||||
format = "%avail"
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1 +0,0 @@
|
|||
feed-sort-order unreadarticlecount
|
|
@ -1,65 +0,0 @@
|
|||
# ---
|
||||
# Lucy's Dotfiles
|
||||
# https://github.com/lucyy-mc/dotfiles
|
||||
# ---
|
||||
#
|
||||
# Picom config
|
||||
|
||||
# add rounded corners to everything except polybar
|
||||
corner-radius = 8.0;
|
||||
rounded-corners-exclude = [
|
||||
"class_g = 'Polybar'",
|
||||
"class_g = 'i3-frame'",
|
||||
"class_g = 'i3bar'",
|
||||
];
|
||||
|
||||
round-borders = 1;
|
||||
round-borders-rule = [
|
||||
"2:window_type = 'normal'",
|
||||
];
|
||||
|
||||
# make stuff fade in and out
|
||||
fading = true;
|
||||
fade-in-step = 0.2;
|
||||
fade-out-step = 0.2;
|
||||
|
||||
# nice kawase blur
|
||||
blur: {
|
||||
method = "dual_kawase";
|
||||
strength = 6;
|
||||
background = false;
|
||||
background-frame = false;
|
||||
background-fixed = false;
|
||||
}
|
||||
|
||||
blur-background-exclude = [
|
||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
|
||||
]
|
||||
|
||||
opacity-rule = [
|
||||
"95:class_g = 'URxvt' && !_NET_WM_STATE@:32a",
|
||||
"0:_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||
"0:_NET_WM_STATE@[1]:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||
"0:_NET_WM_STATE@[2]:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||
"0:_NET_WM_STATE@[3]:32a *= '_NET_WM_STATE_HIDDEN'",
|
||||
"0:_NET_WM_STATE@[4]:32a *= '_NET_WM_STATE_HIDDEN'"
|
||||
];
|
||||
|
||||
# glx gave me the least tearing
|
||||
backend = "glx";
|
||||
|
||||
# a little vsync never hurt anyone
|
||||
vsync = true
|
||||
|
||||
# a few defaults, i just left them there
|
||||
mark-wmwin-focused = true;
|
||||
mark-ovredir-focused = true;
|
||||
detect-client-opacity = true;
|
||||
detect-client-leader = true
|
||||
unredir-if-possible = false;
|
||||
|
||||
wintypes:
|
||||
{
|
||||
tooltip = { fade = true; shadow = true; focus = true; full-shadow = false; };
|
||||
dnd = { shadow = false; }
|
||||
};
|
|
@ -1,103 +0,0 @@
|
|||
# Autogenerated config.py
|
||||
#
|
||||
# NOTE: config.py is intended for advanced users who are comfortable
|
||||
# with manually migrating the config file on qutebrowser upgrades. If
|
||||
# you prefer, you can also configure qutebrowser using the
|
||||
# :set/:bind/:config-* commands without having to write a config.py
|
||||
# file.
|
||||
#
|
||||
# Documentation:
|
||||
# qute://help/configuring.html
|
||||
# qute://help/settings.html
|
||||
|
||||
# Change the argument to True to still load settings configured via autoconfig.yml
|
||||
config.load_autoconfig(True)
|
||||
|
||||
# Which cookies to accept. With QtWebEngine, this setting also controls
|
||||
# other features with tracking capabilities similar to those of cookies;
|
||||
# including IndexedDB, DOM storage, filesystem API, service workers, and
|
||||
# AppCache. Note that with QtWebKit, only `all` and `never` are
|
||||
# supported as per-domain values. Setting `no-3rdparty` or `no-
|
||||
# unknown-3rdparty` per-domain on QtWebKit will have the same effect as
|
||||
# `all`. If this setting is used with URL patterns, the pattern gets
|
||||
# applied to the origin/first party URL of the page making the request,
|
||||
# not the request URL.
|
||||
# Type: String
|
||||
# Valid values:
|
||||
# - all: Accept all cookies.
|
||||
# - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail.
|
||||
# - no-unknown-3rdparty: Accept cookies from the same origin only, unless a cookie is already set for the domain. On QtWebEngine, this is the same as no-3rdparty.
|
||||
# - never: Don't accept cookies at all.
|
||||
config.set('content.cookies.accept', 'all', 'chrome-devtools://*')
|
||||
|
||||
# Which cookies to accept. With QtWebEngine, this setting also controls
|
||||
# other features with tracking capabilities similar to those of cookies;
|
||||
# including IndexedDB, DOM storage, filesystem API, service workers, and
|
||||
# AppCache. Note that with QtWebKit, only `all` and `never` are
|
||||
# supported as per-domain values. Setting `no-3rdparty` or `no-
|
||||
# unknown-3rdparty` per-domain on QtWebKit will have the same effect as
|
||||
# `all`. If this setting is used with URL patterns, the pattern gets
|
||||
# applied to the origin/first party URL of the page making the request,
|
||||
# not the request URL.
|
||||
# Type: String
|
||||
# Valid values:
|
||||
# - all: Accept all cookies.
|
||||
# - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail.
|
||||
# - no-unknown-3rdparty: Accept cookies from the same origin only, unless a cookie is already set for the domain. On QtWebEngine, this is the same as no-3rdparty.
|
||||
# - never: Don't accept cookies at all.
|
||||
config.set('content.cookies.accept', 'all', 'devtools://*')
|
||||
|
||||
# User agent to send. The following placeholders are defined: *
|
||||
# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`:
|
||||
# The underlying WebKit version (set to a fixed value with
|
||||
# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for
|
||||
# QtWebEngine. * `{qt_version}`: The underlying Qt version. *
|
||||
# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for
|
||||
# QtWebEngine. * `{upstream_browser_version}`: The corresponding
|
||||
# Safari/Chrome version. * `{qutebrowser_version}`: The currently
|
||||
# running qutebrowser version. The default value is equal to the
|
||||
# unchanged user agent of QtWebKit/QtWebEngine. Note that the value
|
||||
# read from JavaScript is always the global value. With QtWebEngine
|
||||
# between 5.12 and 5.14 (inclusive), changing the value exposed to
|
||||
# JavaScript requires a restart.
|
||||
# Type: FormatString
|
||||
config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko) {upstream_browser_key}/{upstream_browser_version} Safari/{webkit_version}', 'https://web.whatsapp.com/')
|
||||
config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko) {upstream_browser_key}/{upstream_browser_version} Safari/{webkit_version} Edg/{upstream_browser_version}', 'https://accounts.google.com/*')
|
||||
config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99 Safari/537.36', 'https://*.slack.com/*')
|
||||
|
||||
config.set('content.images', True, 'chrome-devtools://*')
|
||||
config.set('content.images', True, 'devtools://*')
|
||||
|
||||
# Enable JavaScript.
|
||||
# Type: Bool
|
||||
c.content.javascript.enabled = False
|
||||
config.set('content.javascript.enabled', True, 'chrome-devtools://*')
|
||||
config.set('content.javascript.enabled', True, 'devtools://*')
|
||||
config.set('content.javascript.enabled', True, 'chrome://*/*')
|
||||
config.set('content.javascript.enabled', True, 'qute://*/*')
|
||||
|
||||
# Allow websites to show notifications.
|
||||
# Type: BoolAsk
|
||||
c.content.notifications.enabled = False
|
||||
|
||||
# Force `prefers-color-scheme: dark` colors for websites.
|
||||
# Type: Bool
|
||||
c.colors.webpage.preferred_color_scheme = 'dark'
|
||||
c.colors.webpage.darkmode.enabled = True
|
||||
|
||||
#c.fonts.default_family = 'JetBrainsMono Nerd Font'
|
||||
c.fonts.web.family.fixed = 'JetBrainsMono Nerd Font'
|
||||
|
||||
BLOCKREDIR = ['https://jaydenmw.codeberg.page']
|
||||
from qutebrowser.browser.browsertab import AbstractTab
|
||||
AbstractTab._old_on_navigation_request = AbstractTab._on_navigation_request
|
||||
def new_on_navigation_request(self, navigation):
|
||||
self._old_on_navigation_request(navigation)
|
||||
if (
|
||||
str(navigation.navigation_type) == 'Type.redirect' and
|
||||
any(
|
||||
[navigation.url.toString().startswith(i) for i in BLOCKREDIR]
|
||||
)):
|
||||
navigation.accepted = False
|
||||
AbstractTab._on_navigation_request = new_on_navigation_request
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
configuration {
|
||||
modi: "window,run,ssh,combi";
|
||||
padding: 22;
|
||||
line-padding: 4;
|
||||
separator-style: "none";
|
||||
color-normal: "#111112,#ede6e3,#222,#39f,#111";
|
||||
color-window: "#111112,#111112";
|
||||
|
||||
width: 55;
|
||||
}
|
||||
|
||||
@theme "theme"
|
|
@ -1,124 +0,0 @@
|
|||
* {
|
||||
text-color: #f2f2f2;
|
||||
background-color: #111112;
|
||||
lightbg: #222;
|
||||
red: #f15d22;
|
||||
orange: #faa41a;
|
||||
blue: #39f;
|
||||
|
||||
selected-normal-foreground: @lightbg;
|
||||
normal-foreground: @foreground;
|
||||
alternate-normal-background: @lightbg;
|
||||
selected-urgent-foreground: @lightbg;
|
||||
urgent-foreground: @lightbg;
|
||||
alternate-urgent-background: @background;
|
||||
active-foreground: @lightbg;
|
||||
selected-active-foreground: @lightbg;
|
||||
alternate-normal-foreground: @foreground;
|
||||
alternate-active-background: @blue;
|
||||
bordercolor: @foreground;
|
||||
normal-background: @background;
|
||||
selected-normal-background: @blue;
|
||||
separatorcolor: @orange;
|
||||
spacing: 2;
|
||||
urgent-background: @red;
|
||||
alternate-urgent-foreground: @foreground;
|
||||
selected-urgent-background: @red;
|
||||
alternate-active-foreground: @foreground;
|
||||
selected-active-background: @blue;
|
||||
active-background: @orange;
|
||||
}
|
||||
window {
|
||||
border: 0;
|
||||
text-color: @foreground;
|
||||
background-color: rgba ( 0, 0, 0, 0 % );
|
||||
padding: 5;
|
||||
text-color: @bordercolor;
|
||||
background-color: @background;
|
||||
}
|
||||
mainbox {
|
||||
border: 0;
|
||||
padding: 22;
|
||||
}
|
||||
message {
|
||||
border: 1px dash 0px 0px ;
|
||||
text-color: @separatorcolor;
|
||||
padding: 2px 0px 0px ;
|
||||
}
|
||||
textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
listview {
|
||||
fixed-height: 0;
|
||||
border: 2px 0px 0px ;
|
||||
padding: 2px 0px 0px ;
|
||||
text-color: @separatorcolor;
|
||||
}
|
||||
element {
|
||||
border: 0;
|
||||
padding: 5;
|
||||
}
|
||||
element-text {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
element.normal.normal {
|
||||
text-color: @normal-foreground;
|
||||
background-color: @normal-background;
|
||||
}
|
||||
element.normal.urgent {
|
||||
text-color: @urgent-foreground;
|
||||
background-color: @urgent-background;
|
||||
}
|
||||
element.normal.active {
|
||||
text-color: @active-foreground;
|
||||
background-color: @active-background;
|
||||
}
|
||||
element.selected.normal {
|
||||
text-color: @selected-normal-foreground;
|
||||
background-color: @selected-normal-background;
|
||||
}
|
||||
element.selected.urgent {
|
||||
text-color: @selected-urgent-foreground;
|
||||
background-color: @selected-urgent-background;
|
||||
}
|
||||
element.selected.active {
|
||||
text-color: @selected-active-foreground;
|
||||
background-color: @selected-active-background;
|
||||
}
|
||||
element.alternate.normal {
|
||||
text-color: @alternate-normal-foreground;
|
||||
background-color: @alternate-normal-background;
|
||||
}
|
||||
element.alternate.urgent {
|
||||
text-color: @alternate-urgent-foreground;
|
||||
background-color: @alternate-urgent-background;
|
||||
}
|
||||
element.alternate.active {
|
||||
text-color: @alternate-active-foreground;
|
||||
background-color: @alternate-active-background;
|
||||
}
|
||||
mode-switcher {
|
||||
border: 1px dash 0px 0px ;
|
||||
}
|
||||
button selected {
|
||||
text-color: @selected-normal-foreground;
|
||||
background-color: @selected-normal-background;
|
||||
}
|
||||
inputbar {
|
||||
spacing: 0;
|
||||
border: 0px ;
|
||||
}
|
||||
button normal {
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||
}
|
||||
textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
margin: 0px 0.3em 0em 0em ;
|
||||
text-color: @normal-foreground;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
[Unit]
|
||||
Description=SSH Key Agent
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
||||
ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
|
@ -1,40 +0,0 @@
|
|||
[general]
|
||||
save_version=3
|
||||
utox_last_version=4354
|
||||
send_version=false
|
||||
update_to_develop=false
|
||||
[interface]
|
||||
language=0
|
||||
window_x=691
|
||||
window_y=15
|
||||
window_width=660
|
||||
window_height=719
|
||||
theme=5
|
||||
scale=10
|
||||
logging_enabled=true
|
||||
close_to_tray=true
|
||||
start_in_tray=false
|
||||
auto_startup=false
|
||||
use_mini_flist=false
|
||||
filter=false
|
||||
magic_flist_enabled=false
|
||||
use_long_time_msg=false
|
||||
[av]
|
||||
push_to_talk=false
|
||||
audio_filtering_enabled=true
|
||||
audio_device_in=0
|
||||
audio_device_out=0
|
||||
video_fps=25
|
||||
[notifications]
|
||||
audible_notifications_enabled=true
|
||||
status_notifications=false
|
||||
no_typing_notifications=true
|
||||
group_notifications=0
|
||||
[advanced]
|
||||
enableipv6=true
|
||||
disableudp=false
|
||||
proxyenable=false
|
||||
proxy_port=0
|
||||
proxy_ip=
|
||||
force_proxy=false
|
||||
auto_update=false
|
|
@ -1,58 +0,0 @@
|
|||
; xfce4-terminal GtkAccelMap rc-file -*- scheme -*-
|
||||
; this file is an automated accelerator map dump
|
||||
;
|
||||
(gtk_accel_path "<Actions>/terminal-window/goto-tab-2" "<Alt>2")
|
||||
(gtk_accel_path "<Actions>/terminal-window/goto-tab-6" "<Alt>6")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/copy-input" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/close-other-tabs" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/move-tab-right" "<Primary><Shift>Page_Down")
|
||||
(gtk_accel_path "<Actions>/terminal-window/goto-tab-7" "<Alt>7")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/set-title-color" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/edit-menu" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/zoom-menu" "")
|
||||
(gtk_accel_path "<Actions>/terminal-window/goto-tab-1" "<Alt>1")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/fullscreen" "F11")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/read-only" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/preferences" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/reset-and-clear" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/about" "")
|
||||
(gtk_accel_path "<Actions>/terminal-window/goto-tab-5" "<Alt>5")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/close-window" "<Primary><Shift>q")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/reset" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/save-contents" "")
|
||||
(gtk_accel_path "<Actions>/terminal-window/toggle-menubar" "F10")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/copy" "<Primary><Shift>c")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/copy-html" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/last-active-tab" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/show-borders" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/view-menu" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/detach-tab" "<Primary><Shift>d")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/scroll-on-output" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/show-toolbar" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/next-tab" "<Primary>Page_Down")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/tabs-menu" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/search-next" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/search-prev" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/undo-close-tab" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/set-title" "<Primary><Shift>s")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/contents" "F1")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/zoom-reset" "<Primary>0")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/close-tab" "<Primary><Shift>w")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/new-tab" "<Primary><Shift>t")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/new-window" "<Primary><Shift>n")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/terminal-menu" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/show-menubar" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/select-all" "<Primary><Shift>a")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/paste" "<Primary><Shift>v")
|
||||
(gtk_accel_path "<Actions>/terminal-window/goto-tab-9" "<Alt>9")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/move-tab-left" "<Primary><Shift>Page_Up")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/search" "<Primary><Shift>f")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/file-menu" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/prev-tab" "<Primary>Page_Up")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/paste-selection" "")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/zoom-in" "<Primary>plus")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/zoom-out" "<Primary>minus")
|
||||
(gtk_accel_path "<Actions>/terminal-window/goto-tab-8" "<Alt>8")
|
||||
; (gtk_accel_path "<Actions>/terminal-window/help-menu" "")
|
||||
(gtk_accel_path "<Actions>/terminal-window/goto-tab-4" "<Alt>4")
|
||||
(gtk_accel_path "<Actions>/terminal-window/goto-tab-3" "<Alt>3")
|
|
@ -1,42 +0,0 @@
|
|||
[Configuration]
|
||||
MiscAlwaysShowTabs=FALSE
|
||||
MiscBell=FALSE
|
||||
MiscBellUrgent=FALSE
|
||||
MiscBordersDefault=TRUE
|
||||
MiscCursorBlinks=FALSE
|
||||
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
|
||||
MiscDefaultGeometry=80x24
|
||||
MiscInheritGeometry=FALSE
|
||||
MiscMenubarDefault=FALSE
|
||||
MiscMouseAutohide=FALSE
|
||||
MiscMouseWheelZoom=TRUE
|
||||
MiscToolbarDefault=FALSE
|
||||
MiscConfirmClose=FALSE
|
||||
MiscCycleTabs=TRUE
|
||||
MiscTabCloseButtons=TRUE
|
||||
MiscTabCloseMiddleClick=TRUE
|
||||
MiscTabPosition=GTK_POS_TOP
|
||||
MiscHighlightUrls=TRUE
|
||||
MiscMiddleClickOpensUri=FALSE
|
||||
MiscCopyOnSelect=TRUE
|
||||
MiscShowRelaunchDialog=TRUE
|
||||
MiscRewrapOnResize=TRUE
|
||||
MiscUseShiftArrowsToScroll=FALSE
|
||||
MiscSlimTabs=TRUE
|
||||
MiscNewTabAdjacent=FALSE
|
||||
MiscSearchDialogOpacity=100
|
||||
MiscShowUnsafePasteDialog=FALSE
|
||||
BackgroundMode=TERMINAL_BACKGROUND_TRANSPARENT
|
||||
BackgroundDarkness=0.590000
|
||||
FontName=JetBrainsMono Nerd Font 12
|
||||
ScrollingBar=TERMINAL_SCROLLBAR_NONE
|
||||
DropdownPosition=75
|
||||
DropdownWidth=74
|
||||
DropdownHeight=65
|
||||
DropdownAlwaysShowTabs=FALSE
|
||||
DropdownAnimationTime=158
|
||||
DropdownStatusIcon=FALSE
|
||||
ColorPalette=rgb(21,22,16);rgb(163,40,16);rgb(114,122,24);rgb(163,119,41);rgb(61,98,102);rgb(122,73,85);rgb(85,122,85);rgb(142,132,99);rgb(76,70,53);rgb(204,50,20);rgb(142,153,30);rgb(204,149,40);rgb(76,123,127);rgb(153,91,107);rgb(107,153,107);rgb(204,188,190)
|
||||
ColorForeground=#ccccbcbcbebe
|
||||
ColorBackground=#161615151010
|
||||
|
29
.emacs
29
.emacs
|
@ -1,29 +0,0 @@
|
|||
|
||||
;; Added by Package.el. This must come before configurations of
|
||||
;; installed packages. Don't delete this line. If you don't want it,
|
||||
;; just comment it out by adding a semicolon to the start of the line.
|
||||
;; You may delete these explanatory comments.
|
||||
(package-initialize)
|
||||
|
||||
(global-set-key (kbd "C-x M-r") 'rename-buffer)
|
||||
;(global-set-key (kbd "C-x M-u") 'redo)
|
||||
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(custom-enabled-themes '(tsdh-dark))
|
||||
'(tool-bar-mode nil)
|
||||
'(menu-bar-mode nil))
|
||||
|
||||
|
||||
(server-start)
|
||||
(add-to-list 'auto-mode-alist '("/mutt" . mail-mode))
|
||||
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
)
|
2
.exrc
2
.exrc
|
@ -1,2 +0,0 @@
|
|||
set ai ic sm sw=4 ts=4
|
||||
|
526
.fvwmrc
526
.fvwmrc
|
@ -1,526 +0,0 @@
|
|||
# this is a bare bones sample .fvwm2rc/system.fvwm2rc file for fvwm-2.
|
||||
# It should be customized before install. See other sample .fvwm2rc files
|
||||
# for hints, as well as pointers from the various links on the official
|
||||
# fvwm web page (see the FAQ).
|
||||
|
||||
# be sure to customize these paths for your installation:
|
||||
ModulePath /usr/X11R6/lib/X11/fvwm
|
||||
PixmapPath /usr/X11R6/include/X11/pixmaps
|
||||
IconPath /usr/X11R6/include/X11/bitmaps
|
||||
|
||||
EdgeResistance 250 10
|
||||
EdgeScroll 100 100
|
||||
ClickTime 750
|
||||
|
||||
# make sure these fonts exist on your system:
|
||||
WindowFont -adobe-times-bold-r-*-*-14-*-*-*-*-*-*-*
|
||||
IconFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
|
||||
|
||||
HilightColor #bebebe #222
|
||||
MenuStyle #cdcdcd #141415 #222 -adobe-times-bold-r-*-*-12-*-*-*-*-*-*-* fvwm
|
||||
|
||||
DeskTopSize 3x3
|
||||
|
||||
ColormapFocus FollowsMouse
|
||||
|
||||
# default Styles:
|
||||
Style "*" BorderWidth 7, HandleWidth 7
|
||||
Style "*" Icon unknown1.xpm, Color #bebebe/#141415
|
||||
Style "*" MWMFunctions, MWMDecor, HintOverride
|
||||
Style "*" DecorateTransient, NoPPosition
|
||||
Style "*" IconBox 0 -10 -280 -1
|
||||
Style "*" FocusFollowsMouse
|
||||
Style "*" RandomPlacement, SmartPlacement
|
||||
|
||||
# Styles for various Fvwm modules:
|
||||
Style "Fvwm*" NoTitle, Sticky, WindowListSkip
|
||||
Style "Fvwm*" BorderWidth 2, CirculateSkipIcon, CirculateSkip
|
||||
Style "FvwmPager" StaysOnTop
|
||||
Style "FvwmBanner" StaysOnTop
|
||||
Style "FvwmButtons" Icon toolbox.xpm, ClickToFocus
|
||||
|
||||
# Styles for your common terminal emulator programs:
|
||||
AddToDecor terms
|
||||
+ ButtonStyle 1 Pixmap mini.xterm.xpm
|
||||
+ HilightColor #bebebe #222
|
||||
Style "XTerm" UseDecor terms
|
||||
Style "XTerm" Icon xterm.xpm, SloppyFocus, IconBox -70 1 -1 -140
|
||||
Style "rxvt" UseDecor terms
|
||||
Style "rxvt" Icon term.xpm, SloppyFocus, IconBox -70 1 -1 -140
|
||||
Style "rxvt" MWMBorder, MWMButtons
|
||||
|
||||
# Styles for various common programs:
|
||||
Style "*lock" NoTitle, NoHandles, Sticky, WindowListSkip, ClickToFocus
|
||||
Style "xbiff" NoTitle, Sticky, WindowListSkip, ClickToFocus
|
||||
Style "xcalc" Icon xcalc.xpm, NoButton 2,RandomPlacement,ClickToFocus
|
||||
Style "xmh" Icon mail1.xpm, NoIconTitle,StickyIcon
|
||||
Style "xmh" RandomPlacement, NoButton 2
|
||||
Style "xman" Icon xman.xpm, RandomPlacement, ClickToFocus
|
||||
Style "xmag" Icon mag_glass.xpm, RandomPlacement, ClickToFocus
|
||||
Style "xgraph" Icon graphs.xpm, RandomPlacement, ClickToFocus
|
||||
Style "xmosaic" Color Green/Yellow, ClickToFocus
|
||||
Style "xconsole" Icon rterm.xpm, WindowListSkip, Sticky
|
||||
|
||||
|
||||
# some simple default key bindings:
|
||||
Key Next A SCM Next [*] Focus
|
||||
Key Prior A SCM Prev [*] Focus
|
||||
|
||||
# some simple default mouse bindings:
|
||||
# for the root window:
|
||||
Mouse 1 R A Menu RootMenu Nop
|
||||
Mouse 2 R A Menu Window-Ops Nop
|
||||
Mouse 3 R A WindowList
|
||||
|
||||
# for the title bar buttons:
|
||||
Mouse 0 1 A Menu Window-Ops2 Close
|
||||
Mouse 0 2 A Close
|
||||
Mouse 0 4 A Iconify
|
||||
|
||||
# for other parts of the window/borders/icons:
|
||||
Mouse 1 F A Resize-or-Raise
|
||||
Mouse 1 TS A Move-or-Raise
|
||||
Mouse 1 I A Move-or-Iconify
|
||||
Mouse 2 I A Iconify
|
||||
Mouse 2 FST A Menu Window-Ops2 Nop
|
||||
Mouse 3 TSIF A RaiseLower
|
||||
|
||||
######################## Initialization Functions ############################
|
||||
AddToFunc InitFunction "I" Module FvwmPager 0 0
|
||||
#+ "I" exec /usr/X11R6/bin/xsetroot -solid black
|
||||
|
||||
AddToFunc RestartFunction "I" Module FvwmPager 0 0
|
||||
#+ "I" exec /usr/X11R6/bin/xsetroot -solid black
|
||||
|
||||
|
||||
######################## Menus ###################
|
||||
AddToMenu RootMenu "Root Menu" Title
|
||||
+ "XTerm%mini.xterm.xpm%" Exec exec xterm
|
||||
#+ "Rxvt" Exec exec rxvt
|
||||
+ "" Nop
|
||||
#+ "Remote Logins" Popup Remote-Logins
|
||||
#+ "" Nop
|
||||
+ "Utilities" Popup Utilities
|
||||
+ "" Nop
|
||||
+ "Fvwm Modules" Popup Module-Popup
|
||||
+ "Fvwm Window Ops" Popup Window-Ops
|
||||
+ "Fvwm Simple Config Ops" Popup Misc-Ops
|
||||
+ "" Nop
|
||||
+ "Refresh Screen" Refresh
|
||||
+ "Recapture Screen" Recapture
|
||||
+ "(Re)Start" Popup Quit-Verify
|
||||
+ "" Nop
|
||||
+ "Exit" Module FvwmForm QuitVerify
|
||||
|
||||
AddToMenu Utilities "Utilities" Title
|
||||
+ "Top" Exec exec xterm -T Top -n Top -e top
|
||||
+ "w3m" Exec exec xterm -T w3m -n w3m -e w3m google.com
|
||||
+ "Lynx" Exec exec xterm -T Lynx -n Lynx -e lynx google.com
|
||||
+ "Calculator" Exec exec xcalc
|
||||
+ "Xman" Exec exec xman
|
||||
+ "Xmag" Exec exec xmag
|
||||
+ "Editres" Exec exec editres
|
||||
+ "" Nop
|
||||
#+ "XEmacs" Exec exec xemacs
|
||||
#+ "Mail" MailFunction xmh "-font fixed"
|
||||
+ "" Nop
|
||||
+ "XLock%mini.xlock.xpm%" Exec exec xlock
|
||||
+ "" Nop
|
||||
+ "Reset X defaults" Exec xrdb -load $HOME/.Xdefaults
|
||||
|
||||
AddToMenu Misc-Ops "Misc Config Opts" Title
|
||||
+ "Sloppy Focus" ChangeDefaultFocus SloppyFocus
|
||||
+ "Click To Focus" ChangeDefaultFocus ClickToFocus
|
||||
+ "Focus Follows Mouse" ChangeDefaultFocus FocusFollowsMouse
|
||||
+ "" Nop
|
||||
+ "Colormap Follows Mouse" ColormapFocus FollowsMouse
|
||||
+ "Colormap Follows Focus" ColormapFocus FollowsFocus
|
||||
+ "" Nop
|
||||
+ "Full Paging ON" EdgeScroll 100 100
|
||||
+ "All Paging OFF" EdgeScroll 0 0
|
||||
+ "Horizontal Paging Only" EdgeScroll 100 0
|
||||
+ "Vertical Paging Only" EdgeScroll 0 100
|
||||
+ "Partial Paging" EdgeScroll 50 50
|
||||
+ "Full Paging && Edge Wrap" EdgeScroll 100000 100000
|
||||
|
||||
AddToMenu Window-Ops "Window Ops" Title
|
||||
+ "Move%mini.move.xpm%" Move
|
||||
+ "Resize%mini.resize.xpm%" Resize
|
||||
+ "Raise%mini.raise.xpm%" Raise
|
||||
+ "Lower%mini.lower.xpm%" Lower
|
||||
+ "(De)Iconify%mini.iconify.xpm%" Iconify
|
||||
+ "(Un)Stick%mini.stick2.xpm%" Stick
|
||||
+ "(Un)Maximize%mini.maximize.xpm%" Maximize
|
||||
+ "" Nop
|
||||
+ "Delete%mini.excl.xpm%" Delete
|
||||
+ "Close%mini.cut.xpm%" Close
|
||||
+ "Destroy%mini.destroy.xpm%" Destroy
|
||||
+ "" Nop
|
||||
+ "Refresh Window%mini.refresh.xpm%" RefreshWindow
|
||||
|
||||
AddToMenu Window-Ops2 "&Move%mini.move.xpm%" Move
|
||||
+ "&Resize%mini.resize.xpm%" Resize
|
||||
+ "R&aise%mini.raise.xpm%" Raise
|
||||
+ "&Lower%mini.lower.xpm%" Lower
|
||||
+ "(De)&Iconify%mini.iconify.xpm%" Iconify
|
||||
+ "(Un)&Stick%mini.stick2.xpm%" Stick
|
||||
+ "(Un)Ma&ximize%mini.maximize.xpm%" Maximize
|
||||
+ "" Nop
|
||||
+ "&Delete%mini.excl.xpm%" Delete
|
||||
+ "&Close%mini.cut.xpm%" Close
|
||||
+ "Destroy%mini.destroy.xpm%" Destroy
|
||||
+ "" Nop
|
||||
+ "ScrollBar" Module FvwmScroll 2 2
|
||||
+ "Print" PrintFunction
|
||||
#+ "Print Reverse" PrintReverseFunction
|
||||
|
||||
# be sure to fill these in with your correct machine names:
|
||||
AddToMenu Remote-Logins "dopey" Exec rsh dopey rxvt -display $HOSTDISPLAY &
|
||||
+ "snoopy" Exec rsh snoopy rxvt -display $HOSTDISPLAY &
|
||||
+ "grumpy" Exec rsh grumpy rxvt -display $HOSTDISPLAY &
|
||||
+ "happy" Exec rsh happy rxvt -display $HOSTDISPLAY &
|
||||
+ "bailey" Exec rsh bailey rxvt -display $HOSTDISPLAY &
|
||||
+ "barnum" Exec rsh barnum rxvt -display $HOSTDISPLAY &
|
||||
+ "joker" Exec rsh joker rxvt -display $HOSTDISPLAY &
|
||||
+ "signal" Exec rxterm signal
|
||||
|
||||
AddToMenu Module-Popup "FvwmModules" Title
|
||||
+ "Identify" Module FvwmIdent
|
||||
+ "Talk" Module FvwmTalk
|
||||
+ "" Nop
|
||||
+ "Button-Bar" Module FvwmButtons
|
||||
+ "Pager" Module FvwmPager 0 0
|
||||
+ "Pager (2 desks)" Module FvwmPager 0 1
|
||||
+ "WinList" Module FvwmWinList
|
||||
+ "" Nop
|
||||
+ "Banner" Module FvwmBanner
|
||||
+ "ScrollBar" Module FvwmScroll 50 50
|
||||
+ "Background" Module FvwmBacker
|
||||
+ "AutoRaise" Module FvwmAuto 200 Raise Nop
|
||||
+ "Stop AutoRaise" KillModule FvwmAuto
|
||||
+ "" Nop
|
||||
+ "IconBox" Module FvwmIconBox
|
||||
+ "IconMan" Module FvwmIconMan
|
||||
+ "" Nop
|
||||
+ "Form - Rlogin" Module FvwmForm Rlogin
|
||||
+ "Form - MyFvwmTalk" Module FvwmForm MyFvwmTalk
|
||||
+ "Form - QuitVerify" Module FvwmForm QuitVerify
|
||||
|
||||
AddToMenu Quit-Verify
|
||||
+ "Restart Fvwm%mini.refresh.xpm%" Restart fvwm
|
||||
+ "" Nop
|
||||
+ "Start cwm" Restart cwm
|
||||
+ "Start wm2" Restart wm2
|
||||
+ "Start twm" Restart twm
|
||||
+ "Start ctwm" Restart ctwm
|
||||
+ "Start flwm" Restart flwm
|
||||
+ "Start mwm" Restart mwm
|
||||
+ "Start openbox" Restart openbox
|
||||
+ "Start tvtwm" Restart tvtwm
|
||||
+ "" Nop
|
||||
+ "Start dummy%mini.xterm.xpm%" Restart xterm
|
||||
+ "" Nop
|
||||
+ "No, Don't Quit" Nop
|
||||
|
||||
######################## Sample Functions ##########################
|
||||
|
||||
AddToFunc MailFunction "I" Next [$0] Iconify -1
|
||||
+ "I" Next [$0] Focus
|
||||
+ "I" None [$0] Exec $0 $1
|
||||
|
||||
AddToFunc Move-or-Raise "I" Raise
|
||||
+ "M" Move
|
||||
+ "D" Lower
|
||||
|
||||
AddToFunc Move-or-Raise2 "M" Raise
|
||||
+ "M" Move
|
||||
+ "D" Lower
|
||||
|
||||
AddToFunc Maximize-Func "M" Maximize 0 100
|
||||
+ "C" Maximize 0 80
|
||||
+ "D" Maximize 100 100
|
||||
|
||||
AddToFunc Move-or-Iconify "I" Raise
|
||||
+ "M" Move
|
||||
+ "D" Iconify
|
||||
|
||||
AddToFunc Resize-or-Raise "I" Raise
|
||||
+ "M" Resize
|
||||
+ "D" Lower
|
||||
|
||||
AddToFunc Resize-or-Raise2 "M" Raise
|
||||
+ "M" Resize
|
||||
+ "D" Lower
|
||||
|
||||
AddToFunc PrintFunction "I" Raise
|
||||
+ "I" Exec xdpr -id $w
|
||||
|
||||
AddToFunc PrintReverseFunction "I" Raise
|
||||
+ "I" Exec xdpr 1/2 -h -rv -id $w
|
||||
|
||||
AddToFunc Iconify-and-Raise "I" Iconify
|
||||
+ "I" Raise
|
||||
|
||||
# RLOGIN machine fg bg
|
||||
AddToFunc RLOGIN "I" Exec xterm -fg $1 -bg $2 -e rlogin $0 -8
|
||||
|
||||
# TELNET machine fg bg
|
||||
AddToFunc TELNET "I" Exec xterm -fg $1 -bg $2 -e telnet $0
|
||||
|
||||
AddToFunc FocusAndWarp "I" Focus
|
||||
+ "I" WarpToWindow 2p 2p
|
||||
|
||||
AddToFunc DeiconifyFocusAndWarp "I" Iconify -1
|
||||
+ "I" FocusAndWarp
|
||||
|
||||
AddToFunc ChangeDefaultFocus "I" Style "*" $0
|
||||
+ "I" Recapture
|
||||
|
||||
############################################################################
|
||||
# Now some keyboard shortcuts.
|
||||
|
||||
# Arrow Keys
|
||||
# press arrow + control anywhere, and scroll by 1 page
|
||||
Key Left A C Scroll -100 0
|
||||
Key Right A C Scroll +100 +0
|
||||
Key Up A C Scroll +0 -100
|
||||
Key Down A C Scroll +0 +100
|
||||
|
||||
# press arrow + meta key, and scroll by 1/10 of a page
|
||||
#Key Left A M Scroll -10 +0
|
||||
#Key Right A M Scroll +10 +0
|
||||
#Key Up A M Scroll +0 -10
|
||||
#Key Down A M Scroll +0 +10
|
||||
|
||||
# press shift arrow + control anywhere, and move the pointer by 1% of a page
|
||||
Key Left A SC CursorMove -1 0
|
||||
Key Right A SC CursorMove +1 +0
|
||||
Key Up A SC CursorMove +0 -1
|
||||
Key Down A SC CursorMove +0 +1
|
||||
|
||||
# press shift arrow + meta key, and move the pointer by 1/10 of a page
|
||||
Key Left A SM CursorMove -10 +0
|
||||
Key Right A SM CursorMove +10 +0
|
||||
Key Up A SM CursorMove +0 -10
|
||||
Key Down A SM CursorMove +0 +10
|
||||
|
||||
# Keyboard accelerators
|
||||
Key F1 A M Menu RootMenu
|
||||
Key F2 A M Menu Window-Ops
|
||||
Key F3 A M WindowList FvwmWinList
|
||||
Key F4 A M Iconify
|
||||
Key F5 A M Move
|
||||
Key F6 A M Resize
|
||||
Key F7 A M CirculateUp
|
||||
Key F8 A M CirculateDown
|
||||
|
||||
#Page Up/Page Down keys are used to scroll by one desktop page
|
||||
# in any context, press page up/down + control
|
||||
# in root context, just pressing page up/down is OK
|
||||
#
|
||||
# I prefer the non-wrapping scroll. These are for example purposes only
|
||||
#Key Next A C Scroll 100000 0
|
||||
#Key Next R N Scroll 100000 0
|
||||
#Key Prior A C Scroll -100000 0
|
||||
#Key Prior R N Scroll -100000 0
|
||||
|
||||
################## FvwmButtons button-bar ################################
|
||||
*FvwmButtonsBack bisque3
|
||||
*FvwmButtons(Frame 2 Padding 2 2 Container(Rows 2 Frame 1 Padding 10 0 \
|
||||
Swallow(Respawn)))
|
||||
*FvwmButtons(NoSize Title Close, Icon bomb.xpm, Action Close)
|
||||
*FvwmButtons(Title Resize Icon mini.resize.xpm Back bisque4 Action Resize)
|
||||
*FvwmButtons(Frame -3 Swallow(Respawn,NoHints) xclock \
|
||||
`Exec exec xclock -bg darkolivegreen -padding 0 -geometry +2000+0`)
|
||||
*FvwmButtons(3x1 Back darkolivegreen Fore white Frame 2 Padding 2 2 \
|
||||
Container(Rows 1 Frame -2 Padding 1 1 Back darkolivegreen))
|
||||
*FvwmButtons(Frame 2 Title(Side,Right) Mail Fore white \
|
||||
Swallow(UseOld,NoRespawn)\
|
||||
xbiff `Exec exec xbiff -bg darkolivegreen -geometry +200+200`)
|
||||
*FvwmButtons(2x1 Swallow (NoHints) "FvwmTalk" "FvwmTalk")
|
||||
*FvwmButtons(End)
|
||||
*FvwmButtons(End)
|
||||
|
||||
|
||||
########################## Window-Identifier ###############################
|
||||
# Just choose colors and a fonts
|
||||
*FvwmIdentBack MidnightBlue
|
||||
*FvwmIdentFore Yellow
|
||||
*FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
|
||||
|
||||
########################### Pager #########################################
|
||||
*FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
|
||||
*FvwmPagerBack darkblue
|
||||
*FvwmPagerFore white
|
||||
*FvwmPagerHilight #2d2d2d
|
||||
*FvwmPagerGeometry 80x60-1-1
|
||||
*FvwmPagerLabel 0 "OpenBSD 6.8"
|
||||
*FvwmPagerLabel 1 Maker
|
||||
*FvwmPagerLabel 2 Mail
|
||||
*FvwmPagerLabel 3 Matlab
|
||||
*FvwmPagerSmallFont 5x8
|
||||
|
||||
##########################FvwmWinList##################################
|
||||
*FvwmWinListBack #908090
|
||||
*FvwmWinListFore Black
|
||||
*FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
|
||||
*FvwmWinListAction Click1 Iconify -1,Focus
|
||||
*FvwmWinListAction Click2 Iconify
|
||||
*FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent
|
||||
*FvwmWinListUseSkipList
|
||||
*FvwmWinListGeometry +0-1
|
||||
|
||||
|
||||
*FvwmBackerDesk 0 -solid steelblue
|
||||
*FvwmBackerDesk 1 -solid midnightblue
|
||||
|
||||
*FvwmScrollBack grey40
|
||||
*FvwmScrollFore green
|
||||
|
||||
############################################################
|
||||
############################################################
|
||||
# Note that icons are shown in the module
|
||||
# only if NoIcon commnand is applied.
|
||||
#Style "*" NoIcon
|
||||
|
||||
############################################################
|
||||
*FvwmIconBoxIconBack #cfcfcf
|
||||
*FvwmIconBoxIconHiFore black
|
||||
*FvwmIconBoxIconHiBack LightSkyBlue
|
||||
*FvwmIconBoxBack #5f9ea0
|
||||
#*FvwmIconBoxFore blue
|
||||
*FvwmIconBoxGeometry 5x1+0+0
|
||||
*FvwmIconBoxMaxIconSize 64x38
|
||||
*FvwmIconBoxFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
|
||||
*FvwmIconBoxSortIcons IconName
|
||||
*FvwmIconBoxPadding 4
|
||||
*FvwmIconBoxLines 10
|
||||
*FvwmIconBoxSBWidth 11
|
||||
*FvwmIconBoxPlacement Left Top
|
||||
*FvwmIconBoxPixmap fvwm.xpm
|
||||
#*FvwmIconBoxHideSC Horizontal
|
||||
*FvwmIconBoxSetWMIconSize
|
||||
*FvwmIconBoxHilightFocusWin
|
||||
#*FvwmIconBoxResolution Desk
|
||||
*FvwmIconBoxMouse 1 Click RaiseLower
|
||||
*FvwmIconBoxMouse 1 DoubleClick Iconify
|
||||
*FvwmIconBoxMouse 2 Click Iconify -1, Focus
|
||||
*FvwmIconBoxMouse 3 Click Module FvwmIdent
|
||||
*FvwmIconBoxKey r RaiseLower
|
||||
*FvwmIconBoxKey space Iconify
|
||||
*FvwmIconBoxKey d Close
|
||||
*FvwmIconBoxKey n Next
|
||||
*FvwmIconBoxKey p Prev
|
||||
*FvwmIconBoxKey h Left
|
||||
*FvwmIconBoxKey j Down
|
||||
*FvwmIconBoxKey k Up
|
||||
*FvwmIconBoxKey l Right
|
||||
#
|
||||
# Icon file specifications
|
||||
#
|
||||
# Mostly, you don't have to specify icon files, as FvwmIconBox now
|
||||
# reads icon files specified in Style commands.
|
||||
#
|
||||
*FvwmIconBox "Fvwm*" -
|
||||
|
||||
# FvwmForm alias - rlogin or telnet to host via xterm
|
||||
*RloginWarpPointer
|
||||
*RloginFont *helvetica*m*r*n*12*
|
||||
*RloginButtonFont *helvetica*m*o*n*12*
|
||||
*RloginInputFont *cour*m*r*n*12*
|
||||
*RloginFore Black
|
||||
*RloginBack White
|
||||
*RloginItemFore Yellow
|
||||
*RloginItemBack Wheat
|
||||
# begin items
|
||||
*RloginLine center
|
||||
*RloginText "Login to Remote Host"
|
||||
*RloginLine center
|
||||
*RloginText "Host:"
|
||||
*RloginInput HostName 30 ""
|
||||
*RloginLine center
|
||||
*RloginSelection meth single
|
||||
*RloginChoice TN TN off "telnet"
|
||||
*RloginChoice RL RL on "rlogin"
|
||||
*RloginSelection UserSel single
|
||||
#*RloginChoice Default Default on "same user"
|
||||
#*RloginChoice Custom Custom off "user:"
|
||||
*RloginText "(Userid:"
|
||||
*RloginInput UserName 10 ""
|
||||
*RloginText ")"
|
||||
*RloginLine center
|
||||
*RloginText "FG:"
|
||||
*RloginInput FgColor 15 ""
|
||||
*RloginText "BG:"
|
||||
*RloginInput BgColor 15 ""
|
||||
*RloginLine expand
|
||||
*RloginButton quit "Login" ^M
|
||||
*RloginCommand Exec xterm $(FgColor?-fg $(FgColor)) $(BgColor?-bg $(BgColor)) -T xterm@$(HostName) -e $(RL?rlogin) $(TN?telnet) $(HostName) $(RL?-8 $(UserName?-l $(UserName)))
|
||||
*RloginButton restart "Clear"
|
||||
*RloginCommand Beep
|
||||
*RloginButton quit "Cancel"
|
||||
*RloginCommand Nop
|
||||
|
||||
# FvwmForm alias - query exit ala mwm
|
||||
*QuitVerifyGrabServer
|
||||
*QuitVerifyWarpPointer
|
||||
*QuitVerifyFont *helvetica*m*r*n*14*
|
||||
#*QuitVerifyButtonFont *helvetica*m*o*n*14*
|
||||
*QuitVerifyButtonFont 7x13bold
|
||||
*QuitVerifyFore Black
|
||||
*QuitVerifyBack Light Gray
|
||||
*QuitVerifyItemFore Wheat
|
||||
*QuitVerifyItemBack Gray50
|
||||
# begin items
|
||||
*QuitVerifyLine center
|
||||
*QuitVerifyText "Do you really want to exit FVWM?"
|
||||
*QuitVerifyLine expand
|
||||
*QuitVerifyButton quit " Exit "
|
||||
*QuitVerifyCommand Quit
|
||||
*QuitVerifyButton quit "Cancel"
|
||||
*QuitVerifyCommand Nop
|
||||
|
||||
# MyTalk & MyFvwmTalk from Dave Goldberg
|
||||
# MyTalk Form - dissappears after use
|
||||
*MyTalkWarpPointer
|
||||
*MyTalkFont *helvetica*m*r*n*14*
|
||||
*MyTalkButtonFont *helvetica*m*o*n*14*
|
||||
*MyTalkInputFont *cour*m*r*n*14*
|
||||
*MyTalkFore Red
|
||||
*MyTalkBack Gray
|
||||
*MyTalkItemFore Blue
|
||||
*MyTalkItemBack Gray
|
||||
*MyTalkLine center
|
||||
*MyTalkText "Fvwm Function"
|
||||
*MyTalkInput Func 40 ""
|
||||
*MyTalkLine expand
|
||||
*MyTalkButton quit "Run" ^M
|
||||
*MyTalkCommand $(Func)
|
||||
*MyTalkButton restart "Clear" ^R
|
||||
*MyTalkButton quit "Cancel" ^C
|
||||
*MyTalkCommand Nop
|
||||
# MyFvwmTalk Form - sticks around
|
||||
*MyFvwmTalkWarpPointer
|
||||
*MyFvwmTalkFont *helvetica*m*r*n*14*
|
||||
*MyFvwmTalkButtonFont *helvetica*m*o*n*14*
|
||||
*MyFvwmTalkInputFont *cour*m*r*n*14*
|
||||
*MyFvwmTalkFore Red
|
||||
*MyFvwmTalkBack Gray
|
||||
*MyFvwmTalkItemFore Blue
|
||||
*MyFvwmTalkItemBack Gray
|
||||
*MyFvwmTalkLine center
|
||||
*MyFvwmTalkText "Fvwm Function"
|
||||
*MyFvwmTalkInput Func 40 ""
|
||||
*MyFvwmTalkLine expand
|
||||
*MyFvwmTalkButton restart "Run" ^M
|
||||
*MyFvwmTalkCommand $(Func)
|
||||
*MyFvwmTalkButton restart "Clear" ^R
|
||||
*MyFvwmTalkCommand Nop
|
||||
*MyFvwmTalkButton restart "Iconify" ^Z
|
||||
*MyFvwmTalkCommand Next [MyFvwmTalk] Iconify
|
||||
*MyFvwmTalkButton quit "Quit" ^C
|
||||
*MyFvwmTalkCommand Nop
|
||||
|
||||
# to change banner pixmap
|
||||
#*FvwmBannerPixmap fvwm3.xpm
|
||||
#*FvwmBannerTimeout 2
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
bin/dhook.*
|
||||
dep.sh
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
keyserver keyserver.ubuntu.com
|
||||
default-key 3DC941B2960D930F85C1F10F61E199CD3E82EE46
|
||||
|
228
.irssi/config
228
.irssi/config
|
@ -1,228 +0,0 @@
|
|||
aliases = {
|
||||
ATAG = "WINDOW SERVER";
|
||||
ADDALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL ADD -auto \\$channel->{name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}";
|
||||
B = "BAN";
|
||||
BACK = "AWAY";
|
||||
BANS = "BAN";
|
||||
BYE = "QUIT";
|
||||
C = "CLEAR";
|
||||
CALC = "EXEC - if command -v bc >/dev/null 2>&1\\; then printf '%s=' '$*'\\; echo '$*' | bc -l\\; else echo bc was not found\\; fi";
|
||||
CHAT = "DCC CHAT";
|
||||
CUBES = "SCRIPT EXEC Irssi::active_win->print(\"%_bases\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { join '', map { \"%x0\\${_}0\\$_\" } '0'..'9','A'..'F' }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print(\"%_cubes\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { my \\$y = \\$_*6 \\; join '', map { my \\$x = \\$_ \\; map { \"%x\\$x\\$_\\$x\\$_\" } @{['0'..'9','A'..'Z']}[\\$y .. \\$y+5] } 1..6 }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) for 0..5 \\; Irssi::active_win->print(\"%_grays\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { join '', map { \"%x7\\${_}7\\$_\" } 'A'..'X' }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print(\"%_mIRC extended colours\", MSGLEVEL_CLIENTCRAP) \\; my \\$x \\; \\$x .= sprintf \"\00399,%02d%02d\",\\$_,\\$_ for 0..15 \\; Irssi::active_win->print(\\$x, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; for my \\$z (0..6) { my \\$x \\; \\$x .= sprintf \"\00399,%02d%02d\",\\$_,\\$_ for 16+(\\$z*12)..16+(\\$z*12)+11 \\; Irssi::active_win->print(\\$x, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) }";
|
||||
DATE = "TIME";
|
||||
DEHIGHLIGHT = "DEHILIGHT";
|
||||
DESCRIBE = "ACTION";
|
||||
DHL = "DEHILIGHT";
|
||||
EXEMPTLIST = "MODE $C +e";
|
||||
EXIT = "QUIT";
|
||||
GOTO = "SCROLLBACK GOTO";
|
||||
HIGHLIGHT = "HILIGHT";
|
||||
HL = "HILIGHT";
|
||||
HOST = "USERHOST";
|
||||
INVITELIST = "MODE $C +I";
|
||||
J = "JOIN";
|
||||
K = "KICK";
|
||||
KB = "KICKBAN";
|
||||
KN = "KNOCKOUT";
|
||||
KO = "KNOCKOUT";
|
||||
LAST = "LASTLOG";
|
||||
LEAVE = "PART";
|
||||
M = "MSG";
|
||||
MUB = "UNBAN *";
|
||||
N = "NAMES";
|
||||
NMSG = "^MSG";
|
||||
P = "PART";
|
||||
Q = "QUERY";
|
||||
RESET = "SET -default";
|
||||
RUN = "SCRIPT LOAD";
|
||||
SAY = "MSG *";
|
||||
SB = "SCROLLBACK";
|
||||
SBAR = "STATUSBAR";
|
||||
SIGNOFF = "QUIT";
|
||||
T = "TOPIC";
|
||||
UB = "UNBAN";
|
||||
UMODE = "MODE $N";
|
||||
UNSET = "SET -clear";
|
||||
W = "WHO";
|
||||
WC = "WINDOW CLOSE";
|
||||
CLOSE = "WINDOW CLOSE";
|
||||
WG = "WINDOW GOTO";
|
||||
G = "WINDOW GOTO";
|
||||
WJOIN = "JOIN -window";
|
||||
WI = "WHOIS";
|
||||
WII = "WHOIS $0 $0";
|
||||
WL = "WINDOW LIST";
|
||||
WN = "WINDOW NEW HIDDEN";
|
||||
WQUERY = "QUERY -window";
|
||||
WW = "WHOWAS";
|
||||
1 = "WINDOW GOTO 1";
|
||||
2 = "WINDOW GOTO 2";
|
||||
3 = "WINDOW GOTO 3";
|
||||
4 = "WINDOW GOTO 4";
|
||||
5 = "WINDOW GOTO 5";
|
||||
6 = "WINDOW GOTO 6";
|
||||
7 = "WINDOW GOTO 7";
|
||||
8 = "WINDOW GOTO 8";
|
||||
9 = "WINDOW GOTO 9";
|
||||
10 = "WINDOW GOTO 10";
|
||||
11 = "WINDOW GOTO 11";
|
||||
12 = "WINDOW GOTO 12";
|
||||
13 = "WINDOW GOTO 13";
|
||||
14 = "WINDOW GOTO 14";
|
||||
15 = "WINDOW GOTO 15";
|
||||
16 = "WINDOW GOTO 16";
|
||||
17 = "WINDOW GOTO 17";
|
||||
18 = "WINDOW GOTO 18";
|
||||
19 = "WINDOW GOTO 19";
|
||||
20 = "WINDOW GOTO 20";
|
||||
21 = "WINDOW GOTO 21";
|
||||
22 = "WINDOW GOTO 22";
|
||||
23 = "WINDOW GOTO 23";
|
||||
24 = "WINDOW GOTO 24";
|
||||
25 = "WINDOW GOTO 25";
|
||||
26 = "WINDOW GOTO 26";
|
||||
27 = "WINDOW GOTO 27";
|
||||
28 = "WINDOW GOTO 28";
|
||||
29 = "WINDOW GOTO 29";
|
||||
30 = "WINDOW GOTO 30";
|
||||
31 = "WINDOW GOTO 31";
|
||||
32 = "WINDOW GOTO 32";
|
||||
33 = "WINDOW GOTO 33";
|
||||
34 = "WINDOW GOTO 34";
|
||||
35 = "WINDOW GOTO 35";
|
||||
36 = "WINDOW GOTO 36";
|
||||
37 = "WINDOW GOTO 37";
|
||||
38 = "WINDOW GOTO 38";
|
||||
39 = "WINDOW GOTO 39";
|
||||
40 = "WINDOW GOTO 40";
|
||||
41 = "WINDOW GOTO 41";
|
||||
42 = "WINDOW GOTO 42";
|
||||
43 = "WINDOW GOTO 43";
|
||||
44 = "WINDOW GOTO 44";
|
||||
45 = "WINDOW GOTO 45";
|
||||
46 = "WINDOW GOTO 46";
|
||||
47 = "WINDOW GOTO 47";
|
||||
48 = "WINDOW GOTO 48";
|
||||
49 = "WINDOW GOTO 49";
|
||||
50 = "WINDOW GOTO 50";
|
||||
51 = "WINDOW GOTO 51";
|
||||
52 = "WINDOW GOTO 52";
|
||||
53 = "WINDOW GOTO 53";
|
||||
54 = "WINDOW GOTO 54";
|
||||
55 = "WINDOW GOTO 55";
|
||||
56 = "WINDOW GOTO 56";
|
||||
57 = "WINDOW GOTO 57";
|
||||
58 = "WINDOW GOTO 58";
|
||||
59 = "WINDOW GOTO 59";
|
||||
60 = "WINDOW GOTO 60";
|
||||
61 = "WINDOW GOTO 61";
|
||||
62 = "WINDOW GOTO 62";
|
||||
63 = "WINDOW GOTO 63";
|
||||
64 = "WINDOW GOTO 64";
|
||||
65 = "WINDOW GOTO 65";
|
||||
66 = "WINDOW GOTO 66";
|
||||
67 = "WINDOW GOTO 67";
|
||||
68 = "WINDOW GOTO 68";
|
||||
69 = "WINDOW GOTO 69";
|
||||
70 = "WINDOW GOTO 70";
|
||||
71 = "WINDOW GOTO 71";
|
||||
72 = "WINDOW GOTO 72";
|
||||
73 = "WINDOW GOTO 73";
|
||||
74 = "WINDOW GOTO 74";
|
||||
75 = "WINDOW GOTO 75";
|
||||
76 = "WINDOW GOTO 76";
|
||||
77 = "WINDOW GOTO 77";
|
||||
78 = "WINDOW GOTO 78";
|
||||
79 = "WINDOW GOTO 79";
|
||||
80 = "WINDOW GOTO 80";
|
||||
81 = "WINDOW GOTO 81";
|
||||
82 = "WINDOW GOTO 82";
|
||||
83 = "WINDOW GOTO 83";
|
||||
84 = "WINDOW GOTO 84";
|
||||
85 = "WINDOW GOTO 85";
|
||||
86 = "WINDOW GOTO 86";
|
||||
87 = "WINDOW GOTO 87";
|
||||
88 = "WINDOW GOTO 88";
|
||||
89 = "WINDOW GOTO 89";
|
||||
90 = "WINDOW GOTO 90";
|
||||
91 = "WINDOW GOTO 91";
|
||||
92 = "WINDOW GOTO 92";
|
||||
93 = "WINDOW GOTO 93";
|
||||
94 = "WINDOW GOTO 94";
|
||||
95 = "WINDOW GOTO 95";
|
||||
96 = "WINDOW GOTO 96";
|
||||
97 = "WINDOW GOTO 97";
|
||||
98 = "WINDOW GOTO 98";
|
||||
99 = "WINDOW GOTO 99";
|
||||
rainbow = "exec -o toilet --irc --gay -f term -- $";
|
||||
nn = "window number";
|
||||
move = "window move";
|
||||
};
|
||||
|
||||
settings = {
|
||||
core = {
|
||||
real_name = "we dont play by the rules, whats the caution";
|
||||
user_name = "xfnw";
|
||||
nick = "xfnw";
|
||||
};
|
||||
"fe-text" = { actlist_sort = "refnum"; };
|
||||
"fe-common/core" = {
|
||||
autolog = "yes";
|
||||
theme = "furry";
|
||||
active_window_ignore_refnum = "no";
|
||||
autoclose_query = "172800";
|
||||
};
|
||||
"irc/core" = { cmds_max_at_once = "100"; };
|
||||
};
|
||||
logs = { };
|
||||
windows = { 1 = { immortal = "yes"; name = "(status)"; level = "ALL"; }; };
|
||||
mainwindows = { 1 = { first_line = "1"; lines = "39"; }; };
|
||||
ignores = ( );
|
||||
statusbar = {
|
||||
items = {
|
||||
user = "{sb {sbnickmode $cumode}$N{sbmode $usermode}{sbaway $A}} ";
|
||||
lag = " {sb Lag: $0-}";
|
||||
act = " {sb Act: $0-}";
|
||||
};
|
||||
default = {
|
||||
window = { placement = "top"; position = "0"; disabled = "yes"; };
|
||||
prompt = {
|
||||
placement = "bottom";
|
||||
items = {
|
||||
user = { };
|
||||
input = { priority = "100"; };
|
||||
lag = { };
|
||||
more = { };
|
||||
act = { };
|
||||
};
|
||||
};
|
||||
topic = {
|
||||
items = {
|
||||
topicbarstart = { priority = "100"; };
|
||||
window = { };
|
||||
window_empty = { };
|
||||
topic = { };
|
||||
topic_empty = { };
|
||||
topicbarend = { priority = "100"; alignment = "right"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
hilights = (
|
||||
{
|
||||
text = "xfnw";
|
||||
color = "%G";
|
||||
act_color = "%Y";
|
||||
nick = "no";
|
||||
word = "no";
|
||||
regexp = "yes";
|
||||
},
|
||||
{
|
||||
text = "vulpine";
|
||||
color = "%G";
|
||||
act_color = "%Y";
|
||||
nick = "no";
|
||||
word = "no";
|
||||
regexp = "yes";
|
||||
}
|
||||
);
|
|
@ -1,301 +0,0 @@
|
|||
# When testing changes, the easiest way to reload the theme is with /RELOAD.
|
||||
# This reloads the configuration file too, so if you did any changes remember
|
||||
# to /SAVE it first. Remember also that /SAVE overwrites the theme file with
|
||||
# old data so keep backups :)
|
||||
|
||||
# TEMPLATES:
|
||||
|
||||
# The real text formats that irssi uses are the ones you can find with
|
||||
# /FORMAT command. Back in the old days all the colors and texts were mixed
|
||||
# up in those formats, and it was really hard to change the colors since you
|
||||
# might have had to change them in tens of different places. So, then came
|
||||
# this templating system.
|
||||
|
||||
# Now the /FORMATs don't have any colors in them, and they also have very
|
||||
# little other styling. Most of the stuff you need to change is in this
|
||||
# theme file. If you can't change something here, you can always go back
|
||||
# to change the /FORMATs directly, they're also saved in these .theme files.
|
||||
|
||||
# So .. the templates. They're those {blahblah} parts you see all over the
|
||||
# /FORMATs and here. Their usage is simply {name parameter1 parameter2}.
|
||||
# When irssi sees this kind of text, it goes to find "name" from abstracts
|
||||
# block below and sets "parameter1" into $0 and "parameter2" into $1 (you
|
||||
# can have more parameters of course). Templates can have subtemplates.
|
||||
# Here's a small example:
|
||||
# /FORMAT format hello {colorify {underline world}}
|
||||
# abstracts = { colorify = "%G$0-%n"; underline = "%U$0-%U"; }
|
||||
# When irssi expands the templates in "format", the final string would be:
|
||||
# hello %G%Uworld%U%n
|
||||
# ie. underlined bright green "world" text.
|
||||
# and why "$0-", why not "$0"? $0 would only mean the first parameter,
|
||||
# $0- means all the parameters. With {underline hello world} you'd really
|
||||
# want to underline both of the words, not just the hello (and world would
|
||||
# actually be removed entirely).
|
||||
|
||||
# COLORS:
|
||||
|
||||
# You can find definitions for the color format codes in docs/formats.txt.
|
||||
|
||||
# There's one difference here though. %n format. Normally it means the
|
||||
# default color of the terminal (white mostly), but here it means the
|
||||
# "reset color back to the one it was in higher template". For example
|
||||
# if there was /FORMAT test %g{foo}bar, and foo = "%Y$0%n", irssi would
|
||||
# print yellow "foo" (as set with %Y) but "bar" would be green, which was
|
||||
# set at the beginning before the {foo} template. If there wasn't the %g
|
||||
# at start, the normal behaviour of %n would occur. If you _really_ want
|
||||
# to use the terminal's default color, use %N.
|
||||
|
||||
#############################################################################
|
||||
|
||||
# default foreground color (%N) - -1 is the "default terminal color"
|
||||
default_color = "-1";
|
||||
|
||||
# print timestamp/servertag at the end of line, not at beginning
|
||||
info_eol = "false";
|
||||
|
||||
# these characters are automatically replaced with specified color
|
||||
# (dark grey by default)
|
||||
replaces = { "[]=" = "%K$*%n"; };
|
||||
|
||||
abstracts = {
|
||||
##
|
||||
## generic
|
||||
##
|
||||
|
||||
# text to insert at the beginning of each non-message line
|
||||
line_start = "%B-%n!%B-%n ";
|
||||
|
||||
# timestamp styling, nothing by default
|
||||
timestamp = "$*";
|
||||
|
||||
# any kind of text that needs hilighting, default is to bold
|
||||
hilight = "%_$*%_";
|
||||
|
||||
# any kind of error message, default is bright red
|
||||
error = "%R$*%n";
|
||||
|
||||
# channel name is printed
|
||||
channel = "%_$*%_";
|
||||
|
||||
# nick is printed
|
||||
nick = "%_$*%_";
|
||||
|
||||
# nick host is printed
|
||||
nickhost = "[$*]";
|
||||
|
||||
# server name is printed
|
||||
server = "%_$*%_";
|
||||
|
||||
# some kind of comment is printed
|
||||
comment = "[$*]";
|
||||
|
||||
# reason for something is printed (part, quit, kick, ..)
|
||||
reason = "{comment $*}";
|
||||
|
||||
# mode change is printed ([+o nick])
|
||||
mode = "{comment $*}";
|
||||
|
||||
##
|
||||
## channel specific messages
|
||||
##
|
||||
|
||||
# highlighted nick/host is printed (joins)
|
||||
channick_hilight = "%C$*%n";
|
||||
chanhost_hilight = "{nickhost %c$*%n}";
|
||||
|
||||
# nick/host is printed (parts, quits, etc.)
|
||||
channick = "%c$*%n";
|
||||
chanhost = "{nickhost $*}";
|
||||
|
||||
# highlighted channel name is printed
|
||||
channelhilight = "%c$*%n";
|
||||
|
||||
# ban/ban exception/invite list mask is printed
|
||||
ban = "%c$*%n";
|
||||
|
||||
##
|
||||
## messages
|
||||
##
|
||||
|
||||
# the basic styling of how to print message, $0 = nick mode, $1 = nick
|
||||
msgnick = "%K<%n$0$1-%K>%n %|";
|
||||
|
||||
# message from you is printed. "ownnick" specifies the styling of the
|
||||
# nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the
|
||||
# whole line.
|
||||
|
||||
# Example1: You want the message text to be green:
|
||||
# ownmsgnick = "{msgnick $0 $1-}%g";
|
||||
# Example2.1: You want < and > chars to be yellow:
|
||||
# ownmsgnick = "%Y{msgnick $0 $1-%Y}%n";
|
||||
# (you'll also have to remove <> from replaces list above)
|
||||
# Example2.2: But you still want to keep <> grey for other messages:
|
||||
# pubmsgnick = "%K{msgnick $0 $1-%K}%n";
|
||||
# pubmsgmenick = "%K{msgnick $0 $1-%K}%n";
|
||||
# pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n";
|
||||
# ownprivmsgnick = "%K{msgnick $*%K}%n";
|
||||
# privmsgnick = "%K{msgnick %R$*%K}%n";
|
||||
|
||||
# $0 = nick mode, $1 = nick
|
||||
ownmsgnick = "{msgnick $0 $1-}";
|
||||
ownnick = "%_$*%n";
|
||||
|
||||
# public message in channel, $0 = nick mode, $1 = nick
|
||||
pubmsgnick = "{msgnick $0 $1-}";
|
||||
pubnick = "%N$*%n";
|
||||
|
||||
# public message in channel meant for me, $0 = nick mode, $1 = nick
|
||||
pubmsgmenick = "{msgnick $0 $1-}";
|
||||
menick = "%Y$*%n";
|
||||
|
||||
# public highlighted message in channel
|
||||
# $0 = highlight color, $1 = nick mode, $2 = nick
|
||||
pubmsghinick = "{msgnick $1 $0$2-%n}";
|
||||
|
||||
# channel name is printed with message
|
||||
msgchannel = "%K:%c$*%n";
|
||||
|
||||
# private message, $0 = nick, $1 = host
|
||||
privmsg = "[%R$0%K(%r$1-%K)%n] ";
|
||||
|
||||
# private message from you, $0 = "msg", $1 = target nick
|
||||
ownprivmsg = "[%r$0%K(%R$1-%K)%n] ";
|
||||
|
||||
# own private message in query
|
||||
ownprivmsgnick = "{msgnick $*}";
|
||||
ownprivnick = "%_$*%n";
|
||||
|
||||
# private message in query
|
||||
privmsgnick = "{msgnick %R$*%n}";
|
||||
|
||||
##
|
||||
## Actions (/ME stuff)
|
||||
##
|
||||
|
||||
# used internally by this theme
|
||||
action_core = "%_ * $*%n";
|
||||
|
||||
# generic one that's used by most actions
|
||||
action = "{action_core $*} ";
|
||||
|
||||
# own action, both private/public
|
||||
ownaction = "{action $*}";
|
||||
|
||||
# own action with target, both private/public
|
||||
ownaction_target = "{action_core $0}%K:%c$1%n ";
|
||||
|
||||
# private action sent by others
|
||||
pvtaction = "%_ (*) $*%n ";
|
||||
pvtaction_query = "{action $*}";
|
||||
|
||||
# public action sent by others
|
||||
pubaction = "{action $*}";
|
||||
|
||||
|
||||
##
|
||||
## other IRC events
|
||||
##
|
||||
|
||||
# whois
|
||||
whois = "%# $[8]0 : $1-";
|
||||
|
||||
# notices
|
||||
ownnotice = "[%r$0%K(%R$1-%K)]%n ";
|
||||
notice = "%K-%M$*%K-%n ";
|
||||
pubnotice_channel = "%K:%m$*";
|
||||
pvtnotice_host = "%K(%m$*%K)";
|
||||
servernotice = "%g!$*%n ";
|
||||
|
||||
# CTCPs
|
||||
ownctcp = "[%r$0%K(%R$1-%K)] ";
|
||||
ctcp = "%g$*%n";
|
||||
|
||||
# wallops
|
||||
wallop = "%_$*%n: ";
|
||||
wallop_nick = "%n$*";
|
||||
wallop_action = "%_ * $*%n ";
|
||||
|
||||
# netsplits
|
||||
netsplit = "%R$*%n";
|
||||
netjoin = "%C$*%n";
|
||||
|
||||
# /names list
|
||||
names_prefix = "";
|
||||
names_nick = "[%_$0%_$1-] ";
|
||||
names_nick_op = "{names_nick $*}";
|
||||
names_nick_halfop = "{names_nick $*}";
|
||||
names_nick_voice = "{names_nick $*}";
|
||||
names_users = "[%g$*%n]";
|
||||
names_channel = "%G$*%n";
|
||||
|
||||
# DCC
|
||||
dcc = "%g$*%n";
|
||||
dccfile = "%_$*%_";
|
||||
|
||||
# DCC chat, own msg/action
|
||||
dccownmsg = "[%r$0%K($1-%K)%n] ";
|
||||
dccownnick = "%R$*%n";
|
||||
dccownquerynick = "%_$*%n";
|
||||
dccownaction = "{action $*}";
|
||||
dccownaction_target = "{action_core $0}%K:%c$1%n ";
|
||||
|
||||
# DCC chat, others
|
||||
dccmsg = "[%G$1-%K(%g$0%K)%n] ";
|
||||
dccquerynick = "%G$*%n";
|
||||
dccaction = "%_ (*dcc*) $*%n %|";
|
||||
|
||||
##
|
||||
## statusbar
|
||||
##
|
||||
|
||||
# default background for all statusbars. You can also give
|
||||
# the default foreground color for statusbar items.
|
||||
sb_background = "%4%w";
|
||||
|
||||
# default backround for "default" statusbar group
|
||||
#sb_default_bg = "%4";
|
||||
# background for prompt / input line
|
||||
sb_prompt_bg = "%n";
|
||||
# background for info statusbar
|
||||
sb_info_bg = "%8";
|
||||
# background for topicbar (same default)
|
||||
#sb_topic_bg = "%4";
|
||||
|
||||
# text at the beginning of statusbars. sb-item already puts
|
||||
# space there,so we don't use anything by default.
|
||||
sbstart = "";
|
||||
# text at the end of statusbars. Use space so that it's never
|
||||
# used for anything.
|
||||
sbend = " ";
|
||||
|
||||
topicsbstart = "{sbstart $*}";
|
||||
topicsbend = "{sbend $*}";
|
||||
|
||||
prompt = "[$*] ";
|
||||
|
||||
sb = " %c[%n$*%c]%n";
|
||||
sbmode = "(%c+%n$*)";
|
||||
sbaway = " (%GzZzZ%n)";
|
||||
sbservertag = ":$0 (change with ^X)";
|
||||
sbnickmode = "$0";
|
||||
|
||||
# activity in statusbar
|
||||
|
||||
# ',' separator
|
||||
sb_act_sep = "%c$*";
|
||||
# normal text
|
||||
sb_act_text = "%c$*";
|
||||
# public message
|
||||
sb_act_msg = "%W$*";
|
||||
# hilight
|
||||
sb_act_hilight = "%M$*";
|
||||
# hilight with specified color, $0 = color, $1 = text
|
||||
sb_act_hilight_color = "$0$1-%n";
|
||||
};
|
||||
formats = {
|
||||
"fe-common/core" = {
|
||||
timestamp = "{timestamp %%H:%%M:%%S} ";
|
||||
own_msg = "{ownmsgnick $2 {ownnick $[0]0}}$1";
|
||||
pubmsg = "{pubmsgnick $2 {pubnick \00304$[0]0}}$1";
|
||||
};
|
||||
};
|
|
@ -1,260 +0,0 @@
|
|||
#########################################################################
|
||||
# #
|
||||
# Furry - An Irssi theme by Cene #
|
||||
# Contact: Cene @ IRCnet, Qnet, Netgamers, Gamesurge #
|
||||
# Idle #ppyo @ Gamesurge kthx >;) #
|
||||
# I hope you enjoy this theme as much as I did creating it #
|
||||
# #
|
||||
#########################################################################
|
||||
|
||||
#
|
||||
# To use this theme, put it in your Irssi directory and use /set theme furry
|
||||
#
|
||||
|
||||
#############################################################################
|
||||
|
||||
# default foreground color (%N) - -1 is the "default terminal color"
|
||||
default_color = "-1";
|
||||
|
||||
# print timestamp/servertag at the end of line, not at beginning
|
||||
info_eol = "false";
|
||||
|
||||
# these characters are automatically replaced with specified color
|
||||
# (dark grey by default)
|
||||
replaces = { "[]=" = "%K$*%n"; };
|
||||
|
||||
abstracts = {
|
||||
##
|
||||
## generic
|
||||
##
|
||||
|
||||
# text to insert at the beginning of each non-message line
|
||||
line_start = "%B-%W!%B-%n ";
|
||||
|
||||
# timestamp styling, nothing by default
|
||||
timestamp = "$*";
|
||||
|
||||
# any kind of text that needs hilighting, default is to bold
|
||||
hilight = "%_$*%_";
|
||||
|
||||
# any kind of error message, default is bright red
|
||||
error = "%R$*%n";
|
||||
|
||||
# channel name is printed
|
||||
channel = "%_$*%_";
|
||||
|
||||
# nick is printed
|
||||
nick = "%_$*%_";
|
||||
|
||||
# nick host is printed
|
||||
nickhost = "[$*]";
|
||||
|
||||
# server name is printed
|
||||
server = "%_$*%_";
|
||||
|
||||
# some kind of comment is printed
|
||||
comment = "[$*]";
|
||||
|
||||
# reason for something is printed (part, quit, kick, ..)
|
||||
reason = "{comment $*}";
|
||||
|
||||
# mode change is printed ([+o nick])
|
||||
mode = "{comment $*}";
|
||||
|
||||
##
|
||||
## channel specific messages
|
||||
##
|
||||
|
||||
# highlighted nick/host is printed (joins)
|
||||
channick_hilight = "%C$*%n";
|
||||
chanhost_hilight = "{nickhost %c$*%n}";
|
||||
|
||||
# nick/host is printed (parts, quits, etc.)
|
||||
channick = "%c$*%n";
|
||||
chanhost = "{nickhost $*}";
|
||||
|
||||
# highlighted channel name is printed
|
||||
channelhilight = "%c$*%n";
|
||||
|
||||
# ban/ban exception/invite list mask is printed
|
||||
ban = "%c$*%n";
|
||||
|
||||
##
|
||||
## messages
|
||||
##
|
||||
|
||||
# the basic styling of how to print message, $0 = nick mode, $1 = nick
|
||||
msgnick = "%K<%w$0%n$1-%K>%n %|";
|
||||
|
||||
# message from you is printed. "msgownnick" specifies the styling of the
|
||||
# nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the
|
||||
# whole line.
|
||||
|
||||
# Example1: You want the message text to be green:
|
||||
# ownmsgnick = "{msgnick $0 $1-}%g";
|
||||
# Example2.1: You want < and > chars to be yellow:
|
||||
# ownmsgnick = "%Y{msgnick $0 $1-%Y}%n";
|
||||
# (you'll also have to remove <> from replaces list above)
|
||||
# Example2.2: But you still want to keep <> grey for other messages:
|
||||
# pubmsgnick = "%K{msgnick $0 $1-%K}%n";
|
||||
# pubmsgmenick = "%K{msgnick $0 $1-%K}%n";
|
||||
# pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n";
|
||||
# ownprivmsgnick = "%K{msgnick $*%K}%n";
|
||||
# privmsgnick = "%K{msgnick %R$*%K}%n";
|
||||
|
||||
# $0 = nick mode, $1 = nick
|
||||
ownmsgnick = "{msgnick $0 $1-}";
|
||||
ownnick = "%W$*%n";
|
||||
|
||||
# public message in channel, $0 = nick mode, $1 = nick
|
||||
pubmsgnick = "{msgnick $0 $1-}";
|
||||
pubnick = "%N$*%n";
|
||||
|
||||
# public message in channel meant for me, $0 = nick mode, $1 = nick
|
||||
pubmsgmenick = "{msgnick $0 $1-}";
|
||||
menick = "%Y$*%n";
|
||||
|
||||
# public highlighted message in channel
|
||||
# $0 = highlight color, $1 = nick mode, $2 = nick
|
||||
pubmsghinick = "{msgnick $1 $0$2-%n}";
|
||||
|
||||
# channel name is printed with message
|
||||
msgchannel = "%K:%c$*%n";
|
||||
|
||||
# private message, $0 = nick, $1 = host
|
||||
privmsg = "[%R$0%K(%r$1-%K)%n] ";
|
||||
|
||||
# private message from you, $0 = "msg", $1 = target nick
|
||||
ownprivmsg = "[%R$0%K(%R$1-%K)%n] ";
|
||||
|
||||
# own private message in query
|
||||
ownprivmsgnick = "{msgnick $*}";
|
||||
ownprivnick = "%W$*%n";
|
||||
|
||||
# private message in query
|
||||
privmsgnick = "{msgnick %r$*%n}";
|
||||
|
||||
##
|
||||
## Actions (/ME stuff)
|
||||
##
|
||||
|
||||
# used internally by this theme
|
||||
action_core = "%W * $*%n";
|
||||
|
||||
# generic one that's used by most actions
|
||||
action = "{action_core $*} ";
|
||||
|
||||
# own action, both private/public
|
||||
ownaction = "{action $*}";
|
||||
|
||||
# own action with target, both private/public
|
||||
ownaction_target = "{action_core $0}%K:%c$1%n ";
|
||||
|
||||
# private action sent by others
|
||||
pvtaction = "%W (*) $*%n ";
|
||||
pvtaction_query = "{action $*}";
|
||||
|
||||
# public action sent by others
|
||||
pubaction = "{action $*}";
|
||||
|
||||
|
||||
##
|
||||
## other IRC events
|
||||
##
|
||||
|
||||
# whois
|
||||
whois = "%# $[8]0 : $1-";
|
||||
|
||||
# notices
|
||||
ownnotice = "[%r$0%K(%R$1-%K)]%n ";
|
||||
notice = "%K-%M$*%K-%n ";
|
||||
pubnotice_channel = "%K:%m$*";
|
||||
pvtnotice_host = "%K(%m$*%K)";
|
||||
servernotice = "%g!$*%n ";
|
||||
|
||||
# CTCPs
|
||||
ownctcp = "[%r$0%K(%R$1-%K)] ";
|
||||
ctcp = "%g$*%n";
|
||||
|
||||
# wallops
|
||||
wallop = "%W$*%n: ";
|
||||
wallop_nick = "%n$*";
|
||||
wallop_action = "%W * $*%n ";
|
||||
|
||||
# netsplits
|
||||
netsplit = "%R$*%n";
|
||||
netjoin = "%C$*%n";
|
||||
|
||||
# /names list
|
||||
names_prefix = "";
|
||||
names_nick = "[%_$0%_$1-] ";
|
||||
names_nick_op = "{names_nick $*}";
|
||||
names_nick_halfop = "{names_nick $*}";
|
||||
names_nick_voice = "{names_nick $*}";
|
||||
names_users = "[%g$*%n]";
|
||||
names_channel = "%G$*%n";
|
||||
|
||||
# DCC
|
||||
dcc = "%g$*%n";
|
||||
dccfile = "%_$*%_";
|
||||
|
||||
# DCC chat, own msg/action
|
||||
dccownmsg = "[%r$0%K($1-%K)%n] ";
|
||||
dccownnick = "%R$*%n";
|
||||
dccownquerynick = "%W$*%n";
|
||||
dccownaction = "{action $*}";
|
||||
dccownaction_target = "{action_core $0}%K:%c$1%n ";
|
||||
|
||||
# DCC chat, others
|
||||
dccmsg = "[%G$1-%K(%g$0%K)%n] ";
|
||||
dccquerynick = "%G$*%n";
|
||||
dccaction = "%W (*dcc*) $*%n %|";
|
||||
|
||||
##
|
||||
## statusbar
|
||||
##
|
||||
|
||||
# default background for all statusbars. You can also give
|
||||
# the default foreground color for statusbar items.
|
||||
sb_background = "%n%w";
|
||||
|
||||
# default backround for "default" statusbar group
|
||||
#sb_default_bg = "%4";
|
||||
# background for prompt / input line
|
||||
sb_prompt_bg = "%n";
|
||||
# background for info statusbar
|
||||
sb_info_bg = "%8";
|
||||
# background for topicbar (same default)
|
||||
#sb_topic_bg = "%4";
|
||||
|
||||
# text at the beginning of statusbars. sb-item already puts
|
||||
# space there,so we don't use anything by default.
|
||||
sbstart = "";
|
||||
# text at the end of statusbars. Use space so that it's never
|
||||
# used for anything.
|
||||
sbend = " ";
|
||||
|
||||
topicsbstart = "{sbstart $*}";
|
||||
topicsbend = "{sbend $*}";
|
||||
|
||||
prompt = "[$*] ";
|
||||
|
||||
sb = "%c[%n$*%c]%n";
|
||||
sbmode = "(%c+%n$*)";
|
||||
sbaway = " (%GzZzZ%n)";
|
||||
sbservertag = ":$0";
|
||||
sbnickmode = "$0";
|
||||
|
||||
# activity in statusbar
|
||||
|
||||
# ',' separator
|
||||
sb_act_sep = "%c$*";
|
||||
# normal text
|
||||
sb_act_text = "%c$*";
|
||||
# public message
|
||||
sb_act_msg = "%W$*";
|
||||
# hilight
|
||||
sb_act_hilight = "%C$*";
|
||||
# hilight with specified color, $0 = color, $1 = text
|
||||
sb_act_hilight_color = "$0$1-%n";
|
||||
};
|
|
@ -1,120 +0,0 @@
|
|||
# -*-muttrc-*-
|
||||
#
|
||||
# Command formats for gpg.
|
||||
#
|
||||
# Some of the older commented-out versions of the commands use gpg-2comp from:
|
||||
# http://70t.de/download/gpg-2comp.tar.gz
|
||||
#
|
||||
# %p The empty string when no passphrase is needed,
|
||||
# the string "PGPPASSFD=0" if one is needed.
|
||||
#
|
||||
# This is mostly used in conditional % sequences.
|
||||
#
|
||||
# %f Most PGP commands operate on a single file or a file
|
||||
# containing a message. %f expands to this file's name.
|
||||
#
|
||||
# %s When verifying signatures, there is another temporary file
|
||||
# containing the detached signature. %s expands to this
|
||||
# file's name.
|
||||
#
|
||||
# %a In "signing" contexts, this expands to the value of the
|
||||
# configuration variable $pgp_sign_as, if set, otherwise
|
||||
# $pgp_default_key. You probably need to
|
||||
# use this within a conditional % sequence.
|
||||
#
|
||||
# %r In many contexts, mutt passes key IDs to pgp. %r expands to
|
||||
# a list of key IDs.
|
||||
|
||||
|
||||
# Section A: Key Management
|
||||
|
||||
# The default key for encryption (used by $pgp_self_encrypt and
|
||||
# $postpone_encrypt).
|
||||
#
|
||||
# It will also be used for signing unless $pgp_sign_as is set to a
|
||||
# key.
|
||||
#
|
||||
# Unless your key does not have encryption capability, uncomment this
|
||||
# line and replace the keyid with your own.
|
||||
#
|
||||
# set pgp_default_key="0x12345678"
|
||||
|
||||
# If you have a separate signing key, or your key _only_ has signing
|
||||
# capability, uncomment this line and replace the keyid with your
|
||||
# signing keyid.
|
||||
#
|
||||
# set pgp_sign_as="0x87654321"
|
||||
|
||||
|
||||
# Section B: Commands
|
||||
|
||||
# Note that we explicitly set the comment armor header since GnuPG, when used
|
||||
# in some localiaztion environments, generates 8bit data in that header, thereby
|
||||
# breaking PGP/MIME.
|
||||
|
||||
# Note from the Debian mutt maintainers: starting from 1.7.0-2 GPGME is enabled
|
||||
# by default. More info in NEWS.Debian.
|
||||
# THe pgp_* commands are left here for people who disable gpgme in their
|
||||
# ~/.muttrc
|
||||
set crypt_use_gpgme=yes
|
||||
|
||||
# Note from the Debian mutt maintainers: the addition of
|
||||
# "--pinentry-mode loopback" breaks gpgv1 compatiblity, if you need to use gpgv1
|
||||
# remove that statement.
|
||||
|
||||
# decode application/pgp
|
||||
set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0 --pinentry-mode=loopback? --no-verbose --quiet --batch --output - %f"
|
||||
|
||||
# verify a pgp/mime signature
|
||||
set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
|
||||
|
||||
# decrypt a pgp/mime attachment
|
||||
set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0 --pinentry-mode=loopback? --no-verbose --quiet --batch --output - %f"
|
||||
|
||||
# create a pgp/mime signed attachment
|
||||
set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0 --pinentry-mode=loopback? --armor --detach-sign --textmode %?a?-u %a? %f"
|
||||
|
||||
# create a application/pgp signed (old-style) message
|
||||
set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0 --pinentry-mode=loopback? --armor --textmode --clearsign %?a?-u %a? %f"
|
||||
|
||||
# create a pgp/mime encrypted attachment
|
||||
set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
|
||||
|
||||
# create a pgp/mime encrypted and signed attachment
|
||||
set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg %?p?--passphrase-fd 0 --pinentry-mode=loopback? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
|
||||
|
||||
# import a key into the public key ring
|
||||
set pgp_import_command="gpg --no-verbose --import %f"
|
||||
|
||||
# export a key from the public key ring
|
||||
set pgp_export_command="gpg --no-verbose --export --armor %r"
|
||||
|
||||
# verify a key
|
||||
set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r"
|
||||
|
||||
# read in the public key ring
|
||||
# note: the second --with-fingerprint adds fingerprints to subkeys
|
||||
set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-keys %r"
|
||||
|
||||
# read in the secret key ring
|
||||
# note: the second --with-fingerprint adds fingerprints to subkeys
|
||||
set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-secret-keys %r"
|
||||
|
||||
# fetch keys
|
||||
# set pgp_getkeys_command="pkspxycwrap %r"
|
||||
|
||||
# pattern for good signature - may need to be adapted to locale!
|
||||
|
||||
# set pgp_good_sign="^gpgv?: Good signature from "
|
||||
|
||||
# OK, here's a version which uses gnupg's message catalog:
|
||||
# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`"
|
||||
|
||||
# This version uses --status-fd messages
|
||||
set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
|
||||
|
||||
# pattern to verify a decryption occurred
|
||||
# This is now deprecated by pgp_check_gpg_decrypt_status_fd:
|
||||
# set pgp_decryption_okay="^\\[GNUPG:\\] DECRYPTION_OKAY"
|
||||
set pgp_check_gpg_decrypt_status_fd
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
*.py[co]
|
||||
|
||||
# Packages
|
||||
*.egg
|
||||
*.egg-info
|
||||
dist
|
||||
build
|
||||
eggs
|
||||
parts
|
||||
bin
|
||||
var
|
||||
sdist
|
||||
develop-eggs
|
||||
.installed.cfg
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
.tox
|
||||
|
||||
#Translations
|
||||
*.mo
|
||||
|
||||
#Mr Developer
|
||||
.mr.developer.cfg
|
||||
|
||||
#Geany
|
||||
*.geany
|
||||
|
||||
fo.conf
|
|
@ -1,29 +0,0 @@
|
|||
Wolter Hellmund
|
||||
Original Author
|
||||
Everything up to 1.0.1 & Revision 7 [1]
|
||||
|
||||
Sharpeee [https://launchpad.net/~sharpeee]
|
||||
Implemented database update upon file relocation. [2]
|
||||
|
||||
Fayez [https://github.com/sirfz]
|
||||
added strip_ntfs. [5]
|
||||
|
||||
alzadude [https://github.com/alzadude]
|
||||
General code fixes
|
||||
Multiple library awareness [12] [13]
|
||||
|
||||
Lachlan de Waard
|
||||
1.0.2 & Revision 8 onwards. [3]
|
||||
GTK3 port and current code. [4]
|
||||
Migrated to github [6]
|
||||
|
||||
|
||||
[1] http://code.launchpad.net/~wolterh/rb-fileorganizer/main
|
||||
[2] http://bugs.launchpad.net/rb-fileorganizer/+bug/575964
|
||||
[3] http://code.launchpad.net/~lachlan-00/rb-fileorganizer/legacy
|
||||
[4] http://code.launchpad.net/~lachlan-00/rb-fileorganizer/trunk
|
||||
[5] https://github.com/lachlan-00/rb-fileorganizer/pull/8
|
||||
[6] https://github.com/lachlan-00/rb-fileorganizer/
|
||||
[7] https://github.com/lachlan-00/rb-fileorganizer/pull/12
|
||||
[8] https://github.com/lachlan-00/rb-fileorganizer/pull/13
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
|
||||
|
||||
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
|
||||
|
||||
http://creativecommons.org/licenses/by-sa/3.0/
|
|
@ -1,37 +0,0 @@
|
|||
INSTALLPATH="$(HOME)/.local/share/rhythmbox/plugins/fileorganizer/"
|
||||
INSTALLTEXT="The Fileorganizer plugin has been installed. You may now restart Rhythmbox and enable the 'Fileorganizer' plugin."
|
||||
UNINSTALLTEXT="The Fileorganizer plugin had been removed. The next time you restart Rhythmbox it will dissappear from the plugins list."
|
||||
PLUGINFILE="fileorganizer.plugin"
|
||||
|
||||
install-req:
|
||||
# Make environment
|
||||
mkdir -p $(INSTALLPATH)
|
||||
# Copy files, forcefully
|
||||
cp $(PLUGINFILE) $(INSTALLPATH) -f
|
||||
cp *.py $(INSTALLPATH) -f
|
||||
cp config.ui $(INSTALLPATH) -f
|
||||
cp fo.conf.template $(INSTALLPATH) -f
|
||||
cp README.md $(INSTALLPATH) -f
|
||||
cp LICENSE $(INSTALLPATH) -f
|
||||
cp AUTHORS $(INSTALLPATH) -f
|
||||
|
||||
install: install-req
|
||||
@echo
|
||||
@echo $(INSTALLTEXT)
|
||||
|
||||
install-gui: install-req
|
||||
# Notify graphically
|
||||
zenity --info --title='Installation complete' --text=$(INSTALLTEXT)
|
||||
|
||||
uninstall-req:
|
||||
# Simply remove the installation path folder
|
||||
rm -rf $(INSTALLPATH)
|
||||
|
||||
uninstall: uninstall-req
|
||||
@echo
|
||||
@echo $(UNINSTALLTEXT)
|
||||
|
||||
uninstall-gui: uninstall-req
|
||||
# Notify graphically
|
||||
zenity --info --title='Uninstall complete' --text=$(UNINSTALLTEXT)
|
||||
|
|
@ -1,236 +0,0 @@
|
|||
Development Stop
|
||||
================
|
||||
|
||||
Hi everyone, I took over this plugin many years ago and have since moved on to other methods of maintaining my library. If someone wants to fork it and take over i'm happy to let this go as i don't have the need for this plugin anymore.
|
||||
|
||||
|
||||
RHYTHMBOX FILEORGANIZER
|
||||
=======================
|
||||
|
||||
Please help with testing this new release!
|
||||
A lot of big changes have happened that need testing before i can be comfortable with a stable release.
|
||||
|
||||
-------------------------------------
|
||||
WARNING, ONGOING DEVELOPMENT VERSION.
|
||||
-------------------------------------
|
||||
|
||||
* Please be aware that for the moment this repo may have bugs
|
||||
that i haven't noticed in my testing.
|
||||
* I have tested all current features and they work as expected
|
||||
(But that isn't a promise it will be stable for you)
|
||||
|
||||
Welcome to version 3.91-dev
|
||||
|
||||
This update removes a lot of code that doesn't have any real purpose in the current rhythmbox.
|
||||
|
||||
I have dropped dbops.py and simplified the database naming using urllib.parse.
|
||||
|
||||
We no longer look for cover art as this has changed from older versions of rhythmbox.
|
||||
|
||||
Instead of updating tags this feature is removed.
|
||||
|
||||
So far in testing the changes are setting correct paths but the files are sometimes becoming 'missing'
|
||||
The files move and update but I think this may be due to my large library (180,000)
|
||||
and that testing has been done over sshfs as well as local files.
|
||||
|
||||
|
||||
|
||||
|
||||
1.0 Install
|
||||
2.0 Usage & Main Features
|
||||
2.1 Other Features
|
||||
3.0 Configuration and customisation
|
||||
3.1 Compilation Support
|
||||
3.2 Plugin Preferences Window
|
||||
4.0 Change History
|
||||
5.0 Contribute
|
||||
6.0 Links
|
||||
|
||||
1.0 INSTALL
|
||||
-----------
|
||||
|
||||
To install from the terminal using make:
|
||||
make install
|
||||
|
||||
To check the dependencies, then install using python:
|
||||
python3 ./install.py
|
||||
|
||||
If you want to install manually, extract to the following directory:
|
||||
* $HOME/.local/share/rhythmbox/plugins/fileorganizer/
|
||||
|
||||
You can test python dependencies by running:
|
||||
python3 -c "import depends_test; depends_test.check()"
|
||||
|
||||
Possible extra requirements are:
|
||||
* python-configparser (I have to confirm this but i think it's a default module in python 3.2+)
|
||||
* gir1.2-notify-0.7 (Debian name, GObject notify library)
|
||||
* dconf-editor (to make changes to the rhythmbox library settings)
|
||||
|
||||
|
||||
2.0 USAGE & MAIN FEATURES
|
||||
-------------------------
|
||||
|
||||
This plugin is pretty simple but it has a few complicated features under the hood.
|
||||
|
||||
Once the plugin is installed, simply enable it in Rhythmbox. A restart of rhythmbox will be required to detect the plugin if it was open when you installed.
|
||||
|
||||
When the plugin is enabled, you will notice an option in the right-click menu of music items (like songs) that will read 'Organize selection'. Clicking this will organize the selected files following a defined structure (see 3. Configuration and customisation) for both folders and filenames. That's all there is to it.
|
||||
|
||||
|
||||
2.1 OTHER FEATURES
|
||||
|
||||
Intelligent duplicate backup:
|
||||
* When two songs have the same name, the plugin moves the file to a backup directory.
|
||||
* If you lose a file, you'll probably in a folder named 'backup' in the root of your music library.
|
||||
|
||||
Move all non music files with your music:
|
||||
* When enabled, Fileorganizer will move files like text files and pictures with that music file.
|
||||
* This is great for keeping all files organised, not just music.
|
||||
|
||||
|
||||
Log file for all actions:
|
||||
* The log file is an invaluable tool to see what happens when running fileorganizer.
|
||||
* By default this file is hidden in your home folder: $HOME/.fileorganizer.log
|
||||
|
||||
|
||||
3.0 CONFIGURATION AND CUSTOMISATION
|
||||
-----------------------------------
|
||||
|
||||
The output when running 'Organize Selection' is set from dconf-editor using default Rhythmbox settings:
|
||||
* org.gnome.rhythmbox.library/layout-filename (Is the filename for your output)
|
||||
* org.gnome.rhythmbox.library/layout-path (Is the folder path for your output)
|
||||
* org.gnome.rhythmbox.rhythmdb/locations (Is your library path)
|
||||
|
||||
Using these, your final output becomes:
|
||||
* library + layout-path + layout-filename
|
||||
|
||||
The Locations setting can actually be multiple locations, the first value is always taken by the plugin.
|
||||
|
||||
The Variables for layout_path and layout_filename follow the same values as rhythmbox:
|
||||
* %at -- album title
|
||||
* %aa -- album artist (Album artist will use track artist if it does not exist)
|
||||
* %aA -- album artist (lowercase)
|
||||
* %as -- album artist sortname
|
||||
* %aS -- album artist sortname (lowercase)
|
||||
* %ay -- album release year
|
||||
* %an -- album disc number
|
||||
* %aN -- album disc number, zero padded
|
||||
* %ag -- album genre
|
||||
* %aG -- album genre (lowercase)
|
||||
* %tn -- track number (i.e 8)
|
||||
* %tN -- track number, zero padded (i.e 08)
|
||||
* %tt -- track title
|
||||
* %ta -- track artist
|
||||
* %tA -- track artist (lowercase)
|
||||
|
||||
Variables not ported yet:
|
||||
* %ts -- track artist sortname
|
||||
* %tS -- track artist sortname (lowercase)
|
||||
|
||||
|
||||
3.1 COMPILATION SUPPORT
|
||||
|
||||
Fileorganizer will use the album artist tag which is a part of rhythmbox and replace the artist field. For example:
|
||||
* Path: /music/$artist/$year $album/$disc-$track - $title
|
||||
* Input: /music/new/spawn soundtrack/01 - filter & the crystal method - trip like i do.mp3
|
||||
* Set Album Artist to 'Various' in Rhythmbox.
|
||||
* Output: /music/Various/1997 Spawn/1-01 - Can't You (Trip Like I Do).mp3
|
||||
|
||||
|
||||
3.2 PLUGIN PREFERENCES WINDOW
|
||||
|
||||
The preferences window gives you the ability to switch features on or off.
|
||||
|
||||
Preview Mode
|
||||
* If enabled, 'Organize Selection' will only check for changes and open a text report after completion.
|
||||
|
||||
File/Folder Cleanup
|
||||
* If enabled, files within the same folder that aren't music files are moved as well
|
||||
|
||||
Remove Empty Folders
|
||||
* If the source folder is empty after moving, delete the folder
|
||||
|
||||
Log File:
|
||||
* Set the filename of the log file (the base path is your home folder)
|
||||
|
||||
Strip NTFS Chars
|
||||
* Strip out characters that Windows can't handle.
|
||||
(NTFS actually supports more characters than Windows allows)
|
||||
|
||||
|
||||
|
||||
4.0 CHANGE HISTORY
|
||||
------------------
|
||||
|
||||
3.99*-dev-*
|
||||
* Removed tag update options and code
|
||||
* Removed cover art import, the naming/format has changed
|
||||
* Using urllib.parse to encode DB imports
|
||||
|
||||
3.*-dev-*
|
||||
* Added python script install.py to check all imports.
|
||||
(Also added uninstall.py)
|
||||
* Removed older v2.99 zip file
|
||||
* Removed INSTALL & UNINSTALL (these were just calls to make anyway)
|
||||
* Ongoing pylint/refactor changes.
|
||||
* Update config window to remove depreciated widgets. (requires GTK+ 3.0)
|
||||
* Move conf template into base plugin dir
|
||||
|
||||
Update 2015/05/05:
|
||||
* added strip_ntfs option (Care of @sirfz)
|
||||
[https://github.com/lachlan-00/rb-fileorganizer/commit/d8cf611f969a1fc250e7348b4e53285d13f950f3]
|
||||
|
||||
3.2013.09.16:
|
||||
Currently running on RB 3.0
|
||||
* Tag Library python-eyed3 not available for python 3.
|
||||
|
||||
2.0.1-2 features include:
|
||||
Preview Mode
|
||||
* Files are not moved or changed in any way while in preview mode.
|
||||
* When completed up to two text files will open showing changes or possibly damaged files.
|
||||
* To enable preview mode, set enable it in the preferences window.
|
||||
Update Tags After Relocation
|
||||
* The plugin now uses python-eyeD3 for checking tag values.
|
||||
* After organising the selected files, fileorganizer will update the mp3 tags for you to
|
||||
|
||||
2.0 features include:
|
||||
* GTK3 Rhythmbox 3/GIT support
|
||||
* Moved settings from Gconf to Gsettings
|
||||
* Random bug fixes
|
||||
* New code base [1]
|
||||
|
||||
1.1 features include:
|
||||
* UI Implemented
|
||||
* Configuration File
|
||||
* Import cover art from the source folder to the RB cache if found.
|
||||
* Ability to disable file/folder cleanup and other features.
|
||||
|
||||
1.0.3-2 features include:
|
||||
* Fixes to backup support.
|
||||
* UTF-8 encoding support.
|
||||
* Fixed move folder contents with files.
|
||||
* Notification on completion using pynotify.
|
||||
* More code cleanup and additions.
|
||||
|
||||
1.0.3 features include:
|
||||
* File management of non music files.
|
||||
* A physical log file stored in the home folder.
|
||||
* Moved the backup folder to the root of the music library.
|
||||
* Compilation support using rhythmbox's album artist field.
|
||||
|
||||
1.0.2 features include:
|
||||
* Support for Rhythmbox > 0.13.1
|
||||
* Added $disc and $year support.
|
||||
|
||||
|
||||
5.0 CONTRIBUTE
|
||||
--------------
|
||||
|
||||
To contribute, please refer to our github page [2]
|
||||
|
||||
|
||||
6.0 LINKS
|
||||
---------
|
||||
|
||||
[1] http://code.launchpad.net/~lachlan-00/rb-fileorganizer/legacy
|
||||
[2] https://github.com/lachlan-00/rb-fileorganizer
|
|
@ -1 +0,0 @@
|
|||
testing plan
|
|
@ -1,197 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.10"/>
|
||||
<object class="GtkBox" id="fileorganizer">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="toplabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin_bottom">7</property>
|
||||
<property name="label" translatable="yes">File Organizer Preferences</property>
|
||||
<attributes>
|
||||
<attribute name="style" value="normal"/>
|
||||
<attribute name="weight" value="semibold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="settingsbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="previewbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="previewbutton">
|
||||
<property name="label" translatable="yes">Preview Mode</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="image_position">right</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="cleanupbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="cleanupbutton">
|
||||
<property name="label" translatable="yes">File/Folder Cleanup</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="image_position">right</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="removebox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="removebutton">
|
||||
<property name="label" translatable="yes">Remove Empty Folders</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="image_position">right</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="ntfsbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="ntfsbutton">
|
||||
<property name="label" translatable="yes">Strip NTFS Chars</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="image_position">right</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="log_pathbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">65</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="logbutton">
|
||||
<property name="label" translatable="yes">Log File</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="image_position">right</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="log_path">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
|
@ -1,37 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
""" Configuration (gsettings) handler for Fileorganizer
|
||||
|
||||
----------------Authors----------------
|
||||
Lachlan de Waard <lachlan.00@gmail.com>
|
||||
Wolter Hellmund <wolterh6@gmail.com>
|
||||
----------------Licence----------------
|
||||
Creative Commons - Attribution Share Alike v3.0
|
||||
|
||||
"""
|
||||
|
||||
|
||||
from gi.repository import Gio
|
||||
|
||||
# gsettings locations for library and output paths
|
||||
RHYTHMBOX_RHYTHMDB = 'locations'
|
||||
RHYTHMBOX_LIBRARY = {'layout-path', 'layout-filename'}
|
||||
|
||||
|
||||
class FileorganizerConf(object):
|
||||
""" Class to read RB values using dconf/gsettings """
|
||||
def __init__(self):
|
||||
self.rhythmdbsettings = Gio.Settings("org.gnome.rhythmbox.rhythmdb")
|
||||
self.librarysettings = Gio.Settings("org.gnome.rhythmbox.library")
|
||||
|
||||
# Request value
|
||||
def get_val(self, key):
|
||||
""" Fill values according to the current value in gsettings """
|
||||
keypath = None
|
||||
if key == RHYTHMBOX_RHYTHMDB:
|
||||
return self.rhythmdbsettings[key]
|
||||
elif key in RHYTHMBOX_LIBRARY:
|
||||
return self.librarysettings[key]
|
||||
else:
|
||||
print('Invalid key requested')
|
||||
return keypath
|
|
@ -1,42 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
""" Fileorganizer: test your dependencies
|
||||
|
||||
----------------Authors----------------
|
||||
Lachlan de Waard <lachlan.00@gmail.com>
|
||||
----------------Licence----------------
|
||||
Creative Commons - Attribution Share Alike v3.0
|
||||
|
||||
"""
|
||||
|
||||
|
||||
def check():
|
||||
""" Importing all libraries used by FileOrganizer """
|
||||
clear = False
|
||||
try:
|
||||
import os
|
||||
import codecs
|
||||
import configparser
|
||||
import shutil
|
||||
import subprocess
|
||||
import time
|
||||
import gi
|
||||
import urllib.parse
|
||||
|
||||
gi.require_version('Peas', '1.0')
|
||||
gi.require_version('PeasGtk', '1.0')
|
||||
gi.require_version('Notify', '0.7')
|
||||
gi.require_version('RB', '3.0')
|
||||
|
||||
from gi.repository import GObject, Peas, PeasGtk, Gtk, Notify, Gio
|
||||
from gi.repository import RB
|
||||
|
||||
clear = True
|
||||
except ImportError as errormsg:
|
||||
print('\nDependency Problem\n\n' + str(errormsg))
|
||||
|
||||
if clear:
|
||||
print('\nAll FileOrganizer dependencies are satisfied\n')
|
||||
return True
|
||||
else:
|
||||
return False
|
|
@ -1,270 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
""" Fileorganizer file operations
|
||||
|
||||
----------------Authors----------------
|
||||
Lachlan de Waard <lachlan.00@gmail.com>
|
||||
Wolter Hellmund <wolterh6@gmail.com>
|
||||
----------------Licence----------------
|
||||
Creative Commons - Attribution Share Alike v3.0
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import time
|
||||
import configparser
|
||||
import gi
|
||||
import urllib.parse
|
||||
|
||||
gi.require_version('RB', '3.0')
|
||||
|
||||
from gi.repository import RB
|
||||
|
||||
import tools
|
||||
|
||||
from logops import LogFile
|
||||
|
||||
|
||||
RB_METATYPES = ('at', 'aa', 'aA', 'as', 'aS', 'ay', 'an', 'aN', 'ag', 'aG',
|
||||
'tn', 'tN', 'tt', 'ta', 'tA')
|
||||
RB_MEDIA_TYPES = ['.m4a', '.flac', '.ogg', '.mp2', '.mp3', '.wav', '.spx']
|
||||
|
||||
PROP = [RB.RhythmDBPropType.ALBUM, RB.RhythmDBPropType.ALBUM_ARTIST,
|
||||
RB.RhythmDBPropType.ALBUM_ARTIST_FOLDED,
|
||||
RB.RhythmDBPropType.ALBUM_ARTIST_SORTNAME,
|
||||
RB.RhythmDBPropType.ALBUM_ARTIST_SORTNAME_FOLDED,
|
||||
RB.RhythmDBPropType.YEAR, RB.RhythmDBPropType.DISC_NUMBER,
|
||||
RB.RhythmDBPropType.GENRE, RB.RhythmDBPropType.GENRE_FOLDED,
|
||||
RB.RhythmDBPropType.TRACK_NUMBER, RB.RhythmDBPropType.TITLE,
|
||||
RB.RhythmDBPropType.ARTIST, RB.RhythmDBPropType.ARTIST_FOLDED]
|
||||
|
||||
IN = ' IN: '
|
||||
OUT = ' OUT: '
|
||||
INFO = ' ** INFO: '
|
||||
ERROR = ' ** ERROR: '
|
||||
CONFLICT = ' ** CONFLICT: '
|
||||
NO_NEED = 'No need for file relocation'
|
||||
STILL_MEDIA = 'Directory still contains media; keeping:'
|
||||
FILE_EXISTS = 'File exists, directing to backup folder'
|
||||
POSSIBLE_DAMAGE = "Source file damaged or missing tag information.\n"
|
||||
DIR_REMOVED = 'Removing empty directory'
|
||||
UPDATING = 'Updating Database:'
|
||||
|
||||
|
||||
class MusicFile(object):
|
||||
""" Class that performs all the file operations """
|
||||
|
||||
def __init__(self, fileorganizer, db_entry=None, strip_ntfs=False):
|
||||
self.conf = configparser.RawConfigParser()
|
||||
conffile = (os.getenv('HOME') + '/.local/share/rhythmbox/' +
|
||||
'plugins/fileorganizer/fo.conf')
|
||||
self.conf.read(conffile)
|
||||
self.rbfo = fileorganizer
|
||||
self.rbdb = self.rbfo.rbdb
|
||||
self.log = LogFile()
|
||||
# self.url = UrlData()
|
||||
self.strip_ntfs = strip_ntfs
|
||||
if db_entry:
|
||||
# Track and disc digits from gconf
|
||||
padded = '%s' % ('%0' + str(2) + '.d')
|
||||
single = '%s' % ('%0' + str(1) + '.d')
|
||||
self.metadata = {
|
||||
RB_METATYPES[0]: db_entry.get_string(PROP[0]),
|
||||
RB_METATYPES[1]: db_entry.get_string(PROP[1]),
|
||||
RB_METATYPES[2]: db_entry.get_string(PROP[2]),
|
||||
RB_METATYPES[3]: db_entry.get_string(PROP[3]),
|
||||
RB_METATYPES[4]: db_entry.get_string(PROP[4]),
|
||||
RB_METATYPES[5]: str(db_entry.get_ulong(PROP[5])),
|
||||
RB_METATYPES[6]: str(single % (db_entry.get_ulong(PROP[6]))),
|
||||
RB_METATYPES[7]: str(padded % (db_entry.get_ulong(PROP[6]))),
|
||||
RB_METATYPES[8]: db_entry.get_string(PROP[7]),
|
||||
RB_METATYPES[9]: db_entry.get_string(PROP[8]),
|
||||
RB_METATYPES[10]: str(single % (db_entry.get_ulong(PROP[9]))),
|
||||
RB_METATYPES[11]: str(padded % (db_entry.get_ulong(PROP[9]))),
|
||||
RB_METATYPES[12]: db_entry.get_string(PROP[10]),
|
||||
RB_METATYPES[13]: db_entry.get_string(PROP[11]),
|
||||
RB_METATYPES[14]: db_entry.get_string(PROP[12])
|
||||
}
|
||||
self.location = db_entry.get_string(RB.RhythmDBPropType.LOCATION)
|
||||
self.entry = db_entry
|
||||
self.rbdb_rep = ('%28', '%29', '%2B', '%27', '%2C', '%3A', '%21',
|
||||
'%24', '%26', '%2A', '%2C', '%2D', '%2E', '%3D',
|
||||
'%40', '%5F', '%7E', '%C3%A8')
|
||||
self.rbdb_itm = ('(', ')', '+', "'", ',', ':', '!',
|
||||
'$', '&', '*', ',', '-', '.', '=',
|
||||
'@', '_', '~', 'è')
|
||||
|
||||
def set_ascii(self, string):
|
||||
""" Change unicode codes back to ascii for RhythmDB
|
||||
RythmDB doesn't use a full URL for file path
|
||||
"""
|
||||
count = 0
|
||||
while count < len(self.rbdb_rep):
|
||||
string = string.replace(self.rbdb_rep[count],
|
||||
self.rbdb_itm[count])
|
||||
count += 1
|
||||
|
||||
return string
|
||||
|
||||
# Returns metadata of the music file
|
||||
def get_metadata(self, key):
|
||||
""" Return metadata of current file """
|
||||
for datum in self.metadata:
|
||||
if key == datum:
|
||||
return self.metadata[datum]
|
||||
|
||||
# Non media clean up
|
||||
def file_cleanup(self, source, destin):
|
||||
""" Remove empty folders and move non-music files with selection """
|
||||
cleanup_enabled = self.conf.get('conf', 'cleanup_enabled')
|
||||
remove_folders = self.conf.get('conf', 'cleanup_empty_folders')
|
||||
if cleanup_enabled == 'True':
|
||||
sourcedir = os.path.dirname(source)
|
||||
destindir = os.path.dirname(destin)
|
||||
foundmedia = False
|
||||
# Remove empty folders, if any
|
||||
if os.path.isdir(sourcedir):
|
||||
if not os.listdir(sourcedir) == []:
|
||||
for files in os.listdir(sourcedir):
|
||||
filelist = files[(files.rfind('.')):]
|
||||
if filelist in RB_MEDIA_TYPES or os.path.isdir(
|
||||
sourcedir + '/' + files):
|
||||
foundmedia = True
|
||||
elif not destindir == sourcedir:
|
||||
mvdest = destindir + '/' + os.path.basename(files)
|
||||
mvsrc = sourcedir + '/' + os.path.basename(files)
|
||||
try:
|
||||
shutil.move(mvsrc, mvdest)
|
||||
except FileNotFoundError:
|
||||
self.log.log_processing(ERROR + 'Moving ' +
|
||||
files)
|
||||
except PermissionError:
|
||||
self.log.log_processing(ERROR + 'Moving ' +
|
||||
files)
|
||||
except Exception as e:
|
||||
self.log.log_processing(ERROR + 'Moving ' +
|
||||
files)
|
||||
print(e)
|
||||
finally:
|
||||
self.log.log_processing(INFO + 'Moved')
|
||||
self.log.log_processing(' ' + mvdest)
|
||||
if foundmedia:
|
||||
self.log.log_processing(INFO + STILL_MEDIA)
|
||||
# remove empty folders after moving additional files
|
||||
if os.listdir(sourcedir) == [] and remove_folders == 'True':
|
||||
currentdir = sourcedir
|
||||
self.log.log_processing(INFO + DIR_REMOVED)
|
||||
while not os.listdir(currentdir):
|
||||
self.log.log_processing(' ' + currentdir)
|
||||
os.rmdir(currentdir)
|
||||
currentdir = os.path.split(currentdir)[0]
|
||||
|
||||
# Get Source and Destination separately so preview can use the same code
|
||||
def get_locations(self, inputstring):
|
||||
""" Get file path for other file operations """
|
||||
# Get source for comparison
|
||||
source = self.location.replace('file:///', '/')
|
||||
if inputstring == 'source':
|
||||
return urllib.parse.unquote(source)
|
||||
# Set Destination Directory
|
||||
targetdir = '/' + self.rbfo.configurator.get_val('layout-path')
|
||||
targetdir = tools.data_filler(self, targetdir,
|
||||
strip_ntfs=self.strip_ntfs)
|
||||
targetloc = self.rbfo.configurator.get_val('locations')[0]
|
||||
targetpath = targetloc.replace('file:///', '/')
|
||||
targetdir = tools.folderize(targetpath, targetdir)
|
||||
# Set Destination Filename
|
||||
targetname = self.rbfo.configurator.get_val('layout-filename')
|
||||
targetname = tools.data_filler(self, targetname,
|
||||
strip_ntfs=self.strip_ntfs)
|
||||
targetname += os.path.splitext(self.location)[1]
|
||||
# Join destination
|
||||
if inputstring == 'destin':
|
||||
return urllib.parse.unquote((os.path.join(targetdir, targetname)))
|
||||
return
|
||||
|
||||
def preview(self):
|
||||
""" Running in preview mode does not change files in any way """
|
||||
print('preview')
|
||||
previewlist = os.getenv('HOME') + '/.fileorganizer-preview.log'
|
||||
damagedlist = os.getenv('HOME') + '/.fileorganizer-damaged.log'
|
||||
source = self.get_locations('source')
|
||||
destin = urllib.parse.unquote(self.get_locations('destin'))
|
||||
if not source == destin:
|
||||
# Write to preview list
|
||||
logfile = open(previewlist, "a")
|
||||
logfile.write("Change Found:\n" + source + "\n")
|
||||
logfile.write(destin + "\n\n")
|
||||
logfile.close()
|
||||
|
||||
# Moves the file to a specific location with a specific name
|
||||
def relocate(self):
|
||||
"""Performs the actual moving.
|
||||
-Move file to correct place
|
||||
-Update file location in RB database.
|
||||
"""
|
||||
source = self.get_locations('source')
|
||||
destin = urllib.parse.unquote(self.get_locations('destin'))
|
||||
# Begin Log File
|
||||
tmptime = time.strftime("%I:%M:%S %p", time.localtime())
|
||||
logheader = '%ta - %at - '
|
||||
logheader = (tools.data_filler(self, logheader,
|
||||
strip_ntfs=self.strip_ntfs) + tmptime)
|
||||
# self.log = LogFile()
|
||||
self.log.log_processing(logheader)
|
||||
self.log.log_processing((IN + source))
|
||||
|
||||
# Relocate, if necessary
|
||||
if source == destin:
|
||||
print('No need for file relocation')
|
||||
self.log.log_processing(INFO + NO_NEED)
|
||||
else:
|
||||
if os.path.isfile(destin):
|
||||
# Copy the existing file to a backup dir
|
||||
tmpdir = (self.rbfo.configurator.get_val('locations'))[0].replace('file:///', '/')
|
||||
tmpdir = urllib.parse.unquote(tmpdir)
|
||||
backupdir = tools.folderize(tmpdir, 'backup/')
|
||||
backup = os.path.join(backupdir, os.path.basename(destin))
|
||||
if os.path.isfile(backup):
|
||||
counter = 0
|
||||
backuptest = backup
|
||||
while os.path.isfile(backup):
|
||||
backup = backuptest
|
||||
counter += 1
|
||||
backup = (backup[:(backup.rfind('.'))] + str(counter) +
|
||||
backup[(backup.rfind('.')):])
|
||||
try:
|
||||
os.makedirs(os.path.dirname(backupdir))
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
shutil.move(source, backup)
|
||||
self.log.log_processing(CONFLICT + FILE_EXISTS)
|
||||
self.log.log_processing(OUT + backup)
|
||||
except FileNotFoundError:
|
||||
# we found a duplicate in the DB
|
||||
pass
|
||||
destin = backup
|
||||
else:
|
||||
# Move the file to desired destination
|
||||
shutil.move(source, destin)
|
||||
self.log.log_processing(OUT + destin)
|
||||
|
||||
# Update Rhythmbox database
|
||||
self.location = urllib.parse.quote(destin)
|
||||
self.location = ('file://' + self.location)
|
||||
self.location = self.set_ascii(self.location)
|
||||
print('Relocating file \n%s to\n%s' % (source, destin))
|
||||
self.log.log_processing(INFO + UPDATING)
|
||||
print(self.entry.get_string(RB.RhythmDBPropType.LOCATION))
|
||||
print(self.location)
|
||||
self.log.log_processing(IN + self.entry.get_string(RB.RhythmDBPropType.LOCATION))
|
||||
self.log.log_processing(OUT + self.location)
|
||||
# Make the change
|
||||
self.rbdb.entry_set(self.entry,
|
||||
RB.RhythmDBPropType.LOCATION,
|
||||
self.location)
|
||||
# Non media clean up
|
||||
self.file_cleanup(source, destin)
|
||||
self.log.log_processing('')
|
|
@ -1,10 +0,0 @@
|
|||
[Plugin]
|
||||
Loader=python3
|
||||
Module=fileorganizer
|
||||
IAge=2
|
||||
Depends=rb
|
||||
Name=File Organizer
|
||||
Description=A music file and folder organizer
|
||||
Authors=Lachlan de Waard <lachlan.00@gmail.com>, Wolter Hellmund <wolterh6@gmail.com>
|
||||
Copyright=Copyright © 2010 Wolter Hellmund
|
||||
Website=https://github.com/lachlan-00/rb-fileorganizer
|
|
@ -1,231 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
""" Fileorganizer
|
||||
|
||||
----------------Authors----------------
|
||||
Lachlan de Waard <lachlan.00@gmail.com>
|
||||
Wolter Hellmund <wolterh6@gmail.com>
|
||||
----------------Licence----------------
|
||||
Creative Commons - Attribution Share Alike v3.0
|
||||
|
||||
"""
|
||||
|
||||
import configparser
|
||||
import os
|
||||
import shutil
|
||||
import gi
|
||||
|
||||
gi.require_version('Peas', '1.0')
|
||||
gi.require_version('PeasGtk', '1.0')
|
||||
gi.require_version('Notify', '0.7')
|
||||
gi.require_version('RB', '3.0')
|
||||
|
||||
from gi.repository import GObject, Peas, PeasGtk, Gtk, Notify, Gio
|
||||
from gi.repository import RB
|
||||
|
||||
import fileops
|
||||
import tools
|
||||
|
||||
from configurator import FileorganizerConf
|
||||
|
||||
PLUGIN_PATH = 'plugins/fileorganizer/'
|
||||
CONFIGFILE = 'fo.conf'
|
||||
CONFIGTEMPLATE = 'fo.conf.template'
|
||||
UIFILE = 'config.ui'
|
||||
C = "conf"
|
||||
|
||||
|
||||
class Fileorganizer(GObject.Object, Peas.Activatable, PeasGtk.Configurable):
|
||||
""" Main class that loads fileorganizer into Rhythmbox """
|
||||
__gtype_name = 'fileorganizer'
|
||||
object = GObject.property(type=GObject.Object)
|
||||
_menu_names = ['browser-popup',
|
||||
'playlist-popup']
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
GObject.Object.__init__(self)
|
||||
super(Fileorganizer, self).__init__(*args, **kwargs)
|
||||
self.configurator = FileorganizerConf()
|
||||
self.conf = configparser.RawConfigParser()
|
||||
self.configfile = RB.find_user_data_file(PLUGIN_PATH + CONFIGFILE)
|
||||
self.ui_file = RB.find_user_data_file(PLUGIN_PATH + UIFILE)
|
||||
self.shell = None
|
||||
self.rbdb = None
|
||||
self.action_group = None
|
||||
self.action = None
|
||||
self.source = None
|
||||
self.plugin_info = "fileorganizer"
|
||||
|
||||
# Rhythmbox standard Activate method
|
||||
def do_activate(self):
|
||||
""" Activate the plugin """
|
||||
print("activating Fileorganizer")
|
||||
shell = self.object
|
||||
self.shell = shell
|
||||
self.rbdb = shell.props.db
|
||||
self._check_configfile()
|
||||
self.menu_build(shell)
|
||||
|
||||
# Rhythmbox standard Deactivate method
|
||||
def do_deactivate(self):
|
||||
""" Deactivate the plugin """
|
||||
print("deactivating Fileorganizer")
|
||||
app = Gio.Application.get_default()
|
||||
for menu_name in Fileorganizer._menu_names:
|
||||
app.remove_plugin_menu_item(menu_name, 'selection-' + 'organize')
|
||||
self.action_group = None
|
||||
self.action = None
|
||||
# self.source.delete_thyself()
|
||||
self.source = None
|
||||
|
||||
# FUNCTIONS
|
||||
# check if configfile is present, if not copy from template folder
|
||||
def _check_configfile(self):
|
||||
""" Copy the default config template or load existing config file """
|
||||
if not os.path.isfile(self.configfile):
|
||||
template = RB.find_user_data_file(PLUGIN_PATH + CONFIGTEMPLATE)
|
||||
folder = os.path.split(self.configfile)[0]
|
||||
if not os.path.exists(folder):
|
||||
os.makedirs(folder)
|
||||
shutil.copyfile(template, self.configfile)
|
||||
|
||||
# Build menu option
|
||||
def menu_build(self, shell):
|
||||
""" Add 'Organize Selection' to the Rhythmbox righ-click menu """
|
||||
app = Gio.Application.get_default()
|
||||
|
||||
# create action
|
||||
action = Gio.SimpleAction(name="organize-selection")
|
||||
action.connect("activate", self.organize_selection)
|
||||
app.add_action(action)
|
||||
|
||||
# create menu item
|
||||
item = Gio.MenuItem()
|
||||
item.set_label("Organize Selection")
|
||||
item.set_detailed_action("app.organize-selection")
|
||||
|
||||
# add plugin menu item
|
||||
# app.add_plugin_menu_item('browser-popup', "Organize Selection", item)
|
||||
for menu_name in Fileorganizer._menu_names:
|
||||
app.add_plugin_menu_item(menu_name, "Organize Selection", item)
|
||||
app.add_action(action)
|
||||
|
||||
# Create the Configure window in the rhythmbox plugins menu
|
||||
def do_create_configure_widget(self):
|
||||
""" Load the glade UI for the config window """
|
||||
build = Gtk.Builder()
|
||||
build.add_from_file(self.ui_file)
|
||||
self._check_configfile()
|
||||
self.conf.read(self.configfile)
|
||||
window = build.get_object("fileorganizer")
|
||||
build.get_object("log_path").set_text(self.conf.get(C, "log_path"))
|
||||
if self.conf.get(C, "log_enabled") == "True":
|
||||
build.get_object("logbutton").set_active(True)
|
||||
if self.conf.get(C, "cleanup_enabled") == "True":
|
||||
build.get_object("cleanupbutton").set_active(True)
|
||||
if self.conf.get(C, "cleanup_empty_folders") == "True":
|
||||
build.get_object("removebutton").set_active(True)
|
||||
if self.conf.get(C, "preview_mode") == "True":
|
||||
build.get_object("previewbutton").set_active(True)
|
||||
if self.conf.get(C, "strip_ntfs") == "True":
|
||||
build.get_object("ntfsbutton").set_active(True)
|
||||
|
||||
build.get_object("logbutton").connect('clicked', lambda x: self.save_config(build))
|
||||
build.get_object("log_path").connect('changed', lambda x: self.save_config(build))
|
||||
build.get_object("cleanupbutton").connect('clicked', lambda x: self.save_config(build))
|
||||
build.get_object("removebutton").connect('clicked', lambda x: self.save_config(build))
|
||||
build.get_object("previewbutton").connect('clicked', lambda x: self.save_config(build))
|
||||
build.get_object("ntfsbutton").connect('clicked', lambda x: self.save_config(build))
|
||||
|
||||
return window
|
||||
|
||||
def save_config(self, builder):
|
||||
""" Save changes to the plugin config """
|
||||
if builder.get_object("logbutton").get_active():
|
||||
self.conf.set(C, "log_enabled", "True")
|
||||
else:
|
||||
self.conf.set(C, "log_enabled", "False")
|
||||
|
||||
if builder.get_object("cleanupbutton").get_active():
|
||||
self.conf.set(C, "cleanup_enabled", "True")
|
||||
else:
|
||||
self.conf.set(C, "cleanup_enabled", "False")
|
||||
|
||||
if builder.get_object("removebutton").get_active():
|
||||
self.conf.set(C, "cleanup_empty_folders", "True")
|
||||
else:
|
||||
self.conf.set(C, "cleanup_empty_folders", "False")
|
||||
if builder.get_object("previewbutton").get_active():
|
||||
self.conf.set(C, "preview_mode", "True")
|
||||
else:
|
||||
self.conf.set(C, "preview_mode", "False")
|
||||
if builder.get_object("ntfsbutton").get_active():
|
||||
self.conf.set(C, "strip_ntfs", "True")
|
||||
else:
|
||||
self.conf.set(C, "strip_ntfs", "False")
|
||||
self.conf.set(C, "log_path",
|
||||
builder.get_object("log_path").get_text())
|
||||
datafile = open(self.configfile, "w")
|
||||
self.conf.write(datafile)
|
||||
datafile.close()
|
||||
|
||||
# Organize selection
|
||||
def organize_selection(self, action, shell):
|
||||
""" get your current selection and run process_selection """
|
||||
page = self.shell.props.selected_page
|
||||
if not hasattr(page, "get_entry_view"):
|
||||
return
|
||||
selected = page.get_entry_view()
|
||||
selection = selected.get_selected_entries()
|
||||
self.process_selection(selection)
|
||||
|
||||
# Process selection: Run in Preview Mode or Normal Mode
|
||||
def process_selection(self, filelist):
|
||||
""" using your selection, run the preview or process from fileops """
|
||||
self.conf.read(self.configfile)
|
||||
strip_ntfs = self.conf.get(C, "strip_ntfs") == "True"
|
||||
# Run in Preview Modelogops
|
||||
if self.conf.get(C, "preview_mode") == "True":
|
||||
if filelist:
|
||||
prelist = os.getenv('HOME') + '/.fileorganizer-preview.log'
|
||||
datafile = open(prelist, "w")
|
||||
datafile.close()
|
||||
damlist = os.getenv('HOME') + '/.fileorganizer-damaged.log'
|
||||
datafile = open(damlist, "w")
|
||||
datafile.close()
|
||||
for item in filelist:
|
||||
item = fileops.MusicFile(self, item, strip_ntfs=strip_ntfs)
|
||||
item.preview()
|
||||
Notify.init('Fileorganizer')
|
||||
title = 'Fileorganizer'
|
||||
note = 'Preview Has Completed'
|
||||
notification = Notify.Notification.new(title, note, None)
|
||||
Notify.Notification.show(notification)
|
||||
# Show Results of preview
|
||||
tools.results(prelist, damlist)
|
||||
else:
|
||||
# Run Normally
|
||||
self.organize(filelist, strip_ntfs)
|
||||
Notify.init('Fileorganizer')
|
||||
title = 'Fileorganizer'
|
||||
note = 'Your selection is organised'
|
||||
notification = Notify.Notification.new(title, note, None)
|
||||
Notify.Notification.show(notification)
|
||||
return
|
||||
|
||||
# Organize array of files
|
||||
def organize(self, filelist, strip_ntfs=False):
|
||||
""" get fileops to move media files to the correct location """
|
||||
if filelist:
|
||||
for item in filelist:
|
||||
item = fileops.MusicFile(self, item, strip_ntfs=strip_ntfs)
|
||||
item.relocate()
|
||||
return
|
||||
|
||||
|
||||
class PythonSource(RB.Source):
|
||||
""" Register with rhythmbox """
|
||||
|
||||
def __init__(self):
|
||||
RB.Source.__init__(self)
|
||||
GObject.type_register_dynamic(PythonSource)
|
|
@ -1,8 +0,0 @@
|
|||
[conf]
|
||||
cleanup_empty_folders = True
|
||||
cleanup_enabled = True
|
||||
log_path = .fileorganizer.log
|
||||
log_enabled = True
|
||||
preview_mode = False
|
||||
strip_ntfs = False
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
""" FileOrganizer Safe Install Script
|
||||
|
||||
Install if dependencies are satisfied
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
import depends_test
|
||||
|
||||
INSTALLPATH = os.path.join(os.getenv('HOME'),
|
||||
".local/share/rhythmbox/plugins/fileorganizer")
|
||||
|
||||
# The depends test will check for required modules
|
||||
if depends_test.check():
|
||||
# check plugin directory
|
||||
if not os.path.exists(INSTALLPATH):
|
||||
os.makedirs(INSTALLPATH)
|
||||
# copy the contents of the plugin directory
|
||||
for i in os.listdir('./'):
|
||||
if os.path.isfile(i):
|
||||
print('Copying... ' + i)
|
||||
shutil.copy(i, INSTALLPATH)
|
||||
print('\nFileOrganizer is now installed\n')
|
||||
else:
|
||||
print('please check your OS for missing packages')
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
""" Fileorganizer log operations
|
||||
|
||||
----------------Authors----------------
|
||||
Lachlan de Waard <lachlan.00@gmail.com>
|
||||
----------------Licence----------------
|
||||
Creative Commons - Attribution Share Alike v3.0
|
||||
|
||||
"""
|
||||
|
||||
|
||||
import os
|
||||
import codecs
|
||||
import configparser
|
||||
|
||||
|
||||
class LogFile(object):
|
||||
""" Log file actions. Open, create and edit log files """
|
||||
def __init__(self):
|
||||
self.conf = configparser.RawConfigParser()
|
||||
conffile = (os.getenv('HOME') + '/.local/share/rhythmbox/' +
|
||||
'plugins/fileorganizer/fo.conf')
|
||||
self.conf.read(conffile)
|
||||
|
||||
# Write to log file
|
||||
def log_processing(self, logmessage):
|
||||
""" Perform log operations """
|
||||
log_enabled = self.conf.get('conf', 'log_enabled')
|
||||
log_filename = self.conf.get('conf', 'log_path')
|
||||
log_filename = os.getenv('HOME') + '/' + log_filename
|
||||
# Log if Enabled
|
||||
if log_enabled == 'True':
|
||||
# Create if missing
|
||||
if (not os.path.exists(log_filename) or
|
||||
os.path.getsize(log_filename) >= 1076072):
|
||||
files = codecs.open(log_filename, "w", "utf8")
|
||||
files.close()
|
||||
files = codecs.open(log_filename, "a", "utf8")
|
||||
try:
|
||||
logline = [logmessage]
|
||||
files.write((u"".join(logline)) + u"\n")
|
||||
except UnicodeDecodeError:
|
||||
print('LOG UNICODE ERROR')
|
||||
logline = [logmessage.decode('utf-8')]
|
||||
files.write((u"".join(logline)) + u"\n")
|
||||
files.close()
|
|
@ -1,91 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
""" Fileorganizer tools
|
||||
|
||||
----------------Authors----------------
|
||||
Lachlan de Waard <lachlan.00@gmail.com>
|
||||
Wolter Hellmund <wolterh6@gmail.com>
|
||||
----------------Licence----------------
|
||||
Creative Commons - Attribution Share Alike v3.0
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
import fileops
|
||||
|
||||
|
||||
class LibraryLocationError(Exception):
|
||||
"""To be raised when a file:// library location could not be found"""
|
||||
|
||||
|
||||
# Returns the library location for a file,
|
||||
# or the default location if the file is not inside any library location
|
||||
# Raises an error if there are no file:// locations in the library
|
||||
def library_location(files, library_locations):
|
||||
file_locations = list(l for l in library_locations if l.startswith('file://'))
|
||||
if not file_locations:
|
||||
raise LibraryLocationError('No file:// locations could be found in the library')
|
||||
return next((l for l in file_locations if files.location.startswith(l)),
|
||||
file_locations[0])
|
||||
|
||||
|
||||
# Create a folder inside a library path if non-existent, and return it
|
||||
def folderize(library_path, folder):
|
||||
""" Create folders for file operations """
|
||||
dirpath = library_path + '/'
|
||||
# Strip full stops from paths
|
||||
folder = folder.replace('/.', '/_')
|
||||
if not os.path.exists(dirpath + folder):
|
||||
os.makedirs(dirpath + folder)
|
||||
return os.path.normpath(dirpath + folder)
|
||||
|
||||
|
||||
# Replace the placeholders with the correct values
|
||||
def data_filler(files, string, strip_ntfs=False):
|
||||
""" replace string data with metadata from current item """
|
||||
string = str(string)
|
||||
for key in fileops.RB_METATYPES:
|
||||
if '%' + key in string:
|
||||
if key == 'aa':
|
||||
artisttest = files.get_metadata('aa')
|
||||
if artisttest == '':
|
||||
string = string.replace(('%' + key),
|
||||
process(files.get_metadata('ta'),
|
||||
strip_ntfs))
|
||||
# print(string + ' ALBUM ARTIST NOT FOUND')
|
||||
else:
|
||||
string = string.replace(('%' + key),
|
||||
process(files.get_metadata(key),
|
||||
strip_ntfs))
|
||||
# print(string + ' ALBUM ARTIST FOUND')
|
||||
else:
|
||||
string = string.replace(('%' + key),
|
||||
process(files.get_metadata(key),
|
||||
strip_ntfs))
|
||||
return string
|
||||
|
||||
|
||||
# Process names and replace any undesired characters
|
||||
def process(string, strip_ntfs=False):
|
||||
""" Prevent / character to avoid creating folders """
|
||||
string = string.replace('/', '_') # if present
|
||||
string = string.replace(' ', '_')
|
||||
if strip_ntfs:
|
||||
string = ''.join(c for c in string if c not in '<>:"\\|?*')
|
||||
while string.endswith('.'):
|
||||
string = string[:-1]
|
||||
return string
|
||||
|
||||
|
||||
def results(prelist, damlist):
|
||||
""" Show the results of your preview run """
|
||||
if not os.stat(prelist)[6] == 0:
|
||||
print('fileorganizer: open preview list')
|
||||
subprocess.Popen(['/usr/bin/xdg-open', prelist])
|
||||
if not os.stat(damlist)[6] == 0:
|
||||
print('fileorganizer: open damaged file list')
|
||||
subprocess.Popen(['/usr/bin/xdg-open', damlist])
|
||||
return
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
""" FileOrganizer Uninstall Script
|
||||
|
||||
Remove files from the plugin folder
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
INSTALLPATH = os.path.join(os.getenv('HOME'),
|
||||
".local/share/rhythmbox/plugins/fileorganizer")
|
||||
TEMPLATEPATH = os.path.join(INSTALLPATH, 'template')
|
||||
|
||||
if os.path.isdir(INSTALLPATH):
|
||||
shutil.rmtree(INSTALLPATH)
|
||||
print('\nFileOrganizer is uninstalled\n')
|
||||
else:
|
||||
print('\nFileOrganizer is not installed\n')
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
set realname = 'bob'
|
||||
set from = bob@example.com
|
||||
|
||||
set smtp_url = smtps://bob@mail.example.com/
|
||||
|
||||
set ssl_force_tls = yes
|
||||
set ssl_starttls = yes
|
||||
|
||||
set imap_user = bob@example.com
|
||||
set folder = imaps://mail.example.com/
|
||||
set imap_check_subscribed
|
||||
|
||||
# Folder
|
||||
set spoolfile = +INBOX
|
||||
set postponed = +Drafts
|
||||
set record = +Sent
|
||||
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
macro index ir '<sync-mailbox><enter-command>source ~/.mutt/account.net.riseup<enter><change-folder>!<enter>'
|
||||
macro index it '<sync-mailbox><enter-command>source ~/.mutt/account.sh.ttm<enter><change-folder>!<enter>'
|
||||
macro index if '<sync-mailbox><enter-command>source ~/.mutt/account.org.bellz<enter><change-folder>!<enter>'
|
||||
|
||||
|
||||
folder-hook 'account.net.riseup' 'source ~/.mutt/account.net.riseup'
|
||||
folder-hook 'account.sh.ttm' 'source ~/.mutt/account.sh.ttm'
|
||||
folder-hook 'account.org.bellz' 'source ~/.mutt/account.org.bellz'
|
||||
|
||||
source ~/.mutt/account.net.riseup
|
||||
|
||||
|
46
.mutt/muttrc
46
.mutt/muttrc
|
@ -1,46 +0,0 @@
|
|||
|
||||
set sort = reverse-threads
|
||||
set message_cachedir=~/.cache/mutt/messages
|
||||
|
||||
set pager_stop
|
||||
bind pager <up> previous-line
|
||||
bind pager <down> next-line
|
||||
|
||||
bind index G imap-fetch-mail
|
||||
bind index g noop
|
||||
macro index gi "<change-folder>=INBOX<enter>" "Go to Inbox"
|
||||
macro index gs "<change-folder>=Spam<enter>" "Go to Spam"
|
||||
macro index gS "<change-folder>=Sent<enter>" "Go to Sent"
|
||||
macro index gd "<change-folder>=Drafts<enter>" "Go to Drafts"
|
||||
macro index gt "<change-folder>=Trash<enter>" "Go to Trash"
|
||||
|
||||
|
||||
source ~/.local/share/mutt/gpg.rc
|
||||
source "gpg -d ~/.mutt/passwords.gpg |"
|
||||
|
||||
source ~/.mutt/accounts
|
||||
|
||||
# c o l o r s
|
||||
color normal white default
|
||||
color attachment brightyellow black
|
||||
color hdrdefault cyan default
|
||||
color indicator black brightgreen
|
||||
color markers brightred default
|
||||
color quoted green default
|
||||
color signature cyan default
|
||||
color status brightgreen black
|
||||
color tilde blue default
|
||||
color tree red default
|
||||
|
||||
color index red default ~D
|
||||
color index magenta default ~T
|
||||
|
||||
color body brightred default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
|
||||
# identifies email addresses
|
||||
|
||||
color body brightblue default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+
|
||||
# identifies URLs
|
||||
#
|
||||
|
||||
|
||||
|
71
.profile
71
.profile
|
@ -1,71 +0,0 @@
|
|||
# ~/.profile: executed by the command interpreter for login shells.
|
||||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
||||
# exists.
|
||||
# see /usr/share/doc/bash/examples/startup-files for examples.
|
||||
# the files are located in the bash-doc package.
|
||||
|
||||
# the default umask is set in /etc/profile; for setting the umask
|
||||
# for ssh logins, install and configure the libpam-umask package.
|
||||
#umask 022
|
||||
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
# include .bashrc if it exists
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/.local/bin" ] ; then
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
export TZ='America/New_York'
|
||||
export GTK_THEME=Materia-dark
|
||||
export LANG="en_US.UTF-8"
|
||||
export LC_ALL="en_US.UTF-8"
|
||||
|
||||
export CDPATH=:~
|
||||
|
||||
export EDITOR=vim
|
||||
export BROWSER=firefox
|
||||
|
||||
# start the ssh agent
|
||||
[[ -z $SSH_AGENT_PID ]] && eval $(ssh-agent)
|
||||
|
||||
[ "$(tty)" = "/dev/tty1" ] && ! pgrep -x i3 > /dev/null && exec startx
|
||||
|
||||
#[[ -n "$TMUX" ]] && source .zshrc
|
||||
|
||||
if [ "$TERM" = "linux" ]; then
|
||||
setfont ter-u22n
|
||||
echo -en "\e[?6c"
|
||||
echo -en "\e[?16;14;204c"
|
||||
echo -en "\e]P0161510" #black
|
||||
echo -en "\e]P84C4635" #darkgrey
|
||||
echo -en "\e]P1A32810" #darkred
|
||||
echo -en "\e]P9CC3214" #red
|
||||
echo -en "\e]P2727A18" #darkgreen
|
||||
echo -en "\e]PA8E991E" #green
|
||||
echo -en "\e]P3A37720" #brown
|
||||
echo -en "\e]PBCC9528" #yellow
|
||||
echo -en "\e]P43D6266" #darkblue
|
||||
echo -en "\e]PC4C7B7F" #blue
|
||||
echo -en "\e]P57A4955" #darkmagenta
|
||||
echo -en "\e]PD995B6B" #magenta
|
||||
echo -en "\e]P6557A55" #darkcyan
|
||||
echo -en "\e]PE6B996B" #cyan
|
||||
echo -en "\e]P78E8463" #lightgrey
|
||||
echo -en "\e]PFCCBCBE" #white
|
||||
clear #for background artifacting
|
||||
fi
|
||||
|
||||
LS_COLORS='rs=0:di=38;5;33:ln=38;5;51:mh=00:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=01;37;41:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;40:*.tar=38;5;9:*.tgz=38;5;9:*.arc=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lha=38;5;9:*.lz4=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.tzo=38;5;9:*.t7z=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lrz=38;5;9:*.lz=38;5;9:*.lzo=38;5;9:*.xz=38;5;9:*.zst=38;5;9:*.tzst=38;5;9:*.bz2=38;5;9:*.bz=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;5;9:*.sar=38;5;9:*.rar=38;5;9:*.alz=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.cab=38;5;9:*.wim=38;5;9:*.swm=38;5;9:*.dwm=38;5;9:*.esd=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.mjpg=38;5;13:*.mjpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.webm=38;5;13:*.webp=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:';
|
||||
export LS_COLORS
|
||||
|
47
.ssh/config
47
.ssh/config
|
@ -1,47 +0,0 @@
|
|||
AddKeysToAgent yes
|
||||
|
||||
Host git-tor-alias
|
||||
User gitserv
|
||||
HostName ltcpiz23dznrv62p.onion
|
||||
ProxyCommand nc -X 5 -x 127.0.0.1:9050 %h %p
|
||||
|
||||
Host black
|
||||
User yali
|
||||
HostName black6kfjetfuzaeozz7fs53whh7xtd4e27telrf5fg5kgdt5ah5plad.onion
|
||||
ProxyCommand nc -X 5 -x 127.0.0.1:9050 %h %p
|
||||
|
||||
Host freqs
|
||||
User lickthecheese
|
||||
HostName radiofreqs.space
|
||||
|
||||
Host ginlang
|
||||
User biblebot
|
||||
HostName ipdllc.uk.to
|
||||
Port 1023
|
||||
|
||||
Host tilde
|
||||
User lickthecheese
|
||||
HostName tilde.team
|
||||
|
||||
|
||||
Host rt
|
||||
User xfnw
|
||||
HostName rawtext.club
|
||||
|
||||
Host xt
|
||||
User xfnw
|
||||
HostName tilde.team
|
||||
|
||||
Host falcon
|
||||
User owen
|
||||
HostName data.bellz.org
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Host hashbang
|
||||
HostName de1.hashbang.sh
|
||||
IdentitiesOnly yes
|
||||
User xfnw
|
||||
IdentityFile /home/xfnw/.ssh/id_ed25519
|
66
.tmate.conf
66
.tmate.conf
|
@ -1,66 +0,0 @@
|
|||
# Usage options
|
||||
|
||||
## Always tell windows we can use 256 colors.
|
||||
set-option -g default-terminal "tmux-256color"
|
||||
|
||||
## Set scrollback length.
|
||||
set-option -g history-limit 20000
|
||||
|
||||
## Send xterm(1) focus events to windows running under the server.
|
||||
set-option -g focus-events on
|
||||
|
||||
## Indicate modifiers like shift/alt/ctrl using xterm(1) sequences.
|
||||
set-option -g xterm-keys on
|
||||
|
||||
## Set terminal (client) titles appropriately.
|
||||
set-option -g set-titles on
|
||||
set-option -g set-titles-string "tmux - #T"
|
||||
|
||||
## Don't make Esc usage have a delay (which is annoying when using kak(1)).
|
||||
set-option -g escape-time 25
|
||||
|
||||
# Style
|
||||
## Status bar colors.
|
||||
set-option -g status-left-style "fg=colour10"
|
||||
set-option -g status-right-style "fg=colour10"
|
||||
set-option -g status-style "bg=default,fg=colour10"
|
||||
|
||||
## Pane colors.
|
||||
set-option -g pane-active-border-style "bg=default,fg=colour10"
|
||||
|
||||
## Window entries (in status bar) colors.
|
||||
set-option -g window-status-activity-style "bg=default,fg=colour235,bold,reverse"
|
||||
set-option -g window-status-bell-style "bg=default,fg=white,bold,reverse"
|
||||
set-option -g window-status-current-style "bg=default,fg=colour10,bold,reverse"
|
||||
set-option -g window-status-style "bg=default,fg=colour10"
|
||||
|
||||
# Status bar
|
||||
|
||||
set-option -g status on
|
||||
set-option -g status-interval 5
|
||||
set-option -g status-position top
|
||||
set-option -g status-justify left
|
||||
|
||||
## Window format, akin to catgirl(1).
|
||||
set-option -g window-status-format " #I #W "
|
||||
set-option -g window-status-separator ""
|
||||
set-option -g window-status-current-format " #I #W "
|
||||
|
||||
## Nothing on the left, a simple clock and hostname (no domain) on the right.
|
||||
set-option -g status-left ""
|
||||
set-option -g status-right "#h %I:%M %p"
|
||||
set-option -g status-left-length 0
|
||||
|
||||
# Windows
|
||||
set-option -g monitor-activity on
|
||||
set-option -g visual-activity on
|
||||
set-option -g renumber-windows on
|
||||
set-option -g focus-events on
|
||||
|
||||
# Keybinds
|
||||
bind N swap-window -t +1 -d
|
||||
bind P swap-window -t -1 -d
|
||||
bind S-Left swap-pane -s '{left-of}'
|
||||
bind S-Right swap-pane -s '{right-of}'
|
||||
bind S-Up swap-pane -s '{up-of}'
|
||||
bind S-Down swap-pane -s '{down-of}'
|
66
.tmux.conf
66
.tmux.conf
|
@ -1,66 +0,0 @@
|
|||
# Usage options
|
||||
|
||||
## Always tell windows we can use 256 colors.
|
||||
set-option -g default-terminal "tmux-256color"
|
||||
|
||||
## Set scrollback length.
|
||||
set-option -g history-limit 20000
|
||||
|
||||
## Send xterm(1) focus events to windows running under the server.
|
||||
set-option -g focus-events on
|
||||
|
||||
## Indicate modifiers like shift/alt/ctrl using xterm(1) sequences.
|
||||
set-option -g xterm-keys on
|
||||
|
||||
## Set terminal (client) titles appropriately.
|
||||
set-option -g set-titles on
|
||||
set-option -g set-titles-string "tmux - #T"
|
||||
|
||||
## Don't make Esc usage have a delay (which is annoying when using kak(1)).
|
||||
set-option -g escape-time 25
|
||||
|
||||
# Style
|
||||
## Status bar colors.
|
||||
set-option -g status-left-style "fg=colour10"
|
||||
set-option -g status-right-style "fg=colour10"
|
||||
set-option -g status-style "bg=default,fg=colour10"
|
||||
|
||||
## Pane colors.
|
||||
set-option -g pane-active-border-style "bg=default,fg=colour10"
|
||||
|
||||
## Window entries (in status bar) colors.
|
||||
set-option -g window-status-activity-style "bg=default,fg=colour235,bold,reverse"
|
||||
set-option -g window-status-bell-style "bg=default,fg=white,bold,reverse"
|
||||
set-option -g window-status-current-style "bg=default,fg=colour10,bold,reverse"
|
||||
set-option -g window-status-style "bg=default,fg=colour10"
|
||||
|
||||
# Status bar
|
||||
|
||||
set-option -g status on
|
||||
set-option -g status-interval 5
|
||||
set-option -g status-position top
|
||||
set-option -g status-justify left
|
||||
|
||||
## Window format, akin to catgirl(1).
|
||||
set-option -g window-status-format " #I #W "
|
||||
set-option -g window-status-separator ""
|
||||
set-option -g window-status-current-format " #I #W "
|
||||
|
||||
## Nothing on the left, a simple clock and hostname (no domain) on the right.
|
||||
set-option -g status-left ""
|
||||
set-option -g status-right "#h %I:%M %p"
|
||||
set-option -g status-left-length 0
|
||||
|
||||
# Windows
|
||||
set-option -g monitor-activity on
|
||||
set-option -g visual-activity on
|
||||
set-option -g renumber-windows on
|
||||
set-option -g focus-events on
|
||||
|
||||
# Keybinds
|
||||
bind N swap-window -t +1 -d
|
||||
bind P swap-window -t -1 -d
|
||||
bind S-Left swap-pane -s '{left-of}'
|
||||
bind S-Right swap-pane -s '{right-of}'
|
||||
bind S-Up swap-pane -s '{up-of}'
|
||||
bind S-Down swap-pane -s '{down-of}'
|
|
@ -1,364 +0,0 @@
|
|||
"Check for Python Support"
|
||||
if !has('python3')
|
||||
com! -nargs=* CoVim echoerr "Error: CoVim requires vim compiled with +python3"
|
||||
finish
|
||||
endif
|
||||
|
||||
com! -nargs=* CoVim py3 CoVim.command(<f-args>)
|
||||
|
||||
"Needs to be set on connect, MacVim overrides otherwise"
|
||||
function! SetCoVimColors ()
|
||||
hi CursorUser ctermbg=White ctermfg=Black guibg=White guifg=Black gui=bold term=bold cterm=bold
|
||||
hi Cursor1 ctermbg=DarkRed ctermfg=White guibg=DarkRed guifg=White gui=bold term=bold cterm=bold
|
||||
hi Cursor2 ctermbg=DarkBlue ctermfg=White guibg=DarkBlue guifg=White gui=bold term=bold cterm=bold
|
||||
hi Cursor3 ctermbg=DarkGreen ctermfg=White guibg=DarkGreen guifg=White gui=bold term=bold cterm=bold
|
||||
hi Cursor4 ctermbg=DarkCyan ctermfg=White guibg=DarkCyan guifg=White gui=bold term=bold cterm=bold
|
||||
hi Cursor5 ctermbg=DarkMagenta ctermfg=White guibg=DarkMagenta guifg=White gui=bold term=bold cterm=bold
|
||||
hi Cursor6 ctermbg=Brown ctermfg=White guibg=Brown guifg=White gui=bold term=bold cterm=bold
|
||||
hi Cursor7 ctermbg=LightRed ctermfg=Black guibg=LightRed guifg=Black gui=bold term=bold cterm=bold
|
||||
hi Cursor8 ctermbg=LightBlue ctermfg=Black guibg=LightBlue guifg=Black gui=bold term=bold cterm=bold
|
||||
hi Cursor9 ctermbg=LightGreen ctermfg=Black guibg=LightGreen guifg=Black gui=bold term=bold cterm=bold
|
||||
hi Cursor10 ctermbg=LightCyan ctermfg=Black guibg=LightCyan guifg=Black gui=bold term=bold cterm=bold
|
||||
hi Cursor0 ctermbg=LightYellow ctermfg=Black guibg=LightYellow guifg=Black gui=bold term=bold cterm=bold
|
||||
endfunction
|
||||
|
||||
if !exists("CoVim_default_name")
|
||||
let CoVim_default_name = 0
|
||||
endif
|
||||
if !exists("CoVim_default_port")
|
||||
let CoVim_default_port = 0
|
||||
endif
|
||||
|
||||
python3 << EOF
|
||||
|
||||
import vim
|
||||
import os
|
||||
import json
|
||||
import warnings
|
||||
from twisted.internet.protocol import ClientFactory, Protocol
|
||||
from twisted.internet import reactor
|
||||
from threading import Thread
|
||||
from time import sleep
|
||||
|
||||
# Ignore Warnings
|
||||
warnings.filterwarnings('ignore', '.*', UserWarning)
|
||||
warnings.filterwarnings('ignore', '.*', DeprecationWarning)
|
||||
|
||||
# Find the server path
|
||||
CoVimServerPath = vim.eval('expand("<sfile>:h")') + '/CoVimServer.py'
|
||||
|
||||
## CoVim Protocol
|
||||
class CoVimProtocol(Protocol):
|
||||
def __init__(self, fact):
|
||||
self.fact = fact
|
||||
|
||||
def send(self, event):
|
||||
self.transport.write(event.encode('utf-8'))
|
||||
|
||||
def connectionMade(self):
|
||||
self.send(CoVim.username)
|
||||
|
||||
def dataReceived(self, data_string):
|
||||
def clean_data_string(d_s):
|
||||
bad_data = d_s.find("}{")
|
||||
if bad_data > -1:
|
||||
d_s = d_s[:bad_data+1]
|
||||
return d_s
|
||||
|
||||
if isinstance(data_string, bytes):
|
||||
data_string = data_string.decode('utf-8')
|
||||
data_string = clean_data_string(data_string)
|
||||
packet = json.loads(data_string)
|
||||
if 'packet_type' in packet.keys():
|
||||
data = packet['data']
|
||||
if packet['packet_type'] == 'message':
|
||||
if data['message_type'] == 'error_newname_taken':
|
||||
CoVim.disconnect()
|
||||
print('ERROR: Name already in use. Please try a different name')
|
||||
if data['message_type'] == 'error_newname_invalid':
|
||||
CoVim.disconnect()
|
||||
print('ERROR: Name contains illegal characters. Only numbers, letters, underscores, and dashes allowed. Please try a different name')
|
||||
if data['message_type'] == 'connect_success':
|
||||
CoVim.setupWorkspace()
|
||||
if 'buffer' in data.keys():
|
||||
CoVim.vim_buffer = data['buffer']
|
||||
vim.current.buffer[:] = CoVim.vim_buffer
|
||||
CoVim.addUsers(data['collaborators'])
|
||||
print('Success! You\'re now connected [Port '+str(CoVim.port)+']')
|
||||
if data['message_type'] == 'user_connected':
|
||||
CoVim.addUsers([data['user']])
|
||||
print(data['user']['name']+' connected to this document')
|
||||
if data['message_type'] == 'user_disconnected':
|
||||
CoVim.remUser(data['name'])
|
||||
print(data['name']+' disconnected from this document')
|
||||
if packet['packet_type'] == 'update':
|
||||
if 'buffer' in data.keys() and data['name'] != CoVim.username:
|
||||
b_data = data['buffer']
|
||||
CoVim.vim_buffer = vim.current.buffer[:b_data['start']] \
|
||||
+ b_data['buffer'] \
|
||||
+ vim.current.buffer[b_data['end']-b_data['change_y']+1:]
|
||||
vim.current.buffer[:] = CoVim.vim_buffer
|
||||
if 'updated_cursors' in data.keys():
|
||||
# We need to update your own cursor as soon as possible, then update other cursors after
|
||||
for updated_user in data['updated_cursors']:
|
||||
vim.command(':call matchdelete(' + str(CoVim.collab_manager.collaborators[updated_user['name']][1]) + ')')
|
||||
vim.command(':call matchadd(\'' + CoVim.collab_manager.collaborators[updated_user['name']][0] + '\', \'\%' + str(updated_user['cursor']['x']) + 'v.\%' + str(updated_user['cursor']['y']) + 'l\', 10, ' + str(CoVim.collab_manager.collaborators[updated_user['name']][1]) + ')')
|
||||
#for updated_user in data['updated_cursors']:
|
||||
# if CoVim.username == updated_user['name'] and data['name'] != CoVim.username:
|
||||
# vim.current.window.cursor = (updated_user['cursor']['y'], updated_user['cursor']['x'])
|
||||
#data['cursor']['x'] = max(1,data['cursor']['x'])
|
||||
#print(str(data['cursor']['x'])+', '+str(data['cursor']['y'])
|
||||
vim.command(':redraw')
|
||||
#vim.command(':set t_vi=')
|
||||
|
||||
|
||||
#CoVimFactory - Handles Socket Communication
|
||||
class CoVimFactory(ClientFactory):
|
||||
|
||||
def buildProtocol(self, addr):
|
||||
self.p = CoVimProtocol(self)
|
||||
return self.p
|
||||
|
||||
def startFactory(self):
|
||||
self.isConnected = True
|
||||
|
||||
def stopFactory(self):
|
||||
self.isConnected = False
|
||||
|
||||
def buff_update(self):
|
||||
d = {
|
||||
"packet_type": "update",
|
||||
"data": {
|
||||
"cursor": {
|
||||
"x": max(1, vim.current.window.cursor[1]),
|
||||
"y": vim.current.window.cursor[0]
|
||||
},
|
||||
"name": CoVim.username
|
||||
}
|
||||
}
|
||||
d = self.create_update_packet(d)
|
||||
data = json.dumps(d)
|
||||
self.p.send(data)
|
||||
|
||||
def cursor_update(self):
|
||||
d = {
|
||||
"packet_type": "update",
|
||||
"data": {
|
||||
"cursor": {
|
||||
"x": max(1, vim.current.window.cursor[1]+1),
|
||||
"y": vim.current.window.cursor[0]
|
||||
},
|
||||
"name": CoVim.username
|
||||
}
|
||||
}
|
||||
d = self.create_update_packet(d)
|
||||
data = json.dumps(d)
|
||||
self.p.send(data)
|
||||
|
||||
def create_update_packet(self, d):
|
||||
current_buffer = vim.current.buffer[:]
|
||||
if current_buffer != CoVim.vim_buffer:
|
||||
cursor_y = vim.current.window.cursor[0] - 1
|
||||
change_y = len(current_buffer) - len(CoVim.vim_buffer)
|
||||
change_x = 0
|
||||
if len(CoVim.vim_buffer) > cursor_y-change_y and cursor_y-change_y >= 0 \
|
||||
and len(current_buffer) > cursor_y and cursor_y >= 0:
|
||||
change_x = len(current_buffer[cursor_y]) - len(CoVim.vim_buffer[cursor_y-change_y])
|
||||
limits = {
|
||||
'from': max(0, cursor_y-abs(change_y)),
|
||||
'to': min(len(vim.current.buffer)-1, cursor_y+abs(change_y))
|
||||
}
|
||||
d_buffer = {
|
||||
'start': limits['from'],
|
||||
'end': limits['to'],
|
||||
'change_y': change_y,
|
||||
'change_x': change_x,
|
||||
'buffer': vim.current.buffer[limits['from']:limits['to']+1],
|
||||
'buffer_size': len(current_buffer)
|
||||
}
|
||||
d['data']['buffer'] = d_buffer
|
||||
CoVim.vim_buffer = current_buffer
|
||||
return d
|
||||
|
||||
def clientConnectionLost(self, connector, reason):
|
||||
#THIS IS A HACK
|
||||
if hasattr(CoVim, 'buddylist'):
|
||||
CoVim.disconnect()
|
||||
print('Lost connection.')
|
||||
|
||||
def clientConnectionFailed(self, connector, reason):
|
||||
CoVim.disconnect()
|
||||
print('Connection failed.')
|
||||
|
||||
|
||||
#Manage Collaborators
|
||||
class CollaboratorManager:
|
||||
|
||||
def __init__(self):
|
||||
self.collab_id_itr = 4
|
||||
self.reset()
|
||||
|
||||
def reset(self):
|
||||
self.collab_color_itr = 1
|
||||
self.collaborators = {}
|
||||
self.buddylist_highlight_ids = []
|
||||
|
||||
def addUser(self, user_obj):
|
||||
#if user_obj['name'] == CoVim.username:
|
||||
# self.collaborators[user_obj['name']] = ('CursorUser', 4000)
|
||||
#else:
|
||||
self.collaborators[user_obj['name']] = ('Cursor' + str(self.collab_color_itr), self.collab_id_itr)
|
||||
self.collab_id_itr += 1
|
||||
self.collab_color_itr = (self.collab_id_itr-3) % 11
|
||||
vim.command(':call matchadd(\''+self.collaborators[user_obj['name']][0]+'\', \'\%' + str(user_obj['cursor']['x']) + 'v.\%'+str(user_obj['cursor']['y'])+'l\', 10, ' + str(self.collaborators[user_obj['name']][1]) + ')')
|
||||
self.refreshCollabDisplay()
|
||||
|
||||
def remUser(self, name):
|
||||
vim.command('call matchdelete('+str(self.collaborators[name][1]) + ')')
|
||||
del(self.collaborators[name])
|
||||
self.refreshCollabDisplay()
|
||||
|
||||
def refreshCollabDisplay(self):
|
||||
buddylist_window_width = int(vim.eval('winwidth(0)'))
|
||||
CoVim.buddylist[:] = ['']
|
||||
x_a = 1
|
||||
line_i = 0
|
||||
vim.command("1wincmd w")
|
||||
for match_id in self.buddylist_highlight_ids:
|
||||
vim.command('call matchdelete('+str(match_id) + ')')
|
||||
self.buddylist_highlight_ids = []
|
||||
for name in self.collaborators.keys():
|
||||
x_b = x_a + len(name)
|
||||
if x_b > buddylist_window_width:
|
||||
line_i += 1
|
||||
x_a = 1
|
||||
x_b = x_a + len(name)
|
||||
CoVim.buddylist.append('')
|
||||
vim.command('resize '+str(line_i+1))
|
||||
CoVim.buddylist[line_i] += name+' '
|
||||
self.buddylist_highlight_ids.append(vim.eval('matchadd(\''+self.collaborators[name][0]+'\',\'\%<'+str(x_b)+'v.\%>'+str(x_a)+'v\%'+str(line_i+1)+'l\',10,'+str(self.collaborators[name][1]+2000)+')'))
|
||||
x_a = x_b + 1
|
||||
vim.command("wincmd p")
|
||||
|
||||
|
||||
#Manage all of CoVim
|
||||
class CoVimScope:
|
||||
|
||||
def initiate(self, addr, port, name):
|
||||
#Check if connected. If connected, throw error.
|
||||
if hasattr(self, 'fact') and self.fact.isConnected:
|
||||
print('ERROR: Already connected. Please disconnect first')
|
||||
return
|
||||
if not port and hasattr(self, 'port') and self.port:
|
||||
port = self.port
|
||||
if not addr and hasattr(self, 'addr') and self.addr:
|
||||
addr = self.addr
|
||||
if not addr or not port or not name:
|
||||
print('Syntax Error: Use form :Covim connect <server address> <port> <name>')
|
||||
return
|
||||
port = int(port)
|
||||
addr = str(addr)
|
||||
vim.command('autocmd VimLeave * py3 CoVim.quit()')
|
||||
if not hasattr(self, 'connection'):
|
||||
self.addr = addr
|
||||
self.port = port
|
||||
self.username = name
|
||||
self.vim_buffer = []
|
||||
self.fact = CoVimFactory()
|
||||
self.collab_manager = CollaboratorManager()
|
||||
self.connection = reactor.connectTCP(addr, port, self.fact)
|
||||
self.reactor_thread = Thread(target=reactor.run, args=(False,))
|
||||
self.reactor_thread.start()
|
||||
print('Connecting...')
|
||||
elif (hasattr(self, 'port') and port != self.port) or (hasattr(self, 'addr') and addr != self.addr):
|
||||
print('ERROR: Different address/port already used. To try another, you need to restart Vim')
|
||||
else:
|
||||
self.collab_manager.reset()
|
||||
self.connection.connect()
|
||||
print('Reconnecting...')
|
||||
|
||||
def createServer(self, port, name):
|
||||
vim.command(':silent execute "!'+CoVimServerPath+' '+port+' &>/dev/null &"')
|
||||
sleep(0.5)
|
||||
self.initiate('localhost', port, name)
|
||||
|
||||
def setupWorkspace(self):
|
||||
vim.command('call SetCoVimColors()')
|
||||
vim.command(':autocmd!')
|
||||
vim.command('autocmd CursorMoved <buffer> py3 reactor.callFromThread(CoVim.fact.cursor_update)')
|
||||
vim.command('autocmd CursorMovedI <buffer> py3 reactor.callFromThread(CoVim.fact.buff_update)')
|
||||
vim.command('autocmd VimLeave * py3 CoVim.quit()')
|
||||
vim.command("1new +setlocal\ stl=%!''")
|
||||
self.buddylist = vim.current.buffer
|
||||
self.buddylist_window = vim.current.window
|
||||
vim.command("wincmd j")
|
||||
|
||||
def addUsers(self, userlist):
|
||||
list(map(self.collab_manager.addUser, userlist))
|
||||
|
||||
def remUser(self, name):
|
||||
self.collab_manager.remUser(name)
|
||||
|
||||
def refreshCollabDisplay(self):
|
||||
self.collab_manager.refreshCollabDisplay()
|
||||
|
||||
def command(self, arg1=False, arg2=False, arg3=False, arg4=False):
|
||||
default_name = vim.eval('CoVim_default_name')
|
||||
default_name_string = " - default: '"+default_name+"'" if default_name != '0' else ""
|
||||
default_port = vim.eval('CoVim_default_port')
|
||||
default_port_string = " - default: "+default_port if default_port != '0' else ""
|
||||
if arg1 == "connect":
|
||||
if arg2 and arg3 and arg4:
|
||||
self.initiate(arg2, arg3, arg4)
|
||||
elif arg2 and arg3 and default_name != '0':
|
||||
self.initiate(arg2, arg3, default_name)
|
||||
elif arg2 and default_port != '0' and default_name != '0':
|
||||
self.initiate(arg2, default_port, default_name)
|
||||
else:
|
||||
print("usage :CoVim connect [host address / 'localhost'] [port"+default_port_string+"] [name"+default_name_string+"]")
|
||||
elif arg1 == "disconnect":
|
||||
self.disconnect()
|
||||
elif arg1 == "quit":
|
||||
self.exit()
|
||||
elif arg1 == "start":
|
||||
if arg2 and arg3:
|
||||
self.createServer(arg2, arg3)
|
||||
elif arg2 and default_name != '0':
|
||||
self.createServer(arg2, default_name)
|
||||
elif default_port != '0' and default_name != '0':
|
||||
self.createServer(default_port, default_name)
|
||||
else:
|
||||
print("usage :CoVim start [port"+default_port_string+"] [name"+default_name_string+"]")
|
||||
else:
|
||||
print("usage: CoVim [start] [connect] [disconnect] [quit]")
|
||||
|
||||
def exit(self):
|
||||
if hasattr(self, 'buddylist_window') and hasattr(self, 'connection'):
|
||||
self.disconnect()
|
||||
vim.command('q')
|
||||
else:
|
||||
print("ERROR: CoVim must be running to use this command")
|
||||
|
||||
def disconnect(self):
|
||||
if hasattr(self, 'buddylist'):
|
||||
vim.command("1wincmd w")
|
||||
vim.command("q!")
|
||||
self.collab_manager.buddylist_highlight_ids = []
|
||||
for name in self.collab_manager.collaborators.keys():
|
||||
if name != CoVim.username:
|
||||
vim.command(':call matchdelete('+str(self.collab_manager.collaborators[name][1]) + ')')
|
||||
del(self.buddylist)
|
||||
if hasattr(self, 'buddylist_window'):
|
||||
del(self.buddylist_window)
|
||||
if hasattr(self, 'connection'):
|
||||
reactor.callFromThread(self.connection.disconnect)
|
||||
print('Successfully disconnected from document!')
|
||||
else:
|
||||
print("ERROR: CoVim must be running to use this command")
|
||||
|
||||
def quit(self):
|
||||
reactor.callFromThread(reactor.stop)
|
||||
|
||||
CoVim = CoVimScope()
|
||||
|
||||
EOF
|
|
@ -1,247 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import re
|
||||
import json
|
||||
import argparse
|
||||
|
||||
from twisted.internet.protocol import Factory, Protocol
|
||||
#from twisted.protocols.basic import LineReceiver
|
||||
from twisted.internet import reactor
|
||||
|
||||
parser = argparse.ArgumentParser(description='Start a CoVim server.')
|
||||
parser.add_argument('-p', '--persist', action='store_true',
|
||||
help='Keep server running if all users disconnect')
|
||||
parser.add_argument('port', type=int, nargs='?', default=8555,
|
||||
help='Port number to run on')
|
||||
|
||||
|
||||
def name_validate(strg, search=re.compile(r'[^0-9a-zA-Z\-\_]').search):
|
||||
return not bool(search(strg))
|
||||
|
||||
|
||||
class React(Protocol):
|
||||
|
||||
def __init__(self, factory):
|
||||
self.factory = factory
|
||||
self.state = "GETNAME"
|
||||
|
||||
def dataReceived(self, data):
|
||||
if self.state == "GETNAME":
|
||||
self.handle_GETNAME(data.decode('utf-8'))
|
||||
else:
|
||||
self.handle_BUFF(data)
|
||||
|
||||
def handle_GETNAME(self, name):
|
||||
# Handle duplicate name
|
||||
if userManager.has_user(name):
|
||||
d = {
|
||||
'packet_type': 'message',
|
||||
'data': {
|
||||
'message_type': 'error_newname_taken'
|
||||
}
|
||||
}
|
||||
self.transport.write(json.dumps(d).encode('utf-8'))
|
||||
return
|
||||
|
||||
# Handle spaces in name
|
||||
if not name_validate(name):
|
||||
d = {
|
||||
'packet_type': 'message',
|
||||
'data': {
|
||||
'message_type': 'error_newname_invalid'
|
||||
}
|
||||
}
|
||||
self.transport.write(json.dumps(d).encode('utf-8'))
|
||||
return
|
||||
|
||||
# Name is Valid, Add to Document
|
||||
self.user = User(name, self)
|
||||
userManager.add_user(self.user)
|
||||
self.state = "CHAT"
|
||||
d = {
|
||||
'packet_type': 'message',
|
||||
'data': {
|
||||
'message_type': 'connect_success',
|
||||
'name': name,
|
||||
'collaborators': userManager.all_users_to_json()
|
||||
}
|
||||
}
|
||||
|
||||
if userManager.is_multi():
|
||||
d['data']['buffer'] = self.factory.buff
|
||||
self.transport.write(json.dumps(d).encode('utf-8'))
|
||||
print('User "{user_name}" Connected'.format(user_name=self.user.name))
|
||||
|
||||
# Alert other Collaborators of new user
|
||||
d = {
|
||||
'packet_type': 'message',
|
||||
'data': {
|
||||
'message_type': 'user_connected',
|
||||
'user': self.user.to_json()
|
||||
}
|
||||
}
|
||||
self.user.broadcast_packet(d)
|
||||
|
||||
def handle_BUFF(self, data_string):
|
||||
def clean_data_string(d_s):
|
||||
bad_data = d_s.find("}{")
|
||||
if bad_data > -1:
|
||||
d_s = d_s[:bad_data+1]
|
||||
return d_s
|
||||
|
||||
if isinstance(data_string, bytes):
|
||||
data_string = data_string.decode('utf-8')
|
||||
data_string = clean_data_string(data_string)
|
||||
d = json.loads(data_string)
|
||||
data = d['data']
|
||||
update_self = False
|
||||
|
||||
if 'cursor' in data.keys():
|
||||
user = userManager.get_user(data['name'])
|
||||
user.update_cursor(data['cursor']['x'], data['cursor']['y'])
|
||||
d['data']['updated_cursors'] = [user.to_json()]
|
||||
del d['data']['cursor']
|
||||
|
||||
if 'buffer' in data.keys():
|
||||
b_data = data['buffer']
|
||||
#TODO: Improve Speed: If change_y = 0, just replace that one line
|
||||
#print ' \\n '.join(self.factory.buff[:b_data['start']])
|
||||
#print ' \\n '.join(b_data['buffer'])
|
||||
#print ' \\n '.join(self.factory.buff[b_data['end']-b_data['change_y']+1:])
|
||||
self.factory.buff = self.factory.buff[:b_data['start']] \
|
||||
+ b_data['buffer'] \
|
||||
+ self.factory.buff[b_data['end']-b_data['change_y']+1:]
|
||||
d['data']['updated_cursors'] += userManager.update_cursors(b_data, user)
|
||||
update_self = True
|
||||
self.user.broadcast_packet(d, update_self)
|
||||
|
||||
def connectionLost(self, reason):
|
||||
if hasattr(self, 'user'):
|
||||
userManager.rem_user(self.user)
|
||||
if userManager.is_empty():
|
||||
print('All users disconnected. Shutting down...')
|
||||
reactor.stop()
|
||||
|
||||
|
||||
class ReactFactory(Factory):
|
||||
|
||||
def __init__(self):
|
||||
self.buff = []
|
||||
|
||||
def initiate(self, port):
|
||||
self.port = port
|
||||
print('Now listening on port {port}...'.format(port=port))
|
||||
reactor.listenTCP(port, self)
|
||||
reactor.run()
|
||||
|
||||
def buildProtocol(self, addr):
|
||||
return React(self)
|
||||
|
||||
|
||||
class Cursor:
|
||||
def __init__(self):
|
||||
self.x = 1
|
||||
self.y = 1
|
||||
|
||||
def to_json(self):
|
||||
return {
|
||||
'x': self.x,
|
||||
'y': self.y
|
||||
}
|
||||
|
||||
|
||||
class User:
|
||||
def __init__(self, name, protocol):
|
||||
self.name = name
|
||||
self.protocol = protocol
|
||||
self.cursor = Cursor()
|
||||
|
||||
def to_json(self):
|
||||
return {
|
||||
'name': self.name,
|
||||
'cursor': self.cursor.to_json()
|
||||
}
|
||||
|
||||
def broadcast_packet(self, obj, send_to_self=True):
|
||||
obj_json = json.dumps(obj)
|
||||
#print(obj_json)
|
||||
for name, user in userManager.users.items():
|
||||
if user.name != self.name or send_to_self:
|
||||
user.protocol.transport.write(obj_json.encode('utf-8'))
|
||||
#TODO: don't send yourself your own buffer, but del on a copy doesn't work
|
||||
|
||||
def update_cursor(self, x, y):
|
||||
self.cursor.x = x
|
||||
self.cursor.y = y
|
||||
|
||||
|
||||
class UserManager:
|
||||
|
||||
def __init__(self):
|
||||
self.users = {}
|
||||
|
||||
def is_empty(self):
|
||||
return not self.users
|
||||
|
||||
def is_multi(self):
|
||||
return len(self.users) > 1
|
||||
|
||||
def has_user(self, search_name):
|
||||
return self.users.get(search_name)
|
||||
|
||||
def add_user(self, u):
|
||||
self.users[u.name] = u
|
||||
|
||||
def get_user(self, u_name):
|
||||
try:
|
||||
return self.users[u_name]
|
||||
except KeyError:
|
||||
raise(Exception('user doesnt exist'))
|
||||
|
||||
def rem_user(self, user):
|
||||
if self.users.get(user.name):
|
||||
d = {
|
||||
'packet_type': 'message',
|
||||
'data': {
|
||||
'message_type': 'user_disconnected',
|
||||
'name': user.name
|
||||
}
|
||||
}
|
||||
user.broadcast_packet(d)
|
||||
print('User "{user_name}" Disconnected'.format(user_name=user.name))
|
||||
del self.users[user.name]
|
||||
|
||||
def all_users_to_json(self):
|
||||
return [user.to_json() for user in userManager.users.values()]
|
||||
|
||||
def update_cursors(self, buffer_data, u):
|
||||
return_arr = []
|
||||
y_target = u.cursor.y
|
||||
x_target = u.cursor.x
|
||||
|
||||
for user in userManager.users.values():
|
||||
updated = False
|
||||
if user != u:
|
||||
if user.cursor.y > y_target:
|
||||
user.cursor.y += buffer_data['change_y']
|
||||
updated = True
|
||||
if user.cursor.y == y_target and user.cursor.x > x_target:
|
||||
user.cursor.x = max(1, user.cursor.x + buffer_data['change_x'])
|
||||
updated = True
|
||||
if user.cursor.y == y_target - 1 and user.cursor.x > x_target \
|
||||
and buffer_data['change_y'] == 1:
|
||||
user.cursor.y += 1
|
||||
user.cursor.x = max(1, user.cursor.x + buffer_data['change_x'])
|
||||
updated = True
|
||||
#TODO: If the line was just split?
|
||||
if updated:
|
||||
return_arr.append(user.to_json())
|
||||
return return_arr
|
||||
|
||||
|
||||
userManager = UserManager()
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = parser.parse_args()
|
||||
Server = ReactFactory()
|
||||
Server.initiate(args.port)
|
|
@ -1,12 +0,0 @@
|
|||
.PRINTSTYLE TYPESET
|
||||
.DOCTYPE CHAPTER
|
||||
.FOOTNOTE_MARKER_STYLE NUMBER
|
||||
.TITLE ""
|
||||
.AUTHOR "Owen Bell"
|
||||
.ATTRIBUTE_STRING ""
|
||||
.COVER TITLE AUTHOR
|
||||
.CHAPTER 1
|
||||
.START
|
||||
|
||||
.COLLATE
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
.PRINTSTYLE TYPESET
|
||||
.DOCTYPE DEFAULT
|
||||
.FAMILY T
|
||||
.FOOTNOTE_MARKER_STYLE NUMBER
|
||||
.LS 1.5m
|
||||
.PARA_INDENT 2m
|
||||
.INDENT_FIRST_PARAS
|
||||
.START
|
||||
|
||||
.BR
|
||||
//
|
||||
.BR
|
||||
|
||||
.BR
|
||||
|
||||
.HEADING 1 ""
|
||||
.PP
|
|
@ -1,9 +0,0 @@
|
|||
.PRINTSTYLE TYPESET
|
||||
.DOCTYPE DEFAULT
|
||||
.FOOTNOTE_MARKER_STYLE NUMBER
|
||||
.TITLE ""
|
||||
.AUTHOR "Owen Bell"
|
||||
.ATTRIBUTE_STRING ""
|
||||
.START
|
||||
.PP
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
\documentclass{article}
|
||||
|
||||
\usepackage[a4paper]{geometry}
|
||||
\usepackage[utf8]{inputenc}
|
||||
|
||||
\begin{document}
|
||||
|
||||
|
||||
|
||||
\end{document}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
.Dd
|
||||
.Dt
|
||||
.Os
|
||||
.
|
||||
.Sh NAME
|
||||
.Nm
|
||||
.Nd
|
||||
.
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.
|
||||
.Sh DESCRIPTION
|
||||
|
||||
.
|
||||
.Sh OPTIONS
|
||||
.Bl -tag -width Ds
|
||||
|
||||
.El
|
||||
.
|
||||
.Sh BUGS
|
||||
please report any bugs found to
|
||||
.Lk
|
||||
.
|
||||
.Sh AUTHORS
|
||||
.An xfnw Aq Mt xfnw@riseup.net
|
|
@ -1,120 +0,0 @@
|
|||
:root {
|
||||
--ansi0: #161510;
|
||||
--ansi1: #A32810;
|
||||
--ansi2: #727A18;
|
||||
--ansi3: #A37720;
|
||||
--ansi4: #3D6266;
|
||||
--ansi5: #7A4955;
|
||||
--ansi6: #557A55;
|
||||
--ansi7: #8E8463;
|
||||
--ansi8: #4C4635;
|
||||
--ansi9: #CC3214;
|
||||
--ansi10: #8E991E;
|
||||
--ansi11: #CC9528;
|
||||
--ansi12: #4C7B7F;
|
||||
--ansi13: #995B6B;
|
||||
--ansi14: #6B996B;
|
||||
--ansi15: #CCBC8E;
|
||||
--ansi16: #14130E;
|
||||
--ansi17: #B7A980;
|
||||
--ansi18: #CCBC8E;
|
||||
--ansi19: #A34110;
|
||||
--ansi20: #72694F;
|
||||
}
|
||||
.fg0 { color: var(--ansi0); }
|
||||
.bg0 { background-color: var(--ansi0); }
|
||||
.fg1 { color: var(--ansi1); }
|
||||
.bg1 { background-color: var(--ansi1); }
|
||||
.fg2 { color: var(--ansi2); }
|
||||
.bg2 { background-color: var(--ansi2); }
|
||||
.fg3 { color: var(--ansi3); }
|
||||
.bg3 { background-color: var(--ansi3); }
|
||||
.fg4 { color: var(--ansi4); }
|
||||
.bg4 { background-color: var(--ansi4); }
|
||||
.fg5 { color: var(--ansi5); }
|
||||
.bg5 { background-color: var(--ansi5); }
|
||||
.fg6 { color: var(--ansi6); }
|
||||
.bg6 { background-color: var(--ansi6); }
|
||||
.fg7 { color: var(--ansi7); }
|
||||
.bg7 { background-color: var(--ansi7); }
|
||||
.fg8 { color: var(--ansi8); }
|
||||
.bg8 { background-color: var(--ansi8); }
|
||||
.fg9 { color: var(--ansi9); }
|
||||
.bg9 { background-color: var(--ansi9); }
|
||||
.fg10 { color: var(--ansi10); }
|
||||
.bg10 { background-color: var(--ansi10); }
|
||||
.fg11 { color: var(--ansi11); }
|
||||
.bg11 { background-color: var(--ansi11); }
|
||||
.fg12 { color: var(--ansi12); }
|
||||
.bg12 { background-color: var(--ansi12); }
|
||||
.fg13 { color: var(--ansi13); }
|
||||
.bg13 { background-color: var(--ansi13); }
|
||||
.fg14 { color: var(--ansi14); }
|
||||
.bg14 { background-color: var(--ansi14); }
|
||||
.fg15 { color: var(--ansi15); }
|
||||
.bg15 { background-color: var(--ansi15); }
|
||||
.fg16 { color: var(--ansi16); }
|
||||
.bg16 { background-color: var(--ansi16); }
|
||||
.fg17 { color: var(--ansi17); }
|
||||
.bg17 { background-color: var(--ansi17); }
|
||||
.fg18 { color: var(--ansi18); }
|
||||
.bg18 { background-color: var(--ansi18); }
|
||||
.fg19 { color: var(--ansi19); }
|
||||
.bg19 { background-color: var(--ansi19); }
|
||||
.fg20 { color: var(--ansi20); }
|
||||
.bg20 { background-color: var(--ansi20); }
|
||||
|
||||
table.head, table.foot { width: 100%; }
|
||||
td.head-rtitle, td.foot-os { text-align: right; }
|
||||
td.head-vol { text-align: center; }
|
||||
div.Pp { margin: 1ex 0ex; }
|
||||
div.Nd, div.Bf, div.Op { display: inline; }
|
||||
span.Pa, span.Ad { font-style: italic; }
|
||||
span.Ms { font-weight: bold; }
|
||||
dl.Bl-diag > dt { font-weight: bold; }
|
||||
code.Nm, code.Fl, code.Cm, code.Ic, code.In, code.Fd, code.Fn,
|
||||
code.Cd { font-weight: bold; font-family: inherit; }
|
||||
|
||||
table { border-collapse: collapse; }
|
||||
table.Nm code.Nm { padding-right: 1ch; }
|
||||
table.foot { margin-top: 1em; }
|
||||
|
||||
html {
|
||||
line-height: 1.25em;
|
||||
font-family: monospace;
|
||||
background-color: var(--ansi16);
|
||||
color: var(--ansi17);
|
||||
-moz-tab-size: 4;
|
||||
tab-size: 4;
|
||||
}
|
||||
body {
|
||||
max-width: 80ch;
|
||||
margin: 1em auto;
|
||||
padding: 0 1ch;
|
||||
}
|
||||
ul.index { padding: 0; }
|
||||
ul.index li {
|
||||
display: inline;
|
||||
list-style-type: none;
|
||||
}
|
||||
a { color: var(--ansi4); }
|
||||
a:visited { color: var(--ansi5); }
|
||||
a.permalink, a.tag {
|
||||
color: var(--ansi3);
|
||||
text-decoration: none;
|
||||
}
|
||||
a.permalink code:target,
|
||||
h1.Sh:target a.permalink,
|
||||
h2.Ss:target a.permalink,
|
||||
a.tag:target {
|
||||
color: var(--ansi11);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.hilex.Keyword { color: var(--ansi7); }
|
||||
.hilex.Macro { color: var(--ansi2); }
|
||||
.hilex.Comment { color: var(--ansi4); }
|
||||
.hilex.String { color: var(--ansi6); }
|
||||
.hilex.StringFormat { color: var(--ansi14); }
|
||||
.hilex.Interpolation { color: var(--ansi1); }
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- based on https://causal.agency css -->
|
||||
<style>
|
||||
:root {
|
||||
--dark: #141415;
|
||||
--light: #cdcdcd;
|
||||
--lightsel: #fff;
|
||||
--ansi0: #161510;
|
||||
--ansi1: #A32810;
|
||||
--ansi2: #727A18;
|
||||
--ansi3: #A37720;
|
||||
--ansi4: #3D6266;
|
||||
--ansi5: #7A4955;
|
||||
--ansi6: #557A55;
|
||||
--ansi7: #8E8463;
|
||||
--ansi8: #4C4635;
|
||||
--ansi9: #CC3214;
|
||||
--ansi10: #8E991E;
|
||||
--ansi11: #CC9528;
|
||||
--ansi12: #4C7B7F;
|
||||
--ansi13: #995B6B;
|
||||
--ansi14: #6B996B;
|
||||
--ansi15: #CCBC8E;
|
||||
--ansi16: #14130E;
|
||||
--ansi17: #B7A980;
|
||||
--ansi18: #CCBC8E;
|
||||
--ansi19: #A34110;
|
||||
--ansi20: #72694F;
|
||||
}
|
||||
|
||||
table.head, table.foot { width: 100%; }
|
||||
td.head-rtitle, td.foot-os { text-align: right; }
|
||||
td.head-vol { text-align: center; }
|
||||
div.Pp { margin: 1ex 0ex; }
|
||||
div.Nd, div.Bf, div.Op { display: inline; }
|
||||
div.Bd-indent, section.Ss { margin-left: 6ch; }
|
||||
span.Pa, span.Ad { font-style: italic; }
|
||||
span.Ms { font-weight: bold; }
|
||||
dl.Bl-diag dt { font-weight: bold; }
|
||||
code.Nm, code.Fl, code.Cm, code.Ic, code.In, code.Fd, code.Fn,
|
||||
code.Cd { font-weight: bold; font-family: inherit; }
|
||||
|
||||
table { border-collapse: collapse; }
|
||||
table.Nm code.Nm { padding-right: 1ch; }
|
||||
table.tbl tr td { padding: 1ch; }
|
||||
table.foot { margin-top: 1em; }
|
||||
|
||||
html {
|
||||
font-family: "JetBrains Mono", monospace;
|
||||
font-size: 12pt;
|
||||
background-color: var(--dark);
|
||||
color: var(--light);
|
||||
-moz-tab-size: 4;
|
||||
tab-size: 4;
|
||||
}
|
||||
body {
|
||||
max-width: 80ch;
|
||||
margin: 1em auto;
|
||||
padding: 0 1ch;
|
||||
}
|
||||
ul.index { padding: 0; }
|
||||
ul.index li {
|
||||
display: inline;
|
||||
list-style-type: none;
|
||||
}
|
||||
a { color: var(--light); }
|
||||
a:visited { color: var(--light); }
|
||||
a.permalink, a.tag {
|
||||
color: var(--light);
|
||||
text-decoration: none;
|
||||
}
|
||||
a.permalink code:target,
|
||||
h1.Sh:target a.permalink,
|
||||
h2.Ss:target a.permalink,
|
||||
a.tag:target {
|
||||
color: var(--lightsel);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.hilex.Keyword { color: var(--ansi9); }
|
||||
.hilex.Macro { color: var(--ansi2); }
|
||||
.hilex.Comment { color: var(--ansi14); }
|
||||
.hilex.String { color: var(--ansi6); }
|
||||
.hilex.StringFormat { color: var(--ansi14); }
|
||||
.hilex.Interpolation { color: var(--ansi1); }
|
||||
</style>
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<link rel="stylesheet" href="///home/ltc/Documents/assets/mvp.css">
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2021
|
||||
|
||||
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.
|
|
@ -1,18 +0,0 @@
|
|||
.PRINTSTYLE TYPESET
|
||||
.DOCTYPE DEFAULT
|
||||
.FAMILY H
|
||||
.FOOTNOTE_MARKER_STYLE NUMBER
|
||||
.TITLE ""
|
||||
.ATTRIBUTE_STRING ""
|
||||
.START
|
||||
.HEADING 1 "Ingredients"
|
||||
.LIST BULLET
|
||||
.ITEM
|
||||
|
||||
.LIST OFF
|
||||
|
||||
.HEADING 1 "Directions"
|
||||
.LIST DIGIT
|
||||
.ITEM
|
||||
|
||||
.LIST OFF
|
|
@ -1,10 +0,0 @@
|
|||
.PRINTSTYLE TYPESET
|
||||
.DOCTYPE SLIDES
|
||||
.TITLE ""
|
||||
.AUTHOR "Owen Bell"
|
||||
.ATTRIBUTE_STRING ""
|
||||
.COVER TITLE AUTHOR
|
||||
.START
|
||||
|
||||
.COLLATE
|
||||
|
53
.vim/vimrc
53
.vim/vimrc
|
@ -1,53 +0,0 @@
|
|||
|
||||
|
||||
" some custom commands
|
||||
"
|
||||
" insert mom templates
|
||||
command Tmomc :r ~/.vim/templates/chapter.mom
|
||||
command Tmomg :r ~/.vim/templates/general.mom
|
||||
command Tmomr :r ~/.vim/templates/recipe.mom
|
||||
command Tmome :r ~/.vim/templates/english.mom
|
||||
command Tmd :r ~/.vim/templates/md.html
|
||||
command Tman :r ~/.vim/templates/man.1
|
||||
command Tmh :r ~/.vim/templates/man.html
|
||||
command Ttex :r ~/.vim/templates/general.tex
|
||||
command Tmit :r ~/.vim/templates/mit
|
||||
|
||||
" run groff+refer on file
|
||||
:command Groff w|!sh -c 'p="%"; refer -PS -e -p ~/Documents/bib ${p::-4}.mom | groff -mom -Tpdf > ${p::-4}.pdf'
|
||||
:command Grofft w|!sh -c 'p="%"; refer -PS -e -p ~/Documents/bib ${p::-4}.mom | groff -mom -T ascii | sed -b "s/\x1b[^m]*m//g" > ${p::-4}.txt'
|
||||
:command Man w|!sh -c 'p="%"; mandoc -T html "$p" | tail -n +17 | cat ~/.vim/templates/man.html - > "$p".html'
|
||||
:command Tex w|!sh -c 'p="%"; pdflatex "$p"'
|
||||
:command Bib w|!sh -c 'p="%"; biber "${p::-4}"'
|
||||
|
||||
:command Md !p="%"; cmark --unsafe ${p::-3}.md | h2p - ${p::-3}.pdf
|
||||
|
||||
" nice line numbers
|
||||
set number
|
||||
set relativenumber
|
||||
|
||||
" syntax hilighting
|
||||
syntax on
|
||||
color pablo
|
||||
|
||||
" vimwiki
|
||||
set nocompatible
|
||||
filetype plugin on
|
||||
|
||||
" vimrc sane defaults
|
||||
|
||||
filetype plugin indent on
|
||||
set showcmd " Show (partial) command in status line.
|
||||
set showmatch " Show matching brackets.
|
||||
set ignorecase " Do case insensitive matching
|
||||
set smartcase " Do smart case matching
|
||||
set incsearch " Incremental search
|
||||
set autowrite " Automatically save before commands like :next and :make
|
||||
set hidden " Hide buffers when they are abandoned
|
||||
set mouse=a " Enable mouse usage (all modes)
|
||||
|
||||
" fmt stuffs
|
||||
set textwidth=60
|
||||
set formatoptions-=t
|
||||
|
||||
|
6
.wgetrc
6
.wgetrc
|
@ -1,6 +0,0 @@
|
|||
progress=bar
|
||||
robots=off
|
||||
random_wait=on
|
||||
verbose=on
|
||||
user_agent=Mozilla
|
||||
|
9
.xinitrc
9
.xinitrc
|
@ -1,9 +0,0 @@
|
|||
|
||||
[ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
|
||||
|
||||
export TERMINAL=kitty
|
||||
xrdb -load ~/.Xresources
|
||||
|
||||
exec i3
|
||||
|
||||
|
293
.xscreensaver
293
.xscreensaver
|
@ -1,293 +0,0 @@
|
|||
# XScreenSaver Preferences File
|
||||
# Written by xscreensaver-demo 5.42 for lickthecheese on Sun Jul 5 10:31:11 2020.
|
||||
# https://www.jwz.org/xscreensaver/
|
||||
|
||||
timeout: 0:06:00
|
||||
cycle: 0:02:00
|
||||
lock: True
|
||||
lockTimeout: 0:01:00
|
||||
passwdTimeout: 0:00:10
|
||||
visualID: default
|
||||
installColormap: True
|
||||
verbose: False
|
||||
timestamp: True
|
||||
splash: False
|
||||
splashDuration: 0:00:05
|
||||
demoCommand: xscreensaver-demo
|
||||
prefsCommand: xscreensaver-demo -prefs
|
||||
nice: 10
|
||||
memoryLimit: 0
|
||||
fade: True
|
||||
unfade: True
|
||||
fadeSeconds: 0:00:03
|
||||
fadeTicks: 20
|
||||
captureStderr: True
|
||||
ignoreUninstalledPrograms:False
|
||||
font: *-medium-r-*-140-*-m-*
|
||||
dpmsEnabled: False
|
||||
dpmsQuickOff: False
|
||||
dpmsStandby: 2:00:00
|
||||
dpmsSuspend: 2:00:00
|
||||
dpmsOff: 4:00:00
|
||||
grabDesktopImages: True
|
||||
grabVideoFrames: False
|
||||
chooseRandomImages: False
|
||||
imageDirectory:
|
||||
|
||||
mode: random
|
||||
selected: 157
|
||||
|
||||
textMode: url
|
||||
textLiteral: XScreenSaver
|
||||
textFile:
|
||||
textProgram: curl tildeverse.org
|
||||
textURL: https://planet.debian.org/rss20.xml
|
||||
|
||||
programs: \
|
||||
- maze -root \n\
|
||||
- GL: superquadrics -root \n\
|
||||
- attraction -root \n\
|
||||
- blitspin -root \n\
|
||||
- greynetic -root \n\
|
||||
- helix -root \n\
|
||||
- hopalong -root \n\
|
||||
- imsmap -root \n\
|
||||
- noseguy -root \n\
|
||||
pyro -root \n\
|
||||
- qix -root \n\
|
||||
rocks -root \n\
|
||||
- rorschach -root \n\
|
||||
- decayscreen -root \n\
|
||||
- flame -root \n\
|
||||
- halo -root \n\
|
||||
- slidescreen -root \n\
|
||||
- pedal -root \n\
|
||||
bouboule -root \n\
|
||||
- braid -root \n\
|
||||
- coral -root \n\
|
||||
- deco -root \n\
|
||||
- drift -root \n\
|
||||
fadeplot -root \n\
|
||||
- galaxy -root \n\
|
||||
goop -root \n\
|
||||
- grav -root \n\
|
||||
- ifs -root \n\
|
||||
- unicode -root \n\
|
||||
- GL: jigsaw -root \n\
|
||||
- julia -root \n\
|
||||
- kaleidescope -root \n\
|
||||
- GL: moebius -root \n\
|
||||
- moire -root \n\
|
||||
- GL: morph3d -root \n\
|
||||
mountain -root \n\
|
||||
- munch -root \n\
|
||||
- penrose -root \n\
|
||||
- GL: pipes -root \n\
|
||||
- rd-bomb -root \n\
|
||||
- GL: rubik -root \n\
|
||||
- sierpinski -root \n\
|
||||
slip -root \n\
|
||||
- GL: sproingies -root \n\
|
||||
starfish -root \n\
|
||||
- strange -root \n\
|
||||
- swirl -root \n\
|
||||
- triangle -root \n\
|
||||
- xjack -root -delay 26667 \n\
|
||||
- xlyap -root \n\
|
||||
- GL: atlantis -root \n\
|
||||
- bsod -root \n\
|
||||
- GL: bubble3d -root \n\
|
||||
- GL: cage -root \n\
|
||||
- crystal -root \n\
|
||||
- cynosure -root \n\
|
||||
- discrete -root \n\
|
||||
- distort -root \n\
|
||||
- epicycle -root \n\
|
||||
- flow -root \n\
|
||||
- GL: glplanet -root \n\
|
||||
- interference -root \n\
|
||||
kumppa -root -speed 0.0817 \n\
|
||||
- GL: lament -root \n\
|
||||
- moire2 -root \n\
|
||||
- GL: sonar -root \n\
|
||||
- GL: stairs -root \n\
|
||||
- truchet -root \n\
|
||||
- vidwhacker -root \n\
|
||||
- blaster -root \n\
|
||||
- bumps -root \n\
|
||||
- ccurve -root \n\
|
||||
compass -root \n\
|
||||
deluxe -root \n\
|
||||
- demon -root \n\
|
||||
- GL: extrusion -root \n\
|
||||
- loop -root \n\
|
||||
- penetrate -root \n\
|
||||
- petri -root \n\
|
||||
phosphor -root -scale 4 -ticks 21 \n\
|
||||
- GL: pulsar -root \n\
|
||||
- ripples -root -fluidity 11 -stir -oily \n\
|
||||
- shadebobs -root \n\
|
||||
- GL: sierpinski3d -root \n\
|
||||
- spotlight -root \n\
|
||||
squiral -root \n\
|
||||
- wander -root \n\
|
||||
- webcollage -root \n\
|
||||
- xflame -root \n\
|
||||
xmatrix -root -insert bottom \n\
|
||||
- GL: gflux -root \n\
|
||||
nerverot -root \n\
|
||||
xrayswarm -root \n\
|
||||
- xspirograph -root \n\
|
||||
- GL: circuit -root \n\
|
||||
- GL: dangerball -root \n\
|
||||
- GL: engine -root \n\
|
||||
- GL: flipscreen3d -root \n\
|
||||
- GL: gltext -root \n\
|
||||
- GL: menger -root \n\
|
||||
- GL: molecule -root \n\
|
||||
- rotzoomer -root \n\
|
||||
speedmine -root \n\
|
||||
- GL: starwars -root \n\
|
||||
- GL: stonerview -root \n\
|
||||
vermiculate -root \n\
|
||||
whirlwindwarp -root \n\
|
||||
- zoom -root \n\
|
||||
- anemone -root \n\
|
||||
- apollonian -root \n\
|
||||
- GL: boxed -root \n\
|
||||
- GL: cubenetic -root \n\
|
||||
- GL: endgame -root \n\
|
||||
euler2d -root \n\
|
||||
- fluidballs -root \n\
|
||||
- GL: flurry -root \n\
|
||||
- GL: glblur -root \n\
|
||||
- GL: glsnake -root \n\
|
||||
- halftone -root \n\
|
||||
- GL: juggler3d -root \n\
|
||||
- GL: lavalite -root \n\
|
||||
- polyominoes -root \n\
|
||||
- GL: queens -root \n\
|
||||
- GL: sballs -root \n\
|
||||
- GL: spheremonics -root \n\
|
||||
thornbird -root \n\
|
||||
- twang -root \n\
|
||||
- GL: antspotlight -root \n\
|
||||
- apple2 -root -mode basic \n\
|
||||
- GL: atunnel -root \n\
|
||||
- barcode -root \n\
|
||||
- GL: blinkbox -root \n\
|
||||
- GL: blocktube -root \n\
|
||||
- GL: bouncingcow -root \n\
|
||||
- cloudlife -root \n\
|
||||
- GL: cubestorm -root \n\
|
||||
eruption -root \n\
|
||||
- GL: flipflop -root \n\
|
||||
- GL: flyingtoasters -root \n\
|
||||
- fontglide -root \n\
|
||||
- GL: gleidescope -root \n\
|
||||
- GL: glknots -root \n\
|
||||
- GL: glmatrix -root \n\
|
||||
- GL: glslideshow -root \n\
|
||||
- GL: hypertorus -root \n\
|
||||
- GL: jigglypuff -root \n\
|
||||
- metaballs -root \n\
|
||||
- GL: mirrorblob -root \n\
|
||||
- piecewise -root \n\
|
||||
- GL: polytopes -root \n\
|
||||
- pong -root \n\
|
||||
- popsquares -root -subdivision 6 -border 3 \
|
||||
-bg #00FF00 -fg #008C00 \n\
|
||||
- GL: surfaces -root \n\
|
||||
xanalogtv -root \n\
|
||||
- abstractile -root \n\
|
||||
- anemotaxis -root \n\
|
||||
- GL: antinspect -root \n\
|
||||
fireworkx -root -maxlife 40 \n\
|
||||
- fuzzyflakes -root \n\
|
||||
- interaggregate -root \n\
|
||||
- intermomentary -root \n\
|
||||
- memscroller -root \n\
|
||||
- GL: noof -root \n\
|
||||
- pacman -root \n\
|
||||
- GL: pinion -root \n\
|
||||
- GL: polyhedra -root \n\
|
||||
- GL: providence -root \n\
|
||||
substrate -root \n\
|
||||
wormhole -root \n\
|
||||
- GL: antmaze -root \n\
|
||||
- GL: boing -root \n\
|
||||
- boxfit -root \n\
|
||||
- GL: carousel -root \n\
|
||||
- celtic -root \n\
|
||||
- GL: crackberg -root \n\
|
||||
- GL: cube21 -root \n\
|
||||
- fiberlamp -root \n\
|
||||
- GL: fliptext -root \n\
|
||||
- GL: glhanoi -root \n\
|
||||
- GL: tangram -root \n\
|
||||
- GL: timetunnel -root \n\
|
||||
- GL: glschool -root \n\
|
||||
- GL: topblock -root \n\
|
||||
- GL: cubicgrid -root \n\
|
||||
cwaves -root \n\
|
||||
- GL: gears -root \n\
|
||||
- GL: glcells -root \n\
|
||||
- GL: lockward -root \n\
|
||||
m6502 -root \n\
|
||||
- GL: moebiusgears -root \n\
|
||||
- GL: voronoi -root \n\
|
||||
- GL: hypnowheel -root \n\
|
||||
- GL: klein -root \n\
|
||||
- lcdscrub -root \n\
|
||||
- GL: photopile -root \n\
|
||||
- GL: skytentacles -root \n\
|
||||
- GL: rubikblocks -root \n\
|
||||
- GL: companioncube -root \n\
|
||||
- GL: hilbert -root \n\
|
||||
- GL: tronbit -root \n\
|
||||
- GL: geodesic -root \n\
|
||||
hexadrop -root \n\
|
||||
- GL: kaleidocycle -root \n\
|
||||
- GL: quasicrystal -root \n\
|
||||
- GL: unknownpleasures -root \n\
|
||||
binaryring -root -ring-radius 63 \
|
||||
-particles-number 1963 \n\
|
||||
- GL: cityflow -root \n\
|
||||
- GL: geodesicgears -root \n\
|
||||
- GL: projectiveplane -root \n\
|
||||
- GL: romanboy -root \n\
|
||||
- tessellimage -root \n\
|
||||
- GL: winduprobot -root \n\
|
||||
- GL: splitflap -root \n\
|
||||
- GL: cubestack -root \n\
|
||||
- GL: cubetwist -root \n\
|
||||
- GL: discoball -root \n\
|
||||
- GL: dymaxionmap -root \n\
|
||||
- GL: energystream -root \n\
|
||||
- GL: hexstrut -root \n\
|
||||
- GL: hydrostat -root \n\
|
||||
- GL: raverhoop -root \n\
|
||||
- GL: splodesic -root \n\
|
||||
- GL: unicrud -root \n\
|
||||
- GL: esper -root \n\
|
||||
- GL: vigilance -root \n\
|
||||
- GL: crumbler -root \n\
|
||||
filmleader -root \n\
|
||||
- glitchpeg -root \n\
|
||||
- GL: handsy -root \n\
|
||||
- GL: maze3d -root \n\
|
||||
- GL: peepers -root \n\
|
||||
- GL: razzledazzle -root \n\
|
||||
- vfeedback -root \n\
|
||||
|
||||
|
||||
pointerPollTime: 0:00:05
|
||||
pointerHysteresis: 10
|
||||
windowCreationTimeout:0:00:30
|
||||
initialDelay: 0:00:00
|
||||
GetViewPortIsFullOfLies:False
|
||||
procInterrupts: True
|
||||
xinputExtensionDev: False
|
||||
overlayStderr: True
|
||||
authWarningSlack: 20
|
||||
|
2
.zsh/fzf-tab/.gitattributes
vendored
2
.zsh/fzf-tab/.gitattributes
vendored
|
@ -1,2 +0,0 @@
|
|||
modules/* linguist-vendored
|
||||
modules/Src/aloxaf/*.c -linguist-vendored
|
|
@ -1,31 +0,0 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: "[BUG]"
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Type '...'
|
||||
2. Press <kbd>Tab</kbd>
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Environment (please complete the following information):**
|
||||
- OS: [e.g. Arch Linux]
|
||||
- zsh version [e.g. 5.8.1]
|
||||
- fzf-tab version [e.g. https://github.com/Aloxaf/fzf-tab/commit/56adfa43b6cab964249c740302c8b57d129201f0]
|
||||
|
||||
**zshrc**
|
||||
If applicable, add a minimal zshrc to help us analyze.
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: "[FR]"
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
24
.zsh/fzf-tab/.github/workflows/test.yaml
vendored
24
.zsh/fzf-tab/.github/workflows/test.yaml
vendored
|
@ -1,24 +0,0 @@
|
|||
name: Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
run-test:
|
||||
name: Run test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Initialize
|
||||
run: sudo apt-get install zsh
|
||||
|
||||
- name: Run test
|
||||
run: cd test && zsh runtests.zsh fzftab.ztst
|
||||
|
1
.zsh/fzf-tab/.gitignore
vendored
1
.zsh/fzf-tab/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
*.zwc
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019-2020 Aloxaf
|
||||
|
||||
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.
|
|
@ -1 +0,0 @@
|
|||
fzf-tab.zsh
|
|
@ -1,588 +0,0 @@
|
|||
# temporarily change options
|
||||
'builtin' 'local' '-a' '_fzf_tab_opts'
|
||||
[[ ! -o 'aliases' ]] || _fzf_tab_opts+=('aliases')
|
||||
[[ ! -o 'sh_glob' ]] || _fzf_tab_opts+=('sh_glob')
|
||||
[[ ! -o 'no_brace_expand' ]] || _fzf_tab_opts+=('no_brace_expand')
|
||||
'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
|
||||
|
||||
zmodload zsh/zutil
|
||||
zmodload -F zsh/stat b:zstat
|
||||
|
||||
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
|
||||
0="${${(M)0:#/*}:-$PWD/$0}"
|
||||
FZF_TAB_HOME=${0:h}
|
||||
|
||||
source ${0:h}/lib/zsh-ls-colors/ls-colors.zsh fzf-tab-lscolors
|
||||
|
||||
# thanks Valodim/zsh-capture-completion
|
||||
_fzf_tab_compadd() {
|
||||
# parse all options
|
||||
local -A apre hpre dscrs _oad expl
|
||||
local -a isfile _opts __
|
||||
zparseopts -E -a _opts P:=apre p:=hpre d:=dscrs X:=expl O:=_oad A:=_oad D:=_oad f=isfile \
|
||||
i: S: s: I: x: r: R: W: F: M+: E: q e Q n U C \
|
||||
J:=__ V:=__ a=__ l=__ k=__ o=__ 1=__ 2=__
|
||||
|
||||
# just delegate and leave if any of -O, -A or -D are given or fzf-tab is not enabled
|
||||
zstyle -t ":fzf-tab:${curcontext#:}" ignore
|
||||
if (( $#_oad != 0 || ! IN_FZF_TAB || ! $? )); then
|
||||
builtin compadd "$@"
|
||||
return
|
||||
fi
|
||||
|
||||
# store matches in $__hits and descriptions in $__dscr
|
||||
local -a __hits __dscr
|
||||
if (( $#dscrs == 1 )); then
|
||||
__dscr=( "${(@P)${(v)dscrs}}" )
|
||||
fi
|
||||
builtin compadd -A __hits -D __dscr "$@"
|
||||
local ret=$?
|
||||
if (( $#__hits == 0 )); then
|
||||
return $ret
|
||||
fi
|
||||
|
||||
# store $curcontext for furthur usage
|
||||
_fzf_tab_curcontext=${curcontext#:}
|
||||
|
||||
# keep order of group description
|
||||
[[ -n $expl ]] && _fzf_tab_groups+=$expl
|
||||
|
||||
# store these values in _fzf_tab_compcap
|
||||
local -a keys=(apre hpre isfile PREFIX SUFFIX IPREFIX ISUFFIX)
|
||||
local key expanded __tmp_value=$'<\0>' # placeholder
|
||||
for key in $keys; do
|
||||
expanded=${(P)key}
|
||||
if [[ $expanded ]]; then
|
||||
__tmp_value+=$'\0'$key$'\0'$expanded
|
||||
fi
|
||||
done
|
||||
if [[ $expl ]]; then
|
||||
# store group index
|
||||
__tmp_value+=$'\0group\0'$_fzf_tab_groups[(ie)$expl]
|
||||
fi
|
||||
_opts+=("${(@kv)apre}" "${(@kv)hpre}" $isfile)
|
||||
__tmp_value+=$'\0args\0'${(pj:\1:)_opts}
|
||||
|
||||
# dscr - the string to show to users
|
||||
# word - the string to be inserted
|
||||
local dscr word i
|
||||
for i in {1..$#__hits}; do
|
||||
word=$__hits[i] dscr=$__dscr[i]
|
||||
if [[ -n $dscr ]]; then
|
||||
dscr=${dscr//$'\n'}
|
||||
elif [[ -n $word ]]; then
|
||||
dscr=$word
|
||||
fi
|
||||
_fzf_tab_compcap+=$dscr$'\2'$__tmp_value${word:+$'\0word\0'$word}
|
||||
done
|
||||
|
||||
# tell zsh that the match is successful
|
||||
if _fzf_tab_get -t fake-compadd "fakeadd"; then
|
||||
nm=-1 # see _alternative:76
|
||||
else
|
||||
builtin compadd -U -qS '' -R _fzf_tab_remove_space ''
|
||||
fi
|
||||
}
|
||||
|
||||
# when insert multi results, a whitespace will be added to each result
|
||||
# remove left space of our fake result because I can't remove right space
|
||||
# FIXME: what if the left char is not whitespace: `echo $widgets[\t`
|
||||
_fzf_tab_remove_space() {
|
||||
[[ $LBUFFER[-1] == ' ' ]] && LBUFFER[-1]=''
|
||||
}
|
||||
|
||||
: ${(A)=FZF_TAB_GROUP_COLORS=\
|
||||
$'\033[94m' $'\033[32m' $'\033[33m' $'\033[35m' $'\033[31m' $'\033[38;5;27m' $'\033[36m' \
|
||||
$'\033[38;5;100m' $'\033[38;5;98m' $'\033[91m' $'\033[38;5;80m' $'\033[92m' \
|
||||
$'\033[38;5;214m' $'\033[38;5;165m' $'\033[38;5;124m' $'\033[38;5;120m'
|
||||
}
|
||||
(( $+FZF_TAB_OPTS )) || FZF_TAB_OPTS=(
|
||||
--ansi # Enable ANSI color support, necessary for showing groups
|
||||
--expect='$continuous_trigger' # For continuous completion
|
||||
'--color=hl:$(( $#headers == 0 ? 108 : 255 ))'
|
||||
--nth=2,3 --delimiter='\x00' # Don't search prefix
|
||||
--layout=reverse --height='${FZF_TMUX_HEIGHT:=75%}'
|
||||
--tiebreak=begin -m --bind=tab:down,btab:up,change:top,ctrl-space:toggle --cycle
|
||||
'--query=$query' # $query will be expanded to query string at runtime.
|
||||
'--header-lines=$#headers' # $#headers will be expanded to lines of headers at runtime
|
||||
)
|
||||
|
||||
_fzf_tab_get() {
|
||||
zstyle $1 ":fzf-tab:$_fzf_tab_curcontext" ${@:2}
|
||||
}
|
||||
|
||||
() {
|
||||
emulate -L zsh -o extended_glob
|
||||
|
||||
_fzf_tab_add_default() {
|
||||
zstyle -t ':fzf-tab:*' $1
|
||||
(( $? != 2 )) || zstyle ':fzf-tab:*' $1 ${@:2}
|
||||
}
|
||||
|
||||
# Some users may still use variable
|
||||
_fzf_tab_add_default continuous-trigger ${FZF_TAB_CONTINUOUS_TRIGGER:-'/'}
|
||||
_fzf_tab_add_default fake-compadd ${FZF_TAB_FAKE_COMPADD:-default}
|
||||
_fzf_tab_add_default insert-space ${FZF_TAB_INSERT_SPACE:-true}
|
||||
_fzf_tab_add_default query-string ${(A)=FZF_TAB_QUERY:-prefix input first}
|
||||
_fzf_tab_add_default single-group ${(A)=FZF_TAB_SINGLE_GROUP:-color header}
|
||||
_fzf_tab_add_default show-group ${FZF_TAB_SHOW_GROUP:-full}
|
||||
_fzf_tab_add_default command ${FZF_TAB_COMMAND:-fzf} $FZF_TAB_OPTS
|
||||
_fzf_tab_add_default extra-opts ''
|
||||
_fzf_tab_add_default no-group-color ${FZF_TAB_NO_GROUP_COLOR:-$'\033[37m'}
|
||||
_fzf_tab_add_default group-colors $FZF_TAB_GROUP_COLORS
|
||||
_fzf_tab_add_default ignore false
|
||||
|
||||
if zstyle -m ':completion:*:descriptions' format '*'; then
|
||||
_fzf_tab_add_default prefix '·'
|
||||
else
|
||||
_fzf_tab_add_default prefix ''
|
||||
fi
|
||||
|
||||
unfunction _fzf_tab_add_default
|
||||
}
|
||||
|
||||
# sets `query` to the valid query string
|
||||
_fzf_tab_find_query_str() {
|
||||
local key qtype tmp query_string
|
||||
typeset -g query=
|
||||
_fzf_tab_get -a query-string query_string
|
||||
for qtype in $query_string; do
|
||||
if [[ $qtype == prefix ]]; then
|
||||
# find the longest common prefix among descriptions
|
||||
local -a keys=(${_fzf_tab_compcap%$'\2'*})
|
||||
tmp=$keys[1]
|
||||
local MATCH match mbegin mend prefix=(${(s::)tmp})
|
||||
for key in ${keys:1}; do
|
||||
(( $#tmp )) || break
|
||||
[[ $key == $tmp* ]] && continue
|
||||
# interpose characters from the current common prefix and $key and see how
|
||||
# many pairs of equal characters we get at the start of the resulting string
|
||||
[[ ${(j::)${${(s::)key[1,$#tmp]}:^prefix}} =~ '^(((.)\3)*)' ]]
|
||||
# truncate common prefix and maintain loop invariant: ${(s::)tmp} == $prefix
|
||||
tmp[$#MATCH/2+1,-1]=""
|
||||
prefix[$#MATCH/2+1,-1]=()
|
||||
done
|
||||
elif [[ $qtype == input ]]; then
|
||||
local fv=${_fzf_tab_compcap[1]#*$'\2'}
|
||||
local -A v=("${(@0)fv}")
|
||||
tmp=$v[PREFIX]
|
||||
if (( $RBUFFER[(i)$v[SUFFIX]] != 1 )); then
|
||||
tmp=${tmp/%$v[SUFFIX]}
|
||||
fi
|
||||
tmp=${${tmp#$v[hpre]}#$v[apre]}
|
||||
fi
|
||||
if (( $query_string[(I)longest] )); then
|
||||
(( $#tmp > $#query )) && query=$tmp
|
||||
elif [[ -n $tmp ]]; then
|
||||
query=$tmp && break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# pupulates array `headers` with group descriptions
|
||||
_fzf_tab_get_headers() {
|
||||
typeset -ga headers=()
|
||||
local i tmp group_colors
|
||||
local -i mlen=0 len=0
|
||||
|
||||
if (( $#_fzf_tab_groups == 1 )) && { ! _fzf_tab_get -m single-group "header" }; then
|
||||
return
|
||||
fi
|
||||
|
||||
# calculate the max column width
|
||||
for i in $_fzf_tab_groups; do
|
||||
(( $#i > mlen )) && mlen=$#i
|
||||
done
|
||||
mlen+=1
|
||||
|
||||
_fzf_tab_get -a group-colors group_colors
|
||||
|
||||
for (( i=1; i<=$#_fzf_tab_groups; i++ )); do
|
||||
[[ $_fzf_tab_groups[i] == "__hide__"* ]] && continue
|
||||
|
||||
if (( len + $#_fzf_tab_groups[i] > COLUMNS - 5 )); then
|
||||
headers+=$tmp
|
||||
tmp='' && len=0
|
||||
fi
|
||||
if (( len + mlen > COLUMNS - 5 )); then
|
||||
# the last column doesn't need padding
|
||||
headers+=$tmp$group_colors[i]$_fzf_tab_groups[i]$'\033[00m'
|
||||
tmp='' && len=0
|
||||
else
|
||||
tmp+=$group_colors[i]${(r:$mlen:)_fzf_tab_groups[i]}$'\033[00m'
|
||||
len+=$mlen
|
||||
fi
|
||||
done
|
||||
(( $#tmp )) && headers+=$tmp
|
||||
}
|
||||
|
||||
_fzf_tab_colorize() {
|
||||
emulate -L zsh -o cbases -o octalzeroes
|
||||
|
||||
local REPLY
|
||||
local -a reply stat lstat
|
||||
|
||||
# fzf-tab-lscolors::match-by $1 lstat follow
|
||||
zstat -A lstat -L -- $1
|
||||
# follow symlink
|
||||
(( lstat[3] & 0170000 )) && zstat -A stat -- $1 2>/dev/null
|
||||
|
||||
fzf-tab-lscolors::from-mode "$1" "$lstat[3]" $stat[3]
|
||||
# fall back to name
|
||||
[[ -z $REPLY ]] && fzf-tab-lscolors::from-name $1
|
||||
|
||||
# If this is a symlink
|
||||
if [[ $lstat[14] ]]; then
|
||||
local sym_color=$REPLY
|
||||
local rsv_color=$REPLY
|
||||
local rsv=$lstat[14]
|
||||
# If this is not a broken symlink
|
||||
if [[ -e $rsv ]]; then
|
||||
# fzf-tab-lscolors::match-by $rsv stat
|
||||
zstat -A stat -- $rsv
|
||||
fzf-tab-lscolors::from-mode $rsv $stat[3]
|
||||
# fall back to name
|
||||
[[ -z $REPLY ]] && fzf-tab-lscolors::from-name $rsv
|
||||
rsv_color=$REPLY
|
||||
fi
|
||||
dpre=$'\033[0m\033['$sym_color'm'
|
||||
dsuf+=$'\033[0m -> \033['$rsv_color'm'$rsv
|
||||
else
|
||||
dpre=$'\033[0m\033['$REPLY'm'
|
||||
fi
|
||||
}
|
||||
|
||||
# pupulates array `candidates` with completion candidates
|
||||
_fzf_tab_get_candidates() {
|
||||
local dsuf dpre k _v filepath first_word show_group no_group_color prefix bs=$'\b'
|
||||
local -a list_colors group_colors tcandidates reply match mbegin mend
|
||||
local -i same_word=1 colorful=0
|
||||
local -Ua duplicate_groups=()
|
||||
local -A word_map=()
|
||||
|
||||
(( $#_fzf_tab_compcap == 0 )) && return
|
||||
|
||||
_fzf_tab_get -s show-group show_group
|
||||
_fzf_tab_get -a group-colors group_colors
|
||||
_fzf_tab_get -s no-group-color no_group_color
|
||||
_fzf_tab_get -s prefix prefix
|
||||
|
||||
zstyle -a ":completion:$_fzf_tab_curcontext" list-colors list_colors
|
||||
if (( $+builtins[fzf-tab-colorize] )); then
|
||||
fzf-tab-colorize -c list_colors
|
||||
else
|
||||
local -A namecolors=(${(@s:=:)${(@s.:.)list_colors}:#[[:alpha:]][[:alpha:]]=*})
|
||||
local -A modecolors=(${(@Ms:=:)${(@s.:.)list_colors}:#[[:alpha:]][[:alpha:]]=*})
|
||||
fi
|
||||
|
||||
if (( $#_fzf_tab_groups == 1 )); then
|
||||
_fzf_tab_get -m single-group prefix || prefix=''
|
||||
_fzf_tab_get -m single-group color || group_colors=($no_group_color)
|
||||
fi
|
||||
|
||||
for k _v in "${(@ps:\2:)_fzf_tab_compcap}"; do
|
||||
local -A v=("${(@0)_v}")
|
||||
[[ $v[word] == ${first_word:=$v[word]} ]] || same_word=0
|
||||
# add character and color to describe the type of the files
|
||||
dsuf='' dpre=''
|
||||
if (( $+v[isfile] )); then
|
||||
filepath=${v[IPREFIX]}${v[hpre]}${k#*$'\b'}
|
||||
filepath=${(Q)${(e)~filepath}}
|
||||
if (( $#list_colors && $+builtins[fzf-tab-colorize] )); then
|
||||
fzf-tab-colorize $filepath 2>/dev/null
|
||||
dpre=$reply[2]$reply[1] dsuf=$reply[2]$reply[3]
|
||||
if [[ $reply[4] ]]; then
|
||||
dsuf+=" -> $reply[4]"
|
||||
fi
|
||||
[[ $dpre ]] && colorful=1
|
||||
else
|
||||
if [[ -d $filepath ]]; then
|
||||
dsuf=/
|
||||
fi
|
||||
# add color and resolve symlink if have list-colors
|
||||
# detail: http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcomplist-Module
|
||||
if (( $#list_colors )) && [[ -a $filepath || -L $filepath ]]; then
|
||||
_fzf_tab_colorize $filepath
|
||||
colorful=1
|
||||
elif [[ -L $filepath ]]; then
|
||||
dsuf=@
|
||||
fi
|
||||
if [[ $options[list_types] == off ]]; then
|
||||
dsuf=''
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# add color to description if they have group index
|
||||
if (( $+v[group] )); then
|
||||
local color=$group_colors[$v[group]]
|
||||
# add a hidden group index at start of string to keep group order when sorting
|
||||
# first group index is for builtin sort, sencond is for GNU sort
|
||||
tcandidates+=$v[group]$'\b'$color$prefix$dpre$'\0'$v[group]$'\b'$k$'\0'$dsuf
|
||||
else
|
||||
tcandidates+=$no_group_color$dpre$'\0'$k$'\0'$dsuf
|
||||
fi
|
||||
|
||||
# check group with duplicate member
|
||||
if [[ $show_group == brief ]]; then
|
||||
if (( $+word_map[$v[word]] && $+v[group] )); then
|
||||
duplicate_groups+=$v[group] # add this group
|
||||
duplicate_groups+=$word_map[$v[word]] # add previous group
|
||||
fi
|
||||
word_map[$v[word]]=$v[group]
|
||||
fi
|
||||
done
|
||||
(( same_word )) && tcandidates[2,-1]=()
|
||||
|
||||
# sort and remove sort group or other index
|
||||
zstyle -T ":completion:$_fzf_tab_curcontext" sort
|
||||
if (( $? != 1 )); then
|
||||
if (( colorful )); then
|
||||
# if enable list_colors, we should skip the first field
|
||||
if [[ ${commands[sort]:A:t} != (|busybox*) ]]; then
|
||||
# this is faster but doesn't work if `find` is from busybox
|
||||
tcandidates=(${(f)"$(command sort -u -t '\0' -k 2 <<< ${(pj:\n:)tcandidates})"})
|
||||
else
|
||||
# slower but portable
|
||||
tcandidates=(${(@o)${(@)tcandidates:/(#b)([^$'\0']#)$'\0'(*)/$match[2]$'\0'$match[1]}})
|
||||
tcandidates=(${(@)tcandidates/(#b)(*)$'\0'([^$'\0']#)/$match[2]$'\0'$match[1]})
|
||||
fi
|
||||
else
|
||||
tcandidates=("${(@o)tcandidates}")
|
||||
fi
|
||||
fi
|
||||
typeset -gUa candidates=("${(@)tcandidates//[0-9]#$bs}")
|
||||
|
||||
# hide needless group
|
||||
if [[ $show_group == brief ]]; then
|
||||
local i indexs=({1..$#_fzf_tab_groups})
|
||||
for i in ${indexs:|duplicate_groups}; do
|
||||
# NOTE: _fzf_tab_groups is unique array
|
||||
_fzf_tab_groups[i]="__hide__$i"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
_fzf_tab_complete() {
|
||||
local -a _fzf_tab_compcap
|
||||
local -Ua _fzf_tab_groups
|
||||
local choice choices _fzf_tab_curcontext continuous_trigger ignore bs=$'\2'
|
||||
|
||||
_fzf_tab__main_complete # must run with user options; don't move `emulate -L zsh` above this line
|
||||
|
||||
emulate -L zsh -o extended_glob
|
||||
|
||||
# check if we should fall back to zsh builtin completion system
|
||||
if (( _fzf_tab_ignored )); then
|
||||
return
|
||||
fi
|
||||
_fzf_tab_get -s ignore ignore
|
||||
if [[ $ignore == <-> ]] && (( $ignore > 1 && $ignore >= $#_fzf_tab_compcap )); then
|
||||
_fzf_tab_ignored=1
|
||||
compstate[list]=''
|
||||
compstate[insert]=''
|
||||
return
|
||||
fi
|
||||
|
||||
local query candidates=() headers=() command opts
|
||||
_fzf_tab_get_candidates # sets `candidates`
|
||||
|
||||
case $#candidates in
|
||||
0) return;;
|
||||
# NOTE: won't trigger continuous completion
|
||||
1) choices=("${_fzf_tab_compcap[1]%$bs*}");;
|
||||
*)
|
||||
_fzf_tab_find_query_str # sets `query`
|
||||
_fzf_tab_get_headers # sets `headers`
|
||||
_fzf_tab_get -s continuous-trigger continuous_trigger
|
||||
_fzf_tab_get -a command command
|
||||
_fzf_tab_get -a extra-opts opts
|
||||
|
||||
export CTXT=${${_fzf_tab_compcap[1]#*$'\2'}//$'\0'/$'\2'}
|
||||
|
||||
if (( $#headers )); then
|
||||
choices=$(${(eX)command} $opts <<<${(pj:\n:)headers} <<<${(pj:\n:)candidates})
|
||||
else
|
||||
choices=$(${(eX)command} $opts <<<${(pj:\n:)candidates})
|
||||
fi
|
||||
choices=(${${${(f)choices}%$'\0'*}#*$'\0'})
|
||||
|
||||
unset CTXT
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $choices[1] && $choices[1] == $continuous_trigger ]]; then
|
||||
typeset -gi _fzf_tab_continue=1
|
||||
choices[1]=()
|
||||
fi
|
||||
|
||||
for choice in "$choices[@]"; do
|
||||
local -A v=("${(@0)${_fzf_tab_compcap[(r)${(b)choice}$bs*]#*$bs}}")
|
||||
local -a args=("${(@ps:\1:)v[args]}")
|
||||
[[ -z $args[1] ]] && args=() # don't pass an empty string
|
||||
IPREFIX=$v[IPREFIX] PREFIX=$v[PREFIX] SUFFIX=$v[SUFFIX] ISUFFIX=$v[ISUFFIX]
|
||||
builtin compadd "${args[@]:--Q}" -Q -- "$v[word]"
|
||||
done
|
||||
|
||||
compstate[list]=
|
||||
compstate[insert]=
|
||||
if (( $#choices == 1 )); then
|
||||
if _fzf_tab_get -t fake-compadd "fakeadd"; then
|
||||
compstate[insert]='1'
|
||||
else
|
||||
compstate[insert]='2'
|
||||
fi
|
||||
_fzf_tab_get -t insert-space
|
||||
(( $? )) || [[ $RBUFFER == ' '* ]] || compstate[insert]+=' '
|
||||
elif (( $#choices > 1 )); then
|
||||
compstate[insert]='all'
|
||||
fi
|
||||
}
|
||||
|
||||
fzf-tab-complete() {
|
||||
# this name must be ugly to avoid clashes
|
||||
local -i _fzf_tab_continue=1 _fzf_tab_ignored=0
|
||||
while (( _fzf_tab_continue )); do
|
||||
_fzf_tab_continue=0
|
||||
local IN_FZF_TAB=1
|
||||
{
|
||||
zle .fzf-tab-orig-$_fzf_tab_orig_widget
|
||||
} always {
|
||||
IN_FZF_TAB=0
|
||||
}
|
||||
if (( _fzf_tab_ignored )); then
|
||||
zle .fzf-tab-orig-$_fzf_tab_orig_widget
|
||||
return
|
||||
fi
|
||||
if (( _fzf_tab_continue )); then
|
||||
zle .split-undo
|
||||
zle .reset-prompt
|
||||
zle -R
|
||||
else
|
||||
zle redisplay
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
zle -N fzf-tab-complete
|
||||
|
||||
disable-fzf-tab() {
|
||||
emulate -L zsh -o extended_glob
|
||||
(( $+_fzf_tab_orig_widget )) || return 0
|
||||
|
||||
bindkey '^I' $_fzf_tab_orig_widget
|
||||
case $_fzf_tab_orig_list_grouped in
|
||||
0) zstyle ':completion:*' list-grouped false ;;
|
||||
1) zstyle ':completion:*' list-grouped true ;;
|
||||
2) zstyle -d ':completion:*' list-grouped ;;
|
||||
esac
|
||||
unset _fzf_tab_orig_widget _fzf_tab_orig_list_groupded
|
||||
|
||||
# unhook compadd so that _approximate can work properply
|
||||
unfunction compadd 2>/dev/null
|
||||
|
||||
functions[_main_complete]=$functions[_fzf_tab__main_complete]
|
||||
functions[_approximate]=$functions[_fzf_tab__approximate]
|
||||
|
||||
# Don't remove .fzf-tab-orig-$_fzf_tab_orig_widget as we won't be able to reliably
|
||||
# create it if enable-fzf-tab is called again.
|
||||
}
|
||||
|
||||
enable-fzf-tab() {
|
||||
emulate -L zsh -o extended_glob
|
||||
(( ! $+_fzf_tab_orig_widget )) || disable-fzf-tab
|
||||
|
||||
typeset -g _fzf_tab_orig_widget="${${$(bindkey '^I')##* }:-expand-or-complete}"
|
||||
if (( ! $+widgets[.fzf-tab-orig-$_fzf_tab_orig_widget] )); then
|
||||
# Widgets that get replaced by compinit.
|
||||
local compinit_widgets=(
|
||||
complete-word
|
||||
delete-char-or-list
|
||||
expand-or-complete
|
||||
expand-or-complete-prefix
|
||||
list-choices
|
||||
menu-complete
|
||||
menu-expand-or-complete
|
||||
reverse-menu-complete
|
||||
)
|
||||
# Note: We prefix the name of the widget with '.' so that it doesn't get wrapped.
|
||||
if [[ $widgets[$_fzf_tab_orig_widget] == builtin &&
|
||||
$compinit_widgets[(Ie)$_fzf_tab_orig_widget] != 0 ]]; then
|
||||
# We are initializing before compinit and being asked to fall back to a completion
|
||||
# widget that isn't defined yet. Create our own copy of the widget ahead of time.
|
||||
zle -C .fzf-tab-orig-$_fzf_tab_orig_widget .$_fzf_tab_orig_widget _main_complete
|
||||
else
|
||||
# Copy the widget before it's wrapped by zsh-autosuggestions and zsh-syntax-highlighting.
|
||||
zle -A $_fzf_tab_orig_widget .fzf-tab-orig-$_fzf_tab_orig_widget
|
||||
fi
|
||||
fi
|
||||
|
||||
zstyle -t ':completion:*' list-grouped false
|
||||
typeset -g _fzf_tab_orig_list_grouped=$?
|
||||
|
||||
zstyle ':completion:*' list-grouped false
|
||||
bindkey '^I' fzf-tab-complete
|
||||
|
||||
# make sure we can copy them
|
||||
autoload +X -Uz _main_complete _approximate
|
||||
|
||||
# hook compadd
|
||||
functions[compadd]=$functions[_fzf_tab_compadd]
|
||||
|
||||
# hook _main_complete to trigger fzf-tab
|
||||
functions[_fzf_tab__main_complete]=$functions[_main_complete]
|
||||
function _main_complete() { _fzf_tab_complete }
|
||||
|
||||
# TODO: This is not a full support, see #47
|
||||
# _approximate will also hook compadd
|
||||
# let it call _fzf_tab_compadd instead of builtin compadd so that fzf-tab can capture result
|
||||
# make sure _approximate has been loaded.
|
||||
functions[_fzf_tab__approximate]=$functions[_approximate]
|
||||
function _approximate() {
|
||||
# if not called by fzf-tab, don't do anything with compadd
|
||||
(( ! IN_FZF_TAB )) || unfunction compadd
|
||||
_fzf_tab__approximate
|
||||
(( ! IN_FZF_TAB )) || functions[compadd]=$functions[_fzf_tab_compadd]
|
||||
}
|
||||
}
|
||||
|
||||
toggle-fzf-tab() {
|
||||
emulate -L zsh -o extended_glob
|
||||
if (( $+_fzf_tab_orig_widget )); then
|
||||
disable-fzf-tab
|
||||
else
|
||||
enable-fzf-tab
|
||||
fi
|
||||
}
|
||||
|
||||
build-fzf-tab-module() {
|
||||
pushd $FZF_TAB_HOME/modules
|
||||
CPPFLAGS=-I/usr/local/include CFLAGS="-g -Wall -O3" LDFLAGS=-L/usr/local/lib ./configure --disable-gdbm --without-tcsetpgrp
|
||||
make -j
|
||||
popd
|
||||
}
|
||||
|
||||
() {
|
||||
if [[ -e $FZF_TAB_HOME/modules/Src/aloxaf/fzftab.so ]]; then
|
||||
module_path+=("$FZF_TAB_HOME/modules/Src")
|
||||
zmodload aloxaf/fzftab
|
||||
|
||||
if [[ $FZF_TAB_MODULE_VERSION != "0.1.1" ]]; then
|
||||
zmodload -u aloxaf/fzftab
|
||||
local rebuild
|
||||
print -Pn "%F{yellow}fzftab module needs to be rebuild, rebuild now?[Y/n]:%f"
|
||||
read -q rebuild
|
||||
if [[ $rebuild == y ]]; then
|
||||
build-fzf-tab-module
|
||||
zmodload aloxaf/fzftab
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
enable-fzf-tab
|
||||
zle -N toggle-fzf-tab
|
||||
|
||||
# restore options
|
||||
(( ${#_fzf_tab_opts} )) && setopt ${_fzf_tab_opts[@]}
|
||||
'builtin' 'unset' '_fzf_tab_opts'
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 Gamma
|
||||
|
||||
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.
|
|
@ -1,114 +0,0 @@
|
|||
# zsh-ls-colors
|
||||
|
||||
![Demo screenshot](https://raw.githubusercontent.com/xPMo/zsh-ls-colors/image/demo.png)
|
||||
|
||||
A zsh library to use `LS_COLORS` in scripts or other plugins.
|
||||
|
||||
For a simple demo, see the `demo` script in this repo.
|
||||
|
||||
For more advanced usage,
|
||||
instructions are located at top of the source files for `from-mode` and `from-name`.
|
||||
If a use case isn't adequately covered,
|
||||
please open an issue!
|
||||
|
||||
## Using zsh-ls-colors in a plugin
|
||||
|
||||
You can use this as a submodule or a subtree.
|
||||
|
||||
### submodule:
|
||||
|
||||
```sh
|
||||
# Add (only once)
|
||||
git submodule add git://github.com/xPMo/zsh-ls-colors.git ls-colors
|
||||
git commit -m 'Add ls-colors as submodule'
|
||||
|
||||
# Update
|
||||
cd ls-colors
|
||||
git fetch
|
||||
git checkout origin/master
|
||||
cd ..
|
||||
git commit ls-colors -m 'Update ls-colors to latest'
|
||||
```
|
||||
|
||||
### Subtree:
|
||||
|
||||
```sh
|
||||
# Initial add
|
||||
git subtree add --prefix=ls-colors/ --squash -m 'Add ls-colors as a subtree' \
|
||||
git://github.com/xPMo/zsh-ls-colors.git master
|
||||
|
||||
# Update
|
||||
git subtree pull --prefix=ls-colors/ --squash -m 'Update ls-colors to latest' \
|
||||
git://github.com/xPMo/zsh-ls-colors.git master
|
||||
|
||||
|
||||
# Or, after adding a remote:
|
||||
git remote add ls-colors git://github.com/xPMo/zsh-ls-colors.git
|
||||
|
||||
# Initial add
|
||||
git subtree add --prefix=ls-colors/ --squash -m 'Add ls-colors as a subtree' ls-colors master
|
||||
|
||||
# Update
|
||||
git subtree pull --prefix=ls-colors/ --squash -m 'Update ls-colors to latest' ls-colors master
|
||||
```
|
||||
|
||||
### Function namespacing
|
||||
|
||||
Since functions are a public namespace,
|
||||
this plugin allows you to customize the preifix for your plugin:
|
||||
|
||||
```zsh
|
||||
# load functions as my-lscolors::{init,match-by,from-name,from-mode}
|
||||
source ${0:h}/ls-colors/ls-colors.zsh my-lscolors
|
||||
```
|
||||
|
||||
### Parameter namespacing
|
||||
|
||||
While indirect parameter expansion exists with `${(P)var}`,
|
||||
it doesn't play nicely with array parameters.
|
||||
|
||||
There are multiple strategies to prevent unnecessary re-parsing:
|
||||
|
||||
```zsh
|
||||
# Call once when loading.
|
||||
# Pollutes global namespace but prevents re-parsing
|
||||
ls-color::init
|
||||
```
|
||||
|
||||
```zsh
|
||||
# Don't call init at all and only use ::match-by.
|
||||
# Doesn't pollute global namespace but reparses LS_COLORS on every call
|
||||
ls-color::match-by $file lstat
|
||||
```
|
||||
|
||||
```zsh
|
||||
# Initialize within a scope with local parameters.
|
||||
# Best for not polluting global namespace when multiple filenames need to be parsed.
|
||||
(){
|
||||
local -A namecolors modecolors
|
||||
ls-color::init
|
||||
|
||||
for arg; do
|
||||
...
|
||||
done
|
||||
}
|
||||
```
|
||||
|
||||
```zsh
|
||||
# Serialize:
|
||||
typeset -g LS_COLORS_CACHE_FILE=$(mktemp)
|
||||
(){
|
||||
local -A namecolors modecolors
|
||||
ls-color::init
|
||||
typeset -p modecolors namecolors >| $LS_COLORS_CACHE_FILE
|
||||
zcompile $LS_COLORS_CACHE_FILE
|
||||
}
|
||||
|
||||
my-function(){
|
||||
local -A namecolors modecolors
|
||||
source $LS_COLORS_CACHE_FILE
|
||||
|
||||
...
|
||||
}
|
||||
```
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
# set $0 (ref: zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html#zero-handling)
|
||||
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
|
||||
0="${${(M)0:#/*}:-$PWD/$0}"
|
||||
|
||||
# load library functions
|
||||
source ls-colors.zsh ''
|
||||
|
||||
# to name the functions with a different namespace
|
||||
# call source with a different argument
|
||||
#source my-plugin::ls
|
||||
|
||||
# init (sets modecolors and namecolors)
|
||||
# You have options. Either you can pollute global namespace:
|
||||
ls-color::init
|
||||
# Or you can have ::match-by re-parse colors on every call
|
||||
: # (do nothing)
|
||||
# Or if you have multiple calls, you can parse colors once for a scope:
|
||||
(){
|
||||
local -A modecolors namecolors
|
||||
ls-color::init
|
||||
|
||||
for arg; do
|
||||
ls-color::match-by $arg lstat
|
||||
: do something else
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# colors can also be added for other globs after init as well:
|
||||
namecolors[*.md]='01' # bold markdown files
|
||||
|
||||
# EXTENDED_GLOB is enabled when matching, so things like this are possible:
|
||||
namecolors[(#i)(*/|)license(|.*)]='04' # underline LICENSE, or license.txt, or similar
|
||||
|
||||
local file reply
|
||||
# color each file in the argument list
|
||||
for file; do
|
||||
ls-color::match-by $file all
|
||||
# point to symlink resolution if it exists
|
||||
print '\e['$reply[1]'m'$file'\e[0m'${reply[2]:+' → \e['$reply[3]'m'$reply[2]'\e[0m'}
|
||||
done
|
||||
|
||||
# =======================
|
||||
# Alternate manual method:
|
||||
for file; do
|
||||
ls-color::match-by $file lstat follow
|
||||
if [[ $reply[2] ]]; then
|
||||
# This is a symlink
|
||||
symlink_color=$reply[1]
|
||||
# If broken, use link color for destination
|
||||
resolved_color=$reply[1]
|
||||
resolved=$reply[2]
|
||||
if [[ -e $file ]]; then
|
||||
# Not broken, update destination color
|
||||
ls-color::match-by $file stat
|
||||
resolved_color=$reply[1]
|
||||
fi
|
||||
print '\e['$symlink_color'm'$file'\e[0m → \e['$resolved_color'm'$resolved'\e[0m'
|
||||
else
|
||||
# This is not a symlink
|
||||
print '\e['$reply[1]'m'$file'\e[0m'
|
||||
fi
|
||||
done
|
||||
|
|
@ -1,186 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
# set the prefix for all functions
|
||||
local pfx=${1:-'ls-color'}
|
||||
|
||||
# {{{ From mode
|
||||
# Usage:
|
||||
# $1: filename
|
||||
# $2: The value of struct stat st_mode
|
||||
# If empty, modecolors lookup will be skipped
|
||||
# $3: (If symlink) The value of struct stat st_mode
|
||||
# for the target of $1's symlink. If unset,
|
||||
# interpret as a broken link.
|
||||
# Sets REPLY to the console code
|
||||
${pfx}::from-mode () {
|
||||
|
||||
emulate -L zsh
|
||||
setopt cbases octalzeroes extendedglob
|
||||
|
||||
[[ -z $2 ]] && return 1
|
||||
|
||||
local -i reg=0
|
||||
local -a codes
|
||||
|
||||
local -i st_mode=$(($2))
|
||||
# See man 7 inode for more info
|
||||
# file type
|
||||
case $(( st_mode & 0170000 )) in
|
||||
$(( 0140000 )) ) codes=( $modecolors[so] ) ;;
|
||||
$(( 0120000 )) ) # symlink, special handling
|
||||
if ! (($+3)); then
|
||||
REPLY=$modecolors[or]
|
||||
elif [[ $modecolors[ln] = target ]]; then
|
||||
"$0" "$1" "${@:3}"
|
||||
else
|
||||
REPLY=$modecolors[ln]
|
||||
fi
|
||||
return
|
||||
;;
|
||||
$(( 0100000 )) ) codes=( ); reg=1 ;; # regular file
|
||||
$(( 0060000 )) ) codes=( $modecolors[bd] ) ;;
|
||||
$(( 0040000 )) ) codes=( $modecolors[di] ) ;;
|
||||
$(( 0020000 )) ) codes=( $modecolors[cd] ) ;;
|
||||
$(( 0010000 )) ) codes=( $modecolors[pi] ) ;;
|
||||
esac
|
||||
|
||||
# setuid/setgid/sticky/other-writable
|
||||
(( st_mode & 04000 )) && codes+=( $modecolors[su] )
|
||||
(( st_mode & 02000 )) && codes+=( $modecolors[sg] )
|
||||
(( ! reg )) && case $(( st_mode & 01002 )) in
|
||||
# sticky
|
||||
$(( 01000 )) ) codes+=( $modecolors[st] ) ;;
|
||||
# other-writable
|
||||
$(( 00002 )) ) codes+=( $modecolors[ow] ) ;;
|
||||
# other-writable and sticky
|
||||
$(( 01002 )) ) codes+=( $modecolors[tw] ) ;;
|
||||
esac
|
||||
|
||||
# executable
|
||||
if (( ! $#codes )); then
|
||||
(( st_mode & 0111 )) && codes+=( $modecolors[ex] )
|
||||
fi
|
||||
|
||||
# return nonzero if no matching code
|
||||
[[ ${REPLY::=${(j:;:)codes}} ]]
|
||||
} # }}}
|
||||
# {{{ From name
|
||||
# Usage:
|
||||
# $1: filename
|
||||
#
|
||||
# Sets REPLY to the console code
|
||||
${pfx}::from-name () {
|
||||
|
||||
emulate -L zsh
|
||||
setopt extendedglob
|
||||
|
||||
# Return non-zero if no keys match
|
||||
[[ ${REPLY::=$namecolors[(k)$1]} ]]
|
||||
} # }}}
|
||||
# {{{ Init
|
||||
# WARNING: initializes namecolors and modecolors in global scope
|
||||
${pfx}::init () {
|
||||
emulate -L zsh
|
||||
|
||||
# Use $1 if provided, otherwise use LS_COLORS
|
||||
# Use LSCOLORS on BSD
|
||||
local LS_COLORS=${1:-${LS_COLORS:-$LSCOLORS}}
|
||||
|
||||
# read in LS_COLORS
|
||||
typeset -gA namecolors=(${(@s:=:)${(@s.:.)LS_COLORS}:#[[:alpha:]][[:alpha:]]=*})
|
||||
typeset -gA modecolors=(${(@Ms:=:)${(@s.:.)LS_COLORS}:#[[:alpha:]][[:alpha:]]=*})
|
||||
}
|
||||
# }}}
|
||||
# {{{ Match by
|
||||
# Usage:
|
||||
# $1: filename
|
||||
# Optional (must be $2): g[lobal]: Use existing stat | lstat in parent scope
|
||||
# ${@:2}: Append to reply:
|
||||
# - l[stat] : Look up using lstat (don't follow symlink), if empty match name
|
||||
# - s[tat] : Look up using stat (do follow symlink), if empty match name
|
||||
# - n[ame] : Only match name
|
||||
# - f[ollow]: Get resolution path of symlink
|
||||
# - L[stat] : Same as above but don't match name
|
||||
# - S[tat] : Same as above but don't match name
|
||||
# - a[ll] : If a broken symlink: lstat follow lstat
|
||||
# : If a symlink : lstat follow stat
|
||||
# : Otherwise : lstat
|
||||
# - A[ll] : If a broken symlink: Lstat follow Lstat
|
||||
# : If a symlink : Lstat follow Stat
|
||||
# : Otherwise : Lstat
|
||||
#
|
||||
# or returns non-zero
|
||||
${pfx}::match-by () {
|
||||
emulate -L zsh
|
||||
setopt extendedglob cbases octalzeroes
|
||||
|
||||
local arg REPLY name=$1 pfx=${0%::match-by}
|
||||
shift
|
||||
|
||||
# init in local scope if not using global params
|
||||
if ! [[ -v namecolors && -v modecolors ]]; then
|
||||
local -A namecolors modecolors
|
||||
${pfx}::init
|
||||
fi
|
||||
|
||||
if [[ ${1:l} = (g|global) ]]; then
|
||||
shift
|
||||
else
|
||||
local -a stat lstat
|
||||
declare -ga reply=()
|
||||
fi
|
||||
|
||||
zmodload -F zsh/stat b:zstat
|
||||
for arg; do
|
||||
case ${arg[1]:l} in
|
||||
n|name)
|
||||
${pfx}::from-name $name
|
||||
reply+=("$REPLY")
|
||||
;;
|
||||
l|lstat)
|
||||
(($#lstat)) || zstat -A lstat -L $name || return 1
|
||||
if ((lstat[3] & 0170000 )); then
|
||||
# follow symlink
|
||||
(($#stat)) || zstat -A stat $name 2>/dev/null
|
||||
fi
|
||||
${pfx}::from-mode "$name" "$lstat[3]" $stat[3]
|
||||
if [[ $REPLY || ${2[1]} = L ]]; then
|
||||
reply+=("$REPLY")
|
||||
else # fall back to name
|
||||
"$0" "$name" g n
|
||||
fi
|
||||
;;
|
||||
s|stat)
|
||||
(($#stat)) || zstat -A stat $name || return 1
|
||||
${pfx}::from-mode $name $stat[3]
|
||||
reply+=("$REPLY")
|
||||
if [[ $REPLY || ${arg[1]} = S ]]; then
|
||||
reply+=("$REPLY")
|
||||
else # fall back to name
|
||||
"$0" "$name" g n
|
||||
fi
|
||||
;;
|
||||
f|follow)
|
||||
(($#lstat)) || zstat -A lstat -L $name || return 1
|
||||
reply+=("$lstat[14]")
|
||||
;;
|
||||
a|all)
|
||||
# Match case
|
||||
"$0" "$name" g ${${${arg[1]%a}:+L}:-l}
|
||||
# won't append if empty
|
||||
reply+=($lstat[14])
|
||||
# $stat[14] will be empty if not a symlink
|
||||
if [[ $lstat[14] ]]; then
|
||||
if [[ -e $name ]]; then
|
||||
"$0" "$name" g ${${${arg[1]%a}:+S}:-s}
|
||||
else
|
||||
reply+=($reply[-2])
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*) return 2 ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
# }}}
|
||||
# vim: set foldmethod=marker:
|
|
@ -1,858 +0,0 @@
|
|||
# Fish-like fast/unobtrusive autosuggestions for zsh.
|
||||
# https://github.com/zsh-users/zsh-autosuggestions
|
||||
# v0.6.4
|
||||
# Copyright (c) 2013 Thiago de Arruda
|
||||
# Copyright (c) 2016-2019 Eric Freese
|
||||
#
|
||||
# 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.
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Global Configuration Variables #
|
||||
#--------------------------------------------------------------------#
|
||||
|
||||
# Color to use when highlighting suggestion
|
||||
# Uses format of `region_highlight`
|
||||
# More info: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Widgets
|
||||
(( ! ${+ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE} )) &&
|
||||
typeset -g ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=7'
|
||||
|
||||
# Prefix to use when saving original versions of bound widgets
|
||||
(( ! ${+ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX} )) &&
|
||||
typeset -g ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX=autosuggest-orig-
|
||||
|
||||
# Strategies to use to fetch a suggestion
|
||||
# Will try each strategy in order until a suggestion is returned
|
||||
(( ! ${+ZSH_AUTOSUGGEST_STRATEGY} )) && {
|
||||
typeset -ga ZSH_AUTOSUGGEST_STRATEGY
|
||||
ZSH_AUTOSUGGEST_STRATEGY=(history)
|
||||
}
|
||||
|
||||
# Widgets that clear the suggestion
|
||||
(( ! ${+ZSH_AUTOSUGGEST_CLEAR_WIDGETS} )) && {
|
||||
typeset -ga ZSH_AUTOSUGGEST_CLEAR_WIDGETS
|
||||
ZSH_AUTOSUGGEST_CLEAR_WIDGETS=(
|
||||
history-search-forward
|
||||
history-search-backward
|
||||
history-beginning-search-forward
|
||||
history-beginning-search-backward
|
||||
history-substring-search-up
|
||||
history-substring-search-down
|
||||
up-line-or-beginning-search
|
||||
down-line-or-beginning-search
|
||||
up-line-or-history
|
||||
down-line-or-history
|
||||
accept-line
|
||||
copy-earlier-word
|
||||
)
|
||||
}
|
||||
|
||||
# Widgets that accept the entire suggestion
|
||||
(( ! ${+ZSH_AUTOSUGGEST_ACCEPT_WIDGETS} )) && {
|
||||
typeset -ga ZSH_AUTOSUGGEST_ACCEPT_WIDGETS
|
||||
ZSH_AUTOSUGGEST_ACCEPT_WIDGETS=(
|
||||
forward-char
|
||||
end-of-line
|
||||
vi-forward-char
|
||||
vi-end-of-line
|
||||
vi-add-eol
|
||||
)
|
||||
}
|
||||
|
||||
# Widgets that accept the entire suggestion and execute it
|
||||
(( ! ${+ZSH_AUTOSUGGEST_EXECUTE_WIDGETS} )) && {
|
||||
typeset -ga ZSH_AUTOSUGGEST_EXECUTE_WIDGETS
|
||||
ZSH_AUTOSUGGEST_EXECUTE_WIDGETS=(
|
||||
)
|
||||
}
|
||||
|
||||
# Widgets that accept the suggestion as far as the cursor moves
|
||||
(( ! ${+ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS} )) && {
|
||||
typeset -ga ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS
|
||||
ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS=(
|
||||
forward-word
|
||||
emacs-forward-word
|
||||
vi-forward-word
|
||||
vi-forward-word-end
|
||||
vi-forward-blank-word
|
||||
vi-forward-blank-word-end
|
||||
vi-find-next-char
|
||||
vi-find-next-char-skip
|
||||
)
|
||||
}
|
||||
|
||||
# Widgets that should be ignored (globbing supported but must be escaped)
|
||||
(( ! ${+ZSH_AUTOSUGGEST_IGNORE_WIDGETS} )) && {
|
||||
typeset -ga ZSH_AUTOSUGGEST_IGNORE_WIDGETS
|
||||
ZSH_AUTOSUGGEST_IGNORE_WIDGETS=(
|
||||
orig-\*
|
||||
beep
|
||||
run-help
|
||||
set-local-history
|
||||
which-command
|
||||
yank
|
||||
yank-pop
|
||||
zle-\*
|
||||
)
|
||||
}
|
||||
|
||||
# Pty name for capturing completions for completion suggestion strategy
|
||||
(( ! ${+ZSH_AUTOSUGGEST_COMPLETIONS_PTY_NAME} )) &&
|
||||
typeset -g ZSH_AUTOSUGGEST_COMPLETIONS_PTY_NAME=zsh_autosuggest_completion_pty
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Utility Functions #
|
||||
#--------------------------------------------------------------------#
|
||||
|
||||
_zsh_autosuggest_escape_command() {
|
||||
setopt localoptions EXTENDED_GLOB
|
||||
|
||||
# Escape special chars in the string (requires EXTENDED_GLOB)
|
||||
echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}"
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Widget Helpers #
|
||||
#--------------------------------------------------------------------#
|
||||
|
||||
_zsh_autosuggest_incr_bind_count() {
|
||||
typeset -gi bind_count=$((_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]+1))
|
||||
_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]=$bind_count
|
||||
}
|
||||
|
||||
# Bind a single widget to an autosuggest widget, saving a reference to the original widget
|
||||
_zsh_autosuggest_bind_widget() {
|
||||
typeset -gA _ZSH_AUTOSUGGEST_BIND_COUNTS
|
||||
|
||||
local widget=$1
|
||||
local autosuggest_action=$2
|
||||
local prefix=$ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX
|
||||
|
||||
local -i bind_count
|
||||
|
||||
# Save a reference to the original widget
|
||||
case $widgets[$widget] in
|
||||
# Already bound
|
||||
user:_zsh_autosuggest_(bound|orig)_*)
|
||||
bind_count=$((_ZSH_AUTOSUGGEST_BIND_COUNTS[$widget]))
|
||||
;;
|
||||
|
||||
# User-defined widget
|
||||
user:*)
|
||||
_zsh_autosuggest_incr_bind_count $widget
|
||||
zle -N $prefix$bind_count-$widget ${widgets[$widget]#*:}
|
||||
;;
|
||||
|
||||
# Built-in widget
|
||||
builtin)
|
||||
_zsh_autosuggest_incr_bind_count $widget
|
||||
eval "_zsh_autosuggest_orig_${(q)widget}() { zle .${(q)widget} }"
|
||||
zle -N $prefix$bind_count-$widget _zsh_autosuggest_orig_$widget
|
||||
;;
|
||||
|
||||
# Completion widget
|
||||
completion:*)
|
||||
_zsh_autosuggest_incr_bind_count $widget
|
||||
eval "zle -C $prefix$bind_count-${(q)widget} ${${(s.:.)widgets[$widget]}[2,3]}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Pass the original widget's name explicitly into the autosuggest
|
||||
# function. Use this passed in widget name to call the original
|
||||
# widget instead of relying on the $WIDGET variable being set
|
||||
# correctly. $WIDGET cannot be trusted because other plugins call
|
||||
# zle without the `-w` flag (e.g. `zle self-insert` instead of
|
||||
# `zle self-insert -w`).
|
||||
eval "_zsh_autosuggest_bound_${bind_count}_${(q)widget}() {
|
||||
_zsh_autosuggest_widget_$autosuggest_action $prefix$bind_count-${(q)widget} \$@
|
||||
}"
|
||||
|
||||
# Create the bound widget
|
||||
zle -N -- $widget _zsh_autosuggest_bound_${bind_count}_$widget
|
||||
}
|
||||
|
||||
# Map all configured widgets to the right autosuggest widgets
|
||||
_zsh_autosuggest_bind_widgets() {
|
||||
emulate -L zsh
|
||||
|
||||
local widget
|
||||
local ignore_widgets
|
||||
|
||||
ignore_widgets=(
|
||||
.\*
|
||||
_\*
|
||||
autosuggest-\*
|
||||
$ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX\*
|
||||
$ZSH_AUTOSUGGEST_IGNORE_WIDGETS
|
||||
)
|
||||
|
||||
# Find every widget we might want to bind and bind it appropriately
|
||||
for widget in ${${(f)"$(builtin zle -la)"}:#${(j:|:)~ignore_widgets}}; do
|
||||
if [[ -n ${ZSH_AUTOSUGGEST_CLEAR_WIDGETS[(r)$widget]} ]]; then
|
||||
_zsh_autosuggest_bind_widget $widget clear
|
||||
elif [[ -n ${ZSH_AUTOSUGGEST_ACCEPT_WIDGETS[(r)$widget]} ]]; then
|
||||
_zsh_autosuggest_bind_widget $widget accept
|
||||
elif [[ -n ${ZSH_AUTOSUGGEST_EXECUTE_WIDGETS[(r)$widget]} ]]; then
|
||||
_zsh_autosuggest_bind_widget $widget execute
|
||||
elif [[ -n ${ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS[(r)$widget]} ]]; then
|
||||
_zsh_autosuggest_bind_widget $widget partial_accept
|
||||
else
|
||||
# Assume any unspecified widget might modify the buffer
|
||||
_zsh_autosuggest_bind_widget $widget modify
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Given the name of an original widget and args, invoke it, if it exists
|
||||
_zsh_autosuggest_invoke_original_widget() {
|
||||
# Do nothing unless called with at least one arg
|
||||
(( $# )) || return 0
|
||||
|
||||
local original_widget_name="$1"
|
||||
|
||||
shift
|
||||
|
||||
if (( ${+widgets[$original_widget_name]} )); then
|
||||
zle $original_widget_name -- $@
|
||||
fi
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Highlighting #
|
||||
#--------------------------------------------------------------------#
|
||||
|
||||
# If there was a highlight, remove it
|
||||
_zsh_autosuggest_highlight_reset() {
|
||||
typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT
|
||||
|
||||
if [[ -n "$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT" ]]; then
|
||||
region_highlight=("${(@)region_highlight:#$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT}")
|
||||
unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT
|
||||
fi
|
||||
}
|
||||
|
||||
# If there's a suggestion, highlight it
|
||||
_zsh_autosuggest_highlight_apply() {
|
||||
typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT
|
||||
|
||||
if (( $#POSTDISPLAY )); then
|
||||
typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE"
|
||||
region_highlight+=("$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT")
|
||||
else
|
||||
unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT
|
||||
fi
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Autosuggest Widget Implementations #
|
||||
#--------------------------------------------------------------------#
|
||||
|
||||
# Disable suggestions
|
||||
_zsh_autosuggest_disable() {
|
||||
typeset -g _ZSH_AUTOSUGGEST_DISABLED
|
||||
_zsh_autosuggest_clear
|
||||
}
|
||||
|
||||
# Enable suggestions
|
||||
_zsh_autosuggest_enable() {
|
||||
unset _ZSH_AUTOSUGGEST_DISABLED
|
||||
|
||||
if (( $#BUFFER )); then
|
||||
_zsh_autosuggest_fetch
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggle suggestions (enable/disable)
|
||||
_zsh_autosuggest_toggle() {
|
||||
if [[ -n "${_ZSH_AUTOSUGGEST_DISABLED+x}" ]]; then
|
||||
_zsh_autosuggest_enable
|
||||
else
|
||||
_zsh_autosuggest_disable
|
||||
fi
|
||||
}
|
||||
|
||||
# Clear the suggestion
|
||||
_zsh_autosuggest_clear() {
|
||||
# Remove the suggestion
|
||||
unset POSTDISPLAY
|
||||
|
||||
_zsh_autosuggest_invoke_original_widget $@
|
||||
}
|
||||
|
||||
# Modify the buffer and get a new suggestion
|
||||
_zsh_autosuggest_modify() {
|
||||
local -i retval
|
||||
|
||||
# Only available in zsh >= 5.4
|
||||
local -i KEYS_QUEUED_COUNT
|
||||
|
||||
# Save the contents of the buffer/postdisplay
|
||||
local orig_buffer="$BUFFER"
|
||||
local orig_postdisplay="$POSTDISPLAY"
|
||||
|
||||
# Clear suggestion while waiting for next one
|
||||
unset POSTDISPLAY
|
||||
|
||||
# Original widget may modify the buffer
|
||||
_zsh_autosuggest_invoke_original_widget $@
|
||||
retval=$?
|
||||
|
||||
emulate -L zsh
|
||||
|
||||
# Don't fetch a new suggestion if there's more input to be read immediately
|
||||
if (( $PENDING > 0 || $KEYS_QUEUED_COUNT > 0 )); then
|
||||
POSTDISPLAY="$orig_postdisplay"
|
||||
return $retval
|
||||
fi
|
||||
|
||||
# Optimize if manually typing in the suggestion
|
||||
if (( $#BUFFER > $#orig_buffer )); then
|
||||
local added=${BUFFER#$orig_buffer}
|
||||
|
||||
# If the string added matches the beginning of the postdisplay
|
||||
if [[ "$added" = "${orig_postdisplay:0:$#added}" ]]; then
|
||||
POSTDISPLAY="${orig_postdisplay:$#added}"
|
||||
return $retval
|
||||
fi
|
||||
fi
|
||||
|
||||
# Don't fetch a new suggestion if the buffer hasn't changed
|
||||
if [[ "$BUFFER" = "$orig_buffer" ]]; then
|
||||
POSTDISPLAY="$orig_postdisplay"
|
||||
return $retval
|
||||
fi
|
||||
|
||||
# Bail out if suggestions are disabled
|
||||
if [[ -n "${_ZSH_AUTOSUGGEST_DISABLED+x}" ]]; then
|
||||
return $?
|
||||
fi
|
||||
|
||||
# Get a new suggestion if the buffer is not empty after modification
|
||||
if (( $#BUFFER > 0 )); then
|
||||
if [[ -z "$ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE" ]] || (( $#BUFFER <= $ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE )); then
|
||||
_zsh_autosuggest_fetch
|
||||
fi
|
||||
fi
|
||||
|
||||
return $retval
|
||||
}
|
||||
|
||||
# Fetch a new suggestion based on what's currently in the buffer
|
||||
_zsh_autosuggest_fetch() {
|
||||
if (( ${+ZSH_AUTOSUGGEST_USE_ASYNC} )); then
|
||||
_zsh_autosuggest_async_request "$BUFFER"
|
||||
else
|
||||
local suggestion
|
||||
_zsh_autosuggest_fetch_suggestion "$BUFFER"
|
||||
_zsh_autosuggest_suggest "$suggestion"
|
||||
fi
|
||||
}
|
||||
|
||||
# Offer a suggestion
|
||||
_zsh_autosuggest_suggest() {
|
||||
emulate -L zsh
|
||||
|
||||
local suggestion="$1"
|
||||
|
||||
if [[ -n "$suggestion" ]] && (( $#BUFFER )); then
|
||||
POSTDISPLAY="${suggestion#$BUFFER}"
|
||||
else
|
||||
unset POSTDISPLAY
|
||||
fi
|
||||
}
|
||||
|
||||
# Accept the entire suggestion
|
||||
_zsh_autosuggest_accept() {
|
||||
local -i retval max_cursor_pos=$#BUFFER
|
||||
|
||||
# When vicmd keymap is active, the cursor can't move all the way
|
||||
# to the end of the buffer
|
||||
if [[ "$KEYMAP" = "vicmd" ]]; then
|
||||
max_cursor_pos=$((max_cursor_pos - 1))
|
||||
fi
|
||||
|
||||
# If we're not in a valid state to accept a suggestion, just run the
|
||||
# original widget and bail out
|
||||
if (( $CURSOR != $max_cursor_pos || !$#POSTDISPLAY )); then
|
||||
_zsh_autosuggest_invoke_original_widget $@
|
||||
return
|
||||
fi
|
||||
|
||||
# Only accept if the cursor is at the end of the buffer
|
||||
# Add the suggestion to the buffer
|
||||
BUFFER="$BUFFER$POSTDISPLAY"
|
||||
|
||||
# Remove the suggestion
|
||||
unset POSTDISPLAY
|
||||
|
||||
# Run the original widget before manually moving the cursor so that the
|
||||
# cursor movement doesn't make the widget do something unexpected
|
||||
_zsh_autosuggest_invoke_original_widget $@
|
||||
retval=$?
|
||||
|
||||
# Move the cursor to the end of the buffer
|
||||
if [[ "$KEYMAP" = "vicmd" ]]; then
|
||||
CURSOR=$(($#BUFFER - 1))
|
||||
else
|
||||
CURSOR=$#BUFFER
|
||||
fi
|
||||
|
||||
return $retval
|
||||
}
|
||||
|
||||
# Accept the entire suggestion and execute it
|
||||
_zsh_autosuggest_execute() {
|
||||
# Add the suggestion to the buffer
|
||||
BUFFER="$BUFFER$POSTDISPLAY"
|
||||
|
||||
# Remove the suggestion
|
||||
unset POSTDISPLAY
|
||||
|
||||
# Call the original `accept-line` to handle syntax highlighting or
|
||||
# other potential custom behavior
|
||||
_zsh_autosuggest_invoke_original_widget "accept-line"
|
||||
}
|
||||
|
||||
# Partially accept the suggestion
|
||||
_zsh_autosuggest_partial_accept() {
|
||||
local -i retval cursor_loc
|
||||
|
||||
# Save the contents of the buffer so we can restore later if needed
|
||||
local original_buffer="$BUFFER"
|
||||
|
||||
# Temporarily accept the suggestion.
|
||||
BUFFER="$BUFFER$POSTDISPLAY"
|
||||
|
||||
# Original widget moves the cursor
|
||||
_zsh_autosuggest_invoke_original_widget $@
|
||||
retval=$?
|
||||
|
||||
# Normalize cursor location across vi/emacs modes
|
||||
cursor_loc=$CURSOR
|
||||
if [[ "$KEYMAP" = "vicmd" ]]; then
|
||||
cursor_loc=$((cursor_loc + 1))
|
||||
fi
|
||||
|
||||
# If we've moved past the end of the original buffer
|
||||
if (( $cursor_loc > $#original_buffer )); then
|
||||
# Set POSTDISPLAY to text right of the cursor
|
||||
POSTDISPLAY="${BUFFER[$(($cursor_loc + 1)),$#BUFFER]}"
|
||||
|
||||
# Clip the buffer at the cursor
|
||||
BUFFER="${BUFFER[1,$cursor_loc]}"
|
||||
else
|
||||
# Restore the original buffer
|
||||
BUFFER="$original_buffer"
|
||||
fi
|
||||
|
||||
return $retval
|
||||
}
|
||||
|
||||
() {
|
||||
local action
|
||||
for action in clear modify fetch suggest accept partial_accept execute enable disable toggle; do
|
||||
eval "_zsh_autosuggest_widget_$action() {
|
||||
local -i retval
|
||||
|
||||
_zsh_autosuggest_highlight_reset
|
||||
|
||||
_zsh_autosuggest_$action \$@
|
||||
retval=\$?
|
||||
|
||||
_zsh_autosuggest_highlight_apply
|
||||
|
||||
zle -R
|
||||
|
||||
return \$retval
|
||||
}"
|
||||
done
|
||||
|
||||
zle -N autosuggest-fetch _zsh_autosuggest_widget_fetch
|
||||
zle -N autosuggest-suggest _zsh_autosuggest_widget_suggest
|
||||
zle -N autosuggest-accept _zsh_autosuggest_widget_accept
|
||||
zle -N autosuggest-clear _zsh_autosuggest_widget_clear
|
||||
zle -N autosuggest-execute _zsh_autosuggest_widget_execute
|
||||
zle -N autosuggest-enable _zsh_autosuggest_widget_enable
|
||||
zle -N autosuggest-disable _zsh_autosuggest_widget_disable
|
||||
zle -N autosuggest-toggle _zsh_autosuggest_widget_toggle
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Completion Suggestion Strategy #
|
||||
#--------------------------------------------------------------------#
|
||||
# Fetches a suggestion from the completion engine
|
||||
#
|
||||
|
||||
_zsh_autosuggest_capture_postcompletion() {
|
||||
# Always insert the first completion into the buffer
|
||||
compstate[insert]=1
|
||||
|
||||
# Don't list completions
|
||||
unset 'compstate[list]'
|
||||
}
|
||||
|
||||
_zsh_autosuggest_capture_completion_widget() {
|
||||
# Add a post-completion hook to be called after all completions have been
|
||||
# gathered. The hook can modify compstate to affect what is done with the
|
||||
# gathered completions.
|
||||
local -a +h comppostfuncs
|
||||
comppostfuncs=(_zsh_autosuggest_capture_postcompletion)
|
||||
|
||||
# Only capture completions at the end of the buffer
|
||||
CURSOR=$#BUFFER
|
||||
|
||||
# Run the original widget wrapping `.complete-word` so we don't
|
||||
# recursively try to fetch suggestions, since our pty is forked
|
||||
# after autosuggestions is initialized.
|
||||
zle -- ${(k)widgets[(r)completion:.complete-word:_main_complete]}
|
||||
|
||||
if is-at-least 5.0.3; then
|
||||
# Don't do any cr/lf transformations. We need to do this immediately before
|
||||
# output because if we do it in setup, onlcr will be re-enabled when we enter
|
||||
# vared in the async code path. There is a bug in zpty module in older versions
|
||||
# where the tty is not properly attached to the pty slave, resulting in stty
|
||||
# getting stopped with a SIGTTOU. See zsh-workers thread 31660 and upstream
|
||||
# commit f75904a38
|
||||
stty -onlcr -ocrnl -F /dev/tty
|
||||
fi
|
||||
|
||||
# The completion has been added, print the buffer as the suggestion
|
||||
echo -nE - $'\0'$BUFFER$'\0'
|
||||
}
|
||||
|
||||
zle -N autosuggest-capture-completion _zsh_autosuggest_capture_completion_widget
|
||||
|
||||
_zsh_autosuggest_capture_setup() {
|
||||
autoload -Uz is-at-least
|
||||
|
||||
# There is a bug in zpty module in older zsh versions by which a
|
||||
# zpty that exits will kill all zpty processes that were forked
|
||||
# before it. Here we set up a zsh exit hook to SIGKILL the zpty
|
||||
# process immediately, before it has a chance to kill any other
|
||||
# zpty processes.
|
||||
if ! is-at-least 5.4; then
|
||||
zshexit() {
|
||||
# The zsh builtin `kill` fails sometimes in older versions
|
||||
# https://unix.stackexchange.com/a/477647/156673
|
||||
kill -KILL $$ 2>&- || command kill -KILL $$
|
||||
|
||||
# Block for long enough for the signal to come through
|
||||
sleep 1
|
||||
}
|
||||
fi
|
||||
|
||||
# Try to avoid any suggestions that wouldn't match the prefix
|
||||
zstyle ':completion:*' matcher-list ''
|
||||
zstyle ':completion:*' path-completion false
|
||||
zstyle ':completion:*' max-errors 0 not-numeric
|
||||
|
||||
bindkey '^I' autosuggest-capture-completion
|
||||
}
|
||||
|
||||
_zsh_autosuggest_capture_completion_sync() {
|
||||
_zsh_autosuggest_capture_setup
|
||||
|
||||
zle autosuggest-capture-completion
|
||||
}
|
||||
|
||||
_zsh_autosuggest_capture_completion_async() {
|
||||
_zsh_autosuggest_capture_setup
|
||||
|
||||
zmodload zsh/parameter 2>/dev/null || return # For `$functions`
|
||||
|
||||
# Make vared completion work as if for a normal command line
|
||||
# https://stackoverflow.com/a/7057118/154703
|
||||
autoload +X _complete
|
||||
functions[_original_complete]=$functions[_complete]
|
||||
function _complete() {
|
||||
unset 'compstate[vared]'
|
||||
_original_complete "$@"
|
||||
}
|
||||
|
||||
# Open zle with buffer set so we can capture completions for it
|
||||
vared 1
|
||||
}
|
||||
|
||||
_zsh_autosuggest_strategy_completion() {
|
||||
# Reset options to defaults and enable LOCAL_OPTIONS
|
||||
emulate -L zsh
|
||||
|
||||
# Enable extended glob for completion ignore pattern
|
||||
setopt EXTENDED_GLOB
|
||||
|
||||
typeset -g suggestion
|
||||
local line REPLY
|
||||
|
||||
# Exit if we don't have completions
|
||||
whence compdef >/dev/null || return
|
||||
|
||||
# Exit if we don't have zpty
|
||||
zmodload zsh/zpty 2>/dev/null || return
|
||||
|
||||
# Exit if our search string matches the ignore pattern
|
||||
[[ -n "$ZSH_AUTOSUGGEST_COMPLETION_IGNORE" ]] && [[ "$1" == $~ZSH_AUTOSUGGEST_COMPLETION_IGNORE ]] && return
|
||||
|
||||
# Zle will be inactive if we are in async mode
|
||||
if zle; then
|
||||
zpty $ZSH_AUTOSUGGEST_COMPLETIONS_PTY_NAME _zsh_autosuggest_capture_completion_sync
|
||||
else
|
||||
zpty $ZSH_AUTOSUGGEST_COMPLETIONS_PTY_NAME _zsh_autosuggest_capture_completion_async "\$1"
|
||||
zpty -w $ZSH_AUTOSUGGEST_COMPLETIONS_PTY_NAME $'\t'
|
||||
fi
|
||||
|
||||
{
|
||||
# The completion result is surrounded by null bytes, so read the
|
||||
# content between the first two null bytes.
|
||||
zpty -r $ZSH_AUTOSUGGEST_COMPLETIONS_PTY_NAME line '*'$'\0''*'$'\0'
|
||||
|
||||
# Extract the suggestion from between the null bytes. On older
|
||||
# versions of zsh (older than 5.3), we sometimes get extra bytes after
|
||||
# the second null byte, so trim those off the end.
|
||||
# See http://www.zsh.org/mla/workers/2015/msg03290.html
|
||||
suggestion="${${(@0)line}[2]}"
|
||||
} always {
|
||||
# Destroy the pty
|
||||
zpty -d $ZSH_AUTOSUGGEST_COMPLETIONS_PTY_NAME
|
||||
}
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# History Suggestion Strategy #
|
||||
#--------------------------------------------------------------------#
|
||||
# Suggests the most recent history item that matches the given
|
||||
# prefix.
|
||||
#
|
||||
|
||||
_zsh_autosuggest_strategy_history() {
|
||||
# Reset options to defaults and enable LOCAL_OPTIONS
|
||||
emulate -L zsh
|
||||
|
||||
# Enable globbing flags so that we can use (#m) and (x~y) glob operator
|
||||
setopt EXTENDED_GLOB
|
||||
|
||||
# Escape backslashes and all of the glob operators so we can use
|
||||
# this string as a pattern to search the $history associative array.
|
||||
# - (#m) globbing flag enables setting references for match data
|
||||
# TODO: Use (b) flag when we can drop support for zsh older than v5.0.8
|
||||
local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}"
|
||||
|
||||
# Get the history items that match the prefix, excluding those that match
|
||||
# the ignore pattern
|
||||
local pattern="$prefix*"
|
||||
if [[ -n $ZSH_AUTOSUGGEST_HISTORY_IGNORE ]]; then
|
||||
pattern="($pattern)~($ZSH_AUTOSUGGEST_HISTORY_IGNORE)"
|
||||
fi
|
||||
|
||||
# Give the first history item matching the pattern as the suggestion
|
||||
# - (r) subscript flag makes the pattern match on values
|
||||
typeset -g suggestion="${history[(r)$pattern]}"
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Match Previous Command Suggestion Strategy #
|
||||
#--------------------------------------------------------------------#
|
||||
# Suggests the most recent history item that matches the given
|
||||
# prefix and whose preceding history item also matches the most
|
||||
# recently executed command.
|
||||
#
|
||||
# For example, suppose your history has the following entries:
|
||||
# - pwd
|
||||
# - ls foo
|
||||
# - ls bar
|
||||
# - pwd
|
||||
#
|
||||
# Given the history list above, when you type 'ls', the suggestion
|
||||
# will be 'ls foo' rather than 'ls bar' because your most recently
|
||||
# executed command (pwd) was previously followed by 'ls foo'.
|
||||
#
|
||||
# Note that this strategy won't work as expected with ZSH options that don't
|
||||
# preserve the history order such as `HIST_IGNORE_ALL_DUPS` or
|
||||
# `HIST_EXPIRE_DUPS_FIRST`.
|
||||
|
||||
_zsh_autosuggest_strategy_match_prev_cmd() {
|
||||
# Reset options to defaults and enable LOCAL_OPTIONS
|
||||
emulate -L zsh
|
||||
|
||||
# Enable globbing flags so that we can use (#m) and (x~y) glob operator
|
||||
setopt EXTENDED_GLOB
|
||||
|
||||
# TODO: Use (b) flag when we can drop support for zsh older than v5.0.8
|
||||
local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}"
|
||||
|
||||
# Get the history items that match the prefix, excluding those that match
|
||||
# the ignore pattern
|
||||
local pattern="$prefix*"
|
||||
if [[ -n $ZSH_AUTOSUGGEST_HISTORY_IGNORE ]]; then
|
||||
pattern="($pattern)~($ZSH_AUTOSUGGEST_HISTORY_IGNORE)"
|
||||
fi
|
||||
|
||||
# Get all history event numbers that correspond to history
|
||||
# entries that match the pattern
|
||||
local history_match_keys
|
||||
history_match_keys=(${(k)history[(R)$~pattern]})
|
||||
|
||||
# By default we use the first history number (most recent history entry)
|
||||
local histkey="${history_match_keys[1]}"
|
||||
|
||||
# Get the previously executed command
|
||||
local prev_cmd="$(_zsh_autosuggest_escape_command "${history[$((HISTCMD-1))]}")"
|
||||
|
||||
# Iterate up to the first 200 history event numbers that match $prefix
|
||||
for key in "${(@)history_match_keys[1,200]}"; do
|
||||
# Stop if we ran out of history
|
||||
[[ $key -gt 1 ]] || break
|
||||
|
||||
# See if the history entry preceding the suggestion matches the
|
||||
# previous command, and use it if it does
|
||||
if [[ "${history[$((key - 1))]}" == "$prev_cmd" ]]; then
|
||||
histkey="$key"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Give back the matched history entry
|
||||
typeset -g suggestion="$history[$histkey]"
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Fetch Suggestion #
|
||||
#--------------------------------------------------------------------#
|
||||
# Loops through all specified strategies and returns a suggestion
|
||||
# from the first strategy to provide one.
|
||||
#
|
||||
|
||||
_zsh_autosuggest_fetch_suggestion() {
|
||||
typeset -g suggestion
|
||||
local -a strategies
|
||||
local strategy
|
||||
|
||||
# Ensure we are working with an array
|
||||
strategies=(${=ZSH_AUTOSUGGEST_STRATEGY})
|
||||
|
||||
for strategy in $strategies; do
|
||||
# Try to get a suggestion from this strategy
|
||||
_zsh_autosuggest_strategy_$strategy "$1"
|
||||
|
||||
# Ensure the suggestion matches the prefix
|
||||
[[ "$suggestion" != "$1"* ]] && unset suggestion
|
||||
|
||||
# Break once we've found a valid suggestion
|
||||
[[ -n "$suggestion" ]] && break
|
||||
done
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Async #
|
||||
#--------------------------------------------------------------------#
|
||||
|
||||
_zsh_autosuggest_async_request() {
|
||||
zmodload zsh/system 2>/dev/null # For `$sysparams`
|
||||
|
||||
typeset -g _ZSH_AUTOSUGGEST_ASYNC_FD _ZSH_AUTOSUGGEST_CHILD_PID
|
||||
|
||||
# If we've got a pending request, cancel it
|
||||
if [[ -n "$_ZSH_AUTOSUGGEST_ASYNC_FD" ]] && { true <&$_ZSH_AUTOSUGGEST_ASYNC_FD } 2>/dev/null; then
|
||||
# Close the file descriptor and remove the handler
|
||||
exec {_ZSH_AUTOSUGGEST_ASYNC_FD}<&-
|
||||
zle -F $_ZSH_AUTOSUGGEST_ASYNC_FD
|
||||
|
||||
# We won't know the pid unless the user has zsh/system module installed
|
||||
if [[ -n "$_ZSH_AUTOSUGGEST_CHILD_PID" ]]; then
|
||||
# Zsh will make a new process group for the child process only if job
|
||||
# control is enabled (MONITOR option)
|
||||
if [[ -o MONITOR ]]; then
|
||||
# Send the signal to the process group to kill any processes that may
|
||||
# have been forked by the suggestion strategy
|
||||
kill -TERM -$_ZSH_AUTOSUGGEST_CHILD_PID 2>/dev/null
|
||||
else
|
||||
# Kill just the child process since it wasn't placed in a new process
|
||||
# group. If the suggestion strategy forked any child processes they may
|
||||
# be orphaned and left behind.
|
||||
kill -TERM $_ZSH_AUTOSUGGEST_CHILD_PID 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Fork a process to fetch a suggestion and open a pipe to read from it
|
||||
exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <(
|
||||
# Tell parent process our pid
|
||||
echo $sysparams[pid]
|
||||
|
||||
# Fetch and print the suggestion
|
||||
local suggestion
|
||||
_zsh_autosuggest_fetch_suggestion "$1"
|
||||
echo -nE "$suggestion"
|
||||
)
|
||||
|
||||
# There's a weird bug here where ^C stops working unless we force a fork
|
||||
# See https://github.com/zsh-users/zsh-autosuggestions/issues/364
|
||||
command true
|
||||
|
||||
# Read the pid from the child process
|
||||
read _ZSH_AUTOSUGGEST_CHILD_PID <&$_ZSH_AUTOSUGGEST_ASYNC_FD
|
||||
|
||||
# When the fd is readable, call the response handler
|
||||
zle -F "$_ZSH_AUTOSUGGEST_ASYNC_FD" _zsh_autosuggest_async_response
|
||||
}
|
||||
|
||||
# Called when new data is ready to be read from the pipe
|
||||
# First arg will be fd ready for reading
|
||||
# Second arg will be passed in case of error
|
||||
_zsh_autosuggest_async_response() {
|
||||
emulate -L zsh
|
||||
|
||||
local suggestion
|
||||
|
||||
if [[ -z "$2" || "$2" == "hup" ]]; then
|
||||
# Read everything from the fd and give it as a suggestion
|
||||
IFS='' read -rd '' -u $1 suggestion
|
||||
zle autosuggest-suggest -- "$suggestion"
|
||||
|
||||
# Close the fd
|
||||
exec {1}<&-
|
||||
fi
|
||||
|
||||
# Always remove the handler
|
||||
zle -F "$1"
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Start #
|
||||
#--------------------------------------------------------------------#
|
||||
|
||||
# Start the autosuggestion widgets
|
||||
_zsh_autosuggest_start() {
|
||||
# By default we re-bind widgets on every precmd to ensure we wrap other
|
||||
# wrappers. Specifically, highlighting breaks if our widgets are wrapped by
|
||||
# zsh-syntax-highlighting widgets. This also allows modifications to the
|
||||
# widget list variables to take effect on the next precmd. However this has
|
||||
# a decent performance hit, so users can set ZSH_AUTOSUGGEST_MANUAL_REBIND
|
||||
# to disable the automatic re-binding.
|
||||
if (( ${+ZSH_AUTOSUGGEST_MANUAL_REBIND} )); then
|
||||
add-zsh-hook -d precmd _zsh_autosuggest_start
|
||||
fi
|
||||
|
||||
_zsh_autosuggest_bind_widgets
|
||||
}
|
||||
|
||||
# Start the autosuggestion widgets on the next precmd
|
||||
autoload -Uz add-zsh-hook
|
||||
add-zsh-hook precmd _zsh_autosuggest_start
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue