Commit | Line | Data |
---|---|---|
08146d0e AB |
1 | #+title: rc.org |
2 | #+property: header-args :comments link :mkdirp yes :results silent | |
3 | ||
4 | * About | |
5 | ||
6 | This org file contains the configuration files of pretty much every | |
7 | program I use. The files are tangled (i.e. exported, or derived) from | |
8 | this file using =org-babel=. | |
9 | ||
10 | Note: This file is best viewed inside Emacs with org mode. | |
11 | ||
12 | * Configs | |
13 | ||
b13e2dc1 AB |
14 | This section contains the configuration files (dotfiles) of various |
15 | programs I use. | |
16 | ||
17 | ** [[https://github.com/afewmail/afew][afew]] | |
18 | :PROPERTIES: | |
19 | :header-args+: :tangle ~/.config/afew/config | |
20 | :END: | |
21 | ||
22 | #+begin_quote | |
23 | an initial tagging script for notmuch mail | |
24 | #+end_quote | |
25 | ||
26 | #+begin_src conf | |
27 | # This is the default filter chain | |
28 | [SpamFilter] | |
29 | #[ClassifyingFilter] | |
30 | [KillThreadsFilter] | |
31 | #[ListMailsFilter] | |
32 | [ArchiveSentMailsFilter] | |
33 | sent_tag = sent | |
34 | [InboxFilter] | |
35 | ||
36 | #[Filter.1] | |
37 | #query = 'folder:amin/lists/.haskell-cafe' | |
38 | #tags = +lists;+lists/haskell-cafe | |
39 | #message = lists/haskell-cafe | |
40 | ||
41 | #[Filter.2] | |
42 | #query = 'folder:amin/lists/.haskell-weekly' | |
43 | #tags = +lists;+lists/haskell-weekly | |
44 | #message = lists/haskell-weekly | |
45 | ||
46 | #[Filter.3] | |
47 | #query = 'folder:amin/lists/.hackernewsletter' | |
48 | #tags = +lists;+lists/hackernewsletter | |
49 | #message = lists/hackernewsletter | |
50 | ||
51 | ||
52 | #[FolderNameFilter] | |
53 | #folder_blacklist = Inbox | |
54 | #maildir_separator = /. | |
55 | #folder_transforms = Drafts:draft Junk:spam Trash:deleted Sent:sent Archive:archive lists/haskell-cafe:lists/haskell-cafe | |
56 | #+end_src | |
57 | ||
58 | ** bspwm | |
59 | ||
60 | *** bspwmrc | |
61 | :PROPERTIES: | |
62 | :header-args+: :tangle ~/.config/bspwm/bspwmrc :shebang "#!/bin/sh" | |
63 | :END: | |
64 | ||
65 | #+begin_src sh | |
66 | sxhkd & | |
67 | sh ~/.fehbg & | |
68 | xfce4-panel -d & | |
87af8efd | 69 | compton & |
b13e2dc1 AB |
70 | sleep 0.5 && pasystray --notify=all & |
71 | ||
72 | bspc monitor -d I II III IV V VI VII VIII IX X | |
73 | #bspc monitor eDP-1 -d I II III IV V | |
74 | #bspc monitor HDMI-1 -d VI VII VIII IX X | |
75 | ||
76 | #bspc config border_width 2 | |
77 | #bspc config window_gap 8 | |
78 | bspc config window_gap 0 | |
79 | ||
80 | bspc config bottom_padding 26 | |
81 | ||
82 | bspc config split_ratio 0.52 | |
83 | bspc config borderless_monocle true | |
84 | bspc config gapless_monocle true | |
85 | bspc config click_to_focus button1 | |
86 | bspc config directional_focus_tightness low | |
87 | ||
87af8efd | 88 | #bspc rule -a Firefox desktop='^1' follow=on |
b13e2dc1 AB |
89 | bspc rule -a Nightly desktop='^1' follow=on |
90 | bspc rule -a Emacs desktop='^2' state=tiled follow=on | |
91 | #bspc rule -a Chromium desktop='^4' follow=on | |
92 | bspc rule -a URxvt state=floating | |
93 | bspc rule -a URxvt:tiled state=tiled | |
94 | bspc rule -a Connman-gtk state=floating | |
95 | bspc rule -a Xfce4-panel state=floating | |
96 | bspc rule -a TelegramDesktop state=floating | |
97 | bspc rule -a Ec state=floating | |
98 | bspc rule -a Pavucontrol state=floating | |
99 | bspc rule -a Eog state=floating | |
100 | bspc rule -a Seahorse state=floating | |
101 | bspc rule -a mpv state=floating | |
102 | bspc rule -a Evince state=floating | |
103 | bspc rule -a Meld state=floating | |
104 | bspc rule -a Autokey-gtk state=floating | |
105 | bspc rule -a Mousepad state=floating | |
106 | bspc rule -a Wrapper-1.0 state=floating | |
107 | bspc rule -a File-roller state=floating | |
108 | bspc rule -a Gnome-disks state=floating | |
109 | bspc rule -a Termite state=floating | |
110 | bspc rule -a Termite:tiled state=tiled | |
111 | bspc rule -a Thunderbird:Calendar state=floating | |
112 | bspc rule -a Audacity state=floating | |
113 | bspc rule -a Proof state=floating # pvs x-show-proof | |
114 | bspc rule -a Nm-connection-editor state=floating | |
115 | bspc rule -a Wire state=floating | |
116 | bspc rule -a discord state=floating | |
117 | bspc rule -a X2goclient state=floating | |
118 | bspc rule -a SimpleScreenRecorder state=floating | |
119 | bspc rule -a Gimp state=floating | |
120 | bspc rule -a Wrapper-2.0 state=floating | |
121 | bspc rule -a Zathura state=tiled | |
122 | #+end_src | |
123 | ||
124 | *** sxhkdrc | |
125 | :PROPERTIES: | |
126 | :header-args+: :tangle ~/.config/sxhkd/sxhkdrc | |
127 | :END: | |
128 | ||
129 | #+begin_src conf | |
130 | # | |
131 | # wm independent hotkeys | |
132 | # | |
133 | ||
134 | # terminal emulator | |
135 | super + {_,shift} + Return | |
136 | urxvt{_, -name tiled} | |
137 | ||
138 | #super + {_,shift} + Return | |
139 | # termite{_, --name=tiled} | |
140 | ||
141 | # program launcher | |
142 | super + space | |
143 | rofi -show run -display-run '> ' -display-window ' 🗔 ' | |
144 | ||
145 | super + alt + space | |
146 | xfce4-popup-whiskermenu | |
147 | ||
148 | # window finder | |
149 | super + backslash | |
150 | rofi -show window -display-run '> ' -display-window ' 🗔 ' | |
151 | ||
152 | # password manager | |
153 | alt + space | |
154 | rofi-pass | |
155 | ||
156 | # firefox | |
157 | #super + r | |
158 | # firefox | |
159 | ||
160 | # chromium | |
161 | #super + c | |
162 | # chromium -incognito | |
163 | ||
164 | # emacs | |
165 | super + e | |
166 | emacs | |
167 | ||
168 | # make sxhkd reload its configuration files: | |
169 | super + Escape | |
170 | pkill -USR1 -x sxhkd | |
171 | ||
172 | # volume {up,down} | |
173 | XF86Audio{Raise,Lower}Volume | |
174 | pamixer --allow-boost --{in,de}crease 5 | |
175 | ||
176 | # mute | |
177 | XF86AudioMute | |
178 | pamixer --toggle-mute | |
179 | ||
373a060a AB |
180 | XF86AudioMicMute |
181 | pactl set-source-mute 1 toggle | |
182 | ||
b13e2dc1 AB |
183 | # playback control |
184 | XF86Audio{Play,Prev,Next} | |
185 | mpc {toggle,prev,next} | |
186 | ||
187 | # lock the screen | |
188 | super + shift + q | |
189 | light-locker-command -l | |
190 | ||
191 | # Toggle keyboard layout | |
192 | super + F7 | |
193 | toggle-layout | |
194 | ||
195 | # Toggle Xfce presentation mode | |
196 | XF86LaunchB | |
197 | toggle-presentation-mode | |
198 | ||
199 | # monitor brightness | |
200 | XF86MonBrightness{Up,Down} | |
201 | light -{A,U} 5 | |
202 | ||
203 | super + apostrophe | |
204 | rofi-light | |
205 | ||
206 | # keyboard brightness | |
207 | #XF86KbdBrightness{Up,Down} | |
208 | # kbdlight {up,down} | |
209 | ||
72f329ba AB |
210 | XF86RotateWindows |
211 | toggle-tablet | |
212 | ||
b13e2dc1 AB |
213 | # |
214 | # bspwm hotkeys | |
215 | # | |
216 | ||
217 | # quit bspwm normally | |
218 | super + alt + Escape | |
219 | bspc quit | |
220 | ||
221 | # close and kill | |
222 | super + {w,q} | |
223 | bspc node -{c,k} | |
224 | ||
225 | # alternate between the tiled and monocle layout | |
226 | super + m | |
227 | bspc desktop -l next | |
228 | ||
229 | # send the newest marked node to the newest preselected node | |
230 | super + y | |
231 | bspc node newest.marked.local -n newest.!automatic.local | |
232 | ||
233 | # swap the current node and the biggest node | |
234 | super + g | |
235 | bspc node -s biggest | |
236 | ||
237 | # | |
238 | # state/flags | |
239 | # | |
240 | ||
241 | # set the window state | |
242 | super + {t,shift + t,s,f} | |
243 | bspc node -t {tiled,pseudo_tiled,floating,fullscreen} | |
244 | ||
245 | # set the node flags | |
246 | super + ctrl + {m,x,y,z} | |
247 | bspc node -g {marked,locked,sticky,private} | |
248 | ||
249 | # | |
250 | # focus/swap | |
251 | # | |
252 | ||
253 | # focus the node in the given direction | |
254 | super + {_,shift + }{h,j,k,l} | |
255 | bspc node -{f,s} {west,south,north,east} | |
256 | ||
257 | # focus the node for the given path jump | |
258 | super + {p,b,comma,period} | |
259 | bspc node -f @{parent,brother,first,second} | |
260 | ||
261 | # focus the next/previous node in the current desktop | |
262 | super + {_,shift + }c | |
263 | bspc node -f {next,prev}.local | |
264 | ||
265 | # focus the next/previous desktop in the current monitor | |
266 | super + bracket{left,right} | |
267 | bspc desktop -f {prev,next}.local | |
268 | ||
269 | # send to next/prev desktop | |
270 | super + shift + bracket{left,right} | |
271 | bspc node -d {prev,next} --follow | |
272 | ||
273 | # focus the last node/desktop | |
274 | super + {grave,Tab} | |
275 | bspc {node,desktop} -f last | |
276 | ||
277 | # focus the older or newer node in the focus history | |
278 | super + {o,i} | |
279 | bspc wm -h off; \ | |
280 | bspc node {older,newer} -f; \ | |
281 | bspc wm -h on | |
282 | ||
283 | # focus or send to the given desktop | |
284 | super + {_,shift + }{1-9,0} | |
285 | bspc {desktop -f,node -d} '^{1-9,10}' | |
286 | ||
287 | # | |
288 | # preselect | |
289 | # | |
290 | ||
291 | # preselect the direction | |
292 | super + ctrl + {h,j,k,l} | |
293 | bspc node -p {west,south,north,east} | |
294 | ||
295 | # preselect the ratio | |
296 | super + ctrl + {1-9} | |
297 | bspc node -o 0.{1-9} | |
298 | ||
299 | # cancel the preselection for the focused node | |
300 | super + ctrl + space | |
301 | bspc node -p cancel | |
302 | ||
303 | # cancel the preselection for the focused desktop | |
304 | super + ctrl + shift + space | |
305 | bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel | |
306 | ||
307 | # | |
308 | # move/resize | |
309 | # | |
310 | ||
311 | # expand a window by moving one of its side outward | |
312 | super + alt + {h,j,k,l} | |
313 | bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0} | |
314 | ||
315 | # contract a window by moving one of its side inward | |
316 | super + alt + shift + {h,j,k,l} | |
317 | bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} | |
318 | ||
319 | # move a floating window | |
320 | super + {Left,Down,Up,Right} | |
321 | bspc node -v {-20 0,0 20,0 -20,20 0} | |
322 | ||
323 | #alt + bracket{left,right} | |
324 | # xdotool key --clearmodifiers ctrl+Page_{Up,Down} | |
325 | #+end_src | |
326 | ||
327 | ** compton | |
328 | :PROPERTIES: | |
329 | :header-args+: :tangle ~/.config/compton.conf | |
330 | :END: | |
331 | ||
332 | #+begin_src conf | |
333 | # Shadow | |
334 | shadow = false; # Enabled client-side shadows on windows. | |
335 | no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows. | |
336 | no-dnd-shadow = true; # Don't draw shadows on DND windows. | |
337 | clear-shadow = true; # Zero the part of the shadow's mask behind the | |
338 | # window. Fix some weirdness with ARGB windows. | |
339 | shadow-radius = 5; # The blur radius for shadows. (default 12) | |
340 | shadow-offset-x = -5; # The left offset for shadows. (default -15) | |
341 | shadow-offset-y = -5; # The top offset for shadows. (default -15) | |
342 | # shadow-opacity = 0.7; # The translucency for shadows. (default .75) | |
343 | # shadow-red = 0.0; # Red color value of shadow. (0.0 - 1.0, defaults to 0) | |
344 | # shadow-green = 0.0; # Green color value of shadow. (0.0 - 1.0, defaults to 0) | |
345 | # shadow-blue = 0.0; # Blue color value of shadow. (0.0 - 1.0, defaults to 0) | |
346 | shadow-exclude = [ "n:e:Notification", "class_g = 'Chromium'", "class_g = 'Dmenu'", "class_g = 'Firefox' && argb" ]; # Exclude conditions for shadows. | |
347 | # shadow-exclude = "n:e:Notification"; | |
348 | #shadow-exclude = [ "_GTK_FRAME_EXTENTS@:c" ] # Fix dual shadow on some gtk3 powered applications | |
349 | shadow-ignore-shaped = true; # Avoid drawing shadow on all shaped windows | |
350 | # (see also: --detect-rounded-corners) | |
351 | ||
352 | # Opacity | |
353 | menu-opacity = 1.0; # The opacity for menus. (default 1.0) | |
354 | #inactive-opacity = 0.9; # Default opacity of inactive windows. (0.0 - 1.0) | |
355 | # active-opacity = 0.8; # Default opacity for active windows. (0.0 - 1.0) | |
356 | frame-opacity = 1.0; # Opacity of window titlebars and borders. (0.1 - 1.0) | |
357 | # inactive-opacity-override = true; # Let inactive opacity set by 'inactive-opacity' overrides | |
358 | # value of _NET_WM_OPACITY. Bad choice. | |
359 | alpha-step = 0.06; # XRender backend: Step size for alpha pictures. Increasing | |
360 | # it may result in less X resource usage, | |
361 | # Yet fading may look bad. | |
362 | #inactive-dim = 0.5; # Dim inactive windows. (0.0 - 1.0) | |
363 | #inactive-dim-fixed = true; # Do not let dimness adjust based on window opacity. | |
364 | # blur-background = true; # Blur background of transparent windows. | |
365 | # Bad performance with X Render backend. | |
366 | # GLX backend is preferred. | |
367 | # blur-background-frame = true; # Blur background of opaque windows with transparent | |
368 | # frames as well. | |
369 | blur-background-fixed = true; # Do not let blur radius adjust based on window opacity. | |
370 | blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ]; | |
371 | # Exclude conditions for background blur. | |
372 | ||
373 | # Fading | |
374 | fading = false; # Fade windows during opacity changes. | |
375 | fade-delta = 3; # The time between steps in a fade in milliseconds. (default 10). | |
376 | fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028). | |
377 | fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03). | |
378 | # no-fading-openclose = true; # Avoid fade windows in/out when opening/closing. | |
379 | fade-exclude = [ ]; # Exclude conditions for fading. | |
380 | ||
381 | # Other | |
382 | backend = "glx" # Backend to use: "xrender" or "glx". GLX backend is typically | |
383 | # much faster but depends on a sane driver. | |
384 | mark-wmwin-focused = true; # Try to detect WM windows and mark them as active. | |
385 | mark-ovredir-focused = true; # Mark all non-WM but override-redirect windows active (e.g. menus). | |
386 | use-ewmh-active-win = true; # Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused | |
387 | # instead of using FocusIn/Out events. Usually more reliable but | |
388 | # depends on a EWMH-compliant WM. | |
389 | detect-rounded-corners = false; # Detect rounded corners and treat them as rectangular when --shadow-ignore- shaped is on. | |
390 | detect-client-opacity = true; # Detect _NET_WM_OPACITY on client windows, useful for window | |
391 | # managers not passing _NET_WM_OPACITY of client windows to frame | |
392 | # windows. | |
393 | refresh-rate = 0; # For --sw-opti: Specify refresh rate of the screen. 0 for auto. | |
394 | vsync = "drm"; # "none", "drm", "opengl", "opengl-oml", "opengl-swc", "opengl-mswc" | |
395 | # See man page for more details. | |
396 | dbe = false; # Enable DBE painting mode. Rarely needed. | |
397 | paint-on-overlay = true; # Painting on X Composite overlay window. Recommended. | |
398 | sw-opti = false; # Limit compton to repaint at most once every 1 / refresh_rate. | |
399 | # Incompatible with certain VSync methods. | |
400 | unredir-if-possible = false; # Unredirect all windows if a full-screen opaque window is | |
401 | # detected, to maximize performance for full-screen windows. | |
402 | focus-exclude = [ ]; # A list of conditions of windows that should always be considered | |
403 | # focused. | |
404 | detect-transient = true; # Use WM_TRANSIENT_FOR to group windows, and consider windows in | |
405 | # the same group focused at the same time. | |
406 | detect-client-leader = true; # Use WM_CLIENT_LEADER to group windows. | |
407 | invert-color-include = [ ]; # Conditions for windows to be painted with inverted color. | |
408 | ||
409 | # GLX backend # GLX backend fine-tune options. See man page for more info. | |
410 | glx-no-stencil = true; # Recommended. | |
411 | glx-copy-from-front = false; # Useful with --glx-swap-method, | |
412 | # glx-use-copysubbuffermesa = true; # Recommended if it works. Breaks VSync. | |
413 | # glx-no-rebind-pixmap = true; # Recommended if it works. | |
414 | glx-no-rebind-pixmap = true; # Recommended if it works. | |
415 | #glx-swap-method = "4"; # See man page. | |
416 | glx-swap-method = "4"; # See man page. | |
417 | ||
418 | # Window type settings | |
419 | wintypes: | |
420 | { | |
421 | tooltip = { fade = true; shadow = false; opacity = 1; focus = true; }; | |
422 | menu = { shadow = false; }; | |
423 | dropdown_menu = { shadow = false; }; | |
424 | popup_menu = { shadow = false; }; | |
425 | utility = { shadow = false; }; | |
426 | # fade: Fade the particular type of windows. | |
427 | # shadow: Give those windows shadow | |
428 | # opacity: Default opacity for the type of windows. | |
429 | # focus: Whether to always consider windows of this type focused. | |
430 | }; | |
431 | #+end_src | |
432 | ||
05ab13aa AB |
433 | ** Dunst |
434 | :PROPERTIES: | |
435 | :header-args+: :tangle ~/.config/dunst/dunstrc | |
436 | :END: | |
437 | ||
438 | #+begin_src conf | |
439 | [global] | |
440 | #font = Ubuntu Mono 10.5 | |
441 | font = Inconsolata 11 | |
442 | ||
443 | # Path to default icons. | |
444 | icon_folders = /usr/share/icons/Moka/16x16/status/:/usr/share/icons/Moka/16x16/devices/:/usr/share/icons/Faba-Mono/16x16/status/:/usr/share/icons/Faba-Mono/16x16/devices/:/usr/share/icons/Moka/16x16/actions/:/usr/share/icons/Moka/16x16/categories/:/usr/share/icons/Moka/16x16/mimetypes/:/usr/share/icons/Moka/16x16/apps/:/usr/share/icons/Moka/16x16/places/:/usr/share/icons/Paper/16x16/status/ | |
445 | ||
446 | icon_position = left | |
447 | # <b>bold</b> | |
448 | # <i>italic</i> | |
449 | # <s>strikethrough<s/> | |
450 | # <u>underline</u> | |
451 | markup = full | |
452 | # The format of the message. Possible variables are: | |
453 | # %a appname | |
454 | # %s summary | |
455 | # %b body | |
456 | # %i iconname (including its path) | |
457 | # %I iconname (without its path) | |
458 | # %p progress value if set ([ 0%] to [100%]) or nothing | |
459 | # Markup is allowed | |
460 | format = "<b>%s</b>\n%b" | |
461 | # Sort messages by urgency | |
462 | sort = yes | |
463 | # Show how many messages are currently hidden (because of geometry) | |
464 | indicate_hiddenl= no | |
465 | # Alignment of message text. | |
466 | # Possible values are "left", "center" and "right" | |
467 | alignment = center | |
468 | # The frequency with wich text that is longer than the notification | |
469 | # window allows bounces back and forth. | |
470 | # This option conflicts with 'word_wrap'. | |
471 | # Set to 0 to disable | |
472 | bounce_freq = 3 | |
473 | # show age of message if message is older than show_age_threshold seconds. | |
474 | # set to -1 to disable | |
475 | show_age_threshold = -1 | |
476 | # split notifications into multiple lines if they don't fit into geometry | |
477 | word_wrap = yes | |
478 | # ignore newlines '\n' in notifications | |
479 | ignore_newline = no | |
480 | # The geometry of the message window. | |
481 | # geometry [{width}]x{height}][+/-{x}+/-{y}] | |
482 | # The height is measured in number of notifications everything else in pixels. If the width | |
483 | # is omitted but the height is given ("-geometry x2"), the message window | |
484 | # expands over the whole screen (dmenu-like). If width is 0, | |
485 | # the window expands to the longest message displayed. | |
486 | # A positive x is measured from the left, a negative from the | |
487 | # right side of the screen. Y is measured from the top and down respectevly. | |
488 | # The width can be negative. In this case the actual width is the | |
489 | # screen width minus the width defined in within the geometry option. | |
490 | #geometry = "410x12-12+12" | |
491 | #geometry = "0x0-30-30" | |
492 | geometry = "260x12-30-30" | |
493 | # The transparency of the window. range: [0; 100] | |
494 | # This option will only work if a compositing windowmanager is present (e.g. xcompmgr, compiz, etc..) | |
495 | transparency = 0 | |
496 | # Don't remove messages, if the user is idle (no mouse or keyboard input) | |
497 | # for longer than idle_threshold seconds. | |
498 | # Set to 0 to disable. | |
499 | idle_threshold = 120 | |
500 | # Which monitor should the notifications be displayed on. | |
501 | monitor = 0 | |
502 | # Display notification on focused monitor. Possible modes are: | |
503 | # mouse: follow mouse pointer | |
504 | # keyboard: follow window with keyboard focus | |
505 | # none: don't follow anything | |
506 | # | |
507 | # "keyboard" needs a windowmanager that exports the _NET_ACTIVE_WINDOW property. | |
508 | # This should be the case for almost all modern windowmanagers. | |
509 | # | |
510 | # If this option is set to mouse or keyboard, the monitor option will be | |
511 | # ignored. | |
512 | follow = keyboard | |
513 | # should a notification popped up from history be sticky or | |
514 | # timeout as if it would normally do. | |
515 | sticky_history = yes | |
516 | # The height of a single line. If the height is smaller than the font height, | |
517 | # it will get raised to the font height. | |
518 | # This adds empty space above and under the text. | |
519 | line_height = 0 | |
520 | ||
521 | show_indicators = yes | |
522 | ||
523 | # Draw a line of 'separatpr_height' pixel height between two notifications. | |
524 | # Set to 0 to disable | |
525 | separator_height = 3 | |
526 | # padding between text and separator | |
527 | padding = 8 | |
528 | # horizontal padding | |
529 | horizontal_padding = 8 | |
530 | # Define a color for the separator. | |
531 | # possible values are: | |
532 | # * auto: dunst tries to find a color fitting to the background | |
533 | # * foreground: use the same color as the foreground | |
534 | # * frame: use the same color as the frame. | |
535 | # * anything else will be interpreted as a X color | |
536 | separator_color = foreground | |
537 | # print a notification on startup | |
538 | # This is mainly for error detection, since dbus (re-)starts dunst | |
539 | # automatically after a crash. | |
540 | startup_notification = false | |
541 | # dmenu path | |
542 | #dmenu = /usr/bin/dmenu -p dunst: | |
543 | dmenu = /usr/bin/rofi -dmenu -p dunst: | |
544 | # browser for opening urls in context menu | |
545 | browser = /usr/bin/firefox -new-tab | |
546 | [frame] | |
547 | width = 0 | |
548 | color = "#377222" | |
549 | [shortcuts] | |
550 | # shortcuts are specified as [modifier+][modifier+]...key | |
551 | # available modifiers are 'ctrl', 'mod1' (the alt-key), 'mod2', 'mod3' | |
552 | # and 'mod4' (windows-key) | |
553 | # xev might be helpful to find names for keys | |
554 | # close notification | |
555 | close = ctrl+space | |
556 | # close all notifications | |
557 | close_all = ctrl+shift+space | |
558 | # redisplay last message(s) | |
559 | # On the US keyboard layout 'grave' is normally above TAB and left of '1'. | |
560 | history = ctrl+shift+h | |
561 | # context menu | |
562 | context = ctrl+shift+period | |
563 | [urgency_low] | |
564 | # IMPORTANT: colors have to be defined in quotation marks. | |
565 | # Otherwise the '#' and following would be interpreted as a comment. | |
566 | background = "#1d2a30" | |
567 | foreground = "#71c2af" | |
568 | timeout = 3 | |
569 | [urgency_normal] | |
570 | background = "#1d2a30" | |
571 | foreground = "#71c2af" | |
572 | timeout = 0 | |
573 | [urgency_critical] | |
574 | background = "#1d2a30" | |
575 | foreground = "#ff9982" | |
576 | timeout = 0 | |
577 | ||
578 | # Every section that isn't one of the above is interpreted as a rules | |
579 | # to override settings for certain messages. | |
580 | # Messages can be matched by 'appname', 'summary', 'body' or 'icon' | |
581 | # and you can override the 'timeout', 'urgency', 'foreground', 'background' | |
582 | # and 'format'. | |
583 | # Shell-like globbing will get expanded. | |
584 | # | |
585 | # SCRIPTING | |
586 | # you can specify a script that gets run when the rule matches by setting | |
587 | # the 'script' option. | |
588 | # The script will be called as follows: | |
589 | # script appname summary body icon urgency | |
590 | # where urgency can be "LOW", "NORMAL" or "CRITICAL". | |
591 | # | |
592 | # NOTE: if you don't want a notification to be displayed, set the format to "" | |
593 | # NOTE: It might be helpful to run dunst -print in a terminal in order to find | |
594 | # fitting options for rules. | |
595 | #[espeak] | |
596 | # summary = "*" | |
597 | # script = dunst_espeak.sh | |
598 | #[script-test] | |
599 | # summary = "*script*" | |
600 | # script = dunst_test.sh | |
601 | #[ignore] | |
602 | ## This notification will not be displayed | |
603 | # summary = "foobar" | |
604 | # format = "" | |
605 | #[signed_on] | |
606 | # appname = Pidgin | |
607 | # summary = "*signed on*" | |
608 | # urgency = low | |
609 | # | |
610 | #[signed_off] | |
611 | # appname = Pidgin | |
612 | # summary = *signed off* | |
613 | # urgency = low | |
614 | # | |
615 | #[says] | |
616 | # appname = Pidgin | |
617 | # summary = *says* | |
618 | # urgency = critical | |
619 | # | |
620 | #[twitter] | |
621 | # appname = Pidgin | |
622 | # summary = *twitter.com* | |
623 | # urgency = normal | |
624 | # | |
625 | [xfpm-backlight] | |
626 | summary = *Brightness* | |
627 | urgency = low | |
628 | #+end_src | |
629 | ||
630 | ** Fontconfig | |
631 | :PROPERTIES: | |
45d84997 | 632 | :header-args+: :tangle ~/.config/fontconfig/fonts.conf :comments none |
05ab13aa AB |
633 | :END: |
634 | ||
635 | #+begin_src xml | |
636 | <?xml version="1.0"?> | |
637 | <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
638 | <fontconfig> | |
639 | <match target="font"> | |
640 | <edit mode="assign" name="rgba"> | |
641 | <const>rgb</const> | |
642 | </edit> | |
643 | </match> | |
644 | <match target="font"> | |
645 | <edit mode="assign" name="hinting"> | |
646 | <bool>true</bool> | |
647 | </edit> | |
648 | </match> | |
649 | <match target="font"> | |
650 | <edit mode="assign" name="hintstyle"> | |
651 | <const>hintslight</const> | |
652 | </edit> | |
653 | </match> | |
654 | <match target="font"> | |
655 | <edit mode="assign" name="antialias"> | |
656 | <bool>true</bool> | |
657 | </edit> | |
658 | </match> | |
659 | <match target="font"> | |
660 | <edit mode="assign" name="lcdfilter"> | |
661 | <const>lcddefault</const> | |
662 | </edit> | |
663 | </match> | |
664 | <dir>~/.fonts</dir> | |
665 | ||
666 | <!-- Use Liberation Sans for Helvetica (instead of Nimbus Sans) --> | |
667 | <alias binding="same"> | |
668 | <family>Helvetica</family> | |
669 | <accept> | |
670 | <family>Liberation Sans</family> | |
671 | </accept> | |
672 | </alias> | |
673 | </fontconfig> | |
674 | #+end_src | |
675 | ||
58cbbce2 | 676 | ** Git |
08146d0e AB |
677 | |
678 | *** gitconfig | |
679 | :PROPERTIES: | |
680 | :header-args+: :tangle ~/.gitconfig | |
681 | :END: | |
682 | ||
683 | **** user | |
684 | #+begin_src conf | |
685 | [user] | |
686 | name = Amin Bandali | |
687 | email = amin@aminb.org | |
688 | # signingkey = 4E05246AB0BF7FFB | |
689 | #+end_src | |
690 | ||
691 | **** signing | |
692 | #+begin_src conf | |
693 | # [commit] | |
694 | # gpgsign = true | |
695 | # [format] | |
696 | # signoff = true | |
697 | #+end_src | |
698 | ||
699 | **** core | |
700 | #+begin_src conf | |
701 | [core] | |
702 | autocrlf = input # CRLF -> LF on commit | |
703 | editor = emacsclient -t | |
704 | excludesfile = ~/.gitignore_global | |
705 | pager = "less" | |
706 | #+end_src | |
707 | ||
708 | **** gpg | |
709 | #+begin_src conf | |
710 | [gpg] | |
711 | program = gpg2 | |
712 | #+end_src | |
713 | ||
714 | **** alias | |
715 | #+begin_src conf | |
716 | [alias] | |
717 | git = !exec git # handle nested git calls, e.g. git git status | |
718 | aliases = config --get-regexp '^alias\\.' | |
719 | a = add | |
720 | s = status | |
721 | sl = status --long | |
722 | c = checkout | |
723 | cb = checkout -b | |
724 | b = branch | |
725 | r = rebase | |
726 | p = pull | |
727 | pr = pull --rebase | |
728 | ps = push | |
729 | psf = push --force | |
730 | #+end_src | |
731 | ||
732 | **** color | |
733 | #+begin_src conf | |
734 | [color] | |
735 | ui = auto | |
736 | [color "status"] | |
737 | added = green bold | |
738 | changed = red bold | |
739 | untracked = red bold | |
740 | [color "branch"] | |
741 | current = green bold | |
742 | remote = magenta bold | |
743 | [color "diff"] | |
744 | new = green bold | |
745 | old = red bold | |
746 | #+end_src | |
747 | ||
748 | **** status | |
749 | #+begin_src conf | |
750 | [status] | |
751 | # showUntrackedFiles = all | |
752 | short=true | |
753 | branch=true | |
754 | #+end_src | |
755 | ||
756 | **** github | |
757 | #+begin_src conf | |
758 | [github] | |
759 | user = aminb | |
760 | #+end_src | |
761 | ||
762 | *** gitignore | |
763 | :PROPERTIES: | |
764 | :header-args+: :tangle ~/.gitignore_global | |
765 | :END: | |
766 | ||
767 | #+begin_src conf | |
768 | *.orig | |
769 | *.py[co] | |
770 | *.sublime-workspace | |
771 | *~ | |
772 | .DS_Store | |
773 | *.elc | |
774 | *-autoloads.el | |
775 | #+end_src | |
58cbbce2 AB |
776 | |
777 | ** Latexmk | |
778 | :PROPERTIES: | |
779 | :header-args+: :tangle ~/.latexmkrc | |
780 | :END: | |
781 | ||
782 | #+begin_src conf | |
783 | $pdf_previewer = "start zathura %O %S"; | |
784 | $clean_ext = "aux out"; | |
785 | ||
786 | # $pdf_update_method = 4; | |
787 | # $pdf_update_command = "zathura %O %S"; | |
788 | ||
789 | # Synctex allows one to jump to from the PDF in Zathura to the source in Emacs | |
790 | # by Ctrl+click in the PDF. | |
791 | # Tell latexmk to use Zathura as a previewer, and run emacsclient as the Synctex | |
792 | # editor. | |
793 | # $pdf_previewer = 'exec zathura --synctex-forward -x \'emacsclient --no-wait +%{line} %{input}\' %O %S'; | |
794 | #+end_src | |
b13e2dc1 | 795 | |
434b1815 AB |
796 | ** libinput |
797 | ||
798 | Improve XPS 15 9560's touchpad experience. | |
799 | ||
800 | #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "plasma")) "/sudo::/etc/X11/xorg.conf.d/30-touchpad.conf") | |
801 | Section "InputClass" | |
802 | Identifier "libinput touchpad catchall" | |
803 | Driver "libinput" | |
804 | MatchIsTouchpad "on" | |
805 | Option "ClickMethod" "clickfinger" | |
806 | Option "NaturalScrolling" "true" | |
807 | Option "Tapping" "on" | |
808 | Option "TappingButtonMap" "lrm" | |
809 | EndSection | |
810 | #+end_src | |
811 | ||
931a4b06 AB |
812 | ** getmail |
813 | ||
814 | *** getmailrc | |
815 | :PROPERTIES: | |
816 | :header-args+: :tangle ~/.getmail/getmailrc | |
817 | :END: | |
818 | ||
819 | #+begin_src conf | |
820 | [retriever] | |
821 | type = SimplePOP3SSLRetriever | |
822 | server = fencepost.gnu.org | |
823 | username = aminb | |
824 | password_command = ("gpg2", "--no-tty", "-q", "-d", "~/.passwd/gnu.gpg") | |
825 | port = 995 | |
826 | use_apop = True | |
827 | ||
828 | [destination] | |
829 | type = Maildir | |
830 | path = ~/mail/gnu/Inbox/ | |
831 | ||
832 | [options] | |
833 | delete = True | |
834 | #+end_src | |
835 | ||
836 | *** getmail.service | |
837 | :PROPERTIES: | |
838 | :header-args+: :tangle ~/.config/systemd/user/getmail.service | |
839 | :END: | |
840 | ||
841 | #+begin_src conf :tangle no | |
842 | [Unit] | |
843 | Description=getmail service | |
844 | ||
845 | [Service] | |
846 | Type=oneshot | |
847 | ExecStart=/usr/bin/getmail | |
848 | StandardOutput=syslog | |
849 | StandardError=syslog | |
850 | #+end_src | |
851 | ||
852 | *** getmail.timer | |
853 | :PROPERTIES: | |
854 | :header-args+: :tangle ~/.config/systemd/user/getmail.timer | |
855 | :END: | |
856 | ||
857 | #+begin_src conf :tangle no | |
858 | [Unit] | |
859 | Description=getmail timer | |
860 | ||
861 | [Timer] | |
862 | OnCalendar=*:0/30 | |
863 | Persistent=true | |
864 | Unit=getmail.service | |
865 | ||
866 | [Install] | |
867 | WantedBy=timers.target | |
868 | #+end_src | |
869 | ||
870 | ** GnuPG | |
871 | :PROPERTIES: | |
872 | :header-args+: :tangle ~/.gnupg/gpg-agent.conf | |
873 | :END: | |
874 | ||
875 | #+begin_src conf | |
876 | default-cache-ttl 43200 | |
877 | max-cache-ttl 43200 | |
878 | ||
879 | default-cache-ttl-ssh 10800 | |
880 | max-cache-ttl-ssh 10800 | |
881 | ||
882 | # pinentry-program /usr/bin/pinentry-qt | |
883 | #+end_src | |
884 | ||
be76c6db AB |
885 | ** GTK |
886 | ||
887 | *** gtk-2.0 | |
888 | :PROPERTIES: | |
889 | :header-args+: :tangle ~/.gtkrc-2.0 | |
890 | :END: | |
891 | ||
892 | #+begin_src conf | |
893 | gtk-theme-name="Greybird" | |
894 | gtk-icon-theme-name="Paper" | |
895 | gtk-font-name="Ubuntu 10" | |
896 | gtk-menu-images=0 | |
897 | # gtk-key-theme-name = "Emacs" | |
898 | #+end_src | |
899 | ||
900 | *** gtk-3.0 | |
901 | :PROPERTIES: | |
902 | :header-args+: :tangle ~/.config/gtk-3.0/settings.ini | |
903 | :END: | |
904 | ||
905 | #+begin_src conf :tangle no | |
906 | [Settings] | |
907 | gtk-icon-theme-name = Paper | |
908 | # gtk-theme-name = Adwaita | |
909 | ||
910 | gtk-theme-name = Greybird | |
911 | # gtk-theme-name = Arc-Darker | |
912 | # gtk-theme-name = Numix-ArchBlue | |
913 | ||
914 | gtk-font-name = Ubuntu 10 | |
915 | # gtk-key-theme-name = Emacs | |
916 | #+end_src | |
917 | ||
918 | ** isync | |
919 | ||
920 | *** mbsyncrc | |
921 | :PROPERTIES: | |
922 | :header-args+: :tangle ~/.mbsyncrc | |
923 | :END: | |
924 | ||
925 | #+begin_src conf | |
926 | # Global defaults | |
927 | CopyArrivalDate yes | |
928 | ||
929 | ###### | |
930 | IMAPAccount amin | |
931 | Host nix.aminb.org | |
932 | User amin@aminb.org | |
933 | PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/amin.gpg" | |
934 | SSLType IMAPS | |
935 | ||
936 | IMAPStore amin-remote | |
937 | Account amin | |
938 | ||
939 | MaildirStore amin-local | |
940 | Path ~/mail/amin/ | |
941 | Inbox ~/mail/amin/Inbox | |
942 | SubFolders Verbatim | |
943 | ||
944 | Channel amin | |
945 | Master :amin-remote: | |
946 | Slave :amin-local: | |
947 | Patterns * !dovecot* | |
948 | Create Both | |
949 | SyncState * | |
950 | ||
951 | ###### | |
952 | IMAPAccount uwaterloo | |
953 | Host connect.uwaterloo.ca | |
59027673 | 954 | User abandali |
be76c6db AB |
955 | PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo.gpg" |
956 | SSLType IMAPS | |
957 | ||
958 | IMAPStore uwaterloo-remote | |
959 | Account uwaterloo | |
960 | ||
961 | MaildirStore uwaterloo-local | |
962 | Path ~/mail/uwaterloo/ | |
963 | Inbox ~/mail/uwaterloo/Inbox | |
964 | SubFolders Verbatim | |
965 | ||
966 | Channel uwaterloo | |
967 | Master :uwaterloo-remote: | |
968 | Slave :uwaterloo-local: | |
969 | Patterns * !dovecot* | |
970 | Create Both | |
971 | SyncState * | |
972 | #+end_src | |
973 | ||
974 | *** mbsync.service | |
975 | :PROPERTIES: | |
976 | :header-args+: :tangle ~/.config/systemd/user/mbsync.service | |
977 | :END: | |
978 | ||
979 | #+begin_src conf :tangle no | |
980 | [Unit] | |
981 | Description=mbsync service | |
982 | ||
983 | [Service] | |
984 | Type=oneshot | |
985 | ExecStart=/usr/bin/mbsync -Va | |
986 | StandardOutput=syslog | |
987 | StandardError=syslog | |
988 | #+end_src | |
989 | ||
990 | *** mbsync.timer | |
991 | :PROPERTIES: | |
992 | :header-args+: :tangle ~/.config/systemd/user/mbsync.timer | |
993 | :END: | |
994 | ||
995 | #+begin_src conf :tangle no | |
996 | [Unit] | |
997 | Description=mbsync timer | |
998 | ||
999 | [Timer] | |
1000 | OnCalendar=*:0/15 | |
1001 | Persistent=true | |
1002 | Unit=mbsync.service | |
1003 | ||
1004 | [Install] | |
1005 | WantedBy=timers.target | |
1006 | #+end_src | |
1007 | ||
59027673 AB |
1008 | ** mpd |
1009 | :PROPERTIES: | |
1010 | :header-args+: :tangle ~/.config/mpd/mpd.conf | |
1011 | :END: | |
1012 | ||
1013 | #+begin_src conf | |
1014 | # An example configuration file for MPD. | |
1015 | # Read the user manual for documentation: http://www.musicpd.org/doc/user/ | |
1016 | ||
1017 | ||
1018 | # Files and directories ####################################################### | |
1019 | # | |
1020 | # This setting controls the top directory which MPD will search to discover the | |
1021 | # available audio files and add them to the daemon's online database. This | |
1022 | # setting defaults to the XDG directory, otherwise the music directory will be | |
1023 | # be disabled and audio files will only be accepted over ipc socket (using | |
1024 | # file:// protocol) or streaming files over an accepted protocol. | |
1025 | # | |
1026 | music_directory "~/usr/music" | |
1027 | # | |
1028 | # This setting sets the MPD internal playlist directory. The purpose of this | |
1029 | # directory is storage for playlists created by MPD. The server will use | |
1030 | # playlist files not created by the server but only if they are in the MPD | |
1031 | # format. This setting defaults to playlist saving being disabled. | |
1032 | # | |
1033 | playlist_directory "~/.mpd/playlists" | |
1034 | # | |
1035 | # This setting sets the location of the MPD database. This file is used to | |
1036 | # load the database at server start up and store the database while the | |
1037 | # server is not up. This setting defaults to disabled which will allow | |
1038 | # MPD to accept files over ipc socket (using file:// protocol) or streaming | |
1039 | # files over an accepted protocol. | |
1040 | # | |
1041 | db_file "~/.mpd/database" | |
1042 | # | |
1043 | # These settings are the locations for the daemon log files for the daemon. | |
1044 | # These logs are great for troubleshooting, depending on your log_level | |
1045 | # settings. | |
1046 | # | |
1047 | # The special value "syslog" makes MPD use the local syslog daemon. This | |
1048 | # setting defaults to logging to syslog, otherwise logging is disabled. | |
1049 | # | |
1050 | log_file "~/.mpd/log" | |
1051 | # | |
1052 | # This setting sets the location of the file which stores the process ID | |
1053 | # for use of mpd --kill and some init scripts. This setting is disabled by | |
1054 | # default and the pid file will not be stored. | |
1055 | # | |
1056 | pid_file "~/.mpd/pid" | |
1057 | # | |
1058 | # This setting sets the location of the file which contains information about | |
1059 | # most variables to get MPD back into the same general shape it was in before | |
1060 | # it was brought down. This setting is disabled by default and the server | |
1061 | # state will be reset on server start up. | |
1062 | # | |
1063 | state_file "~/.mpd/state" | |
1064 | # | |
1065 | # The location of the sticker database. This is a database which | |
1066 | # manages dynamic information attached to songs. | |
1067 | # | |
1068 | sticker_file "~/.mpd/sticker.sql" | |
1069 | # | |
1070 | ############################################################################### | |
1071 | ||
1072 | ||
1073 | # General music daemon options ################################################ | |
1074 | # | |
1075 | # This setting specifies the user that MPD will run as. MPD should never run as | |
1076 | # root and you may use this setting to make MPD change its user ID after | |
1077 | # initialization. This setting is disabled by default and MPD is run as the | |
1078 | # current user. | |
1079 | # | |
1080 | #user "nobody" | |
1081 | # | |
1082 | # This setting specifies the group that MPD will run as. If not specified | |
1083 | # primary group of user specified with "user" setting will be used (if set). | |
1084 | # This is useful if MPD needs to be a member of group such as "audio" to | |
1085 | # have permission to use sound card. | |
1086 | # | |
1087 | #group "nogroup" | |
1088 | # | |
1089 | # This setting sets the address for the daemon to listen on. Careful attention | |
1090 | # should be paid if this is assigned to anything other then the default, any. | |
1091 | # This setting can deny access to control of the daemon. Not effective if | |
1092 | # systemd socket activiation is in use. | |
1093 | # | |
1094 | # For network | |
1095 | #bind_to_address "any" | |
1096 | # | |
1097 | # And for Unix Socket | |
1098 | #bind_to_address "~/.mpd/socket" | |
1099 | # | |
1100 | # This setting is the TCP port that is desired for the daemon to get assigned | |
1101 | # to. | |
1102 | # | |
1103 | #port "6600" | |
1104 | # | |
1105 | # This setting controls the type of information which is logged. Available | |
1106 | # setting arguments are "default", "secure" or "verbose". The "verbose" setting | |
1107 | # argument is recommended for troubleshooting, though can quickly stretch | |
1108 | # available resources on limited hardware storage. | |
1109 | # | |
1110 | #log_level "default" | |
1111 | # | |
1112 | # If you have a problem with your MP3s ending abruptly it is recommended that | |
1113 | # you set this argument to "no" to attempt to fix the problem. If this solves | |
1114 | # the problem, it is highly recommended to fix the MP3 files with vbrfix | |
1115 | # (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which | |
1116 | # point gapless MP3 playback can be enabled. | |
1117 | # | |
1118 | #gapless_mp3_playback "yes" | |
1119 | # | |
1120 | # Setting "restore_paused" to "yes" puts MPD into pause mode instead | |
1121 | # of starting playback after startup. | |
1122 | # | |
1123 | #restore_paused "no" | |
1124 | # | |
1125 | # This setting enables MPD to create playlists in a format usable by other | |
1126 | # music players. | |
1127 | # | |
1128 | #save_absolute_paths_in_playlists "no" | |
1129 | # | |
1130 | # This setting defines a list of tag types that will be extracted during the | |
1131 | # audio file discovery process. The complete list of possible values can be | |
1132 | # found in the user manual. | |
1133 | #metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" | |
1134 | # | |
1135 | # This setting enables automatic update of MPD's database when files in | |
1136 | # music_directory are changed. | |
1137 | # | |
1138 | #auto_update "yes" | |
1139 | # | |
1140 | # Limit the depth of the directories being watched, 0 means only watch | |
1141 | # the music directory itself. There is no limit by default. | |
1142 | # | |
1143 | #auto_update_depth "3" | |
1144 | # | |
1145 | ############################################################################### | |
1146 | ||
1147 | ||
1148 | # Symbolic link behavior ###################################################### | |
1149 | # | |
1150 | # If this setting is set to "yes", MPD will discover audio files by following | |
1151 | # symbolic links outside of the configured music_directory. | |
1152 | # | |
1153 | #follow_outside_symlinks "yes" | |
1154 | # | |
1155 | # If this setting is set to "yes", MPD will discover audio files by following | |
1156 | # symbolic links inside of the configured music_directory. | |
1157 | # | |
1158 | #follow_inside_symlinks "yes" | |
1159 | # | |
1160 | ############################################################################### | |
1161 | ||
1162 | ||
1163 | # Zeroconf / Avahi Service Discovery ########################################## | |
1164 | # | |
1165 | # If this setting is set to "yes", service information will be published with | |
1166 | # Zeroconf / Avahi. | |
1167 | # | |
1168 | #zeroconf_enabled "yes" | |
1169 | # | |
1170 | # The argument to this setting will be the Zeroconf / Avahi unique name for | |
1171 | # this MPD server on the network. | |
1172 | # | |
1173 | #zeroconf_name "Music Player" | |
1174 | # | |
1175 | ############################################################################### | |
1176 | ||
1177 | ||
1178 | # Permissions ################################################################# | |
1179 | # | |
1180 | # If this setting is set, MPD will require password authorization. The password | |
1181 | # setting can be specified multiple times for different password profiles. | |
1182 | # | |
1183 | #password "password@read,add,control,admin" | |
1184 | # | |
1185 | # This setting specifies the permissions a user has who has not yet logged in. | |
1186 | # | |
1187 | #default_permissions "read,add,control,admin" | |
1188 | # | |
1189 | ############################################################################### | |
1190 | ||
1191 | ||
1192 | # Database ####################################################################### | |
1193 | # | |
1194 | ||
1195 | #database { | |
1196 | # plugin "proxy" | |
1197 | # host "other.mpd.host" | |
1198 | # port "6600" | |
1199 | #} | |
1200 | ||
1201 | # Input ####################################################################### | |
1202 | # | |
1203 | ||
1204 | input { | |
1205 | plugin "curl" | |
1206 | # proxy "proxy.isp.com:8080" | |
1207 | # proxy_user "user" | |
1208 | # proxy_password "password" | |
1209 | } | |
1210 | ||
1211 | # | |
1212 | ############################################################################### | |
1213 | ||
1214 | # Audio Output ################################################################ | |
1215 | # | |
1216 | ||
1217 | audio_output { | |
1218 | type "pulse" | |
1219 | name "pulse audio" | |
1220 | } | |
1221 | ||
1222 | audio_output { | |
1223 | type "fifo" | |
1224 | name "my_fifo" | |
1225 | path "/tmp/mpd.fifo" | |
1226 | format "44100:16:2" | |
1227 | } | |
1228 | ||
1229 | # MPD supports various audio output types, as well as playing through multiple | |
1230 | # audio outputs at the same time, through multiple audio_output settings | |
1231 | # blocks. Setting this block is optional, though the server will only attempt | |
1232 | # autodetection for one sound card. | |
1233 | # | |
1234 | # An example of an ALSA output: | |
1235 | # | |
1236 | #audio_output { | |
1237 | # type "alsa" | |
1238 | # name "My ALSA Device" | |
1239 | ## device "hw:0,0" # optional | |
1240 | ## mixer_type "hardware" # optional | |
1241 | ## mixer_device "default" # optional | |
1242 | ## mixer_control "PCM" # optional | |
1243 | ## mixer_index "0" # optional | |
1244 | #} | |
1245 | # | |
1246 | # An example of an OSS output: | |
1247 | # | |
1248 | #audio_output { | |
1249 | # type "oss" | |
1250 | # name "My OSS Device" | |
1251 | ## device "/dev/dsp" # optional | |
1252 | ## mixer_type "hardware" # optional | |
1253 | ## mixer_device "/dev/mixer" # optional | |
1254 | ## mixer_control "PCM" # optional | |
1255 | #} | |
1256 | # | |
1257 | # An example of a shout output (for streaming to Icecast): | |
1258 | # | |
1259 | #audio_output { | |
1260 | # type "shout" | |
1261 | # encoder "vorbis" # optional | |
1262 | # name "My Shout Stream" | |
1263 | # host "localhost" | |
1264 | # port "8000" | |
1265 | # mount "/mpd.ogg" | |
1266 | # password "hackme" | |
1267 | # quality "5.0" | |
1268 | # bitrate "128" | |
1269 | # format "44100:16:1" | |
1270 | ## protocol "icecast2" # optional | |
1271 | ## user "source" # optional | |
1272 | ## description "My Stream Description" # optional | |
1273 | ## url "http://example.com" # optional | |
1274 | ## genre "jazz" # optional | |
1275 | ## public "no" # optional | |
1276 | ## timeout "2" # optional | |
1277 | ## mixer_type "software" # optional | |
1278 | #} | |
1279 | # | |
1280 | # An example of a recorder output: | |
1281 | # | |
1282 | #audio_output { | |
1283 | # type "recorder" | |
1284 | # name "My recorder" | |
1285 | # encoder "vorbis" # optional, vorbis or lame | |
1286 | # path "/var/lib/mpd/recorder/mpd.ogg" | |
1287 | ## quality "5.0" # do not define if bitrate is defined | |
1288 | # bitrate "128" # do not define if quality is defined | |
1289 | # format "44100:16:1" | |
1290 | #} | |
1291 | # | |
1292 | # An example of a httpd output (built-in HTTP streaming server): | |
1293 | # | |
1294 | #audio_output { | |
1295 | # type "httpd" | |
1296 | # name "My HTTP Stream" | |
1297 | # encoder "vorbis" # optional, vorbis or lame | |
1298 | # port "8000" | |
1299 | # bind_to_address "0.0.0.0" # optional, IPv4 or IPv6 | |
1300 | ## quality "5.0" # do not define if bitrate is defined | |
1301 | # bitrate "128" # do not define if quality is defined | |
1302 | # format "44100:16:1" | |
1303 | # max_clients "0" # optional 0=no limit | |
1304 | #} | |
1305 | # | |
1306 | # An example of a pulseaudio output (streaming to a remote pulseaudio server) | |
1307 | # | |
1308 | #audio_output { | |
1309 | # type "pulse" | |
1310 | # name "My Pulse Output" | |
1311 | ## server "remote_server" # optional | |
1312 | ## sink "remote_server_sink" # optional | |
1313 | #} | |
1314 | # | |
1315 | # An example of a winmm output (Windows multimedia API). | |
1316 | # | |
1317 | #audio_output { | |
1318 | # type "winmm" | |
1319 | # name "My WinMM output" | |
1320 | ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional | |
1321 | # or | |
1322 | ## device "0" # optional | |
1323 | ## mixer_type "hardware" # optional | |
1324 | #} | |
1325 | # | |
1326 | # An example of an openal output. | |
1327 | # | |
1328 | #audio_output { | |
1329 | # type "openal" | |
1330 | # name "My OpenAL output" | |
1331 | ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional | |
1332 | #} | |
1333 | # | |
1334 | # An example of an sndio output. | |
1335 | # | |
1336 | #audio_output { | |
1337 | # type "sndio" | |
1338 | # name "sndio output" | |
1339 | # mixer_type "software" | |
1340 | #} | |
1341 | # | |
1342 | # An example of an OS X output: | |
1343 | # | |
1344 | #audio_output { | |
1345 | # type "osx" | |
1346 | # name "My OS X Device" | |
1347 | ## device "Built-in Output" # optional | |
1348 | ## channel_map "-1,-1,0,1" # optional | |
1349 | #} | |
1350 | # | |
1351 | ## Example "pipe" output: | |
1352 | # | |
1353 | #audio_output { | |
1354 | # type "pipe" | |
1355 | # name "my pipe" | |
1356 | # command "aplay -f cd 2>/dev/null" | |
1357 | ## Or if you're want to use AudioCompress | |
1358 | # command "AudioCompress -m | aplay -f cd 2>/dev/null" | |
1359 | ## Or to send raw PCM stream through PCM: | |
1360 | # command "nc example.org 8765" | |
1361 | # format "44100:16:2" | |
1362 | #} | |
1363 | # | |
1364 | ## An example of a null output (for no audio output): | |
1365 | # | |
1366 | #audio_output { | |
1367 | # type "null" | |
1368 | # name "My Null Output" | |
1369 | # mixer_type "none" # optional | |
1370 | #} | |
1371 | # | |
1372 | ############################################################################### | |
1373 | ||
1374 | ||
1375 | # Normalization automatic volume adjustments ################################## | |
1376 | # | |
1377 | # This setting specifies the type of ReplayGain to use. This setting can have | |
1378 | # the argument "off", "album", "track" or "auto". "auto" is a special mode that | |
1379 | # chooses between "track" and "album" depending on the current state of | |
1380 | # random playback. If random playback is enabled then "track" mode is used. | |
1381 | # See <http://www.replaygain.org> for more details about ReplayGain. | |
1382 | # This setting is off by default. | |
1383 | # | |
1384 | #replaygain "album" | |
1385 | # | |
1386 | # This setting sets the pre-amp used for files that have ReplayGain tags. By | |
1387 | # default this setting is disabled. | |
1388 | # | |
1389 | #replaygain_preamp "0" | |
1390 | # | |
1391 | # This setting sets the pre-amp used for files that do NOT have ReplayGain tags. | |
1392 | # By default this setting is disabled. | |
1393 | # | |
1394 | #replaygain_missing_preamp "0" | |
1395 | # | |
1396 | # This setting enables or disables ReplayGain limiting. | |
1397 | # MPD calculates actual amplification based on the ReplayGain tags | |
1398 | # and replaygain_preamp / replaygain_missing_preamp setting. | |
1399 | # If replaygain_limit is enabled MPD will never amplify audio signal | |
1400 | # above its original level. If replaygain_limit is disabled such amplification | |
1401 | # might occur. By default this setting is enabled. | |
1402 | # | |
1403 | #replaygain_limit "yes" | |
1404 | # | |
1405 | # This setting enables on-the-fly normalization volume adjustment. This will | |
1406 | # result in the volume of all playing audio to be adjusted so the output has | |
1407 | # equal "loudness". This setting is disabled by default. | |
1408 | # | |
1409 | #volume_normalization "no" | |
1410 | # | |
1411 | ############################################################################### | |
1412 | ||
1413 | # Character Encoding ########################################################## | |
1414 | # | |
1415 | # If file or directory names do not display correctly for your locale then you | |
1416 | # may need to modify this setting. | |
1417 | # | |
1418 | #filesystem_charset "UTF-8" | |
1419 | # | |
1420 | ############################################################################### | |
1421 | #+end_src | |
1422 | ||
1423 | ** msmtp | |
1424 | :PROPERTIES: | |
1425 | :header-args+: :tangle ~/.msmtprc | |
1426 | :END: | |
1427 | ||
1428 | #+begin_src conf | |
1429 | # Set default values for all following accounts. | |
1430 | defaults | |
1431 | port 587 | |
1432 | tls on | |
1433 | auth on | |
1434 | #tls_trust_file /etc/ssl/certs/ca-certificates.crt | |
1435 | logfile ~/.msmtp.log | |
1436 | ||
1437 | # aminb | |
1438 | account aminb | |
1439 | host nix.aminb.org | |
2a1be6b4 | 1440 | tls_fingerprint 65:DD:B8:32:D8:CD:F1:DC:B6:34:EE:35:04:18:AC:09:F3:1D:6D:20:F2:4A:E2:BD:64:48:B7:1F:90:BD:C4:BA |
59027673 AB |
1441 | tls_starttls on |
1442 | from amin@aminb.org | |
1443 | user amin@aminb.org | |
1444 | passwordeval gpg2 --no-tty -q -d ~/.passwd/amin.gpg | |
1445 | ||
1446 | # gnu | |
1447 | account gnu | |
1448 | host fencepost.gnu.org | |
1449 | tls_fingerprint 94:0E:37:EB:EA:44:5A:4B:B6:6F:16:3D:6C:7E:7E:44:2D:93:61:C1:FE:82:A8:29:5E:3C:12:4E:2D:BE:0E:2C | |
1450 | tls_starttls on | |
1451 | from aminb@gnu.org | |
1452 | user aminb | |
1453 | passwordeval gpg2 --no-tty -q -d ~/.passwd/gnu.gpg | |
1454 | ||
1455 | # uwaterloo | |
1456 | account uwaterloo | |
1457 | host connect.uwaterloo.ca | |
1458 | tls_starttls on | |
1459 | from abandali@uwaterloo.ca | |
1460 | user abandali | |
1461 | passwordeval gpg2 --no-tty -q -d ~/.passwd/uwaterloo.gpg | |
1462 | tls_trust_file /etc/ssl/certs/ca-certificates.crt | |
1463 | ||
1464 | # uwaterloo (friendly address) | |
1465 | account uwaterloo-friendly : uwaterloo | |
1466 | from amin.bandali@uwaterloo.ca | |
1467 | ||
1468 | # Set a default account | |
1469 | account default : aminb | |
1470 | #+end_src | |
1471 | ||
1472 | ** ncmpcpp | |
1473 | ||
1474 | *** config | |
1475 | :PROPERTIES: | |
1476 | :header-args+: :tangle ~/.ncmpcpp/config | |
1477 | :END: | |
1478 | ||
1479 | #+begin_src conf :tangle no | |
1480 | ############################################################## | |
1481 | ## This is the example configuration file. Copy it to ## | |
1482 | ## $HOME/.ncmpcpp/config or $XDG_CONFIG_HOME/ncmpcpp/config ## | |
1483 | ## and set up your preferences. ## | |
1484 | ############################################################## | |
1485 | # | |
1486 | ##### directories ###### | |
1487 | ## | |
1488 | ## Directory for storing ncmpcpp related files. | |
1489 | ## Changing it is useful if you want to store | |
1490 | ## everything somewhere else and provide command | |
1491 | ## line setting for alternative location to config | |
1492 | ## file which defines that while launching ncmpcpp. | |
1493 | ## | |
1494 | # | |
1495 | ncmpcpp_directory = ~/.ncmpcpp | |
1496 | # | |
1497 | ## | |
1498 | ## Directory for storing downloaded lyrics. It | |
1499 | ## defaults to ~/.lyrics since other MPD clients | |
1500 | ## (eg. ncmpc) also use that location. | |
1501 | ## | |
1502 | # | |
1503 | #lyrics_directory = ~/.lyrics | |
1504 | # | |
1505 | ##### connection settings ##### | |
1506 | # | |
1507 | #mpd_host = localhost | |
1508 | # | |
1509 | #mpd_port = 6600 | |
1510 | # | |
1511 | #mpd_connection_timeout = 5 | |
1512 | # | |
1513 | ## Needed for tag editor and file operations to work. | |
1514 | ## | |
1515 | mpd_music_dir = ~/usr/music | |
1516 | # | |
1517 | #mpd_crossfade_time = 5 | |
1518 | # | |
1519 | ##### music visualizer ##### | |
1520 | ## | |
1521 | ## Note: In order to make music visualizer work you'll | |
1522 | ## need to use mpd fifo output, whose format parameter | |
1523 | ## has to be set to 44100:16:1 for mono visualization | |
1524 | ## or 44100:16:2 for stereo visualization. Example | |
1525 | ## configuration (it has to be put into mpd.conf): | |
1526 | ## | |
1527 | ## audio_output { | |
1528 | ## type "fifo" | |
1529 | ## name "Visualizer feed" | |
1530 | ## path "/tmp/mpd.fifo" | |
1531 | ## format "44100:16:2" | |
1532 | ## } | |
1533 | ## | |
1534 | # | |
1535 | visualizer_fifo_path = /tmp/mpd.fifo | |
1536 | # | |
1537 | ## | |
1538 | ## Note: Below parameter is needed for ncmpcpp | |
1539 | ## to determine which output provides data for | |
1540 | ## visualizer and thus allow syncing between | |
1541 | ## visualization and sound as currently there | |
1542 | ## are some problems with it. | |
1543 | ## | |
1544 | # | |
1545 | visualizer_output_name = my fifo | |
1546 | # | |
1547 | ## | |
1548 | ## If you set format to 44100:16:2, make it 'yes'. | |
1549 | ## | |
1550 | visualizer_in_stereo = yes | |
1551 | # | |
1552 | ## | |
1553 | ## Multiply received samples by given value. Very | |
1554 | ## useful for proper visualization of quiet music. | |
1555 | ## | |
1556 | #visualizer_sample_multiplier = 1 | |
1557 | # | |
1558 | ## | |
1559 | ## Note: Below parameter defines how often ncmpcpp | |
1560 | ## has to "synchronize" visualizer and audio outputs. | |
1561 | ## 30 seconds is optimal value, but if you experience | |
1562 | ## synchronization problems, set it to lower value. | |
1563 | ## Keep in mind that sane values start with >=10. | |
1564 | ## | |
1565 | # | |
1566 | visualizer_sync_interval = 30 | |
1567 | # | |
1568 | ## | |
1569 | ## Note: To enable spectrum frequency visualization | |
1570 | ## you need to compile ncmpcpp with fftw3 support. | |
1571 | ## | |
1572 | # | |
1573 | ## Available values: spectrum, wave, wave_filled, ellipse. | |
1574 | ## | |
1575 | visualizer_type = spectrum | |
1576 | # | |
1577 | #visualizer_look = ●▮ | |
1578 | visualizer_look = "●•" | |
1579 | # | |
1580 | #visualizer_color = blue, cyan, green, yellow, magenta, red | |
1581 | # | |
1582 | ## Alternative subset of 256 colors for terminals that support it. | |
1583 | ## | |
1584 | #visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161 | |
1585 | # | |
1586 | ##### system encoding ##### | |
1587 | ## | |
1588 | ## ncmpcpp should detect your charset encoding | |
1589 | ## but if it failed to do so, you can specify | |
1590 | ## charset encoding you are using here. | |
1591 | ## | |
1592 | ## Note: You can see whether your ncmpcpp build | |
1593 | ## supports charset detection by checking output | |
1594 | ## of `ncmpcpp --version`. | |
1595 | ## | |
1596 | ## Note: Since MPD uses UTF-8 by default, setting | |
1597 | ## this option makes sense only if your encoding | |
1598 | ## is different. | |
1599 | ## | |
1600 | # | |
1601 | #system_encoding = "" | |
1602 | # | |
1603 | ##### delays ##### | |
1604 | # | |
1605 | ## Time of inactivity (in seconds) after playlist | |
1606 | ## highlighting will be disabled (0 = always on). | |
1607 | ## | |
1608 | #playlist_disable_highlight_delay = 5 | |
1609 | # | |
1610 | ## Defines how long messages are supposed to be visible. | |
1611 | ## | |
1612 | #message_delay_time = 5 | |
1613 | # | |
1614 | ##### song format ##### | |
1615 | ## | |
1616 | ## For a song format you can use: | |
1617 | ## | |
1618 | ## %l - length | |
1619 | ## %f - filename | |
1620 | ## %D - directory | |
1621 | ## %a - artist | |
1622 | ## %A - album artist | |
1623 | ## %t - title | |
1624 | ## %b - album | |
1625 | ## %y - date | |
1626 | ## %n - track number (01/12 -> 01) | |
1627 | ## %N - full track info (01/12 -> 01/12) | |
1628 | ## %g - genre | |
1629 | ## %c - composer | |
1630 | ## %p - performer | |
1631 | ## %d - disc | |
1632 | ## %C - comment | |
1633 | ## %P - priority | |
1634 | ## $R - begin right alignment | |
1635 | ## | |
1636 | ## If you want to make sure that a part of the format is displayed | |
1637 | ## only when certain tags are present, you can archieve it by | |
1638 | ## grouping them with brackets, e.g. '{%a - %t}' will be evaluated | |
1639 | ## to 'ARTIST - TITLE' if both tags are present or '' otherwise. | |
1640 | ## It is also possible to define a list of alternatives by providing | |
1641 | ## several groups and separating them with '|', e.g. '{%t}|{%f}' | |
1642 | ## will be evaluated to 'TITLE' or 'FILENAME' if the former is not | |
1643 | ## present. | |
1644 | ## | |
1645 | ## Note: If you want to set limit on maximal length of a tag, just | |
1646 | ## put the appropriate number between % and character that defines | |
1647 | ## tag type, e.g. to make album take max. 20 terminal cells, use '%20b'. | |
1648 | ## | |
1649 | ## In addition, formats support markers used for text attributes. | |
1650 | ## They are followed by character '$'. After that you can put: | |
1651 | ## | |
1652 | ## - 0 - default window color (discards all other colors) | |
1653 | ## - 1 - black | |
1654 | ## - 2 - red | |
1655 | ## - 3 - green | |
1656 | ## - 4 - yellow | |
1657 | ## - 5 - blue | |
1658 | ## - 6 - magenta | |
1659 | ## - 7 - cyan | |
1660 | ## - 8 - white | |
1661 | ## - 9 - end of current color | |
1662 | ## - b - bold text | |
1663 | ## - u - underline text | |
1664 | ## - r - reverse colors | |
1665 | ## - a - use alternative character set | |
1666 | ## | |
1667 | ## If you don't want to use a non-color attribute anymore, just put it | |
1668 | ## again, but this time insert character '/' between '$' and attribute | |
1669 | ## character, e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag | |
1670 | ## or filename with reversed colors. | |
1671 | ## | |
1672 | ## If you want to use 256 colors and/or background colors in formats | |
1673 | ## (the naming scheme is described below in section about color | |
1674 | ## definitions), it can be done with the syntax $(COLOR), e.g. to set | |
1675 | ## the artist tag to one of the non-standard colors and make it have | |
1676 | ## yellow background, you need to write $(197_yellow)%a$(end). Note | |
1677 | ## that for standard colors this is interchangable with attributes | |
1678 | ## listed above. | |
1679 | ## | |
1680 | ## Note: colors can be nested. | |
1681 | ## | |
1682 | # | |
1683 | #song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9} | |
1684 | # | |
1685 | #song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f} | |
1686 | # | |
1687 | #song_library_format = {%n - }{%t}|{%f} | |
1688 | # | |
1689 | # | |
1690 | #alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b | |
1691 | # | |
1692 | #alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D} | |
1693 | # | |
1694 | #now_playing_prefix = $b | |
1695 | # | |
1696 | #now_playing_suffix = $/b | |
1697 | # | |
1698 | #browser_playlist_prefix = "$2playlist$9 " | |
1699 | # | |
1700 | #selected_item_prefix = $6 | |
1701 | # | |
1702 | #selected_item_suffix = $9 | |
1703 | # | |
1704 | #modified_item_prefix = $3> $9 | |
1705 | # | |
1706 | ## | |
1707 | ## Note: attributes are not supported for the following variables. | |
1708 | ## | |
1709 | #song_window_title_format = {%a - }{%t}|{%f} | |
1710 | ## | |
1711 | ## Note: Below variables are used for sorting songs in browser. | |
1712 | ## The sort mode determines how songs are sorted, and can be used | |
1713 | ## in combination with a sort format to specify a custom sorting format. | |
1714 | ## Available values for browser_sort_mode are "name", "mtime", "format" | |
1715 | ## and "noop". | |
1716 | ## | |
1717 | # | |
1718 | #browser_sort_mode = name | |
1719 | # | |
1720 | #browser_sort_format = {%a - }{%t}|{%f} {(%l)} | |
1721 | # | |
1722 | ##### columns settings ##### | |
1723 | ## | |
1724 | ## syntax of song columns list format is "column column etc." | |
1725 | ## | |
1726 | ## - syntax for each column is: | |
1727 | ## | |
1728 | ## (width of the column)[color of the column]{displayed tag} | |
1729 | ## | |
1730 | ## Note: Width is by default in %, if you want a column to | |
1731 | ## have fixed size, add 'f' after the value, e.g. (10)[white]{a} | |
1732 | ## will be the column that take 10% of screen (so the real width | |
1733 | ## will depend on actual screen size), whereas (10f)[white]{a} | |
1734 | ## will take 10 terminal cells, no matter how wide the screen is. | |
1735 | ## | |
1736 | ## - color is optional (if you want the default one, | |
1737 | ## leave the field empty). | |
1738 | ## | |
1739 | ## Note: You can give a column additional attributes by putting appropriate | |
1740 | ## character after displayed tag character. Available attributes are: | |
1741 | ## | |
1742 | ## - r - column will be right aligned | |
1743 | ## - E - if tag is empty, empty tag marker won't be displayed | |
1744 | ## | |
1745 | ## You can also: | |
1746 | ## | |
1747 | ## - give a column custom name by putting it after attributes, | |
1748 | ## separated with character ':', e.g. {lr:Length} gives you | |
1749 | ## right aligned column of lengths named "Length". | |
1750 | ## | |
1751 | ## - define sequence of tags, that have to be displayed in case | |
1752 | ## predecessor is empty in a way similar to the one in classic | |
1753 | ## song format, i.e. using '|' character, e.g. {a|c|p:Owner} | |
1754 | ## creates column named "Owner" that tries to display artist | |
1755 | ## tag and then composer and performer if previous ones are | |
1756 | ## not available. | |
1757 | ## | |
1758 | # | |
1759 | #song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l} | |
1760 | # | |
1761 | ##### various settings ##### | |
1762 | # | |
1763 | ## | |
1764 | ## Note: Custom command that will be executed each | |
1765 | ## time song changes. Useful for notifications etc. | |
1766 | ## | |
1767 | #execute_on_song_change = "" | |
1768 | # | |
1769 | #playlist_show_mpd_host = no | |
1770 | # | |
1771 | #playlist_show_remaining_time = no | |
1772 | # | |
1773 | #playlist_shorten_total_times = no | |
1774 | # | |
1775 | #playlist_separate_albums = no | |
1776 | # | |
1777 | ## | |
1778 | ## Note: Possible display modes: classic, columns. | |
1779 | ## | |
1780 | #playlist_display_mode = columns | |
1781 | # | |
1782 | #browser_display_mode = classic | |
1783 | # | |
1784 | #search_engine_display_mode = classic | |
1785 | # | |
1786 | #playlist_editor_display_mode = classic | |
1787 | # | |
1788 | #discard_colors_if_item_is_selected = yes | |
1789 | # | |
1790 | #incremental_seeking = yes | |
1791 | # | |
1792 | #seek_time = 1 | |
1793 | # | |
1794 | #volume_change_step = 2 | |
1795 | # | |
1796 | #autocenter_mode = no | |
1797 | # | |
1798 | #centered_cursor = no | |
1799 | # | |
1800 | ## | |
1801 | ## Note: You can specify third character which will | |
1802 | ## be used to build 'empty' part of progressbar. | |
1803 | ## | |
1804 | #progressbar_look = => | |
1805 | progressbar_look = "─╼╶" | |
1806 | #progressbar_look = "─⊙╶" | |
1807 | # | |
1808 | #progressbar_boldness = yes | |
1809 | # | |
1810 | ## Available values: database, playlist. | |
1811 | ## | |
1812 | #default_place_to_search_in = database | |
1813 | # | |
1814 | ## Available values: classic, alternative. | |
1815 | ## | |
1816 | #user_interface = classic | |
1817 | # | |
1818 | #data_fetching_delay = yes | |
1819 | # | |
1820 | ## Available values: artist, album_artist, date, genre, composer, performer. | |
1821 | ## | |
1822 | #media_library_primary_tag = artist | |
1823 | # | |
1824 | ## Available values: wrapped, normal. | |
1825 | ## | |
1826 | #default_find_mode = wrapped | |
1827 | # | |
1828 | #default_tag_editor_pattern = %n - %t | |
1829 | # | |
1830 | #header_visibility = yes | |
1831 | # | |
1832 | #statusbar_visibility = yes | |
1833 | # | |
1834 | #titles_visibility = yes | |
1835 | # | |
1836 | #header_text_scrolling = yes | |
1837 | # | |
1838 | #cyclic_scrolling = no | |
1839 | # | |
1840 | #lines_scrolled = 2 | |
1841 | # | |
1842 | #follow_now_playing_lyrics = no | |
1843 | # | |
1844 | #fetch_lyrics_for_current_song_in_background = no | |
1845 | # | |
1846 | #store_lyrics_in_song_dir = no | |
1847 | # | |
1848 | #generate_win32_compatible_filenames = yes | |
1849 | # | |
1850 | #allow_for_physical_item_deletion = no | |
1851 | # | |
1852 | ## | |
1853 | ## Note: If you set this variable, ncmpcpp will try to | |
1854 | ## get info from last.fm in language you set and if it | |
1855 | ## fails, it will fall back to english. Otherwise it will | |
1856 | ## use english the first time. | |
1857 | ## | |
1858 | ## Note: Language has to be expressed as an ISO 639 alpha-2 code. | |
1859 | ## | |
1860 | #lastfm_preferred_language = en | |
1861 | # | |
1862 | #show_hidden_files_in_local_browser = no | |
1863 | # | |
1864 | ## | |
1865 | ## How shall screen switcher work? | |
1866 | ## | |
1867 | ## - "previous" - switch between the current and previous screen. | |
1868 | ## - "screen1,...,screenN" - switch between given sequence of screens. | |
1869 | ## | |
1870 | ## Screens available for use: help, playlist, browser, search_engine, | |
1871 | ## media_library, playlist_editor, tag_editor, outputs, visualizer, clock. | |
1872 | ## | |
1873 | #screen_switcher_mode = playlist, browser | |
1874 | # | |
1875 | ## | |
1876 | ## Note: You can define startup screen | |
1877 | ## by choosing screen from the list above. | |
1878 | ## | |
1879 | #startup_screen = playlist | |
1880 | # | |
1881 | ## | |
1882 | ## Note: You can define startup slave screen | |
1883 | ## by choosing screen from the list above or | |
1884 | ## an empty value for no slave screen. | |
1885 | ## | |
1886 | #startup_slave_screen = "" | |
1887 | # | |
1888 | #startup_slave_screen_focus = no | |
1889 | # | |
1890 | ## | |
1891 | ## Default width of locked screen (in %). | |
1892 | ## Acceptable values are from 20 to 80. | |
1893 | ## | |
1894 | # | |
1895 | #locked_screen_width_part = 50 | |
1896 | # | |
1897 | #ask_for_locked_screen_width_part = yes | |
1898 | # | |
1899 | #jump_to_now_playing_song_at_start = yes | |
1900 | # | |
1901 | #ask_before_clearing_playlists = yes | |
1902 | # | |
1903 | #clock_display_seconds = no | |
1904 | # | |
1905 | #display_volume_level = yes | |
1906 | # | |
1907 | #display_bitrate = no | |
1908 | # | |
1909 | #display_remaining_time = no | |
1910 | # | |
1911 | ## Available values: none, basic, extended, perl. | |
1912 | ## | |
1913 | #regular_expressions = perl | |
1914 | # | |
1915 | ## | |
1916 | ## Note: If below is enabled, ncmpcpp will ignore leading | |
1917 | ## "The" word while sorting items in browser, tags in | |
1918 | ## media library, etc. | |
1919 | ## | |
1920 | #ignore_leading_the = no | |
1921 | # | |
1922 | #block_search_constraints_change_if_items_found = yes | |
1923 | # | |
1924 | #mouse_support = yes | |
1925 | # | |
1926 | #mouse_list_scroll_whole_page = yes | |
1927 | # | |
1928 | #empty_tag_marker = <empty> | |
1929 | # | |
1930 | #tags_separator = " | " | |
1931 | # | |
1932 | #tag_editor_extended_numeration = no | |
1933 | # | |
1934 | #media_library_sort_by_mtime = no | |
1935 | # | |
1936 | #enable_window_title = yes | |
1937 | # | |
1938 | ## | |
1939 | ## Note: You can choose default search mode for search | |
1940 | ## engine. Available modes are: | |
1941 | ## | |
1942 | ## - 1 - use mpd built-in searching (no regexes, pattern matching) | |
1943 | ## - 2 - use ncmpcpp searching (pattern matching with support for regexes, | |
1944 | ## but if your mpd is on a remote machine, downloading big database | |
1945 | ## to process it can take a while | |
1946 | ## - 3 - match only exact values (this mode uses mpd function for searching | |
1947 | ## in database and local one for searching in current playlist) | |
1948 | ## | |
1949 | # | |
1950 | #search_engine_default_search_mode = 1 | |
1951 | # | |
1952 | #external_editor = nano | |
1953 | # | |
1954 | ## Note: set to yes if external editor is a console application. | |
1955 | ## | |
1956 | #use_console_editor = yes | |
1957 | # | |
1958 | ##### colors definitions ##### | |
1959 | ## | |
1960 | ## It is possible to set a background color by setting a color | |
1961 | ## value "<foreground>_<background>", e.g. red_black will set | |
1962 | ## foregound color to red and background color to black. | |
1963 | ## | |
1964 | ## In addition, for terminals that support 256 colors it | |
1965 | ## is possible to set one of them by using a number in range | |
1966 | ## [1, 256] instead of color name, e.g. numerical value | |
1967 | ## corresponding to red_black is 2_1. To find out if the | |
1968 | ## terminal supports 256 colors, run ncmpcpp and check out | |
1969 | ## the bottom of the help screen for list of available colors | |
1970 | ## and their numerical values. | |
1971 | ## | |
1972 | ## Note: due to technical limitations of ncurses, if 256 colors | |
1973 | ## are used, it is possible to either use only the colors with | |
1974 | ## default background color, or all pairs from 1_1 up to 254_127, | |
1975 | ## depending on the ncurses version used. | |
1976 | ## | |
1977 | # | |
1978 | #colors_enabled = yes | |
1979 | # | |
1980 | #empty_tag_color = cyan | |
1981 | # | |
1982 | #header_window_color = default | |
1983 | # | |
1984 | #volume_color = default | |
1985 | # | |
1986 | #state_line_color = default | |
1987 | # | |
1988 | #state_flags_color = default | |
1989 | # | |
1990 | #main_window_color = yellow | |
1991 | # | |
1992 | #color1 = white | |
1993 | # | |
1994 | #color2 = green | |
1995 | # | |
1996 | #main_window_highlight_color = yellow | |
1997 | # | |
1998 | #progressbar_color = black | |
1999 | # | |
2000 | #progressbar_elapsed_color = green | |
2001 | # | |
2002 | #statusbar_color = default | |
2003 | # | |
2004 | #alternative_ui_separator_color = black | |
2005 | # | |
2006 | #active_column_color = red | |
2007 | # | |
2008 | #window_border_color = green | |
2009 | # | |
2010 | #active_window_border = red | |
2011 | # | |
2012 | #+end_src | |
2013 | ||
2014 | *** bindings | |
2015 | :PROPERTIES: | |
2016 | :header-args+: :tangle ~/.ncmpcpp/bindings | |
2017 | :END: | |
2018 | ||
2019 | #+begin_src conf :tangle no | |
2020 | def_key "j" | |
2021 | scroll_down | |
2022 | def_key "k" | |
2023 | scroll_up | |
2024 | ||
2025 | def_key "ctrl-u" | |
2026 | page_up | |
2027 | def_key "ctrl-d" | |
2028 | page_down | |
2029 | ||
2030 | def_key "h" | |
2031 | previous_column | |
2032 | def_key "l" | |
2033 | next_column | |
2034 | ||
2035 | def_key "." | |
2036 | show_lyrics | |
2037 | ||
2038 | def_key "n" | |
2039 | next_found_item | |
2040 | def_key "N" | |
2041 | previous_found_item | |
2042 | ||
2043 | def_key "J" | |
2044 | move_sort_order_down | |
2045 | def_key "K" | |
2046 | move_sort_order_up | |
2047 | #+end_src | |
2048 | ||
25869427 AB |
2049 | ** notmuch |
2050 | ||
2051 | *** notmuch-config | |
2052 | :PROPERTIES: | |
2053 | :header-args+: :tangle ~/.notmuch-config | |
2054 | :END: | |
2055 | ||
2056 | #+begin_src conf | |
2057 | # .notmuch-config - Configuration file for the notmuch mail system | |
2058 | # | |
2059 | # For more information about notmuch, see https://notmuchmail.org | |
2060 | ||
2061 | # Database configuration | |
2062 | # | |
2063 | # The only value supported here is 'path' which should be the top-level | |
2064 | # directory where your mail currently exists and to where mail will be | |
2065 | # delivered in the future. Files should be individual email messages. | |
2066 | # Notmuch will store its database within a sub-directory of the path | |
2067 | # configured here named ".notmuch". | |
2068 | # | |
2069 | [database] | |
2070 | path=/home/amin/mail | |
2071 | ||
2072 | # User configuration | |
2073 | # | |
2074 | # Here is where you can let notmuch know how you would like to be | |
2075 | # addressed. Valid settings are | |
2076 | # | |
2077 | # name Your full name. | |
2078 | # primary_email Your primary email address. | |
2079 | # other_email A list (separated by ';') of other email addresses | |
2080 | # at which you receive email. | |
2081 | # | |
2082 | # Notmuch will use the various email addresses configured here when | |
2083 | # formatting replies. It will avoid including your own addresses in the | |
2084 | # recipient list of replies, and will set the From address based on the | |
2085 | # address to which the original email was addressed. | |
2086 | # | |
2087 | [user] | |
2088 | name=Amin Bandali | |
2089 | primary_email=amin@aminb.org | |
2a1be6b4 | 2090 | other_email=abandali@uwaterloo.ca;amin.bandali@uwaterloo.ca;aminb@gnu.org; |
25869427 AB |
2091 | |
2092 | # Configuration for "notmuch new" | |
2093 | # | |
2094 | # The following options are supported here: | |
2095 | # | |
2096 | # tags A list (separated by ';') of the tags that will be | |
2097 | # added to all messages incorporated by "notmuch new". | |
2098 | # | |
2099 | # ignore A list (separated by ';') of file and directory names | |
2100 | # that will not be searched for messages by "notmuch new". | |
2101 | # | |
2102 | # NOTE: *Every* file/directory that goes by one of those | |
2103 | # names will be ignored, independent of its depth/location | |
2104 | # in the mail store. | |
2105 | # | |
2106 | [new] | |
2107 | tags=new; | |
2108 | #tags=unread;inbox; | |
2109 | ignore=.uidvalidity;.mbsyncstate | |
2110 | ||
2111 | # Search configuration | |
2112 | # | |
2113 | # The following option is supported here: | |
2114 | # | |
2115 | # exclude_tags | |
2116 | # A ;-separated list of tags that will be excluded from | |
2117 | # search results by default. Using an excluded tag in a | |
2118 | # query will override that exclusion. | |
2119 | # | |
2120 | [search] | |
2121 | exclude_tags=deleted;spam; | |
2122 | ||
2123 | # Maildir compatibility configuration | |
2124 | # | |
2125 | # The following option is supported here: | |
2126 | # | |
2127 | # synchronize_flags Valid values are true and false. | |
2128 | # | |
2129 | # If true, then the following maildir flags (in message filenames) | |
2130 | # will be synchronized with the corresponding notmuch tags: | |
2131 | # | |
2132 | # Flag Tag | |
2133 | # ---- ------- | |
2134 | # D draft | |
2135 | # F flagged | |
2136 | # P passed | |
2137 | # R replied | |
2138 | # S unread (added when 'S' flag is not present) | |
2139 | # | |
2140 | # The "notmuch new" command will notice flag changes in filenames | |
2141 | # and update tags, while the "notmuch tag" and "notmuch restore" | |
2142 | # commands will notice tag changes and update flags in filenames | |
2143 | # | |
2144 | [maildir] | |
2145 | synchronize_flags=true | |
2146 | ||
2147 | # Cryptography related configuration | |
2148 | # | |
2149 | # The following option is supported here: | |
2150 | # | |
2151 | # gpg_path | |
2152 | # binary name or full path to invoke gpg. | |
2153 | # | |
2154 | [crypto] | |
2155 | gpg_path=gpg | |
2156 | #+end_src | |
2157 | ||
2158 | *** post-new hook | |
2159 | :PROPERTIES: | |
2160 | :header-args+: :tangle ~/mail/.notmuch/hooks/post-new :shebang "#!/bin/sh" | |
2161 | :END: | |
2162 | ||
2163 | #+begin_src sh | |
2164 | afew -tn | |
2165 | ||
2166 | # apply tags to lists | |
2167 | notmuch tag +lists +lists/deepspec -- folder:amin/lists/deepspec | |
2168 | notmuch tag +lists +lists/haskell-cafe -- folder:amin/lists/haskell-cafe | |
2169 | notmuch tag +lists +lists/haskell-weekly -- folder:amin/lists/haskell-weekly | |
2170 | notmuch tag +lists +lists/hackernewsletter -- folder:amin/lists/hackernewsletter | |
2171 | notmuch tag +lists +lists/notmuch -- folder:amin/lists/notmuch | |
2172 | notmuch tag +lists +lists/info-gnu-emacs -- folder:amin/lists/info-gnu-emacs | |
2173 | notmuch tag +lists +lists/help-gnu-emacs -- folder:amin/lists/help-gnu-emacs | |
2174 | notmuch tag +lists +lists/emacs-devel -- folder:amin/lists/emacs-devel | |
2175 | #+end_src | |
2176 | ||
2177 | *** notmuch.service | |
2178 | :PROPERTIES: | |
2179 | :header-args+: :tangle ~/.config/systemd/user/notmuch.service | |
2180 | :END: | |
2181 | ||
2182 | #+begin_src conf :tangle no | |
2183 | [Unit] | |
2184 | Description=notmuch service | |
2185 | ||
2186 | [Service] | |
2187 | Type=oneshot | |
2188 | ExecStart=/usr/bin/notmuch new | |
2189 | StandardOutput=syslog | |
2190 | StandardError=syslog | |
2191 | #+end_src | |
2192 | ||
2193 | *** notmuch.timer | |
2194 | :PROPERTIES: | |
2195 | :header-args+: :tangle ~/.config/systemd/user/notmuch.timer | |
2196 | :END: | |
2197 | ||
2198 | #+begin_src conf :tangle no | |
2199 | [Unit] | |
2200 | Description=notmuch timer | |
2201 | ||
2202 | [Timer] | |
2203 | OnCalendar=*:0/5 | |
2204 | Persistent=true | |
2205 | Unit=notmuch.service | |
2206 | ||
2207 | [Install] | |
2208 | WantedBy=timers.target | |
2209 | #+end_src | |
2210 | ||
2211 | ** offlineimap | |
2212 | ||
2213 | *** offlineimaprc | |
2214 | :PROPERTIES: | |
2215 | :header-args+: :tangle ~/.offlineimaprc | |
2216 | :END: | |
2217 | ||
2218 | #+begin_src conf :tangle no | |
2219 | [general] | |
2220 | pythonfile = ~/.offlineimap.py | |
2221 | accounts = Gmail, aminb | |
2222 | maxsyncaccounts = 3 | |
2223 | ||
2224 | [Account Gmail] | |
2225 | localrepository = GmailL | |
2226 | remoterepository = GmailR | |
2227 | ||
2228 | [Account aminb] | |
2229 | localrepository = aminbL | |
2230 | remoterepository = aminbR | |
2231 | ||
2232 | [Repository GmailL] | |
2233 | type = Maildir | |
2234 | localfolders = ~/Maildir/Gmail | |
2235 | ||
2236 | [Repository GmailR] | |
2237 | type = IMAP | |
2238 | remotehost = imap.gmail.com | |
2239 | remoteusereval = mailuser("gmail") | |
2240 | remotepasseval = mailpasswd("gmail") | |
2241 | sslcacertfile = /etc/ssl/certs/ca-certificates.crt | |
2242 | ssl = yes | |
2243 | folderfilter = lambda foldername: foldername not in '[Gmail]/All Mail' | |
2244 | maxconnections = 1 | |
2245 | realdelete = no | |
2246 | ||
2247 | [Repository aminbL] | |
2248 | type = Maildir | |
2249 | localfolders = ~/Maildir/aminb | |
2250 | ||
2251 | [Repository aminbR] | |
2252 | type = IMAP | |
2253 | remotehost = mail.aminb.org | |
2254 | remoteusereval = mailuser("aminb") | |
2255 | remotepasseval = mailpasswd("aminb") | |
2256 | sslcacertfile = /etc/ssl/certs/ca-certificates.crt | |
2257 | ssl = yes | |
2258 | folderfilter = lambda foldername: foldername not in 'dovecot.sieve' | |
2259 | maxconnections = 1 | |
2260 | realdelete = no | |
2261 | #+end_src | |
2262 | ||
2263 | *** offlineimap.py | |
2264 | :PROPERTIES: | |
2265 | :header-args+: :tangle ~/.offlineimap.py | |
2266 | :END: | |
2267 | ||
2268 | #+begin_src python :tangle no | |
2269 | import os | |
2270 | import subprocess | |
2271 | ||
2272 | def mailpasswd(acct): | |
2273 | acct = os.path.basename(acct) | |
2274 | path = "/home/amin/.passwd/%s.gpg" % acct | |
2275 | args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path] | |
2276 | try: | |
2277 | return subprocess.check_output(args).strip() | |
2278 | except subprocess.CalledProcessError: | |
2279 | return "" | |
2280 | ||
2281 | def mailuser(acct): | |
2282 | acct = os.path.basename(acct) | |
2283 | path = "/home/amin/.passwd/%s" % acct | |
2284 | args = ["cat", path] | |
2285 | try: | |
2286 | return subprocess.check_output(args).strip() | |
2287 | except subprocess.CalledProcessError: | |
2288 | return "" | |
2289 | ||
2290 | def prime_gpg_agent(): | |
2291 | ret = False | |
2292 | i = 1 | |
2293 | while not ret: | |
2294 | ret = (mailpasswd("prime") == "prime") | |
2295 | if i > 2: | |
2296 | from offlineimap.ui import getglobalui | |
2297 | sys.stderr.write("Error reading in passwords. Terminating.\n") | |
2298 | getglobalui().terminate() | |
2299 | i += 1 | |
2300 | return ret | |
2301 | ||
2302 | prime_gpg_agent() | |
2303 | #+end_src | |
2304 | ||
1656853a AB |
2305 | ** polybar |
2306 | ||
2307 | *** config | |
2308 | :PROPERTIES: | |
2309 | :header-args+: :tangle ~/.config/polybar/config | |
2310 | :END: | |
2311 | ||
2312 | #+begin_src conf :tangle no | |
2313 | ;===================================================== | |
2314 | ; | |
2315 | ; To learn more about how to configure Polybar | |
2316 | ; go to https://github.com/jaagr/polybar | |
2317 | ; | |
2318 | ; The README contains alot of information | |
2319 | ; | |
2320 | ;===================================================== | |
2321 | ||
2322 | [colors] | |
2323 | ;background = ${xrdb:color0:#222} | |
2324 | background = #222 | |
2325 | background-alt = #444 | |
2326 | ;foreground = ${xrdb:color7:#222} | |
2327 | foreground = #eee | |
2328 | foreground-alt = #888 | |
2329 | primary = #ffb52a | |
2330 | secondary = #e60053 | |
2331 | alert = #bd2c40 | |
2332 | ||
2333 | [bar/main] | |
2334 | ;monitor = ${env:MONITOR:HDMI-1} | |
2335 | width = 100% | |
2336 | height = 27 | |
2337 | ;offset-x = 1% | |
2338 | ;offset-y = 1% | |
2339 | radius = 3.0 | |
2340 | fixed-center = true | |
2341 | ||
2342 | background = ${colors.background} | |
2343 | foreground = ${colors.foreground} | |
2344 | ||
2345 | line-size = 3 | |
2346 | line-color = #f00 | |
2347 | ||
2348 | border-size = 4 | |
2349 | border-color = #00000000 | |
2350 | ||
2351 | padding-left = 0 | |
2352 | padding-right = 2 | |
2353 | ||
2354 | module-margin-left = 2 | |
2355 | module-margin-right = 2 | |
2356 | ||
2357 | font-0 = Ubuntu:fontformat=truetype:antialias=true:pixelsize=9;1 | |
2358 | font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 | |
2359 | font-2 = Wuncon Siji:pixelsize=10;1 | |
2360 | font-3 = FontAwesome:pixelsize=10;1 | |
2361 | ||
2362 | modules-left = bspwm xwindow | |
2363 | modules-center = | |
2364 | modules-right = volume filesystem mail xkeyboard memory cpu temperature date powermenu | |
2365 | ||
2366 | tray-position = right | |
2367 | tray-padding = 1 | |
2368 | ;tray-transparent = true | |
2369 | ;tray-background = #0063ff | |
2370 | tray-maxsize = 18 | |
2371 | ||
2372 | wm-restack = bspwm | |
2373 | ||
2374 | ;override-redirect = true | |
2375 | ||
2376 | scroll-up = bspwm-desknext | |
2377 | scroll-down = bspwm-deskprev | |
2378 | ||
2379 | [module/xwindow] | |
2380 | type = internal/xwindow | |
2381 | label = %title:0:50:...% | |
2382 | ||
2383 | [module/xkeyboard] | |
2384 | type = internal/xkeyboard | |
2385 | blacklist-0 = num lock | |
2386 | ||
2387 | format-prefix = " " | |
2388 | format-prefix-foreground = ${colors.foreground-alt} | |
2389 | format-prefix-underline = ${colors.secondary} | |
2390 | ||
2391 | label-layout = %layout% | |
2392 | label-layout-underline = ${colors.secondary} | |
2393 | ||
2394 | label-indicator-padding = 2 | |
2395 | label-indicator-margin = 1 | |
2396 | label-indicator-background = ${colors.secondary} | |
2397 | label-indicator-underline = ${colors.secondary} | |
2398 | ||
2399 | [module/filesystem] | |
2400 | type = internal/fs | |
2401 | interval = 25 | |
2402 | ||
2403 | mount-0 = / | |
2404 | ||
2405 | label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% | |
2406 | label-unmounted = %mountpoint% not mounted | |
2407 | label-unmounted-foreground = ${colors.foreground-alt} | |
2408 | ||
2409 | [module/bspwm] | |
2410 | type = internal/bspwm | |
2411 | ||
2412 | label-focused = %index% | |
2413 | label-focused-background = ${colors.background-alt} | |
2414 | label-focused-underline= ${colors.primary} | |
2415 | label-focused-padding = 2 | |
2416 | ||
2417 | label-occupied = %index% | |
2418 | label-occupied-padding = 2 | |
2419 | ||
2420 | label-urgent = %index%! | |
2421 | label-urgent-background = ${colors.alert} | |
2422 | label-urgent-padding = 2 | |
2423 | ||
2424 | label-empty = %index% | |
2425 | label-empty-foreground = ${colors.foreground-alt} | |
2426 | label-empty-padding = 2 | |
2427 | ||
2428 | [module/i3] | |
2429 | type = internal/i3 | |
2430 | format = <label-state> <label-mode> | |
2431 | index-sort = true | |
2432 | wrapping-scroll = false | |
2433 | ||
2434 | ; Only show workspaces on the same output as the bar | |
2435 | ;pin-workspaces = true | |
2436 | ||
2437 | label-mode-padding = 2 | |
2438 | label-mode-foreground = #000 | |
2439 | label-mode-background = ${colors.primary} | |
2440 | ||
2441 | ; focused = Active workspace on focused monitor | |
2442 | label-focused = %index% | |
2443 | label-focused-background = ${module/bspwm.label-focused-background} | |
2444 | label-focused-underline = ${module/bspwm.label-focused-underline} | |
2445 | label-focused-padding = ${module/bspwm.label-focused-padding} | |
2446 | ||
2447 | ; unfocused = Inactive workspace on any monitor | |
2448 | label-unfocused = %index% | |
2449 | label-unfocused-padding = ${module/bspwm.label-occupied-padding} | |
2450 | ||
2451 | ; visible = Active workspace on unfocused monitor | |
2452 | label-visible = %index% | |
2453 | label-visible-background = ${self.label-focused-background} | |
2454 | label-visible-underline = ${self.label-focused-underline} | |
2455 | label-visible-padding = ${self.label-focused-padding} | |
2456 | ||
2457 | ; urgent = Workspace with urgency hint set | |
2458 | label-urgent = %index% | |
2459 | label-urgent-background = ${module/bspwm.label-urgent-background} | |
2460 | label-urgent-padding = ${module/bspwm.label-urgent-padding} | |
2461 | ||
2462 | [module/mpd] | |
2463 | type = internal/mpd | |
2464 | format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next> | |
2465 | ||
2466 | icon-prev = | |
2467 | icon-stop = | |
2468 | icon-play = | |
2469 | icon-pause = | |
2470 | icon-next = | |
2471 | ||
2472 | label-song-maxlen = 25 | |
2473 | label-song-ellipsis = true | |
2474 | ||
2475 | [module/xbacklight] | |
2476 | type = internal/xbacklight | |
2477 | ||
2478 | format = <label> <bar> | |
2479 | label = BL | |
2480 | ||
2481 | bar-width = 10 | |
2482 | bar-indicator = | | |
2483 | bar-indicator-foreground = #ff | |
2484 | bar-indicator-font = 2 | |
2485 | bar-fill = ─ | |
2486 | bar-fill-font = 2 | |
2487 | bar-fill-foreground = #9f78e1 | |
2488 | bar-empty = ─ | |
2489 | bar-empty-font = 2 | |
2490 | bar-empty-foreground = ${colors.foreground-alt} | |
2491 | ||
2492 | [module/backlight-acpi] | |
2493 | inherit = module/xbacklight | |
2494 | type = internal/backlight | |
2495 | ;card = intel_backlight | |
2496 | card = mba6x_backlight | |
2497 | ||
2498 | [module/cpu] | |
2499 | type = internal/cpu | |
2500 | interval = 2 | |
2501 | format-prefix = " " | |
2502 | format-prefix-foreground = ${colors.foreground-alt} | |
2503 | format-underline = #f90000 | |
2504 | label = %percentage%% | |
2505 | ||
2506 | [module/memory] | |
2507 | type = internal/memory | |
2508 | interval = 2 | |
2509 | format-prefix = " " | |
2510 | format-prefix-foreground = ${colors.foreground-alt} | |
2511 | format-underline = #4bffdc | |
2512 | label = %percentage_used%% | |
2513 | ||
2514 | [module/wlan] | |
2515 | type = internal/network | |
2516 | interface = | |
2517 | interval = 3.0 | |
2518 | ||
2519 | format-connected = <ramp-signal> <label-connected> | |
2520 | format-connected-underline = #9f78e1 | |
2521 | label-connected = %essid% | |
2522 | ||
2523 | format-disconnected = | |
2524 | ;format-disconnected = <label-disconnected> | |
2525 | ;format-disconnected-underline = ${self.format-connected-underline} | |
2526 | ;label-disconnected = %ifname% disconnected | |
2527 | ;label-disconnected-foreground = ${colors.foreground-alt} | |
2528 | ||
2529 | ramp-signal-0 = | |
2530 | ramp-signal-1 = | |
2531 | ramp-signal-2 = | |
2532 | ramp-signal-3 = | |
2533 | ramp-signal-4 = | |
2534 | ramp-signal-foreground = ${colors.foreground-alt} | |
2535 | ||
2536 | [module/eth] | |
2537 | type = internal/network | |
2538 | interface = | |
2539 | interval = 3.0 | |
2540 | ||
2541 | format-connected-underline = #55aa55 | |
2542 | format-connected-prefix = " " | |
2543 | format-connected-prefix-foreground = ${colors.foreground-alt} | |
2544 | label-connected = %local_ip% | |
2545 | ||
2546 | format-disconnected = | |
2547 | ;format-disconnected = <label-disconnected> | |
2548 | ;format-disconnected-underline = ${self.format-connected-underline} | |
2549 | ;label-disconnected = %ifname% disconnected | |
2550 | ;label-disconnected-foreground = ${colors.foreground-alt} | |
2551 | ||
2552 | [module/date] | |
2553 | type = internal/date | |
2554 | interval = 5 | |
2555 | ||
2556 | date = | |
2557 | date-alt = " %Y-%m-%d" | |
2558 | ||
2559 | time = %H:%M | |
2560 | time-alt = %H:%M:%S | |
2561 | ||
2562 | format-prefix = | |
2563 | format-prefix-foreground = ${colors.foreground-alt} | |
2564 | format-underline = #0a6cf5 | |
2565 | ||
2566 | label = %date% %time% | |
2567 | ||
2568 | [module/volume] | |
2569 | type = internal/volume | |
2570 | ||
2571 | format-volume = <label-volume> <bar-volume> | |
2572 | label-volume = vol | |
2573 | label-volume-foreground = ${root.foreground} | |
2574 | ||
2575 | format-muted-prefix = " " | |
2576 | format-muted-foreground = ${colors.foreground-alt} | |
2577 | label-muted = mute | |
2578 | ||
2579 | bar-volume-width = 10 | |
2580 | bar-volume-foreground-0 = #55aa55 | |
2581 | bar-volume-foreground-1 = #55aa55 | |
2582 | bar-volume-foreground-2 = #55aa55 | |
2583 | bar-volume-foreground-3 = #55aa55 | |
2584 | bar-volume-foreground-4 = #55aa55 | |
2585 | bar-volume-foreground-5 = #f5a70a | |
2586 | bar-volume-foreground-6 = #ff5555 | |
2587 | bar-volume-gradient = false | |
2588 | bar-volume-indicator = | | |
2589 | bar-volume-indicator-font = 2 | |
2590 | bar-volume-fill = ─ | |
2591 | bar-volume-fill-font = 2 | |
2592 | bar-volume-empty = ─ | |
2593 | bar-volume-empty-font = 2 | |
2594 | bar-volume-empty-foreground = ${colors.foreground-alt} | |
2595 | ||
2596 | [module/battery] | |
2597 | type = internal/battery | |
2598 | battery = BAT0 | |
2599 | adapter = ADP1 | |
2600 | full-at = 64 | |
2601 | ||
2602 | format-charging = <animation-charging> <label-charging> | |
2603 | format-charging-underline = #ffb52a | |
2604 | ||
2605 | format-discharging = <ramp-capacity> <label-discharging> | |
2606 | format-discharging-underline = ${self.format-charging-underline} | |
2607 | ||
2608 | format-full-prefix = " " | |
2609 | format-full-prefix-foreground = ${colors.foreground-alt} | |
2610 | format-full-underline = ${self.format-charging-underline} | |
2611 | ||
2612 | ramp-capacity-0 = | |
2613 | ramp-capacity-1 = | |
2614 | ramp-capacity-2 = | |
2615 | ramp-capacity-foreground = ${colors.foreground-alt} | |
2616 | ||
2617 | animation-charging-0 = | |
2618 | animation-charging-1 = | |
2619 | animation-charging-2 = | |
2620 | animation-charging-foreground = ${colors.foreground-alt} | |
2621 | animation-charging-framerate = 750 | |
2622 | ||
2623 | [module/temperature] | |
2624 | type = internal/temperature | |
2625 | thermal-zone = 1 | |
2626 | warn-temperature = 66 | |
2627 | ||
2628 | format = <ramp> <label> | |
2629 | format-underline = #f50a4d | |
2630 | format-warn = <ramp> <label-warn> | |
2631 | format-warn-underline = ${self.format-underline} | |
2632 | ||
2633 | label = %temperature% | |
2634 | label-warn = %temperature% | |
2635 | label-warn-foreground = ${colors.secondary} | |
2636 | ||
2637 | ramp-0 = | |
2638 | ramp-1 = | |
2639 | ramp-2 = | |
2640 | ramp-foreground = ${colors.foreground-alt} | |
2641 | ||
2642 | [module/powermenu] | |
2643 | type = custom/menu | |
2644 | ||
2645 | format-spacing = 1 | |
2646 | ||
2647 | label-open = | |
2648 | label-open-foreground = ${colors.secondary} | |
2649 | label-close = cancel | |
2650 | label-close-foreground = ${colors.secondary} | |
2651 | label-separator = | | |
2652 | label-separator-foreground = ${colors.foreground-alt} | |
2653 | ||
2654 | menu-0-0 = reboot | |
2655 | menu-0-0-exec = menu-open-1 | |
2656 | menu-0-1 = power off | |
2657 | menu-0-1-exec = menu-open-2 | |
2658 | ||
2659 | menu-1-0 = cancel | |
2660 | menu-1-0-exec = menu-open-0 | |
2661 | menu-1-1 = reboot | |
2662 | menu-1-1-exec = sudo reboot | |
2663 | ||
2664 | menu-2-0 = power off | |
2665 | menu-2-0-exec = sudo poweroff | |
2666 | menu-2-1 = cancel | |
2667 | menu-2-1-exec = menu-open-0 | |
2668 | ||
2669 | [module/mail] | |
2670 | type = custom/script | |
2671 | interval = 60 | |
2672 | format = <label> | |
2673 | format-prefix = " " | |
2674 | format-prefix-foreground = ${colors.foreground-alt} | |
2675 | format-underline = #0a6cf5 | |
2676 | exec = notmuch count tag:unread | |
2677 | ||
2678 | [settings] | |
2679 | screenchange-reload = true | |
2680 | ;compositing-background = xor | |
2681 | ;compositing-background = screen | |
2682 | ;compositing-foreground = source | |
2683 | ;compositing-border = over | |
2684 | ||
2685 | [global/wm] | |
2686 | margin-top = 0 | |
2687 | margin-bottom = 0 | |
2688 | ||
2689 | ; vim:ft=dosini | |
2690 | #+end_src | |
2691 | ||
2692 | *** polybar-launch | |
2693 | :PROPERTIES: | |
2e877d14 | 2694 | :header-args+: :tangle ~/.local/bin/polybar-launch :shebang "#!/usr/bin/env sh" |
1656853a AB |
2695 | :END: |
2696 | ||
2e877d14 | 2697 | #+begin_src sh :tangle no |
1656853a AB |
2698 | # Terminate already running bar instances |
2699 | killall -q polybar | |
2700 | ||
2701 | # Wait until the processes have been shut down | |
2702 | while pgrep -x polybar >/dev/null; do sleep 1; done | |
2703 | ||
2704 | # Launch main bar | |
2705 | polybar main & | |
2706 | ||
2707 | echo "Bars launched..." | |
2708 | #+end_src | |
2709 | ||
b165a3e5 AB |
2710 | ** PowerTOP |
2711 | :PROPERTIES: | |
2712 | :header-args+: :tangle "/sudo::/etc/systemd/system/powertop.service" | |
2713 | :END: | |
2714 | ||
2715 | #+begin_src conf | |
2716 | [Unit] | |
2717 | Description=Powertop tunings | |
2718 | ||
2719 | [Service] | |
2720 | ExecStart=/usr/bin/powertop --auto-tune | |
2721 | RemainAfterExit=true | |
2722 | ||
2723 | [Install] | |
2724 | WantedBy=multi-user.target | |
2725 | #+end_src | |
2726 | ||
1656853a AB |
2727 | ** ranger |
2728 | ||
2729 | *** rc.conf | |
2730 | :PROPERTIES: | |
2731 | :header-args+: :tangle ~/.config/ranger/rc.conf | |
2732 | :END: | |
2733 | ||
2734 | #+begin_src conf :tangle no | |
2735 | # =================================================================== | |
2736 | # This file contains the default startup commands for ranger. | |
2737 | # To change them, it is recommended to create the file | |
2738 | # ~/.config/ranger/rc.conf and add your custom commands there. | |
2739 | # | |
2740 | # If you copy this whole file there, you may want to set the environment | |
2741 | # variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice. | |
2742 | # | |
2743 | # The purpose of this file is mainly to define keybindings and settings. | |
2744 | # For running more complex python code, please create a plugin in "plugins/" or | |
2745 | # a command in "commands.py". | |
2746 | # | |
2747 | # Each line is a command that will be run before the user interface | |
2748 | # is initialized. As a result, you can not use commands which rely | |
2749 | # on the UI such as :delete or :mark. | |
2750 | # =================================================================== | |
2751 | ||
2752 | # =================================================================== | |
2753 | # == Options | |
2754 | # =================================================================== | |
2755 | ||
2756 | # How many columns are there, and what are their relative widths? | |
2757 | set column_ratios 1,3,4 | |
2758 | ||
2759 | # Which files should be hidden? (regular expression) | |
2760 | set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ | |
2761 | ||
2762 | # Show hidden files? You can toggle this by typing 'zh' | |
2763 | set show_hidden false | |
2764 | ||
2765 | # Ask for a confirmation when running the "delete" command? | |
2766 | # Valid values are "always" (default), "never", "multiple" | |
2767 | # With "multiple", ranger will ask only if you delete multiple files at once. | |
2768 | set confirm_on_delete multiple | |
2769 | ||
2770 | # Which script is used to generate file previews? | |
2771 | # ranger ships with scope.sh, a script that calls external programs (see | |
2772 | # README for dependencies) to preview images, archives, etc. | |
2773 | set preview_script ~/.config/ranger/scope.sh | |
2774 | ||
2775 | # Use the external preview script or display simple plain text previews? | |
2776 | set use_preview_script true | |
2777 | ||
2778 | # Open all images in this directory when running certain image viewers | |
2779 | # like feh or sxiv? You can still open selected files by marking them. | |
2780 | set open_all_images true | |
2781 | ||
2782 | # Be aware of version control systems and display information. | |
2783 | set vcs_aware false | |
2784 | ||
2785 | # State of the three backends git, hg, bzr. The possible states are | |
2786 | # disabled, local (only show local info), enabled (show local and remote | |
2787 | # information). | |
2788 | set vcs_backend_git enabled | |
2789 | set vcs_backend_hg disabled | |
2790 | set vcs_backend_bzr disabled | |
2791 | ||
2792 | # Preview images in full color with the external command "w3mimgpreview"? | |
2793 | # This requires the console web browser "w3m" and a supported terminal. | |
2794 | # It has been successfully tested with "xterm" and "urxvt" without tmux. | |
2795 | set preview_images true | |
2796 | ||
2797 | # Use a unicode "..." character to mark cut-off filenames? | |
2798 | set unicode_ellipsis false | |
2799 | ||
2800 | # Show dotfiles in the bookmark preview box? | |
2801 | set show_hidden_bookmarks true | |
2802 | ||
2803 | # Which colorscheme to use? These colorschemes are available by default: | |
2804 | # default, jungle, snow | |
2805 | set colorscheme default | |
2806 | ||
2807 | # Preview files on the rightmost column? | |
2808 | # And collapse (shrink) the last column if there is nothing to preview? | |
2809 | set preview_files true | |
2810 | set preview_directories true | |
2811 | set collapse_preview true | |
2812 | ||
2813 | # Save the console history on exit? | |
2814 | set save_console_history true | |
2815 | ||
2816 | # Draw the status bar on top of the browser window (default: bottom) | |
2817 | set status_bar_on_top false | |
2818 | ||
2819 | # Draw a progress bar in the status bar which displays the average state of all | |
2820 | # currently running tasks which support progress bars? | |
2821 | set draw_progress_bar_in_status_bar true | |
2822 | ||
2823 | # Draw borders around columns? | |
2824 | set draw_borders true | |
2825 | ||
2826 | # Display the directory name in tabs? | |
2827 | set dirname_in_tabs false | |
2828 | ||
2829 | # Enable the mouse support? | |
2830 | set mouse_enabled true | |
2831 | ||
2832 | # Display the file size in the main column or status bar? | |
2833 | set display_size_in_main_column true | |
2834 | set display_size_in_status_bar true | |
2835 | ||
2836 | # Display files tags in all columns or only in main column? | |
2837 | set display_tags_in_all_columns true | |
2838 | ||
2839 | # Set a title for the window? | |
2840 | set update_title false | |
2841 | ||
2842 | # Set the title to "ranger" in the tmux program? | |
2843 | set update_tmux_title false | |
2844 | ||
2845 | # Shorten the title if it gets long? The number defines how many | |
2846 | # directories are displayed at once, 0 turns off this feature. | |
2847 | set shorten_title 3 | |
2848 | ||
2849 | # Abbreviate $HOME with ~ in the titlebar (first line) of ranger? | |
2850 | set tilde_in_titlebar false | |
2851 | ||
2852 | # How many directory-changes or console-commands should be kept in history? | |
2853 | set max_history_size 20 | |
2854 | set max_console_history_size 50 | |
2855 | ||
2856 | # Try to keep so much space between the top/bottom border when scrolling: | |
2857 | set scroll_offset 8 | |
2858 | ||
2859 | # Flush the input after each key hit? (Noticable when ranger lags) | |
2860 | set flushinput true | |
2861 | ||
2862 | # Padding on the right when there's no preview? | |
2863 | # This allows you to click into the space to run the file. | |
2864 | set padding_right true | |
2865 | ||
2866 | # Save bookmarks (used with mX and `X) instantly? | |
2867 | # This helps to synchronize bookmarks between multiple ranger | |
2868 | # instances but leads to *slight* performance loss. | |
2869 | # When false, bookmarks are saved when ranger is exited. | |
2870 | set autosave_bookmarks true | |
2871 | ||
2872 | # You can display the "real" cumulative size of directories by using the | |
2873 | # command :get_cumulative_size or typing "dc". The size is expensive to | |
2874 | # calculate and will not be updated automatically. You can choose | |
2875 | # to update it automatically though by turning on this option: | |
2876 | set autoupdate_cumulative_size false | |
2877 | ||
2878 | # Turning this on makes sense for screen readers: | |
2879 | set show_cursor false | |
2880 | ||
2881 | # One of: size, basename, mtime, type | |
2882 | set sort natural | |
2883 | ||
2884 | # Additional sorting options | |
2885 | set sort_reverse false | |
2886 | set sort_case_insensitive true | |
2887 | set sort_directories_first true | |
2888 | ||
2889 | # Enable this if key combinations with the Alt Key don't work for you. | |
2890 | # (Especially on xterm) | |
2891 | set xterm_alt_key false | |
2892 | ||
2893 | # =================================================================== | |
2894 | # == Local Options | |
2895 | # =================================================================== | |
2896 | # You can set local options that only affect a single directory. | |
2897 | ||
2898 | # Examples: | |
2899 | # setlocal path=~/downloads sort mtime | |
2900 | ||
2901 | # =================================================================== | |
2902 | # == Command Aliases in the Console | |
2903 | # =================================================================== | |
2904 | ||
2905 | alias e edit | |
2906 | alias q quit | |
2907 | alias q! quitall | |
2908 | alias qall quitall | |
2909 | alias setl setlocal | |
2910 | ||
2911 | alias filter scout -prt | |
2912 | alias find scout -aet | |
2913 | alias mark scout -mr | |
2914 | alias unmark scout -Mr | |
2915 | alias search scout -rs | |
2916 | alias search_inc scout -rts | |
2917 | alias travel scout -aefiklst | |
2918 | ||
2919 | # =================================================================== | |
2920 | # == Define keys for the browser | |
2921 | # =================================================================== | |
2922 | ||
2923 | # Basic | |
2924 | map Q quit! | |
2925 | map q quit | |
2926 | copymap q ZZ ZQ | |
2927 | ||
2928 | map R reload_cwd | |
2929 | map <C-r> reset | |
2930 | map <C-l> redraw_window | |
2931 | map <C-c> abort | |
2932 | map <esc> change_mode normal | |
2933 | ||
2934 | map i display_file | |
2935 | map ? help | |
2936 | map W display_log | |
2937 | map w taskview_open | |
2938 | map S shell $SHELL | |
2939 | ||
2940 | map : console | |
2941 | map ; console | |
2942 | map ! console shell | |
2943 | map @ console -p6 shell %%s | |
2944 | map # console shell -p | |
2945 | map s console shell | |
2946 | map r chain draw_possible_programs; console open_with | |
2947 | map f console find | |
2948 | map cd console cd | |
2949 | ||
2950 | # Tagging / Marking | |
2951 | map t tag_toggle | |
2952 | map ut tag_remove | |
2953 | map "<any> tag_toggle tag=%any | |
2954 | map <Space> mark_files toggle=True | |
2955 | map v mark_files all=True toggle=True | |
2956 | map uv mark_files all=True val=False | |
2957 | map V toggle_visual_mode | |
2958 | map uV toggle_visual_mode reverse=True | |
2959 | ||
2960 | # For the nostalgics: Midnight Commander bindings | |
2961 | map <F1> help | |
2962 | map <F3> display_file | |
2963 | map <F4> edit | |
2964 | map <F5> copy | |
2965 | map <F6> cut | |
2966 | map <F7> console mkdir | |
2967 | map <F8> console delete | |
2968 | map <F10> exit | |
2969 | ||
2970 | # In case you work on a keyboard with dvorak layout | |
2971 | map <UP> move up=1 | |
2972 | map <DOWN> move down=1 | |
2973 | map <LEFT> move left=1 | |
2974 | map <RIGHT> move right=1 | |
2975 | map <HOME> move to=0 | |
2976 | map <END> move to=-1 | |
2977 | map <PAGEDOWN> move down=1 pages=True | |
2978 | map <PAGEUP> move up=1 pages=True | |
2979 | map <CR> move right=1 | |
2980 | map <DELETE> console delete | |
2981 | map <INSERT> console touch | |
2982 | ||
2983 | # VIM-like | |
2984 | copymap <UP> k | |
2985 | copymap <DOWN> j | |
2986 | copymap <LEFT> h | |
2987 | copymap <RIGHT> l | |
2988 | copymap <HOME> gg | |
2989 | copymap <END> G | |
2990 | copymap <PAGEDOWN> <C-F> | |
2991 | copymap <PAGEUP> <C-B> | |
2992 | ||
2993 | map J move down=0.5 pages=True | |
2994 | map K move up=0.5 pages=True | |
2995 | copymap J <C-D> | |
2996 | copymap K <C-U> | |
2997 | ||
2998 | # Jumping around | |
2999 | map H history_go -1 | |
3000 | map L history_go 1 | |
3001 | map ] move_parent 1 | |
3002 | map [ move_parent -1 | |
3003 | map } traverse | |
3004 | ||
3005 | map gh cd ~ | |
3006 | map ge cd /etc | |
3007 | map gu cd /usr | |
3008 | map gd cd /dev | |
3009 | map gl cd -r . | |
3010 | map gL cd -r %f | |
3011 | map go cd /opt | |
3012 | map gv cd /var | |
3013 | map gm cd /media | |
3014 | map gM cd /mnt | |
3015 | map gs cd /srv | |
3016 | map gr cd / | |
3017 | map gR eval fm.cd(ranger.RANGERDIR) | |
3018 | map g/ cd / | |
3019 | map g? cd /usr/share/doc/ranger | |
3020 | ||
3021 | # External Programs | |
3022 | map E edit | |
3023 | map du shell -p du --max-depth=1 -h --apparent-size | |
3024 | map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh | |
3025 | map yp shell -d echo -n %d/%f | xsel -i | |
3026 | map yd shell -d echo -n %d | xsel -i | |
3027 | map yn shell -d echo -n %f | xsel -i | |
3028 | ||
3029 | # Filesystem Operations | |
3030 | map = chmod | |
3031 | ||
3032 | map cw console rename | |
3033 | map A eval fm.open_console('rename ' + fm.thisfile.basename) | |
3034 | map I eval fm.open_console('rename ' + fm.thisfile.basename, position=7) | |
3035 | ||
3036 | map pp paste | |
3037 | map po paste overwrite=True | |
3038 | map pl paste_symlink relative=False | |
3039 | map pL paste_symlink relative=True | |
3040 | map phl paste_hardlink | |
3041 | map pht paste_hardlinked_subtree | |
3042 | ||
3043 | map dd cut | |
3044 | map ud uncut | |
3045 | map da cut mode=add | |
3046 | map dr cut mode=remove | |
3047 | ||
3048 | map yy copy | |
3049 | map uy uncut | |
3050 | map ya copy mode=add | |
3051 | map yr copy mode=remove | |
3052 | ||
3053 | # Temporary workarounds | |
3054 | map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) | |
3055 | map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) | |
3056 | map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) | |
3057 | map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) | |
3058 | map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) | |
3059 | map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) | |
3060 | map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) | |
3061 | map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) | |
3062 | ||
3063 | # Searching | |
3064 | map / console search | |
3065 | map n search_next | |
3066 | map N search_next forward=False | |
3067 | map ct search_next order=tag | |
3068 | map cs search_next order=size | |
3069 | map ci search_next order=mimetype | |
3070 | map cc search_next order=ctime | |
3071 | map cm search_next order=mtime | |
3072 | map ca search_next order=atime | |
3073 | ||
3074 | # Tabs | |
3075 | map <C-n> tab_new ~ | |
3076 | map <C-w> tab_close | |
3077 | map <TAB> tab_move 1 | |
3078 | map <S-TAB> tab_move -1 | |
3079 | map <A-Right> tab_move 1 | |
3080 | map <A-Left> tab_move -1 | |
3081 | map gt tab_move 1 | |
3082 | map gT tab_move -1 | |
3083 | map gn tab_new ~ | |
3084 | map gc tab_close | |
3085 | map uq tab_restore | |
3086 | map <a-1> tab_open 1 | |
3087 | map <a-2> tab_open 2 | |
3088 | map <a-3> tab_open 3 | |
3089 | map <a-4> tab_open 4 | |
3090 | map <a-5> tab_open 5 | |
3091 | map <a-6> tab_open 6 | |
3092 | map <a-7> tab_open 7 | |
3093 | map <a-8> tab_open 8 | |
3094 | map <a-9> tab_open 9 | |
3095 | ||
3096 | # Sorting | |
3097 | map or toggle_option sort_reverse | |
3098 | map os chain set sort=size; set sort_reverse=False | |
3099 | map ob chain set sort=basename; set sort_reverse=False | |
3100 | map on chain set sort=natural; set sort_reverse=False | |
3101 | map om chain set sort=mtime; set sort_reverse=False | |
3102 | map oc chain set sort=ctime; set sort_reverse=False | |
3103 | map oa chain set sort=atime; set sort_reverse=False | |
3104 | map ot chain set sort=type; set sort_reverse=False | |
3105 | ||
3106 | map oS chain set sort=size; set sort_reverse=True | |
3107 | map oB chain set sort=basename; set sort_reverse=True | |
3108 | map oN chain set sort=natural; set sort_reverse=True | |
3109 | map oM chain set sort=mtime; set sort_reverse=True | |
3110 | map oC chain set sort=ctime; set sort_reverse=True | |
3111 | map oA chain set sort=atime; set sort_reverse=True | |
3112 | map oT chain set sort=type; set sort_reverse=True | |
3113 | ||
3114 | map dc get_cumulative_size | |
3115 | ||
3116 | # Settings | |
3117 | map zc toggle_option collapse_preview | |
3118 | map zd toggle_option sort_directories_first | |
3119 | map zh toggle_option show_hidden | |
3120 | map <C-h> toggle_option show_hidden | |
3121 | map zi toggle_option flushinput | |
3122 | map zm toggle_option mouse_enabled | |
3123 | map zp toggle_option preview_files | |
3124 | map zP toggle_option preview_directories | |
3125 | map zs toggle_option sort_case_insensitive | |
3126 | map zu toggle_option autoupdate_cumulative_size | |
3127 | map zv toggle_option use_preview_script | |
3128 | map zf console filter | |
3129 | ||
3130 | # Bookmarks | |
3131 | map `<any> enter_bookmark %any | |
3132 | map '<any> enter_bookmark %any | |
3133 | map m<any> set_bookmark %any | |
3134 | map um<any> unset_bookmark %any | |
3135 | ||
3136 | map m<bg> draw_bookmarks | |
3137 | copymap m<bg> um<bg> `<bg> '<bg> | |
3138 | ||
3139 | # Generate all the chmod bindings with some python help: | |
3140 | eval for arg in "rwxXst": cmd("map +u{0} shell -d chmod u+{0} %s".format(arg)) | |
3141 | eval for arg in "rwxXst": cmd("map +g{0} shell -d chmod g+{0} %s".format(arg)) | |
3142 | eval for arg in "rwxXst": cmd("map +o{0} shell -d chmod o+{0} %s".format(arg)) | |
3143 | eval for arg in "rwxXst": cmd("map +a{0} shell -d chmod a+{0} %s".format(arg)) | |
3144 | eval for arg in "rwxXst": cmd("map +{0} shell -d chmod u+{0} %s".format(arg)) | |
3145 | ||
3146 | eval for arg in "rwxXst": cmd("map -u{0} shell -d chmod u-{0} %s".format(arg)) | |
3147 | eval for arg in "rwxXst": cmd("map -g{0} shell -d chmod g-{0} %s".format(arg)) | |
3148 | eval for arg in "rwxXst": cmd("map -o{0} shell -d chmod o-{0} %s".format(arg)) | |
3149 | eval for arg in "rwxXst": cmd("map -a{0} shell -d chmod a-{0} %s".format(arg)) | |
3150 | eval for arg in "rwxXst": cmd("map -{0} shell -d chmod u-{0} %s".format(arg)) | |
3151 | ||
3152 | # =================================================================== | |
3153 | # == Define keys for the console | |
3154 | # =================================================================== | |
3155 | # Note: Unmapped keys are passed directly to the console. | |
3156 | ||
3157 | # Basic | |
3158 | cmap <tab> eval fm.ui.console.tab() | |
3159 | cmap <s-tab> eval fm.ui.console.tab(-1) | |
3160 | cmap <ESC> eval fm.ui.console.close() | |
3161 | cmap <CR> eval fm.ui.console.execute() | |
3162 | cmap <C-l> redraw_window | |
3163 | ||
3164 | copycmap <ESC> <C-c> | |
3165 | copycmap <CR> <C-j> | |
3166 | ||
3167 | # Move around | |
3168 | cmap <up> eval fm.ui.console.history_move(-1) | |
3169 | cmap <down> eval fm.ui.console.history_move(1) | |
3170 | cmap <left> eval fm.ui.console.move(left=1) | |
3171 | cmap <right> eval fm.ui.console.move(right=1) | |
3172 | cmap <home> eval fm.ui.console.move(right=0, absolute=True) | |
3173 | cmap <end> eval fm.ui.console.move(right=-1, absolute=True) | |
3174 | ||
3175 | # Line Editing | |
3176 | cmap <backspace> eval fm.ui.console.delete(-1) | |
3177 | cmap <delete> eval fm.ui.console.delete(0) | |
3178 | cmap <C-w> eval fm.ui.console.delete_word() | |
3179 | cmap <C-k> eval fm.ui.console.delete_rest(1) | |
3180 | cmap <C-u> eval fm.ui.console.delete_rest(-1) | |
3181 | cmap <C-y> eval fm.ui.console.paste() | |
3182 | ||
3183 | # And of course the emacs way | |
3184 | copycmap <up> <C-p> | |
3185 | copycmap <down> <C-n> | |
3186 | copycmap <left> <C-b> | |
3187 | copycmap <right> <C-f> | |
3188 | copycmap <home> <C-a> | |
3189 | copycmap <end> <C-e> | |
3190 | copycmap <delete> <C-d> | |
3191 | copycmap <backspace> <C-h> | |
3192 | ||
3193 | # Note: There are multiple ways to express backspaces. <backspace> (code 263) | |
3194 | # and <backspace2> (code 127). To be sure, use both. | |
3195 | copycmap <backspace> <backspace2> | |
3196 | ||
3197 | # This special expression allows typing in numerals: | |
3198 | cmap <allow_quantifiers> false | |
3199 | ||
3200 | # =================================================================== | |
3201 | # == Pager Keybindings | |
3202 | # =================================================================== | |
3203 | ||
3204 | # Movement | |
3205 | pmap <down> pager_move down=1 | |
3206 | pmap <up> pager_move up=1 | |
3207 | pmap <left> pager_move left=4 | |
3208 | pmap <right> pager_move right=4 | |
3209 | pmap <home> pager_move to=0 | |
3210 | pmap <end> pager_move to=-1 | |
3211 | pmap <pagedown> pager_move down=1.0 pages=True | |
3212 | pmap <pageup> pager_move up=1.0 pages=True | |
3213 | pmap <C-d> pager_move down=0.5 pages=True | |
3214 | pmap <C-u> pager_move up=0.5 pages=True | |
3215 | ||
3216 | copypmap <UP> k <C-p> | |
3217 | copypmap <DOWN> j <C-n> <CR> | |
3218 | copypmap <LEFT> h | |
3219 | copypmap <RIGHT> l | |
3220 | copypmap <HOME> g | |
3221 | copypmap <END> G | |
3222 | copypmap <C-d> d | |
3223 | copypmap <C-u> u | |
3224 | copypmap <PAGEDOWN> n f <C-F> <Space> | |
3225 | copypmap <PAGEUP> p b <C-B> | |
3226 | ||
3227 | # Basic | |
3228 | pmap <ESC> pager_close | |
3229 | copypmap <ESC> q Q i <F3> | |
3230 | pmap E edit_file | |
3231 | ||
3232 | # =================================================================== | |
3233 | # == Taskview Keybindings | |
3234 | # =================================================================== | |
3235 | ||
3236 | # Movement | |
3237 | tmap <up> taskview_move up=1 | |
3238 | tmap <down> taskview_move down=1 | |
3239 | tmap <home> taskview_move to=0 | |
3240 | tmap <end> taskview_move to=-1 | |
3241 | tmap <pagedown> taskview_move down=1.0 pages=True | |
3242 | tmap <pageup> taskview_move up=1.0 pages=True | |
3243 | tmap <C-d> taskview_move down=0.5 pages=True | |
3244 | tmap <C-u> taskview_move up=0.5 pages=True | |
3245 | ||
3246 | copytmap <UP> k <C-p> | |
3247 | copytmap <DOWN> j <C-n> <CR> | |
3248 | copytmap <HOME> g | |
3249 | copytmap <END> G | |
3250 | copytmap <C-u> u | |
3251 | copytmap <PAGEDOWN> n f <C-F> <Space> | |
3252 | copytmap <PAGEUP> p b <C-B> | |
3253 | ||
3254 | # Changing priority and deleting tasks | |
3255 | tmap J eval -q fm.ui.taskview.task_move(-1) | |
3256 | tmap K eval -q fm.ui.taskview.task_move(0) | |
3257 | tmap dd eval -q fm.ui.taskview.task_remove() | |
3258 | tmap <pagedown> eval -q fm.ui.taskview.task_move(-1) | |
3259 | tmap <pageup> eval -q fm.ui.taskview.task_move(0) | |
3260 | tmap <delete> eval -q fm.ui.taskview.task_remove() | |
3261 | ||
3262 | # Basic | |
3263 | tmap <ESC> taskview_close | |
3264 | copytmap <ESC> q Q w <C-c> | |
3265 | #+end_src | |
3266 | ||
3267 | *** scope.sh | |
3268 | :PROPERTIES: | |
2e877d14 | 3269 | :header-args+: :tangle ~/.config/ranger/scope.sh :shebang "#!/usr/bin/env sh" |
1656853a AB |
3270 | :END: |
3271 | ||
2e877d14 | 3272 | #+begin_src sh :tangle no |
1656853a AB |
3273 | # ranger supports enhanced previews. If the option "use_preview_script" |
3274 | # is set to True and this file exists, this script will be called and its | |
3275 | # output is displayed in ranger. ANSI color codes are supported. | |
3276 | ||
3277 | # NOTES: This script is considered a configuration file. If you upgrade | |
3278 | # ranger, it will be left untouched. (You must update it yourself.) | |
3279 | # Also, ranger disables STDIN here, so interactive scripts won't work properly | |
3280 | ||
3281 | # Meanings of exit codes: | |
3282 | # code | meaning | action of ranger | |
3283 | # -----+------------+------------------------------------------- | |
3284 | # 0 | success | success. display stdout as preview | |
3285 | # 1 | no preview | failure. display no preview at all | |
3286 | # 2 | plain text | display the plain content of the file | |
3287 | # 3 | fix width | success. Don't reload when width changes | |
3288 | # 4 | fix height | success. Don't reload when height changes | |
3289 | # 5 | fix both | success. Don't ever reload | |
3290 | ||
3291 | # Meaningful aliases for arguments: | |
3292 | path="$1" # Full path of the selected file | |
3293 | width="$2" # Width of the preview pane (number of fitting characters) | |
3294 | height="$3" # Height of the preview pane (number of fitting characters) | |
3295 | ||
3296 | maxln=200 # Stop after $maxln lines. Can be used like ls | head -n $maxln | |
3297 | ||
3298 | # Find out something about the file: | |
3299 | mimetype=$(file --mime-type -Lb "$path") | |
3300 | extension=${path##*.} | |
3301 | ||
3302 | # Functions: | |
3303 | # runs a command and saves its output into $output. Useful if you need | |
3304 | # the return value AND want to use the output in a pipe | |
3305 | try() { output=$(eval '"$@"'); } | |
3306 | ||
3307 | # writes the output of the previouosly used "try" command | |
3308 | dump() { echo "$output"; } | |
3309 | ||
3310 | # a common post-processing function used after most commands | |
3311 | trim() { head -n "$maxln"; } | |
3312 | ||
3313 | # wraps highlight to treat exit code 141 (killed by SIGPIPE) as success | |
3314 | highlight() { command highlight "$@"; test $? = 0 -o $? = 141; } | |
3315 | ||
3316 | case "$extension" in | |
3317 | # Archive extensions: | |
3318 | 7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\ | |
3319 | rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip) | |
3320 | try als "$path" && { dump | trim; exit 0; } | |
3321 | try acat "$path" && { dump | trim; exit 3; } | |
3322 | try bsdtar -lf "$path" && { dump | trim; exit 0; } | |
3323 | exit 1;; | |
3324 | rar) | |
3325 | try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;; | |
3326 | # PDF documents: | |
3327 | pdf) | |
3328 | try pdftotext -l 10 -nopgbrk -q "$path" - && \ | |
3329 | { dump | trim | fmt -s -w $width; exit 0; } || exit 1;; | |
3330 | # BitTorrent Files | |
3331 | torrent) | |
3332 | try transmission-show "$path" && { dump | trim; exit 5; } || exit 1;; | |
3333 | # HTML Pages: | |
3334 | htm|html|xhtml) | |
3335 | try w3m -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; } | |
3336 | try lynx -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; } | |
3337 | try elinks -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; } | |
3338 | ;; # fall back to highlight/cat if the text browsers fail | |
3339 | esac | |
3340 | ||
3341 | case "$mimetype" in | |
3342 | # Syntax highlight for text files: | |
3343 | text/* | */xml) | |
3344 | try highlight --out-format=ansi "$path" && { dump | trim; exit 5; } || exit 2;; | |
3345 | # Ascii-previews of images: | |
3346 | image/*) | |
3347 | img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;; | |
3348 | # Display information about media files: | |
3349 | video/* | audio/*) | |
3350 | exiftool "$path" && exit 5 | |
3351 | # Use sed to remove spaces so the output fits into the narrow window | |
3352 | try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;; | |
3353 | esac | |
3354 | ||
3355 | exit 1 | |
3356 | #+end_src | |
3357 | ||
2f1dcf9d AB |
3358 | ** redshift |
3359 | :PROPERTIES: | |
e2149232 | 3360 | :header-args+: :tangle ~/.config/redshift.conf :comments none |
2f1dcf9d AB |
3361 | :END: |
3362 | ||
3363 | #+begin_src conf | |
3364 | ; Global settings for redshift | |
3365 | [redshift] | |
3366 | ; Set the day and night screen temperatures (Neutral is 6500K) | |
3367 | ;temp-day=5700 | |
3368 | ;temp-night=3500 | |
3369 | ||
3370 | ;temp-day=6500 | |
3371 | temp-day=6200 | |
3372 | ;temp-night=4800 | |
3373 | ;temp-night=5000 | |
3374 | ;temp-night=4500 | |
3375 | temp-night=4000 | |
3376 | ||
3377 | ; Enable/Disable a smooth transition between day and night | |
3378 | ; 0 will cause a direct change from day to night screen temperature. | |
3379 | ; 1 will gradually increase or decrease the screen temperature. | |
3380 | transition=1 | |
3381 | ||
3382 | ; Set the screen brightness. Default is 1.0. | |
3383 | ;brightness=0.9 | |
3384 | ; It is also possible to use different settings for day and night | |
3385 | ; since version 1.8. | |
3386 | ;brightness-day=0.7 | |
3387 | ;brightness-night=0.4 | |
3388 | ; Set the screen gamma (for all colors, or each color channel | |
3389 | ; individually) | |
3390 | ;gamma=0.8 | |
3391 | ;gamma=1.0 | |
3392 | ;gamma=0.8:0.7:0.8 | |
3393 | ; This can also be set individually for day and night since | |
3394 | ; version 1.10. | |
3395 | ;gamma-day=0.8:0.7:0.8 | |
3396 | ;gamma-night=0.6 | |
3397 | ||
3398 | ; Set the location-provider: 'geoclue2' or 'manual' | |
3399 | ; type 'redshift -l list' to see possible values. | |
3400 | ; The location provider settings are in a different section. | |
3401 | ;location-provider=manual | |
3402 | location-provider=geoclue2 | |
3403 | ||
3404 | ; Set the adjustment-method: 'randr', 'vidmode' | |
3405 | ; type 'redshift -m list' to see all possible values. | |
3406 | ; 'randr' is the preferred method, 'vidmode' is an older API. | |
3407 | ; but works in some cases when 'randr' does not. | |
3408 | ; The adjustment method settings are in a different section. | |
3409 | adjustment-method=randr | |
3410 | ||
3411 | ; Configuration of the location-provider: | |
3412 | ; type 'redshift -l PROVIDER:help' to see the settings. | |
3413 | ; ex: 'redshift -l manual:help' | |
3414 | ; Keep in mind that longitudes west of Greenwich (e.g. the Americas) | |
3415 | ; are negative numbers. | |
3416 | ;[manual] | |
3417 | ;lat=48.1 | |
3418 | ;lon=11.6 | |
3419 | ||
3420 | ; Configuration of the adjustment-method | |
3421 | ; type 'redshift -m METHOD:help' to see the settings. | |
3422 | ; ex: 'redshift -m randr:help' | |
3423 | ; In this example, randr is configured to adjust screen 1. | |
3424 | ; Note that the numbering starts from 0, so this is actually the | |
3425 | ; second screen. If this option is not specified, Redshift will try | |
3426 | ; to adjust _all_ screens. | |
3427 | ;[randr] | |
3428 | ;screen=1 | |
3429 | #+end_src | |
3430 | ||
3431 | ** rofi | |
3432 | :PROPERTIES: | |
3433 | :header-args+: :tangle ~/.config/rofi/config | |
3434 | :END: | |
3435 | ||
3436 | #+begin_src conf | |
3437 | rofi.font: Ubuntu Mono 13 | |
3438 | ! rofi.font: Inconsolata 16 | |
3439 | ! rofi.font: Iosevka 13 | |
3440 | ! rofi.font: Source Code Pro 11 | |
3441 | rofi.modi: run,window | |
3442 | ! rofi.width: 640 | |
3443 | rofi.width: 600 | |
3444 | !rofi.location: 2 | |
3445 | !rofi.yoffset: 200 | |
3446 | rofi.monitor: -1 | |
3447 | !rofi.lines: 10 | |
3448 | ||
3449 | !rofi.theme: /usr/share/rofi/themes//Arc.rasi | |
3450 | !rofi.theme: /usr/share/rofi/themes//Paper.rasi | |
3451 | !rofi.theme: /usr/share/rofi/themes//sidebar.rasi | |
3452 | ||
3453 | rofi.theme: /usr/share/rofi/themes//gruvbox-light.rasi | |
3454 | #+end_src | |
3455 | ||
3456 | ** rofi-pass | |
3457 | :PROPERTIES: | |
3458 | :header-args+: :tangle ~/.config/rofi-pass/config | |
3459 | :END: | |
3460 | ||
3461 | #+begin_src conf | |
3462 | # permanently set alternative root dir | |
3463 | # root=/path/to/root | |
3464 | ||
3465 | # rofi command. Make sure to have "$@" as last argument | |
3466 | _rofi () { | |
3467 | #rofi -no-auto-select -kb-accept-entry "!Return" -i -no-levenshtein-sort "$@" | |
61f337f4 | 3468 | rofi -i -no-auto-select -kb-accept-entry "!Return" "$@" |
2f1dcf9d AB |
3469 | } |
3470 | ||
3471 | # xdotool needs the keyboard layout to be set using setxkbmap | |
3472 | # You can do this in your autostart scripts (e.g. xinitrc) | |
3473 | ||
3474 | # If for some reason, you cannot do this, you can set the command here. | |
3475 | # and set fix_layout to true | |
3476 | fix_layout=false | |
3477 | ||
3478 | layout_cmd () { | |
3479 | setxkbmap us | |
3480 | } | |
3481 | ||
3482 | # fields to be used | |
3483 | URL_field='url' | |
3484 | USERNAME_field='user' | |
3485 | AUTOTYPE_field='autotype' | |
3486 | ||
3487 | # delay to be used for :delay keyword | |
3488 | delay=2 | |
3489 | ||
3490 | ## Programs to be used | |
3491 | # Editor | |
3492 | EDITOR='gvim -f' | |
3493 | ||
3494 | # Browser | |
3495 | BROWSER='chromium' | |
3496 | ||
3497 | ## Misc settings | |
3498 | ||
3499 | default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl | |
3500 | auto_enter='false' | |
3501 | notify='false' | |
3502 | default_autotype='user :tab pass' | |
3503 | ||
3504 | # color of the help messages | |
3505 | # leave empty for autodetection | |
3506 | help_color="#4872FF" | |
3507 | ||
3508 | # Clipboard settings | |
3509 | # Possible options: primary, clipboard, both | |
3510 | clip=primary | |
3511 | ||
3512 | # Options for generating new password entries | |
3513 | # default_user is also used for password files that have no user field. | |
3514 | default_user=aminb | |
3515 | default_user2=aminban | |
3516 | password_length=30 | |
3517 | ||
3518 | # Custom Keybindings | |
3519 | #autotype="Alt+1" | |
3520 | autotype="Alt+m" | |
3521 | type_user="Alt+2" | |
3522 | type_pass="Alt+3" | |
3523 | open_url="Alt+4" | |
3524 | copy_name="Alt+u" | |
3525 | copy_url="Alt+l" | |
3526 | copy_pass="Alt+p" | |
3527 | show="Alt+o" | |
3528 | copy_entry="Alt+2" | |
3529 | type_entry="Alt+1" | |
3530 | copy_menu="Alt+c" | |
3531 | action_menu="Alt+a" | |
3532 | type_menu="Alt+t" | |
3533 | help="Alt+h" | |
3534 | switch="Alt+x" | |
3535 | insert_pass="Alt+n" | |
3536 | #+end_src | |
3537 | ||
08e87a0a AB |
3538 | ** TLP |
3539 | ||
3540 | *** TODO enigma | |
3541 | *** plasma | |
3542 | ||
3543 | #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "plasma")) "/sudo::/etc/default/tlp") | |
3544 | # ------------------------------------------------------------------------------ | |
3545 | # tlp - Parameters for power saving | |
3546 | # See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html | |
3547 | ||
3548 | # Hint: some features are disabled by default, remove the leading # to enable | |
3549 | # them. | |
3550 | ||
3551 | # Set to 0 to disable, 1 to enable TLP. | |
3552 | TLP_ENABLE=1 | |
3553 | ||
3554 | # Operation mode when no power supply can be detected: AC, BAT. | |
3555 | # Concerns some desktop and embedded hardware only. | |
3556 | TLP_DEFAULT_MODE=AC | |
3557 | ||
3558 | # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE | |
3559 | # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC. | |
3560 | TLP_PERSISTENT_DEFAULT=0 | |
3561 | ||
3562 | # Seconds laptop mode has to wait after the disk goes idle before doing a sync. | |
3563 | # Non-zero value enables, zero disables laptop mode. | |
3564 | DISK_IDLE_SECS_ON_AC=0 | |
3565 | DISK_IDLE_SECS_ON_BAT=2 | |
3566 | ||
3567 | # Dirty page values (timeouts in secs). | |
3568 | MAX_LOST_WORK_SECS_ON_AC=15 | |
3569 | MAX_LOST_WORK_SECS_ON_BAT=60 | |
3570 | ||
3571 | # Hint: CPU parameters below are disabled by default, remove the leading # | |
3572 | # to enable them, otherwise kernel default values are used. | |
3573 | ||
3574 | # Select a CPU frequency scaling governor. | |
3575 | # Intel Core i processor with intel_pstate driver: | |
3576 | # powersave(*), performance. | |
3577 | # Older hardware with acpi-cpufreq driver: | |
3578 | # ondemand(*), powersave, performance, conservative, schedutil. | |
3579 | # (*) is recommended. | |
3580 | # Hint: use tlp-stat -p to show the active driver and available governors. | |
3581 | # Important: | |
3582 | # powersave for intel_pstate and ondemand for acpi-cpufreq are power | |
3583 | # efficient for *almost all* workloads and therefore kernel and most | |
3584 | # distributions have chosen them as defaults. If you still want to change, | |
3585 | # you should know what you're doing! You *must* disable your distribution's | |
3586 | # governor settings or conflicts will occur. | |
3587 | #CPU_SCALING_GOVERNOR_ON_AC=powersave | |
3588 | #CPU_SCALING_GOVERNOR_ON_BAT=powersave | |
3589 | ||
3590 | # Set the min/max frequency available for the scaling governor. | |
3591 | # Possible values strongly depend on your CPU. For available frequencies see | |
3592 | # the output of tlp-stat -p. | |
3593 | #CPU_SCALING_MIN_FREQ_ON_AC=0 | |
3594 | #CPU_SCALING_MAX_FREQ_ON_AC=0 | |
3595 | #CPU_SCALING_MIN_FREQ_ON_BAT=0 | |
3596 | #CPU_SCALING_MAX_FREQ_ON_BAT=0 | |
3597 | ||
3598 | # Set energy performance hints (HWP) for Intel P-state governor: | |
3599 | # performance, balance_performance, default, balance_power, power | |
3600 | # Values are given in order of increasing power saving. | |
3601 | # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required. | |
3602 | CPU_HWP_ON_AC=balance_performance | |
3603 | CPU_HWP_ON_BAT=balance_power | |
3604 | ||
3605 | # Set Intel P-state performance: 0..100 (%). | |
3606 | # Limit the max/min P-state to control the power dissipation of the CPU. | |
3607 | # Values are stated as a percentage of the available performance. | |
3608 | # Requires an Intel Core i processor with intel_pstate driver. | |
3609 | #CPU_MIN_PERF_ON_AC=0 | |
3610 | #CPU_MAX_PERF_ON_AC=100 | |
3611 | #CPU_MIN_PERF_ON_BAT=0 | |
3612 | #CPU_MAX_PERF_ON_BAT=30 | |
3613 | ||
3614 | # Set the CPU "turbo boost" feature: 0=disable, 1=allow | |
3615 | # Requires an Intel Core i processor. | |
3616 | # Important: | |
3617 | # - This may conflict with your distribution's governor settings | |
3618 | # - A value of 1 does *not* activate boosting, it just allows it | |
3619 | #CPU_BOOST_ON_AC=1 | |
3620 | #CPU_BOOST_ON_BAT=0 | |
3621 | ||
3622 | # Minimize number of used CPU cores/hyper-threads under light load conditions: | |
3623 | # 0=disable, 1=enable. | |
3624 | SCHED_POWERSAVE_ON_AC=0 | |
3625 | SCHED_POWERSAVE_ON_BAT=1 | |
3626 | ||
3627 | # Kernel NMI Watchdog: | |
3628 | # 0=disable (default, saves power), 1=enable (for kernel debugging only). | |
3629 | NMI_WATCHDOG=0 | |
3630 | ||
3631 | # Change CPU voltages aka "undervolting" - Kernel with PHC patch required. | |
3632 | # Frequency voltage pairs are written to: | |
3633 | # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls | |
3634 | # CAUTION: only use this, if you thoroughly understand what you are doing! | |
3635 | #PHC_CONTROLS="F:V F:V F:V F:V" | |
3636 | ||
3637 | # Set CPU performance versus energy savings policy: | |
3638 | # performance, balance-performance, default, balance-power, power. | |
3639 | # Values are given in order of increasing power saving. | |
3640 | # Requires kernel module msr and x86_energy_perf_policy from linux-tools. | |
3641 | ENERGY_PERF_POLICY_ON_AC=performance | |
3642 | ENERGY_PERF_POLICY_ON_BAT=balance-power | |
3643 | ||
3644 | # Disk devices; separate multiple devices with spaces (default: sda). | |
3645 | # Devices can be specified by disk ID also (lookup with: tlp diskid). | |
3646 | DISK_DEVICES="sda sdb" | |
3647 | ||
3648 | # Disk advanced power management level: 1..254, 255 (max saving, min, off). | |
3649 | # Levels 1..127 may spin down the disk; 255 allowable on most drives. | |
3650 | # Separate values for multiple disks with spaces. Use the special value 'keep' | |
3651 | # to keep the hardware default for the particular disk. | |
3652 | DISK_APM_LEVEL_ON_AC="254 254" | |
3653 | DISK_APM_LEVEL_ON_BAT="128 128" | |
3654 | ||
3655 | # Hard disk spin down timeout: | |
3656 | # 0: spin down disabled | |
3657 | # 1..240: timeouts from 5s to 20min (in units of 5s) | |
3658 | # 241..251: timeouts from 30min to 5.5 hours (in units of 30min) | |
3659 | # See 'man hdparm' for details. | |
3660 | # Separate values for multiple disks with spaces. Use the special value 'keep' | |
3661 | # to keep the hardware default for the particular disk. | |
3662 | #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0" | |
3663 | #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0" | |
3664 | ||
3665 | # Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq). | |
3666 | # Separate values for multiple disks with spaces. Use the special value 'keep' | |
3667 | # to keep the kernel default scheduler for the particular disk. | |
3668 | #DISK_IOSCHED="cfq cfq" | |
3669 | ||
3670 | # AHCI link power management (ALPM) for disk devices: | |
3671 | # min_power, med_power_with_dipm(*), medium_power, max_performance. | |
3672 | # (*) Kernel >= 4.15 required, then recommended. | |
3673 | # Multiple values separated with spaces are tried sequentially until success. | |
3674 | SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance" | |
3675 | SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power" | |
3676 | ||
3677 | # Exclude host devices from AHCI link power management. | |
3678 | # Separate multiple hosts with spaces. | |
3679 | #SATA_LINKPWR_BLACKLIST="host1" | |
3680 | ||
3681 | # Runtime Power Management for AHCI host and disks devices: | |
3682 | # on=disable, auto=enable. | |
3683 | # EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss. | |
3684 | #AHCI_RUNTIME_PM_ON_AC=on | |
3685 | #AHCI_RUNTIME_PM_ON_BAT=on | |
3686 | ||
3687 | # Seconds of inactivity before disk is suspended. | |
3688 | AHCI_RUNTIME_PM_TIMEOUT=15 | |
3689 | ||
3690 | # PCI Express Active State Power Management (PCIe ASPM): | |
3691 | # default, performance, powersave. | |
3692 | PCIE_ASPM_ON_AC=performance | |
3693 | PCIE_ASPM_ON_BAT=powersave | |
3694 | ||
3695 | # Radeon graphics clock speed (profile method): low, mid, high, auto, default; | |
3696 | # auto = mid on BAT, high on AC; default = use hardware defaults. | |
3697 | RADEON_POWER_PROFILE_ON_AC=high | |
3698 | RADEON_POWER_PROFILE_ON_BAT=low | |
3699 | ||
3700 | # Radeon dynamic power management method (DPM): battery, performance. | |
3701 | RADEON_DPM_STATE_ON_AC=performance | |
3702 | RADEON_DPM_STATE_ON_BAT=battery | |
3703 | ||
3704 | # Radeon DPM performance level: auto, low, high; auto is recommended. | |
3705 | RADEON_DPM_PERF_LEVEL_ON_AC=auto | |
3706 | RADEON_DPM_PERF_LEVEL_ON_BAT=auto | |
3707 | ||
3708 | # WiFi power saving mode: on=enable, off=disable; not supported by all adapters. | |
3709 | WIFI_PWR_ON_AC=off | |
3710 | WIFI_PWR_ON_BAT=on | |
3711 | ||
3712 | # Disable wake on LAN: Y/N. | |
3713 | WOL_DISABLE=Y | |
3714 | ||
3715 | # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs). | |
3716 | # A value of 0 disables, >=1 enables power saving (recommended: 1). | |
3717 | SOUND_POWER_SAVE_ON_AC=0 | |
3718 | SOUND_POWER_SAVE_ON_BAT=0 | |
3719 | ||
3720 | # Disable controller too (HDA only): Y/N. | |
3721 | SOUND_POWER_SAVE_CONTROLLER=N | |
3722 | ||
3723 | # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable. | |
3724 | # Drive can be powered on again by releasing (and reinserting) the eject lever | |
3725 | # or by pressing the disc eject button on newer models. | |
3726 | # Note: an UltraBay/MediaBay hard disk is never powered off. | |
3727 | BAY_POWEROFF_ON_AC=0 | |
3728 | BAY_POWEROFF_ON_BAT=0 | |
3729 | # Optical drive device to power off (default sr0). | |
3730 | BAY_DEVICE="sr0" | |
3731 | ||
3732 | # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable. | |
3733 | RUNTIME_PM_ON_AC=on | |
3734 | RUNTIME_PM_ON_BAT=auto | |
3735 | ||
3736 | # Exclude PCI(e) device adresses the following list from Runtime PM | |
3737 | # (separate with spaces). Use lspci to get the adresses (1st column). | |
3738 | #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6" | |
3739 | RUNTIME_PM_BLACKLIST="01:00.0" | |
3740 | ||
3741 | # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM. | |
3742 | # Default when unconfigured is "amdgpu nouveau nvidia radeon" which | |
3743 | # prevents accidential power-on of dGPU in hybrid graphics setups. | |
3744 | # Use "" to disable the feature completely. | |
3745 | # Separate multiple drivers with spaces. | |
3746 | #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon" | |
3747 | ||
3748 | # Set to 0 to disable, 1 to enable USB autosuspend feature. | |
3749 | USB_AUTOSUSPEND=1 | |
3750 | ||
3751 | # Exclude listed devices from USB autosuspend (separate with spaces). | |
3752 | # Use lsusb to get the ids. | |
3753 | # Note: input devices (usbhid) are excluded automatically | |
3754 | #USB_BLACKLIST="1111:2222 3333:4444" | |
3755 | ||
3756 | # Bluetooth devices are excluded from USB autosuspend: | |
3757 | # 0=do not exclude, 1=exclude. | |
3758 | USB_BLACKLIST_BTUSB=0 | |
3759 | ||
3760 | # Phone devices are excluded from USB autosuspend: | |
3761 | # 0=do not exclude, 1=exclude (enable charging). | |
3762 | USB_BLACKLIST_PHONE=0 | |
3763 | ||
3764 | # Printers are excluded from USB autosuspend: | |
3765 | # 0=do not exclude, 1=exclude. | |
3766 | USB_BLACKLIST_PRINTER=1 | |
3767 | ||
3768 | # WWAN devices are excluded from USB autosuspend: | |
3769 | # 0=do not exclude, 1=exclude. | |
3770 | USB_BLACKLIST_WWAN=1 | |
3771 | ||
3772 | # Include listed devices into USB autosuspend even if already excluded | |
3773 | # by the blacklists above (separate with spaces). | |
3774 | # Use lsusb to get the ids. | |
3775 | #USB_WHITELIST="1111:2222 3333:4444" | |
3776 | ||
3777 | # Set to 1 to disable autosuspend before shutdown, 0 to do nothing | |
3778 | # (workaround for USB devices that cause shutdown problems). | |
3779 | #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1 | |
3780 | ||
3781 | # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown | |
3782 | # on system startup: 0=disable, 1=enable. | |
3783 | # Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below | |
3784 | # are ignored when this is enabled! | |
3785 | #RESTORE_DEVICE_STATE_ON_STARTUP=0 | |
3786 | RESTORE_DEVICE_STATE_ON_STARTUP=1 | |
3787 | ||
3788 | # Radio devices to disable on startup: bluetooth, wifi, wwan. | |
3789 | # Separate multiple devices with spaces. | |
3790 | #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan" | |
3791 | ||
3792 | # Radio devices to enable on startup: bluetooth, wifi, wwan. | |
3793 | # Separate multiple devices with spaces. | |
3794 | #DEVICES_TO_ENABLE_ON_STARTUP="wifi" | |
3795 | ||
3796 | # Radio devices to disable on shutdown: bluetooth, wifi, wwan. | |
3797 | # (workaround for devices that are blocking shutdown). | |
3798 | #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan" | |
3799 | ||
3800 | # Radio devices to enable on shutdown: bluetooth, wifi, wwan. | |
3801 | # (to prevent other operating systems from missing radios). | |
3802 | #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan" | |
3803 | ||
3804 | # Radio devices to enable on AC: bluetooth, wifi, wwan. | |
3805 | #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan" | |
3806 | ||
3807 | # Radio devices to disable on battery: bluetooth, wifi, wwan. | |
3808 | #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan" | |
3809 | ||
3810 | # Radio devices to disable on battery when not in use (not connected): | |
3811 | # bluetooth, wifi, wwan. | |
3812 | #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan" | |
3813 | ||
3814 | # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module | |
3815 | # required). Charging starts when the remaining capacity falls below the | |
3816 | # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value. | |
3817 | # Main / Internal battery (values in %) | |
3818 | #START_CHARGE_THRESH_BAT0=75 | |
3819 | #STOP_CHARGE_THRESH_BAT0=80 | |
3820 | # Ultrabay / Slice / Replaceable battery (values in %) | |
3821 | #START_CHARGE_THRESH_BAT1=75 | |
3822 | #STOP_CHARGE_THRESH_BAT1=80 | |
3823 | ||
3824 | # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable. | |
3825 | #RESTORE_THRESHOLDS_ON_BAT=1 | |
3826 | ||
3827 | # ------------------------------------------------------------------------------ | |
3828 | # tlp-rdw - Parameters for the radio device wizard | |
3829 | # Possible devices: bluetooth, wifi, wwan. | |
3830 | ||
3831 | # Hints: | |
3832 | # - Parameters are disabled by default, remove the leading # to enable them | |
3833 | # - Separate multiple radio devices with spaces | |
3834 | ||
3835 | # Radio devices to disable on connect. | |
3836 | #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan" | |
3837 | #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan" | |
3838 | #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi" | |
3839 | ||
3840 | # Radio devices to enable on disconnect. | |
3841 | #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan" | |
3842 | #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT="" | |
3843 | #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT="" | |
3844 | ||
3845 | # Radio devices to enable/disable when docked. | |
3846 | #DEVICES_TO_ENABLE_ON_DOCK="" | |
3847 | #DEVICES_TO_DISABLE_ON_DOCK="" | |
3848 | ||
3849 | # Radio devices to enable/disable when undocked. | |
3850 | #DEVICES_TO_ENABLE_ON_UNDOCK="wifi" | |
3851 | #DEVICES_TO_DISABLE_ON_UNDOCK="" | |
3852 | #+end_src | |
3853 | ||
2e877d14 AB |
3854 | ** X |
3855 | ||
3856 | *** xprofile | |
3857 | :PROPERTIES: | |
3858 | :header-args+: :tangle ~/.xprofile | |
3859 | :END: | |
3860 | ||
3861 | =~/.xprofile= is similar in style to =~/.xinitrc=, but on the | |
3862 | contrary, it's automatically sourced by LightDM, my display manager of | |
3863 | choice. | |
3864 | ||
3865 | #+begin_src sh | |
6bab6a4a AB |
3866 | xset -b # disable bell |
3867 | ||
2e877d14 AB |
3868 | # setxkbmap -option compose:ralt |
3869 | ||
3870 | setxkbmap -option ctrl:nocaps # turn capslock into control | |
3871 | setxkbmap -option altwin:swap_alt_win # swap alt and super | |
3872 | ||
3873 | if [ $(hostname) = "plasma" ] | |
3874 | then | |
3875 | setxkbmap -option ctrl:rctrl_ralt # turn right control into right alt | |
3876 | fi | |
3877 | ||
3878 | if [ $(hostname) = "enigma" ] | |
3879 | then | |
3880 | xmodmap -e "keycode 135 = Alt_R" # remap menu key to alt | |
3881 | fi | |
3882 | ||
3883 | light -Scrs "intel_backlight" 2 | |
3884 | ||
3885 | source $HOME/.zprofile | |
3886 | ||
3887 | export _JAVA_AWT_WM_NONREPARENTING=1 | |
3888 | export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true' | |
3889 | ||
2e877d14 AB |
3890 | if [ $(hostname) = "plasma" ] |
3891 | then | |
c0132386 | 3892 | unlock-def-gk.py & |
2e877d14 | 3893 | fi |
c0132386 AB |
3894 | |
3895 | bspwm & | |
2e877d14 AB |
3896 | #+end_src |
3897 | ||
3898 | *** X resources | |
3899 | ||
3900 | **** Xresources | |
3901 | :PROPERTIES: | |
3902 | :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources") | |
3903 | :END: | |
3904 | ||
3905 | #+begin_src conf-xdefaults | |
3906 | #include ".Xresources.d/fonts" | |
3907 | ! #include ".Xresources.d/colors" | |
3908 | #include ".Xresources.d/emacs" | |
3909 | #include ".Xresources.d/rxvt-unicode" | |
3910 | #+end_src | |
3911 | ||
3912 | **** Xresources.d | |
3913 | ||
3914 | ***** fonts | |
3915 | :PROPERTIES: | |
3916 | :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/fonts") | |
3917 | :END: | |
3918 | ||
3919 | #+begin_src conf-xdefaults | |
3920 | Xft.lcdfilter: lcddefault | |
3921 | Xft.antialias: true | |
3922 | Xft.autohint: 0 | |
3923 | Xft.hinting: true | |
3924 | Xft.hintstyle: hintslight | |
3925 | ! Xft.hintstyle: hintfull | |
3926 | Xft.rgba: rgb | |
3927 | Xft.dpi: 96 | |
3928 | #+end_src | |
3929 | ||
3930 | ***** colors | |
3931 | :PROPERTIES: | |
3932 | :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/colors") | |
3933 | :END: | |
3934 | ||
3935 | #+begin_src conf-xdefaults :tangle no | |
3936 | #include "gruvbox-light.xresources" | |
3937 | ! #include "gruvbox-dark.xresources" | |
3938 | #include "gruvbox-urxvt256.xresources" | |
3939 | #+end_src | |
3940 | ||
3941 | #+begin_src conf-xdefaults :tangle no | |
3942 | ! ----------------------------------------------------------------------------- | |
3943 | ! File: gruvbox-light.xresources | |
3944 | ! Description: Retro groove colorscheme generalized | |
3945 | ! Author: morhetz <morhetz@gmail.com> | |
3946 | ! Source: https://github.com/morhetz/gruvbox-generalized | |
3947 | ! Last Modified: 6 Sep 2014 | |
3948 | ! ----------------------------------------------------------------------------- | |
3949 | ||
3950 | ! hard contrast: *background: #f9f5d7 | |
3951 | *background: #fbf1c7 | |
3952 | ! soft contrast: *background: #f2e5bc | |
3953 | *foreground: #3c3836 | |
3954 | ! Black + DarkGrey | |
3955 | *color0: #fdf4c1 | |
3956 | *color8: #928374 | |
3957 | ! DarkRed + Red | |
3958 | *color1: #cc241d | |
3959 | *color9: #9d0006 | |
3960 | ! DarkGreen + Green | |
3961 | *color2: #98971a | |
3962 | *color10: #79740e | |
3963 | ! DarkYellow + Yellow | |
3964 | *color3: #d79921 | |
3965 | *color11: #b57614 | |
3966 | ! DarkBlue + Blue | |
3967 | *color4: #458588 | |
3968 | *color12: #076678 | |
3969 | ! DarkMagenta + Magenta | |
3970 | *color5: #b16286 | |
3971 | *color13: #8f3f71 | |
3972 | ! DarkCyan + Cyan | |
3973 | *color6: #689d6a | |
3974 | *color14: #427b58 | |
3975 | ! LightGrey + White | |
3976 | *color7: #7c6f64 | |
3977 | *color15: #3c3836 | |
3978 | #+end_src | |
3979 | ||
3980 | #+begin_src conf-xdefaults :tangle no | |
3981 | ! ----------------------------------------------------------------------------- | |
3982 | ! File: gruvbox-dark.xresources | |
3983 | ! Description: Retro groove colorscheme generalized | |
3984 | ! Author: morhetz <morhetz@gmail.com> | |
3985 | ! Source: https://github.com/morhetz/gruvbox-generalized | |
3986 | ! Last Modified: 6 Sep 2014 | |
3987 | ! ----------------------------------------------------------------------------- | |
3988 | ||
3989 | ! hard contrast: *background: #1d2021 | |
3990 | *background: #282828 | |
3991 | ! soft contrast: *background: #32302f | |
3992 | *foreground: #ebdbb2 | |
3993 | ! Black + DarkGrey | |
3994 | *color0: #282828 | |
3995 | *color8: #928374 | |
3996 | ! DarkRed + Red | |
3997 | *color1: #cc241d | |
3998 | *color9: #fb4934 | |
3999 | ! DarkGreen + Green | |
4000 | *color2: #98971a | |
4001 | *color10: #b8bb26 | |
4002 | ! DarkYellow + Yellow | |
4003 | *color3: #d79921 | |
4004 | *color11: #fabd2f | |
4005 | ! DarkBlue + Blue | |
4006 | *color4: #458588 | |
4007 | *color12: #83a598 | |
4008 | ! DarkMagenta + Magenta | |
4009 | *color5: #b16286 | |
4010 | *color13: #d3869b | |
4011 | ! DarkCyan + Cyan | |
4012 | *color6: #689d6a | |
4013 | *color14: #8ec07c | |
4014 | ! LightGrey + White | |
4015 | *color7: #a89984 | |
4016 | *color15: #ebdbb2 | |
4017 | #+end_src | |
4018 | ||
4019 | #+begin_src conf-xdefaults :tangle no | |
4020 | ! ----------------------------------------------------------------------------- | |
4021 | ! File: gruvbox-urxvt256.xresources | |
4022 | ! Description: Retro groove colorscheme generalized | |
4023 | ! Author: morhetz <morhetz@gmail.com> | |
4024 | ! Source: https://github.com/morhetz/gruvbox-generalized | |
4025 | ! Last Modified: 13 Dec 2013 | |
4026 | ! ----------------------------------------------------------------------------- | |
4027 | ||
4028 | URxvt.color24: #076678 | |
4029 | URxvt.color66: #427b58 | |
4030 | URxvt.color88: #9d0006 | |
4031 | URxvt.color96: #8f3f71 | |
4032 | URxvt.color100: #79740e | |
4033 | URxvt.color108: #8ec07c | |
4034 | URxvt.color109: #83a598 | |
4035 | URxvt.color130: #af3a03 | |
4036 | URxvt.color136: #b57614 | |
4037 | URxvt.color142: #b8bb26 | |
4038 | URxvt.color167: #fb4934 | |
4039 | URxvt.color175: #d3869b | |
4040 | URxvt.color208: #fe8019 | |
4041 | URxvt.color214: #fabd2f | |
4042 | URxvt.color223: #ebdbb2 | |
4043 | URxvt.color228: #f2e5bc | |
4044 | URxvt.color229: #fbf1c7 | |
4045 | URxvt.color230: #f9f5d7 | |
4046 | URxvt.color234: #1d2021 | |
4047 | URxvt.color235: #282828 | |
4048 | URxvt.color236: #32302f | |
4049 | URxvt.color237: #3c3836 | |
4050 | URxvt.color239: #504945 | |
4051 | URxvt.color241: #665c54 | |
4052 | URxvt.color243: #7c6f64 | |
4053 | URxvt.color244: #928374 | |
4054 | URxvt.color245: #928374 | |
4055 | URxvt.color246: #a89984 | |
4056 | URxvt.color248: #bdae93 | |
4057 | URxvt.color250: #d5c4a1 | |
4058 | #+end_src | |
4059 | ||
4060 | ***** emacs | |
4061 | :PROPERTIES: | |
4062 | :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/emacs") | |
4063 | :END: | |
4064 | ||
4065 | #+begin_src conf-xdefaults | |
4066 | Emacs.menuBar: off | |
4067 | Emacs.toolBar: off | |
4068 | Emacs.verticalScrollBars: off | |
4069 | Emacs.cursorBlink: off | |
4070 | Emacs.FontBackend: xft,x | |
4071 | ! Emacs.font: Ubuntu Mono-12 | |
4072 | ! Emacs.font: Triplicate T4C-11 | |
4073 | ! Emacs.font: Ubuntu Mono-10.5 | |
4074 | ! Emacs.font: Ubuntu Mono-12 | |
4075 | ! Emacs.font: Iosevka-11 | |
4076 | ||
4077 | ! Emacs.font: Fira Mono:size=15 | |
4078 | ! Emacs.font: DejaVu Sans Mono:size=15 | |
4079 | ! Emacs.font: Inconsolata:size=17 | |
4080 | ! Emacs.font: Inconsolata:size=16 | |
4081 | ! Emacs.font: Inconsolata LGC:size=14 | |
4082 | ! Emacs.font: Source Code Pro Medium-10.5 | |
4083 | Emacs.font: Ubuntu Mono:size=16 | |
4084 | ! Emacs.font: Iosevka:size=16 | |
4085 | #+end_src | |
4086 | ||
4087 | ***** rxvt-unicode | |
4088 | :PROPERTIES: | |
4089 | :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/rxvt-unicode") | |
4090 | :END: | |
4091 | ||
4092 | #+begin_src conf-xdefaults | |
4093 | ! Font | |
4094 | URxvt.font: xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true | |
4095 | URxvt.boldFont: xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true:bold, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bold | |
4096 | URxvt.italicFont: xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:italic | |
4097 | URxvt.bolditalicFont: xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true:bold:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bolditalic | |
4098 | ||
4099 | URxvt.xftAntialias: true | |
4100 | URxvt.letterSpace: 0 | |
4101 | ||
4102 | URxvt.depth: 0 | |
4103 | URxvt.loginShell: true | |
4104 | URxvt.saveLines: 100000 | |
4105 | URxvt.internalBorder: 3 | |
4106 | URxvt.lineSpace: 0 | |
4107 | URxvt.scrollBar: false | |
4108 | URxvt.scrollStyle: rxvt | |
4109 | URxvt*scrollTtyOutput: false | |
4110 | URxvt*scrollWithBuffer: true | |
4111 | URxvt*scrollTtyKeypress: true | |
4112 | URxvt.keysym.Shift-Up: command:\033]720;1\007 | |
4113 | URxvt.keysym.Shift-Down: command:\033]721;1\007 | |
4114 | ||
4115 | URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select | |
4116 | URxvt.perl-ext: bidi | |
4117 | URxvt.bidi.enabled: 1 | |
4118 | URxvt.url-select.launcher: firefox | |
4119 | URxvt.url-select.underline: true | |
4120 | URxvt.keysym.M-u: perl:url-select:select_next | |
4121 | URxvt.keysym.M-Escape: perl:keyboard-select:activate | |
4122 | URxvt.keysym.M-s: perl:keyboard-select:search | |
4123 | URxvt.url-launcher: /usr/bin/firefox | |
4124 | URxvt.matcher.button: 1 | |
4125 | URxvt.iso14755: false | |
4126 | URxvt.iso14755_53: false | |
4127 | URxvt.keysym.M-c: perl:clipboard:copy | |
4128 | URxvt.keysym.M-v: perl:clipboard:paste | |
4129 | URxvt.keysym.C-A-V: perl:clipboard:paste_escaped | |
4130 | URxvt.keysym.C-Up: font-size:increase | |
4131 | URxvt.keysym.C-Down: font-size:decrease | |
4132 | URxvt.keysym.C-S-Up: font-size:incglobal | |
4133 | URxvt.keysym.C-S-Down: font-size:decglobal | |
4134 | URxvt.keysym.C-equal: font-size:reset | |
4135 | !URxvt.keysym.C-question: font-size:show | |
4136 | ||
4137 | URxvt.iconFile: /usr/share/icons/Paper/48x48/apps/utilities-terminal.png | |
4138 | ||
4139 | !urxvt*foreground: white | |
4140 | !urxvt*background: black | |
4141 | ||
4142 | !*color0: #2E3436 | |
4143 | !*color1: #a40000 | |
4144 | !*color2: #4E9A06 | |
4145 | !*color3: #C4A000 | |
4146 | !*color4: #3465A4 | |
4147 | !*color5: #75507B | |
4148 | !*color6: #ce5c00 | |
4149 | !*color7: #babdb9 | |
4150 | !*color8: #555753 | |
4151 | !*color9: #EF2929 | |
4152 | !*color10: #8AE234 | |
4153 | !*color11: #FCE94F | |
4154 | !*color12: #729FCF | |
4155 | !*color13: #AD7FA8 | |
4156 | !*color14: #fcaf3e | |
4157 | !*color15: #EEEEEC | |
4158 | ||
4159 | !URxvt.foreground: #C8C8C8 | |
4160 | !URxvt.background: #FFFFFF | |
4161 | ||
4162 | !! black | |
4163 | !*color0: #2E3436 | |
4164 | !*color8: #555753 | |
4165 | !! red | |
4166 | !*color1: #a40000 | |
4167 | !*color9: #EF2929 | |
4168 | !! green | |
4169 | !*color2: #4E9A06 | |
4170 | !*color10: #8AE234 | |
4171 | !! yellow | |
4172 | !*color3: #C4A000 | |
4173 | !*color11: #FCE94F | |
4174 | !! blue | |
4175 | !*color4: #3465A4 | |
4176 | !*color12: #729FCF | |
4177 | !! purple | |
4178 | !*color5: #75507B | |
4179 | !*color13: #AD7FA8 | |
4180 | !! orange (replaces cyan) | |
4181 | !*color6: #ce5c00 | |
4182 | !*color14: #fcaf3e | |
4183 | !! white | |
4184 | !*color7: #babdb9 | |
4185 | !*color15: #EEEEEC | |
4186 | ||
4187 | ! Tango colour theme for rxvt-unicode | |
4188 | URxvt.background: #FFFFFF | |
4189 | URxvt.foreground: #000000 | |
4190 | ||
4191 | ! Black | |
4192 | URxvt.color0: #2E3436 | |
4193 | URxvt.color8: #757773 | |
4194 | ||
4195 | ! Red | |
4196 | URxvt.color1: #CC0000 | |
4197 | URxvt.color9: #EF2929 | |
4198 | ||
4199 | ! Green | |
4200 | URxvt.color2: #4E9A06 | |
4201 | URxvt.color10: #8AE234 | |
4202 | ||
4203 | ! Yellow | |
4204 | URxvt.color3: #C4A000 | |
4205 | URxvt.color11: #FCE94F | |
4206 | ||
4207 | ! Blue | |
4208 | URxvt.color4: #3465A4 | |
4209 | URxvt.color12: #729FCF | |
4210 | ||
4211 | ! Magenta | |
4212 | URxvt.color5: #75507B | |
4213 | URxvt.color13: #AD7FA8 | |
4214 | ||
4215 | !! Cyan | |
4216 | !URxvt.color6: #06989A | |
4217 | !URxvt.color14: #34E2E2 | |
4218 | ! orange (replaces cyan) | |
4219 | *color6: #ce5c00 | |
4220 | *color14: #fcaf3e | |
4221 | ||
4222 | ! White | |
4223 | URxvt.color7: #D3D7CF | |
4224 | URxvt.color15: #EEEEEC | |
4225 | #+end_src | |
4226 | ||
69a6fe26 AB |
4227 | ** XDG |
4228 | :PROPERTIES: | |
4229 | :header-args+: :tangle ~/.config/user-dirs.dirs | |
4230 | :END: | |
4231 | ||
4232 | #+begin_src conf | |
4233 | XDG_DESKTOP_DIR="$HOME/Desktop" | |
4234 | XDG_DOCUMENTS_DIR="$HOME/usr/docs" | |
4235 | XDG_DOWNLOAD_DIR="$HOME/usr/dls" | |
4236 | XDG_MUSIC_DIR="$HOME/usr/music" | |
4237 | XDG_PICTURES_DIR="$HOME/usr/pics" | |
4238 | XDG_PUBLICSHARE_DIR="$HOME/usr/Public" | |
4239 | XDG_TEMPLATES_DIR="$HOME/usr/Templates" | |
4240 | XDG_VIDEOS_DIR="$HOME/usr/vids" | |
4241 | #+end_src | |
4242 | ||
4243 | ** Zathura | |
4244 | :PROPERTIES: | |
4245 | :header-args+: :tangle ~/.config/zathura/zathurarc | |
4246 | :END: | |
4247 | ||
4248 | #+begin_src conf | |
4249 | set smooth-scroll true | |
4250 | set selection-clipboard clipboard | |
4251 | set zoom-step 05 | |
4252 | set default-bg "#272727" | |
4253 | set statusbar-bg "#272727" | |
4254 | set inputbar-bg "#373737" | |
4255 | #+end_src | |
4256 | ||
b1f6f894 AB |
4257 | ** Zsh |
4258 | ||
4259 | My zsh setup is built on [[https://github.com/zimfw/zimfw][Zim]]. Further, my zshrc references [[https://github.com/junegunn/fzf][fzf]], | |
4260 | [[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]], and [[https://github.com/hlissner/zsh-autopair][zsh-autopair]]; so be sure to have them | |
4261 | installed. | |
4262 | ||
4263 | *** zimrc | |
4264 | :PROPERTIES: | |
4265 | :header-args+: :tangle ~/.zimrc | |
4266 | :END: | |
4267 | ||
4268 | #+begin_src sh | |
4269 | ||
4270 | ||
4271 | ################# | |
4272 | # CORE SETTINGS # | |
4273 | ################# | |
4274 | ||
4275 | # | |
4276 | # Zim settings | |
4277 | # | |
4278 | ||
4279 | # Select what modules you would like enabled. | |
4280 | # The second line of modules may depend on options set by modules in the first | |
4281 | # line. These dependencies are noted on the respective module's README.md. | |
4282 | zmodules=(directory environment git git-info history input ssh utility custom \ | |
4283 | syntax-highlighting history-substring-search prompt completion) | |
4284 | ||
4285 | ||
4286 | ################### | |
4287 | # MODULE SETTINGS # | |
4288 | ################### | |
4289 | ||
4290 | # | |
4291 | # Prompt | |
4292 | # | |
4293 | ||
4294 | # Set your desired prompt here | |
4295 | zprompt_theme='pure' | |
4296 | #PURE_PROMPT_SYMBOL=λ | |
4297 | #PURE_PROMPT_SYMBOL=δ | |
4298 | PURE_PROMPT_SYMBOL=➜ | |
4299 | ||
4300 | # | |
4301 | # Completion | |
4302 | # | |
4303 | ||
4304 | # set an optional host-specific filename for the completion cache file | |
4305 | # if none is provided, the default '.zcompdump' is used. | |
4306 | #zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}" | |
4307 | ||
4308 | # | |
4309 | # Utility | |
4310 | # | |
4311 | ||
4312 | # Uncomment to enable command correction prompts | |
4313 | # See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput | |
4314 | setopt CORRECT | |
4315 | ||
4316 | # | |
4317 | # Environment | |
4318 | # | |
4319 | ||
4320 | # Set the string below to the desired terminal title format string. | |
4321 | # The terminal title is redrawn upon directory change, however, variables like | |
4322 | # ${PWD} are only evaluated once. Use prompt expansion strings for dynamic data: | |
4323 | # http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes | |
4324 | # The example below uses the following format: 'username@host:/current/directory' | |
4325 | ztermtitle='%n@%m:%~' | |
4326 | ||
4327 | # | |
4328 | # Input | |
4329 | # | |
4330 | ||
4331 | # Uncomment to enable double-dot expansion. | |
4332 | # This appends '../' to your input for each '.' you type after an initial '..' | |
4333 | #zdouble_dot_expand='true' | |
4334 | ||
4335 | # | |
4336 | # Syntax-Highlighting | |
4337 | # | |
4338 | ||
4339 | # This determines what highlighters will be used with the syntax-highlighting module. | |
4340 | # Documentation of the highlighters can be found here: | |
4341 | # https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md | |
4342 | # For (u)rxvt, termite and gnome-terminal users, | |
4343 | # removing the 'cursor' highlighter will fix the disappearing cursor problem | |
4344 | #zhighlighters=(main brackets cursor) | |
4345 | zhighlighters=(main brackets pattern) | |
4346 | ||
4347 | ||
4348 | # | |
4349 | # SSH | |
4350 | # | |
4351 | ||
4352 | # Load these ssh identities with the ssh module | |
4353 | zssh_ids=(id_rsa plasma_id_rsa id_ed25519 id_rsa_aur) | |
4354 | ||
4355 | ||
4356 | # | |
4357 | # Pacman | |
4358 | # | |
4359 | ||
4360 | # Set (optional) pacman front-end. | |
4361 | zpacman_frontend='yay' | |
4362 | ||
4363 | # Load any helper scripts as defined here | |
4364 | #zpacman_helper=(aur) | |
4365 | #+end_src | |
4366 | ||
4367 | *** zlogin | |
4368 | :PROPERTIES: | |
4369 | :header-args+: :tangle ~/.zlogin | |
4370 | :END: | |
4371 | ||
4372 | #+begin_src sh | |
4373 | ||
4374 | ||
4375 | # | |
4376 | # User configuration sourced by login shells | |
4377 | # | |
4378 | ||
4379 | # Initialize zim | |
4380 | [[ -s ${ZIM_HOME}/login_init.zsh ]] && source ${ZIM_HOME}/login_init.zsh | |
4381 | #+end_src | |
4382 | ||
4383 | *** zprofile | |
4384 | :PROPERTIES: | |
4385 | :header-args+: :tangle ~/.zprofile | |
4386 | :END: | |
4387 | ||
4388 | #+begin_src sh | |
4389 | #PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH" | |
4390 | #PATH=$HOME/.gem/ruby/2.4.0/bin:$PATH | |
50fff474 | 4391 | export PATH=$HOME/.local/bin:$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH |
b1f6f894 AB |
4392 | export XDG_CONFIG_HOME=$HOME/.config |
4393 | export XDG_DATA_HOME=$HOME/.local/share | |
4394 | export XDG_DATA_DIRS=/usr/local/share:/usr/share | |
4395 | export MAILDIR="$HOME/mail" | |
4396 | export CVS_RSH=ssh | |
4397 | #export MATHMODELS=$HOME/src/eiffel/mathmodels | |
4398 | #export RUST_SRC_PATH=~/.multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src | |
4399 | #export PATH=$PATH:$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/ | |
4400 | ||
4401 | # Eiffel2Java stuff | |
4402 | #export JAVA_HOME=/usr/lib/jvm/default | |
4403 | #export CPATH=$CPATH:"$JAVA_HOME/include:$JAVA_HOME/include/linux" | |
4404 | #export LIBRARY_PATH=$LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server" | |
4405 | #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server" | |
4406 | ||
4407 | #export PATH="$HOME/usr/build/pvs:$PATH" | |
4408 | #export SBCLISP_HOME=/usr/share/sbcl-source | |
4409 | #export PVS_LIBRARY_PATH="$HOME/usr/build/pvs/nasalib" | |
4410 | ||
4411 | export MOZ_USE_XINPUT2=1 # precise scrolling in firefox | |
4412 | ||
4413 | #export JAVA_HOME=/usr/lib/jvm/java-8-openjdk | |
4414 | #export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G" | |
4415 | ||
88bb4858 | 4416 | if [ -e /home/amin/.nix-profile/etc/profile.d/nix.sh ]; then . /home/amin/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer |
b1f6f894 AB |
4417 | #+end_src |
4418 | ||
4419 | *** zshenv | |
4420 | :PROPERTIES: | |
4421 | :header-args+: :tangle ~/.zshenv | |
4422 | :END: | |
4423 | ||
4424 | #+begin_src sh | |
4425 | # Ensure that a non-login, non-interactive shell has a defined environment. | |
4426 | if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then | |
4427 | source "${ZDOTDIR:-$HOME}/.zprofile" | |
4428 | fi | |
4429 | #+end_src | |
4430 | ||
4431 | *** zshrc | |
4432 | :PROPERTIES: | |
4433 | :header-args+: :tangle ~/.zshrc | |
4434 | :END: | |
4435 | ||
4436 | #+begin_src sh | |
4437 | # Bash-like navigation | |
4438 | #export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' | |
4439 | #export WORDCHARS='*?-[]~=&;!#$%^(){}<>' | |
4440 | export WORDCHARS='*?[]~=&;!#$%^(){}<>' | |
4441 | #ZLE_SPACE_SUFFIX_CHARS=$'|&' | |
4442 | ||
4443 | #disable -r time # disable shell reserved word | |
4444 | #alias time='time -p' # -p for POSIX output | |
4445 | ||
4446 | # rehash if last command was pacaur or pacman | |
4447 | # (so that zsh picks up changes in $PATH immediately) | |
4448 | TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacaur|pacman)* ]] && killall -USR1 zsh } | |
4449 | ||
4450 | # | |
4451 | # User configuration sourced by interactive shells | |
4452 | # | |
4453 | ||
4454 | # Change default zim location | |
4455 | export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim | |
4456 | ||
4457 | # Start zim | |
4458 | [[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh | |
4459 | ||
4460 | ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red') | |
4461 | #ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold' | |
4462 | ||
4463 | setopt globdots | |
4464 | ||
4465 | source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh | |
4466 | source ~/.zsh/zsh-autopair/autopair.zsh | |
4467 | ||
4468 | ||
4469 | ### fzf ### | |
4470 | ||
4471 | source /usr/share/fzf/key-bindings.zsh | |
4472 | source /usr/share/fzf/completion.zsh | |
4473 | ||
4474 | # Accept history selection instead of putting it on | |
4475 | # the command line | |
4476 | fzf-history-widget-accept() { | |
4477 | fzf-history-widget | |
4478 | zle accept-line | |
4479 | } | |
4480 | #zle -N fzf-history-widget-accept | |
4481 | #bindkey '^R' fzf-history-widget-accept | |
4482 | ||
4483 | # alt+c preview | |
4484 | export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'" | |
4485 | ||
4486 | ### fzf ### | |
4487 | ||
4488 | ||
4489 | # aliases | |
4490 | alias mpv="mpv --ytdl-format mp4" | |
4491 | alias mv="mv -iv" | |
4492 | alias cp="cp -iv" | |
4493 | alias scl=systemctl | |
4494 | alias jcl=journalctl | |
4495 | alias m="mbsync -Va; getmail; notmuch new" | |
4496 | alias best="youtube-dl -f best" | |
2a1be6b4 | 4497 | alias nixx="ssh amin@nix.aminb.org" |
373a060a | 4498 | alias fence="ssh aminb@fencepost.gnu.org" |
b1f6f894 AB |
4499 | |
4500 | aur() { | |
4501 | cd ~/usr/build | |
4502 | git clone https://aur.archlinux.org/${1}.git | |
4503 | cd ${1} | |
4504 | } | |
4505 | ||
4506 | # i-beam cursor | |
4507 | echo -e "\033[5 q" | |
4508 | #echo -e "\033[6 q" | |
4509 | #+end_src | |
4510 | ||
b13e2dc1 AB |
4511 | * Scripts |
4512 | ||
4513 | This section contains various useful scripts and the ones used by the | |
4514 | programs above. For instance, =toggle-tablet= for switching to and | |
4515 | from tablet mode on my X220T, =toggle-presentation-mode= for toggling | |
4516 | Xfce's presentation mode which keeps the screen awake, and | |
4517 | =rofi-light= a small utility that uses [[https://github.com/DaveDavenport/rofi][Rofi]] to ask and [[https://github.com/haikarainen/light][light]] to set an | |
4518 | exact brightness value. | |
4519 | ||
4520 | ** rofi-light | |
4521 | :PROPERTIES: | |
4522 | :header-args+: :tangle ~/.local/bin/rofi-light :shebang "#!/bin/bash" | |
4523 | :END: | |
4524 | ||
33c5a5cd | 4525 | #+begin_src bash |
b13e2dc1 | 4526 | cur=$(light -G) |
c2ce9b12 | 4527 | val=$(rofi -dmenu -mesg "light $cur" -p "light -S " -l 0 -width 12) |
b13e2dc1 AB |
4528 | light -S $val |
4529 | #+end_src | |
4530 | ||
4531 | ** toggle-layout | |
4532 | :PROPERTIES: | |
4533 | :header-args+: :tangle ~/.local/bin/toggle-layout :shebang "#!/bin/bash" | |
4534 | :END: | |
4535 | ||
33c5a5cd | 4536 | #+begin_src bash |
b13e2dc1 AB |
4537 | lang="$(setxkbmap -print | grep xkb_symbols | cut -d'+' -f 2)" |
4538 | ||
4539 | if [ "$lang" = "us" ]; then | |
4540 | setxkbmap ir | |
4541 | else | |
4542 | setxkbmap us | |
4543 | # xmodmap $HOME/.Xmodmap | |
4544 | fi | |
4545 | #+end_src | |
4546 | ||
4547 | ** toggle-presentation-mode | |
4548 | :PROPERTIES: | |
4549 | :header-args+: :tangle ~/.local/bin/toggle-presentation-mode :shebang "#!/bin/bash" | |
4550 | :END: | |
4551 | ||
33c5a5cd | 4552 | #+begin_src bash |
b13e2dc1 AB |
4553 | xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T |
4554 | #+end_src | |
33c5a5cd | 4555 | |
72f329ba AB |
4556 | ** toggle-tablet |
4557 | :PROPERTIES: | |
4558 | :header-args+: :tangle ~/.local/bin/toggle-tablet :shebang "#!/bin/bash" | |
4559 | :END: | |
4560 | ||
4561 | This script toggles between a 'normal' mode and a 'tablet' mode, doing | |
4562 | a few things: | |
4563 | ||
4564 | - rotates the screen using =xrandr=, so that rotating the physical | |
4565 | display of my X220t would have the laptop's battery on the right | |
4566 | hand side, | |
4567 | - enables touch screen, | |
4568 | - properly rotates the stylus pen and touch screen pointers, and | |
4569 | - toggles between RGB and Vertical BGR sub-pixel order. | |
4570 | ||
4571 | #+begin_src bash | |
4572 | case $(xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation) in | |
4573 | 0) # Screen is not rotated, we should rotate it right (90°) | |
4574 | xrandr -o 3 | |
4575 | xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 1 | |
4576 | xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 1 | |
4577 | xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 1 | |
4578 | xfconf-query -c xsettings -p /Xft/RGBA -s vbgr | |
4579 | ;; | |
4580 | 1) # Currently top is rotated right, we should set it normal (0°) | |
4581 | xrandr -o 0 | |
4582 | xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 0 | |
4583 | xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 0 | |
4584 | xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 0 | |
4585 | xfconf-query -c xsettings -p /Xft/RGBA -s rgb | |
4586 | ;; | |
4587 | *) | |
4588 | echo "Unknown result from 'xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation'" >&2 | |
4589 | exit 1 | |
4590 | ;; | |
4591 | esac | |
4592 | #+end_src | |
4593 | ||
2e877d14 AB |
4594 | ** unlock-def-gk.py |
4595 | :PROPERTIES: | |
4596 | :header-args+: :tangle ~/.local/bin/unlock-def-gk.py :shebang "#!/usr/bin/env python2" | |
4597 | :END: | |
4598 | ||
4599 | #+begin_src python | |
4600 | import gnomekeyring as gk | |
4601 | # list_item_ids_sync('login')[0] == 1L | |
4602 | gk.unlock_sync('Default_keyring',gk.item_get_info_sync('login',1L).get_secret()) | |
4603 | #+end_src | |
4604 | ||
4f183f2a AB |
4605 | ** wp |
4606 | ||
4607 | My little wallpaper changer script. | |
4608 | ||
4609 | *** wp | |
4610 | :PROPERTIES: | |
4611 | :header-args+: :tangle ~/.local/bin/wp :shebang "#!/bin/bash" | |
4612 | :END: | |
4613 | ||
4614 | #+begin_src bash :tangle no | |
4615 | export DISPLAY=:0 | |
4616 | ||
4617 | case "$1" in | |
4618 | "day") | |
4619 | feh --bg-scale $HOME/usr/pics/island_day_by_arsenixc-d6ctqon.jpg | |
4620 | ;; | |
4621 | "night") | |
4622 | feh --bg-scale $HOME/usr/pics/island_night_by_arsenixc-d6cz757.jpg | |
4623 | ;; | |
4624 | *) | |
4625 | echo $"Usage: $0 {day|night}" | |
4626 | exit 1 | |
4627 | esac | |
4628 | #+end_src | |
4629 | ||
4630 | *** wp-auto | |
4631 | :PROPERTIES: | |
4632 | :header-args+: :tangle ~/.local/bin/wp-auto :shebang "#!/bin/bash" | |
4633 | :END: | |
4634 | ||
4635 | #+begin_src bash :tangle no | |
4636 | SED=$(which sed) | |
4637 | ROFI=$(which rofi) | |
4638 | ||
4639 | export DISPLAY=:0 | |
4640 | HOUR=$(date +%H) | |
4641 | ||
4642 | if [ -z "${SED}" ] | |
4643 | then | |
4644 | echo "Did not find 'sed', script cannot continue." | |
4645 | exit 1 | |
4646 | fi | |
4647 | if [ -z "${ROFI}" ] | |
4648 | then | |
4649 | echo "Did not find rofi, there is no point to continue." | |
4650 | exit 1 | |
4651 | fi | |
4652 | ||
4653 | ### | |
4654 | # Create if not exists, then removes #include of .theme file (if present) and add the selected theme to the end. | |
4655 | # Repeated calls should leave the config clean-ish | |
4656 | ### | |
4657 | function set_theme() | |
4658 | { | |
4659 | CDIR="${HOME}/.config/rofi/" | |
4660 | if [ ! -d "${CDIR}" ] | |
4661 | then | |
4662 | mkdir -p ${CDIR} | |
4663 | fi | |
4664 | if [ -f "${CDIR}/config" ] | |
4665 | then | |
4666 | ${SED} -i "/rofi\.theme: .*\.rasi$/d" "${CDIR}/config" | |
4667 | fi | |
4668 | echo "rofi.theme: ${1}" >> "${CDIR}/config" | |
4669 | ||
4670 | } | |
4671 | ||
4672 | if [ "$HOUR" -gt "19" ] || [ "$HOUR" -lt "7" ] | |
4673 | then | |
4674 | feh --bg-scale $HOME/usr/pics/island_night_by_arsenixc-d6cz757.jpg | |
4675 | xrdb -merge $HOME/.Xresources.d/gruvbox-dark.xresources | |
4676 | set_theme "/usr/share/rofi/themes//gruvbox-dark.rasi" | |
4677 | else | |
4678 | feh --bg-scale $HOME/usr/pics/island_day_by_arsenixc-d6ctqon.jpg | |
4679 | xrdb -merge $HOME/.Xresources.d/gruvbox-light.xresources | |
4680 | set_theme "/usr/share/rofi/themes//gruvbox-light.rasi" | |
4681 | fi | |
4682 | #+end_src | |
4683 | ||
4684 | *** wp.service | |
4685 | :PROPERTIES: | |
4686 | :header-args+: :tangle ~/.config/systemd/user/wp.service | |
4687 | :END: | |
4688 | ||
4689 | #+begin_src conf :tangle no | |
4690 | [Unit] | |
4691 | Description=wallpaper service | |
4692 | ||
4693 | [Service] | |
4694 | Type=oneshot | |
4695 | ExecStart=/usr/bin/bash -c %h/.local/bin/wp-auto | |
4696 | #+end_src | |
4697 | ||
4698 | *** wp.timer | |
4699 | :PROPERTIES: | |
4700 | :header-args+: :tangle ~/.config/systemd/user/wp.timer | |
4701 | :END: | |
4702 | ||
4703 | #+begin_src conf :tangle no | |
4704 | [Unit] | |
4705 | [Unit] | |
4706 | Description=wallpaper timer | |
4707 | ||
4708 | [Timer] | |
4709 | OnCalendar=07,21:00 | |
4710 | Unit=wp.service | |
4711 | Persistent=true | |
4712 | ||
4713 | [Install] | |
4714 | WantedBy=timers.target | |
4715 | #+end_src | |
4716 | ||
69a6fe26 AB |
4717 | ** zathura-sync.sh |
4718 | :PROPERTIES: | |
4719 | :header-args+: :tangle ~/.local/bin/zathura-sync.sh :shebang "#!/bin/sh" | |
4720 | :END: | |
4721 | ||
4722 | #+begin_src sh | |
4723 | pos="$1" | |
4724 | pdffile="$2" | |
4725 | zathura --synctex-forward "$pos" "$pdffile" || \ | |
4726 | ( | |
4727 | zathura -x "emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"%{input}\")) (goto-line %{line}))'" "$pdffile" & | |
4728 | sleep 1; zathura --synctex-forward "$pos" "$pdffile" ) | |
4729 | #+end_src | |
33c5a5cd AB |
4730 | ** Fun :) |
4731 | ||
4732 | *** eat-em | |
4733 | :PROPERTIES: | |
4734 | :header-args+: :tangle ~/.local/bin/eat-em :shebang "#!/bin/sh" | |
4735 | :END: | |
4736 | ||
4737 | #+begin_src sh | |
4738 | # Original Posted at http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921 | |
4739 | # [ESC] character in original post removed here. | |
4740 | ||
4741 | # ANSI Color -- use these variables to easily have different color | |
4742 | # and format output. Make sure to output the reset sequence after | |
4743 | # colors (f = foreground, b = background), and use the 'off' | |
4744 | # feature for anything you turn on. | |
4745 | ||
4746 | initializeANSI() | |
4747 | { | |
4748 | esc="$(echo -en '\e')" | |
4749 | ||
4750 | blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m" | |
4751 | yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m" | |
4752 | cyanf="${esc}[36m"; whitef="${esc}[37m" | |
4753 | ||
4754 | blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m" | |
4755 | yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m" | |
4756 | cyanb="${esc}[46m"; whiteb="${esc}[47m" | |
4757 | ||
4758 | boldon="${esc}[1m"; boldoff="${esc}[22m" | |
4759 | italicson="${esc}[3m"; italicsoff="${esc}[23m" | |
4760 | ulon="${esc}[4m"; uloff="${esc}[24m" | |
4761 | invon="${esc}[7m"; invoff="${esc}[27m" | |
4762 | ||
4763 | reset="${esc}[0m" | |
4764 | } | |
4765 | ||
4766 | # note in this first use that switching colors doesn't require a reset | |
4767 | # first - the new color overrides the old one. | |
4768 | ||
4769 | #clear | |
4770 | ||
4771 | initializeANSI | |
4772 | ||
4773 | cat << EOF | |
4774 | ||
4775 | ${yellowf} ▄███████▄${reset} ${redf} ▄██████▄${reset} ${greenf} ▄██████▄${reset} ${bluef} ▄██████▄${reset} ${purplef} ▄██████▄${reset} ${cyanf} ▄██████▄${reset} | |
4776 | ${yellowf}▄█████████▀▀${reset} ${redf}▄${whitef}█▀█${redf}██${whitef}█▀█${redf}██▄${reset} ${greenf}▄${whitef}█▀█${greenf}██${whitef}█▀█${greenf}██▄${reset} ${bluef}▄${whitef}█▀█${bluef}██${whitef}█▀█${bluef}██▄${reset} ${purplef}▄${whitef}█▀█${purplef}██${whitef}█▀█${purplef}██▄${reset} ${cyanf}▄${whitef}█▀█${cyanf}██${whitef}█▀█${cyanf}██▄${reset} | |
4777 | ${yellowf}███████▀${reset} ${redf}█${whitef}▄▄█${redf}██${whitef}▄▄█${redf}███${reset} ${greenf}█${whitef}▄▄█${greenf}██${whitef}▄▄█${greenf}███${reset} ${bluef}█${whitef}▄▄█${bluef}██${whitef}▄▄█${bluef}███${reset} ${purplef}█${whitef}▄▄█${purplef}██${whitef}▄▄█${purplef}███${reset} ${cyanf}█${whitef}▄▄█${cyanf}██${whitef}▄▄█${cyanf}███${reset} | |
4778 | ${yellowf}███████▄${reset} ${redf}████████████${reset} ${greenf}████████████${reset} ${bluef}████████████${reset} ${purplef}████████████${reset} ${cyanf}████████████${reset} | |
4779 | ${yellowf}▀█████████▄▄${reset} ${redf}██▀██▀▀██▀██${reset} ${greenf}██▀██▀▀██▀██${reset} ${bluef}██▀██▀▀██▀██${reset} ${purplef}██▀██▀▀██▀██${reset} ${cyanf}██▀██▀▀██▀██${reset} | |
4780 | ${yellowf} ▀███████▀${reset} ${redf}▀ ▀ ▀ ▀${reset} ${greenf}▀ ▀ ▀ ▀${reset} ${bluef}▀ ▀ ▀ ▀${reset} ${purplef}▀ ▀ ▀ ▀${reset} ${cyanf}▀ ▀ ▀ ▀${reset} | |
4781 | ||
4782 | ${boldon}${yellowf} ▄███████▄ ${redf} ▄██████▄ ${greenf} ▄██████▄ ${bluef} ▄██████▄ ${purplef} ▄██████▄ ${cyanf} ▄██████▄${reset} | |
4783 | ${boldon}${yellowf}▄█████████▀▀ ${redf}▄${whitef}█▀█${redf}██${whitef}█▀█${redf}██▄ ${greenf}▄${whitef}█▀█${greenf}██${whitef}█▀█${greenf}██▄ ${bluef}▄${whitef}█▀█${bluef}██${whitef}█▀█${bluef}██▄ ${purplef}▄${whitef}█▀█${purplef}██${whitef}█▀█${purplef}██▄ ${cyanf}▄${whitef}█▀█${cyanf}██${whitef}█▀█${cyanf}██▄${reset} | |
4784 | ${boldon}${yellowf}███████▀ ${redf}█${whitef}▄▄█${redf}██${whitef}▄▄█${redf}███ ${greenf}█${whitef}▄▄█${greenf}██${whitef}▄▄█${greenf}███ ${bluef}█${whitef}▄▄█${bluef}██${whitef}▄▄█${bluef}███ ${purplef}█${whitef}▄▄█${purplef}██${whitef}▄▄█${purplef}███ ${cyanf}█${whitef}▄▄█${cyanf}██${whitef}▄▄█${cyanf}███${reset} | |
4785 | ${boldon}${yellowf}███████▄ ${redf}████████████ ${greenf}████████████ ${bluef}████████████ ${purplef}████████████ ${cyanf}████████████${reset} | |
4786 | ${boldon}${yellowf}▀█████████▄▄ ${redf}██▀██▀▀██▀██ ${greenf}██▀██▀▀██▀██ ${bluef}██▀██▀▀██▀██ ${purplef}██▀██▀▀██▀██ ${cyanf}██▀██▀▀██▀██${reset} | |
4787 | ${boldon}${yellowf} ▀███████▀ ${redf}▀ ▀ ▀ ▀ ${greenf}▀ ▀ ▀ ▀ ${bluef}▀ ▀ ▀ ▀ ${purplef}▀ ▀ ▀ ▀ ${cyanf}▀ ▀ ▀ ▀${reset} | |
4788 | ||
4789 | EOF | |
4790 | #+end_src | |
4791 | ||
33c5a5cd AB |
4792 | *** invade-em |
4793 | :PROPERTIES: | |
4794 | :header-args+: :tangle ~/.local/bin/invade-em :shebang "#!/bin/bash" | |
4795 | :END: | |
4796 | ||
4797 | #+begin_src bash | |
4798 | # | |
4799 | # ANSI color scheme script featuring Space Invaders | |
4800 | # | |
4801 | # Original: http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921 | |
4802 | # Modified by lolilolicon | |
4803 | # | |
4804 | ||
4805 | f=3 b=4 | |
4806 | for j in f b; do | |
4807 | for i in {0..7}; do | |
4808 | printf -v $j$i %b "\e[${!j}${i}m" | |
4809 | done | |
4810 | done | |
4811 | bld=$'\e[1m' | |
4812 | rst=$'\e[0m' | |
4813 | ||
4814 | cat << EOF | |
4815 | ||
4816 | $f1 ▀▄ ▄▀ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4 ▀▄ ▄▀ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst | |
4817 | $f1 ▄█▀███▀█▄ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4 ▄█▀███▀█▄ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst | |
4818 | $f1█▀███████▀█ $f2▀▀███▀▀███▀▀ $f3▀█▀██▀█▀ $f4█▀███████▀█ $f5▀▀███▀▀███▀▀ $f6▀█▀██▀█▀$rst | |
4819 | $f1▀ ▀▄▄ ▄▄▀ ▀ $f2 ▀█▄ ▀▀ ▄█▀ $f3▀▄ ▄▀ $f4▀ ▀▄▄ ▄▄▀ ▀ $f5 ▀█▄ ▀▀ ▄█▀ $f6▀▄ ▄▀$rst | |
4820 | ||
4821 | $bld$f1▄ ▀▄ ▄▀ ▄ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4▄ ▀▄ ▄▀ ▄ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst | |
4822 | $bld$f1█▄█▀███▀█▄█ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4█▄█▀███▀█▄█ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst | |
4823 | $bld$f1▀█████████▀ $f2▀▀▀██▀▀██▀▀▀ $f3▀▀█▀▀█▀▀ $f4▀█████████▀ $f5▀▀▀██▀▀██▀▀▀ $f6▀▀█▀▀█▀▀$rst | |
4824 | $bld$f1 ▄▀ ▀▄ $f2▄▄▀▀ ▀▀ ▀▀▄▄ $f3▄▀▄▀▀▄▀▄ $f4 ▄▀ ▀▄ $f5▄▄▀▀ ▀▀ ▀▀▄▄ $f6▄▀▄▀▀▄▀▄$rst | |
4825 | ||
4826 | ||
4827 | $f7▌$rst | |
4828 | ||
4829 | $f7▌$rst | |
4830 | ||
4831 | $f7 ▄█▄ $rst | |
4832 | $f7▄█████████▄$rst | |
4833 | $f7▀▀▀▀▀▀▀▀▀▀▀$rst | |
4834 | ||
4835 | EOF | |
4836 | #+end_src |