My dotfiles. Period.

main.bashrc 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  1. #!/bin/bash
  2. ## hack to workaround Fedora/Red Hat bug 878428
  3. #shellcheck disable=SC1091
  4. test -f /usr/share/git-core/contrib/completion/git-prompt.sh \
  5. && . /usr/share/git-core/contrib/completion/git-prompt.sh
  6. #######################################################
  7. ### things to do BEFORE host/user-specific settings ###
  8. #######################################################
  9. ### .... ###
  10. ### SUBZ ###
  11. ### '''' ###
  12. prepend() {
  13. #
  14. # pre-pend $2 to filename $1
  15. #
  16. local path=$1
  17. local prefix=$2
  18. local dirpath
  19. local filename
  20. local abspath
  21. abspath=$(readlink -f "$path")
  22. dirpath=$(dirname "$abspath")
  23. filename=$(basename "$abspath")
  24. echo mv "$path" "$dirpath/$prefix-$filename"
  25. }
  26. smv() {
  27. #
  28. # scp but rm the source
  29. #
  30. local src=$1
  31. local dst=$2
  32. test $# -eq 2 || {
  33. echo "i can only 2 argz!" >&2
  34. return 2
  35. }
  36. scp "$src" "$dst" && rm "$src"
  37. }
  38. smvr() {
  39. #
  40. # smv but recursive
  41. #
  42. local src=$1
  43. local dst=$2
  44. test $# -eq 2 || {
  45. echo "i can only 2 argz!" >&2
  46. return 2
  47. }
  48. scp -r "$src" "$dst" && rm -r "$src"
  49. }
  50. snore() {
  51. #
  52. # Sleep loudly-ish for $1 time
  53. #
  54. local stime=${1:-0}
  55. test "$stime" == 0 || echo -e "sleeping for $BASHUM_COLOR_LGREEN$stime$BASHUM_COLOR_NORMAL"
  56. sleep "$stime"
  57. }
  58. dotsleep() {
  59. #
  60. # Sleep with dots for $1 seconds
  61. #
  62. local secs=$1
  63. echo -e "sleeping for $BASHUM_COLOR_LGREEN$secs$BASHUM_COLOR_NORMAL seconds"
  64. local secs_togo=$secs
  65. while test "$secs_togo" -gt 0; do
  66. sleep 1
  67. echo -n .
  68. ((secs_togo--))
  69. done
  70. echo
  71. }
  72. bb() {
  73. #
  74. # Ring the bell after $1 time of sleep
  75. #
  76. local stime=${1:-0}
  77. snore "$stime"
  78. printf '\a'
  79. }
  80. spec_cksources() {
  81. #
  82. # Check Source?: URL's in RPM spec file $1
  83. #
  84. local file=$1
  85. local hdr
  86. local url
  87. rpmspec -P "$file" \
  88. | grep -E 'Source[0-9]+: *http' \
  89. | while read -r hdr url; do
  90. echo -n "$hdr: $url .."
  91. curl -fsSL -I "$url" >/dev/null || {
  92. echo fail
  93. return 1
  94. }
  95. echo ok
  96. done
  97. }
  98. nn() {
  99. #
  100. # Ring the bell and send notification $1 after $2 time
  101. #
  102. local msg=${1:-this is done}
  103. local stime=$2
  104. bb "$stime"
  105. echo -e "hey, $BASHUM_COLOR_LRED$msg$BASHUM_COLOR_NORMAL"
  106. notify-send -a 'nn()' "hey, $msg"
  107. }
  108. pp() {
  109. #
  110. # Ring the bell and send notification $1 and pause
  111. #
  112. local msg=${1:-this is done}
  113. bb
  114. echo -e "hey, \033[1;31m$msg\033[1;0m!"
  115. notify-send -a 'pp()' "hey, $msg"
  116. read -r junk -p "Press Enter to continue"
  117. }
  118. wrep() {
  119. #
  120. # Print each line on STDIN $1 times horizontally
  121. #
  122. echo >&2 "use sdup -w instead!"
  123. local rep=${1:-1}; shift
  124. local delim=${1:-" "}; shift
  125. local line
  126. local n
  127. while read -r line; do
  128. local head=true
  129. n=$rep
  130. while test "$n" -gt 0;
  131. do
  132. $head || echo -n "$delim"
  133. $head && head=false
  134. echo -n "$line"
  135. ((n--))
  136. done
  137. echo
  138. done
  139. }
  140. lrep() {
  141. #
  142. # Print each line on STDIN $1 times
  143. #
  144. local rep=${1:-1}; shift
  145. local line
  146. local n
  147. while read -r line; do
  148. n=$rep
  149. while test "$n" -gt 0;
  150. do
  151. echo "$line"
  152. ((n--))
  153. done
  154. done
  155. }
  156. prep() {
  157. #
  158. # Print STDIN $1 times
  159. #
  160. local rep=${1:-1}; shift
  161. local data
  162. data=$(cat)
  163. n=$rep
  164. while test "$n" -gt 0;
  165. do
  166. echo "$data"
  167. echo
  168. ((n--))
  169. done
  170. }
  171. dt() {
  172. #
  173. # Open $1 new terminals
  174. #
  175. __bashum_run_n "${1:-1}" urxvt
  176. }
  177. dT() {
  178. #
  179. # Open $1 new alterminals
  180. #
  181. __bashum_run_n "${1:-1}" xfce4-terminal
  182. }
  183. hr() {
  184. #
  185. # Make horizontal ruler
  186. #
  187. local i
  188. local line
  189. for i in $(seq 1 "$COLUMNS"); do
  190. case $((i%10)) in
  191. 0) line+='#' ;;
  192. *) line+='-' ;;
  193. esac
  194. done
  195. echo "$line"
  196. echo "$line"
  197. echo "$line"
  198. }
  199. __bashum_run_n() {
  200. #
  201. # Run $2.. in background $1 times
  202. #
  203. local n=${1:-1}; shift
  204. while test "$n" -gt 0;
  205. do
  206. "$@" &
  207. ((n--))
  208. done
  209. }
  210. twice() {
  211. #
  212. # Run $@ two times
  213. #
  214. "$@"
  215. "$@"
  216. }
  217. ckyaml() {
  218. #
  219. # Check if YAML file $1 is loadable
  220. #
  221. local yfile=$1
  222. test -n "$yfile" || { echo "usage: ckyaml FILE.yaml"; return 2; }
  223. python -c 'import yaml; import sys; print(yaml.load(sys.stdin)["this"])' <"$yfile"
  224. }
  225. git() {
  226. #
  227. # /usr/bin/git wrapper just to disable dangerous commands
  228. #
  229. # In particular, `git-am` is a a close typo of my favorite
  230. # aliases `ap` (`git-add --patch`) and `cm` (`git-commit`)
  231. # but it's dangerous to call by accident as it destroys
  232. # workdir changes.
  233. #
  234. if grep -Fwqse "$1" "$GIT_DISABLED_COMMANDS"; then
  235. echo "You don't want this." >&2
  236. return 1
  237. else
  238. command git "$@"
  239. fi
  240. }
  241. grepcl() {
  242. #
  243. # Grep in common chat log files
  244. #
  245. # The order is from older apps to newer as I was moving towards
  246. # weechat.
  247. #
  248. grep "$@" -R \
  249. "$HOME/.config/xchat2/xchatlogs" \
  250. "$HOME/.config/xchat2/scrollback" \
  251. "$HOME/.config/hexchat/logs" \
  252. "$HOME/.config/hexchat/scrollback" \
  253. "$HOME/.local/share/weechat/logs.old" \
  254. "$HOME/.local/share/weechat/logs"
  255. }
  256. grepfx() {
  257. #
  258. # Grep recursively for technical debt
  259. #
  260. # '[F]' hack to avoid matching self
  261. #
  262. grep --color -n \
  263. --exclude-dir 'utils' \
  264. --exclude-dir '.git' \
  265. -o '#[F]IXME:.*' -R "$@"
  266. }
  267. grepr() {
  268. #
  269. # Grep recursively, keeping numbers and ignoring common dirs
  270. #
  271. # Number one tool for refactoring!
  272. #
  273. local p=$1; shift
  274. grep --color -n --exclude-dir=".git" -e "$p" -R "$@"
  275. }
  276. grepr1() {
  277. #
  278. # Like grepr() but only list matching items in this directory
  279. #
  280. # Ie. list only files in current directory or names of subdirectories
  281. # where matches were found "somewhere".
  282. #
  283. grepr "$@" -l | cut -d/ -f1 | uniq
  284. }
  285. greph() {
  286. #
  287. # Grep through bash history
  288. #
  289. history | sed 's/^ *//; s/ / /' | cut -d' ' -f2- | grep "$@"
  290. }
  291. gitcd() {
  292. #
  293. # Deep in git repo, cd to the git root
  294. #
  295. cd "$(git rev-parse --show-toplevel)" || return 1
  296. }
  297. clsz() {
  298. #
  299. # Clear screen and move the prompt to bottom
  300. #
  301. tput clear; tput cup "$(tput lines)" 0
  302. }
  303. bcdiff() {
  304. #
  305. # Call bcompare only if objects actually differ
  306. #
  307. test $# -eq 2 && diff "$@" >/dev/null && return
  308. bcompare "$@" &
  309. }
  310. strip_colors() {
  311. #
  312. # Strip color codes from stdin
  313. #
  314. # Stolen from http://unix.stackexchange.com/a/4533/9365
  315. #
  316. sed -r 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g'
  317. }
  318. vims() {
  319. #
  320. # List Vim .swp files in a nice table
  321. #
  322. # **Note:** For this ro work, you need to set up Vim to
  323. # use same swap directory as assigned below. this can
  324. # be achieved by addoing section such as this to your
  325. # .vimrc:
  326. #
  327. # if isdirectory($HOME . '/.local/share/vim') == 0
  328. # :silent !mkdir -p ~/.vim/swap >/dev/null 2>&1
  329. # endif
  330. # set directory=./.vim-swap//
  331. # set directory+=~/.local/share/vim/swap//
  332. # set directory+=~/tmp//
  333. # set directory+=.
  334. #
  335. # Call this after crash or poweroff to remind yourself what
  336. # files you were editing before fact. Example:
  337. #
  338. # 2015-07-10 06:10:48.603953758 +0200 ~/TODO.todo
  339. #
  340. # This should make it easier to recover after a little
  341. # disaster.
  342. #
  343. local swap="$HOME/.local/share/vim/swap"
  344. #shellcheck disable=SC1117
  345. find "$swap" -type f -print0 \
  346. | xargs -0 -r stat -c "%y %n" \
  347. | sed "
  348. s| $swap/| |
  349. s|%|/|g
  350. s|.swp$||
  351. s| $HOME| ~|
  352. s| \(..:..\):[^ ]* +.... | \\1 |
  353. " \
  354. | sort \
  355. | tac
  356. }
  357. fixnl() {
  358. #
  359. # Fix newlines in stdin and pass to stdout
  360. #
  361. # Note: We need to read whole stdin; this cannot work
  362. # for infinite stream.
  363. #
  364. # Fix annoying cases:
  365. #
  366. # * If multi-line text is missing newline at the
  367. # end---add the missing newline.
  368. #
  369. # * If -c is passed, and single-line text does have
  370. # a newline at the end, remove it.
  371. #
  372. # This will not touch properly terminated multi-line texts,
  373. # or zero-line texts (ie. oly chars with no newline at all).
  374. #
  375. local arg=$1 # argument passed
  376. local cache # cache to keep stream in
  377. local nlcount # count of newlines in the stream
  378. local lastchr # hex dump (2-digit, lowercase) of last char
  379. local single=keep # single-line streams:
  380. # keep: do nothing
  381. # chop: drop last char if it's a LF
  382. case $arg in
  383. -c|--chop-single) single=chop ;;
  384. esac
  385. cache="$(mktemp -t fixnl.XXXXXXXX)"
  386. cat >"$cache"
  387. nlcount=$(<"$cache" wc -l)
  388. lastchr=$(<"$cache" tail -c1 | hexdump -e '"%02x"')
  389. case $nlcount:$lastchr:$single in
  390. 0:??:*) cat "$cache" ;; # 'abc' => keep as is
  391. 1:0a:chop) head -c -1 "$cache" ;; # 'abc\n' => -c passed: chop!
  392. 1:0a:keep) cat "$cache" ;; # 'abc\n' => keep as is
  393. *:0a:*) cat "$cache" ;; # 'a\nb\nc\n' => keep as is
  394. *:??:*) cat "$cache"; echo ;; # 'a\nb\nc' => add the missing NL
  395. esac
  396. rm "$cache"
  397. }
  398. nlfor() {
  399. #
  400. # Replace $1 (or blank space) with newlines and fix final newline
  401. #
  402. # Shorthand for commonly used tr syntax. Example:
  403. #
  404. # $ echo "$PATH" | nlat :
  405. # /foo
  406. # /bar
  407. # $
  408. #
  409. # is almost like `tr : '\n'` except that it is a bit easier
  410. # to type and fixes the annoying problem with missing
  411. # newline at the end of the replaced string.
  412. #
  413. local char=$1
  414. test -n "$char" || char='[:blank:]'
  415. tr "$char" '\n' \
  416. | fixnl
  417. }
  418. nljoin() {
  419. #
  420. # Join lines with $1 (or space)
  421. #
  422. # Shorthand for commonly used tr syntax. Example:
  423. #
  424. # $ { echo foo; echo bar; } | nljoin :
  425. #
  426. # is almost like `tr '\n' :` except that it is a bit easier
  427. # to type and fixes the annoying problem with extraneous
  428. # newline/colon at the end of final string.
  429. #
  430. local char=$1
  431. test -n "$char" || char=' '
  432. tr '\n' "$char" \
  433. | sed "s/$char*$//" \
  434. | fixnl -c
  435. }
  436. urle() {
  437. #
  438. # Encode or decode (if $1 is '-d') message on stdin as URL encode
  439. #
  440. local fn=quote
  441. case $1 in
  442. -d) fn=unquote ;;
  443. -*) echo 'usage: urle [-d] <text' >&2; return 2 ;;
  444. esac
  445. python3 -c "import sys; from urllib.parse import $fn; print($fn(sys.stdin.read()));"
  446. }
  447. qpr() {
  448. #
  449. # Encode or decode (if $1 is '-d') message on stdin as Quoted Printable
  450. #
  451. local fn=encode
  452. case $1 in
  453. -d) fn=decode ;;
  454. -*) echo 'usage: qpr [-d] <text' >&2; return 2 ;;
  455. esac
  456. perl -MMIME::QuotedPrint -pe "\$_=MIME::QuotedPrint::$fn(\$_);"
  457. }
  458. xop() {
  459. #
  460. # Common clipboard operations with fixnl() on top
  461. #
  462. local op=$1
  463. local file=${2:-/dev/stdin}
  464. case $op in
  465. oo) xclip -selection clipboard -o | fixnl ;;
  466. o) xclip -o | fixnl ;;
  467. ii) fixnl -c | xclip -selection clipboard -i ;;
  468. i) fixnl -c | xclip -i ;;
  469. esac <"$file"
  470. }
  471. xod() {
  472. #
  473. # Like mktemp but get the content from clipboard
  474. #
  475. # Dump xo in a file named $1 somewhere in /tmp; echo the path
  476. # usage: scp $(xod useful_name.txt) eg:some/shared/place
  477. # instead of:
  478. #
  479. # xo > useful_name.txt
  480. # scp useful_name.txt eg:some/shared/place
  481. # rm useful_name.txt
  482. #
  483. local name="${1:-clipboard_dump.txt}"
  484. local tmp
  485. tmp=$(mktemp -d -t "xod.XXXXXXXX")
  486. xclip -o > "$tmp/$name"
  487. echo "$tmp/$name"
  488. }
  489. xood() {
  490. #
  491. # Just like xod() but using xoo (i.e. 'clipboard' clipboard)
  492. #
  493. local name="${1:-clipboard_dump.txt}"
  494. local tmp
  495. tmp=$(mktemp -d -t "xood.XXXXXXXX")
  496. xclip -selection clipboard -o > "$tmp/$name"
  497. echo "$tmp/$name"
  498. }
  499. xl() {
  500. #
  501. # Show primary clipboard in less(1)
  502. #
  503. xop o | less -S
  504. }
  505. xxl() {
  506. #
  507. # Show C-C clipboard in less(1)
  508. #
  509. xop oo | less -S
  510. }
  511. xvxx() {
  512. #
  513. # Edit text in primary clipboard and save it to C-C clipboard
  514. #
  515. # Ideal for editing snippets in browser-based editors: during editing,
  516. # select the text, open terminal, call `xvxx`, edit the text, move
  517. # back to the browser and paste it over the old (still selected) text.
  518. # That's it, no need to make up and save temporary files.
  519. #
  520. # If you quickly realize you need to re-edit the text, use xvvx().
  521. #
  522. xop o | vipe | xop ii
  523. }
  524. xcp() {
  525. #
  526. # Copy paths of $@ to clipboard
  527. #
  528. local path
  529. find "$@" -maxdepth 0 -mindepth 0 \
  530. | while read -r path; do
  531. readlink -e "$path"
  532. done \
  533. | xop i
  534. }
  535. xpst() {
  536. #
  537. # Paste paths from clipboard
  538. #
  539. { xop o; echo; } \
  540. | while read -r path; do
  541. echo "path='$path'" >&2
  542. test -e "$path" || {
  543. echo "does not exist: $path"
  544. continue
  545. }
  546. cp -r "$path" .
  547. done
  548. }
  549. xvb() {
  550. #
  551. # Edit text in primary clipboard and run it using bash
  552. #
  553. xop o | vipe | bash
  554. }
  555. xxvb() {
  556. #
  557. # Edit text in C-C clipboard and run it using bash
  558. #
  559. xop oo | vipe | bash
  560. }
  561. vxx() {
  562. #
  563. # Edit text on stdin and save it to C-C clipboard
  564. #
  565. # Ideal for editing outut of command before pasting ot to browser
  566. # or another GUI application. Run the command with `vxx`, edit
  567. # the text, move back to the application and paste it.
  568. #
  569. # If you quickly realize you need to re-edit the text, use xvvx().
  570. #
  571. vipe | xop ii
  572. }
  573. xcxx() {
  574. #
  575. # Filter text in primary clipboard using command $@ and save it to C-C clipboard
  576. #
  577. # Similar to xvvx() but instead of interactive editing, provided filter
  578. # command is run.
  579. #
  580. local cmd=("$@")
  581. xop o | "${cmd[@]}" | xop ii
  582. return "${PIPESTATUS[1]}"
  583. }
  584. vx() {
  585. #
  586. # Edit stdin and save it to primary clipboard
  587. #
  588. # Ideal for selecting snippets of output of arbitrary commands.
  589. # select the text, open terminal, call `xvx`, edit the text, move
  590. # back to the browser and paste it over the old (still selected) text.
  591. # That's it, no need to make up and save temporary files.
  592. #
  593. vipe | xop i
  594. }
  595. xxvxx() {
  596. #
  597. # Edit text in C-C clipboard and save it back
  598. #
  599. xop oo | vipe | xop ii
  600. }
  601. yt2ogg() {
  602. #
  603. # Download YouTube video as vorbis audio
  604. #
  605. local url=$1
  606. youtube-dl -x --audio-format vorbis "$url"
  607. }
  608. yum_hasbin() {
  609. #
  610. # Ask yum who has bin $1 (and make the output actually readable)
  611. #
  612. local bname
  613. for bname in "$@";
  614. do
  615. case $bname in
  616. */*) dnf provides "$bname" ;;
  617. *) dnf provides "*/bin/$bname" ;;
  618. esac \
  619. | grep '^.' \
  620. | grep -E '^[[:alnum:]_:.-]+ :'
  621. done
  622. }
  623. cal() {
  624. #
  625. # cal with the proper version pick
  626. #
  627. local cal_v
  628. local cal_es
  629. cal_v=$(command cal -V 2>/dev/null); cal_es=$?
  630. case $cal_es:$cal_v in
  631. 0:cal\ from\ util-linux\ 2.*)
  632. command cal --color=always --monday --week "$@"
  633. ;;
  634. 64:*)
  635. command cal -M "$@"
  636. ;;
  637. esac
  638. }
  639. ### .... ###
  640. ### BASH ###
  641. ### '''' ###
  642. HISTCONTROL=ignoredups:erasedups
  643. # shopt -s histappend
  644. # PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND"
  645. HISTIGNORE="$HISTIGNORE:ls:ll:la:cd"
  646. HISTIGNORE="$HISTIGNORE:git st"
  647. HISTIGNORE="$HISTIGNORE:se *:sc *"
  648. HISTSIZE=33333
  649. HISTFILESIZE=33333
  650. HISTTIMEFORMAT='%F %T '
  651. GLOBIGNORE=.:..
  652. # shopt -s histverify
  653. # some more aliases
  654. alias cls='clear'
  655. alias czkrates='czkrates -v'
  656. alias ll='ls -lh'
  657. alias lla='ls -lha'
  658. alias lr='ll -lhrt'
  659. alias open='xdg-open'
  660. alias diff='colordiff -u'
  661. alias dmesg='dmesg --time-format iso'
  662. alias pad4='sed -e "/./s/^/ /"'
  663. alias mkittool='mkittool -v'
  664. alias grep='grep --color'
  665. alias sc='se --direction encz.cz'
  666. alias taskm='task modify'
  667. alias tasks='task rc.context:none'
  668. alias ts='ts "%F %T"'
  669. alias lsblk='lsblk -o +UUID,LABEL'
  670. alias pstree='pstree -h'
  671. alias virsh='virsh --connect qemu:///system'
  672. alias wttr='curl -s "wttr.in/?1&n&q"'
  673. alias xaa='xclip -o | audit2allow'
  674. alias xi='xop i'
  675. alias xii='xop ii'
  676. alias xo='xop o'
  677. alias xoo='xop oo'
  678. alias reboot="echo -n . ; sync ; echo -n . ; sync ; echo -n . ; systemctl reboot"
  679. alias poweroff="echo -n . ; sync ; echo -n . ; sync ; echo -n . ; systemctl poweroff"
  680. x4x() {
  681. #
  682. # Pad text from primary clipboard with 4 spaces; save to C-C clipboard
  683. #
  684. # ...that is, for inclusion as Markdown verbatim text.
  685. #
  686. xo | pad4 | xii
  687. }
  688. BASHUM__RV_TMP="/tmp/bashum-rv"
  689. mkdir -p "$BASHUM__RV_TMP"
  690. ### ...... ###
  691. ### OTHERS ###
  692. ### '''''' ###
  693. export LC_COLLATE=C # make sort upper first
  694. export EDITOR=vim
  695. export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
  696. export LESS=' -R '
  697. export NEATY=color
  698. export PRETTY=color
  699. export PRETTY_DEBUG_EXCLUDE=inigrep
  700. export MDVIMB__CONVERTER=cmark
  701. export MDVIMB__STYLE=darkzen # pergamen
  702. #shellcheck disable=SC2034
  703. {
  704. GIT_PS1_SHOWDIRTYSTATE=true
  705. GIT_PS1_SHOWUNTRACKEDFILES=true
  706. __SATURNIN_COMPLETE_DEBUG=true
  707. GIT_DISABLED_COMMANDS="$HOME/.gittum/disabled-commands"
  708. }
  709. export GIT_PAGER='less -S'
  710. # disable mounting things like SFTP to ~/.gvfs when accessed
  711. # via GIO (used by nautilus etc.)
  712. export GVFS_DISABLE_FUSE=1
  713. # disable the terrible beep sound (only for X; for tty?, blacklist pcspkr)
  714. xhost >& /dev/null && xset b off
  715. # get rid of those .pyc files once and for all
  716. export PYTHONDONTWRITEBYTECODE=1
  717. ssh-add -l >& /dev/null || ssh-add