Use XDG directories

This commit is contained in:
Observer of Time 2019-09-25 21:07:56 +03:00
parent 320f5f7004
commit e758191295
Signed by: chronobserver
GPG Key ID: 8A2DEA1DBAEBCA9E
36 changed files with 340 additions and 155 deletions

View File

@ -697,4 +697,3 @@
# }}} # }}}
# vim:fdl=0:fdm=marker:ic:scs: # vim:fdl=0:fdm=marker:ic:scs:

View File

@ -21,18 +21,17 @@ alias vcat='vimcat -c "colors gruvbox"'
alias vim='nvim' alias vim='nvim'
# neovim terminal shell # neovim terminal shell
alias vish='nvim +term' alias vish='nvim +term'
# youtube-dl download as flac
alias ytdl-flac='youtube-dl -x --audio-format flac --audio-quality 9'
# youtube-dl download as mp3
alias ytdl-mp3='youtube-dl -x --audio-format mp3 --audio-quality 320K'
# maximum zip compression # maximum zip compression
alias zip-max='7z a -tzip -mm=Deflate -mx=9 -mfb=128 -mpass=10 -aoa' alias zip-max='7z a -tzip -mm=Deflate -mx=9 -mfb=128 -mpass=10 -aoa'
# }}} # }}}
# Enable color support of commands {{{ # Enable color support of commands {{{
if test -x /usr/bin/dircolors; then if test -x /usr/bin/dircolors; then
if test -r ~/.dir_colors; then eval "$(dircolors -b "$_")" if test -r "$XDG_CONFIG_HOME/dircolors"; then
else eval "$(dircolors -b)"; fi eval "$(dircolors -b "$_")"
else
eval "$(dircolors -b)"
fi
alias ls='ls --color=auto' alias ls='ls --color=auto'
alias grep='grep --color=auto' alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto' alias fgrep='fgrep --color=auto'
@ -57,8 +56,8 @@ alias l='ls -lhNFHB'
# Add an alert function for long running commands {{{ # Add an alert function for long running commands {{{
alert() { # Use like so: sleep 10; alert alert() { # Use like so: sleep 10; alert
# shellcheck disable=SC2181 # shellcheck disable=SC2181
notify-send --urgency=low -i "$([ $? -eq 0 ] && printf terminal || printf error)" \ notify-send -u low -i "$( (($?)) && printf error || printf terminal)" \
"$(history | tail -1 | sed -e 's/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//')" "$(history | sed -e '$!d;s/^[^}]\+}\s*//;s/[;&|]\s*alert$//')"
} }
# }}} # }}}
@ -69,4 +68,3 @@ test -f ~/.bash_funcs && . "$_"
test -f ~/.ssh/aliases && . "$_" test -f ~/.ssh/aliases && . "$_"
# vim:set fdm=marker fdl=1: # vim:set fdm=marker fdl=1:

View File

@ -45,9 +45,9 @@ rot13() { # Encodes/Decodes string in rot13
pictshare() { # Uploads image to pictshare pictshare() { # Uploads image to pictshare
__usage $# 1 '<file>' && return 1 __usage $# 1 '<file>' && return 1
curl -SsX POST -F "postimage=@$1" \ curl -sSF "file=@$1" \
https://pictshare.net/backend.php | \ https://pictshare.net/api/upload.php | \
awk 'BEGIN { FS="\"" } { gsub(/\\/,""); print $16 }' awk -F'"' '{gsub(/\\/,""); print $12}'
} }
transh() { # Uploads file to transfer.sh transh() { # Uploads file to transfer.sh
@ -59,17 +59,17 @@ transh() { # Uploads file to transfer.sh
"https://transfer.sh/$file" && printf '\n' "https://transfer.sh/$file" && printf '\n'
} }
svgmin() { # Minifies and formats svg for css svgmin() { # Minifies and formats svg into a data URI
__usage $# 2 '< -i FILE | -s STRING >' && return 1 __usage $# 2 '< -i FILE | -s STRING >' && return 1
declare plugins randstr declare plugins tmpfile
plugins="$(svgo --show-plugins | awk ' plugins="$(svgo --show-plugins | awk '
BEGIN { printf "{" } BEGIN { printf "{" }
/cleanup|remove/ { printf c $2; c="," } /cleanup|remove/ { printf c $2; c="," }
END { printf "}" }')" END { printf "}" }')"
randstr=$(tr -cd '[:alnum:]' </dev/urandom | fold -w8 | head -1) tmpfile="$(mktemp svgmin.XXXXXXXX)"
svgo --enable="$plugins" "$@" --datauri=encoded -o "/tmp/$randstr.svg.b64" svgo --enable="$plugins" "$@" --datauri=encoded -o "$tmpfile"
printf "'data:image/svg+xml;UTF8,%s'\\n" "$(<"/tmp/$randstr.svg.b64")" printf "'data:image/svg+xml;UTF8,%s'\\n" "$(<"$tmpfile")"
rm "/tmp/$randstr.svg.b64" rm "$tmpfile"
} }
tempconv() { # Converts Fahrenheit to Celsius and vice versa tempconv() { # Converts Fahrenheit to Celsius and vice versa
@ -115,10 +115,8 @@ weather() { # Show weather info from wttr.in
sri() { # Prints the SRI hash of a resource sri() { # Prints the SRI hash of a resource
__usage $# 1 '<URL> [algorithm]' && return 1 __usage $# 1 '<URL> [algorithm]' && return 1
declare sha printf 'sha%d-%s\n' "${2:-384}" \
sha="$(curl -Ss "$1" | shasum -b \ "$(curl -Ss "$1" | shasum -ba "${2:-384}" - | xxd -r -p | base64)"
-a "${2:-384}" - | xxd -r -p | base64)"
printf 'sha%d-%s\n' "${2:-384}" "$sha"
} }
myip() { # What's my ip myip() { # What's my ip
@ -144,9 +142,8 @@ urldecode() { # Decodes urlencoded string
utf8decode() { # Decodes =?UTF-8?B?...?= string utf8decode() { # Decodes =?UTF-8?B?...?= string
__usage $# 1 '<string>' && return 1 __usage $# 1 '<string>' && return 1
[[ $1 =~ ^=\?[Uu][Tt][Ff]-8\?[Bb]\?([^?]+)\?=$ ]] [[ $* =~ ^=\?[Uu][Tt][Ff]-8\?[Bb]\?([^?]+)\?=$ ]]
printf '%s\n' "$(base64 -d <<< "${BASH_REMATCH[1]}")" printf '%s\n' "$(base64 -d <<< "${BASH_REMATCH[1]}")"
} }
# vim:set ft=sh fdm=syntax fdl=0: # vim:set ft=sh fdm=syntax fdl=0:

View File

@ -35,11 +35,17 @@ export EDITOR=nvim
# Set the default browser # Set the default browser
export BROWSER=firefox export BROWSER=firefox
# Set the XDG directories {{{
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
# }}}
# Set the paths used by go {{{ # Set the paths used by go {{{
export GOPATH="$HOME/.local/go" export GOPATH="$HOME/.local/go"
# }}} # }}}
# Set the paths used by rubygems {{{ # Set the paths used by ruby {{{
export GEM_HOME="$HOME/.local/ruby" export GEM_HOME="$HOME/.local/ruby"
export GEM_SPEC_CACHE="$GEM_HOME/specs" export GEM_SPEC_CACHE="$GEM_HOME/specs"
export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/2.6.0" export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/2.6.0"
@ -51,13 +57,22 @@ export PERL_CPANM_OPT="-l ~/.local/perl"
export PERL_CPANM_HOME="$HOME/.local/perl/.cpanm" export PERL_CPANM_HOME="$HOME/.local/perl/.cpanm"
# }}} # }}}
# Set the paths used by rust {{{
export CARGO_HOME="$XDG_DATA_HOME/cargo"
# }}}
# Set the paths used by node {{{
export NODE_REPL_HISTORY="$XDG_CACHE_HOME/.node_repl_history"
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
# }}}
# Set the paths used by the android sdk {{{ # Set the paths used by the android sdk {{{
export ANDROID_HOME="$HOME/.local/android" export ANDROID_HOME="$HOME/.local/android"
# }}} # }}}
# Set the search path for commands {{{ # Set the search path for commands {{{
export PATH="$HOME/.local/bin:\ export PATH="$HOME/.local/bin:\
/usr/sbin:/usr/local/bin:/usr/bin:\ /usr/bin:/usr/local/bin:/usr/sbin:\
/usr/lib/jvm/default/bin:\ /usr/lib/jvm/default/bin:\
/usr/bin/site_perl:\ /usr/bin/site_perl:\
/usr/bin/vendor_perl:\ /usr/bin/vendor_perl:\
@ -66,11 +81,15 @@ $HOME/.local/perl/bin:\
$GOPATH/bin:\ $GOPATH/bin:\
$GEM_HOME/bin:\ $GEM_HOME/bin:\
$HOME/.yarn/bin:\ $HOME/.yarn/bin:\
$HOME/.poetry/bin:\
$ANDROID_HOME/tools:\ $ANDROID_HOME/tools:\
$ANDROID_HOME/platform-tools:" $ANDROID_HOME/platform-tools:"
# }}} # }}}
# Set the paths used by ccache {{{
export CCACHE_CONFIGPATH="$XDG_CONFIG_HOME/ccache.cfg"
export CCACHE_DIR="$XDG_CACHE_HOME/ccache"
# }}}
# Use a 256color terminal if one exists {{{ # Use a 256color terminal if one exists {{{
for t in {konsole,xterm,gnome}-256color; do for t in {konsole,xterm,gnome}-256color; do
[ -f /usr/share/terminfo/${t:0:1}/$t ] && export TERM=$t && break [ -f /usr/share/terminfo/${t:0:1}/$t ] && export TERM=$t && break

View File

@ -18,7 +18,7 @@ HISTIGNORE='&:[ ]*:exit:ls:cd:history:clear'
HISTCONTROL='erasedups' HISTCONTROL='erasedups'
# Move the history file away from $HOME # Move the history file away from $HOME
HISTFILE="$HOME/.cache/.bash_history" HISTFILE="$XDG_CACHE_HOME/.bash_history"
# Print time of command in history # Print time of command in history
HISTTIMEFORMAT='{%Y-%m-%d %T} ' HISTTIMEFORMAT='{%Y-%m-%d %T} '
@ -44,4 +44,3 @@ test -f ~/.unirc.sh && . "$_"
: # ensure 0 exit code : # ensure 0 exit code
# vim:set wrap lbr bri briopt=shift\:4: # vim:set wrap lbr bri briopt=shift\:4:

View File

@ -74,4 +74,3 @@ SpacesInAngles: false
Standard: "Cpp11" Standard: "Cpp11"
# vim:ft=yaml: # vim:ft=yaml:

View File

@ -188,4 +188,3 @@ CheckOptions:
value: true value: true
# vim:ft=yaml: # vim:ft=yaml:

View File

@ -12,7 +12,7 @@ disable-ipv6=true
# Set the command to be executed after # Set the command to be executed after
# download completed but before seeding. # download completed but before seeding.
on-bt-download-complete=/home/johan/.aria2/notif.sh on-bt-download-complete=${HOME}/.config/aria2/notif.sh
# Set interval in seconds to output # Set interval in seconds to output
# download progress summary. # download progress summary.
@ -55,7 +55,7 @@ http-accept-gzip=true
http-auth-challenge=true http-auth-challenge=true
# Set user agent for HTTP(S) downloads. # Set user agent for HTTP(S) downloads.
user-agent=curl/7.65.1 user-agent=curl/7.66.0
# }}} # }}}
@ -74,4 +74,3 @@ metalink-preferred-protocol=https
# }}} # }}}
# vml:fdm=marker:fdl=0: # vml:fdm=marker:fdl=0:

View File

@ -2,4 +2,3 @@
notify-send -u normal -t 2000 -i \ notify-send -u normal -t 2000 -i \
emblem-downloads 'Torrent' "Downloaded: $3" emblem-downloads 'Torrent' "Downloaded: $3"

2
.config/ccache.cfg Normal file
View File

@ -0,0 +1,2 @@
max_size = 2G
compression = true

View File

@ -148,6 +148,8 @@ STICKY_OTHER_WRITABLE 48;5;10;38;5;16 # dir that is sticky and other-writable
.asf 38;5;202 .asf 38;5;202
.avi 38;5;202 .avi 38;5;202
.axv 38;5;202 .axv 38;5;202
.bik 38;5;202
.bk2 38;5;202
.cgm 38;5;202 .cgm 38;5;202
.dl 38;5;202 .dl 38;5;202
.emf 38;5;202 .emf 38;5;202
@ -167,11 +169,11 @@ STICKY_OTHER_WRITABLE 48;5;10;38;5;16 # dir that is sticky and other-writable
.ogm 38;5;202 .ogm 38;5;202
.ogv 38;5;202 .ogv 38;5;202
.ogx 38;5;202 .ogx 38;5;202
.pak 38;5;202
.qt 38;5;202 .qt 38;5;202
.rm 38;5;202 .rm 38;5;202
.rmvb 38;5;202 .rmvb 38;5;202
.vob 38;5;202 .vob 38;5;202
.webm 38;5;202
.wmv 38;5;202 .wmv 38;5;202
.xcf 38;5;202 .xcf 38;5;202
.xwd 38;5;202 .xwd 38;5;202
@ -180,6 +182,7 @@ STICKY_OTHER_WRITABLE 48;5;10;38;5;16 # dir that is sticky and other-writable
# audio formats (cyan) {{{ # audio formats (cyan) {{{
.aac 38;5;45 .aac 38;5;45
.ac3 38;5;45
.au 38;5;45 .au 38;5;45
.axa 38;5;45 .axa 38;5;45
.flac 38;5;45 .flac 38;5;45
@ -190,6 +193,7 @@ STICKY_OTHER_WRITABLE 48;5;10;38;5;16 # dir that is sticky and other-writable
.mpc 38;5;45 .mpc 38;5;45
.oga 38;5;45 .oga 38;5;45
.ogg 38;5;45 .ogg 38;5;45
.opus 38;5;45
.ra 38;5;45 .ra 38;5;45
.spx 38;5;45 .spx 38;5;45
.wav 38;5;45 .wav 38;5;45
@ -197,5 +201,4 @@ STICKY_OTHER_WRITABLE 48;5;10;38;5;16 # dir that is sticky and other-writable
# }}} # }}}
# }}} # }}}
# vim:fdm=marker:fdl=1: # vim:ft=dircolors:fdm=marker:fdl=1:

View File

@ -5,7 +5,7 @@
[core] [core]
editor = ${EDITOR:-nvim} editor = ${EDITOR:-nvim}
pager = ${PAGER:-vimpager} pager = ${PAGER:-nvimpager}
whitespace = tabwidth=4,cr-at-eol whitespace = tabwidth=4,cr-at-eol
[credential] [credential]
@ -51,7 +51,7 @@
keepBackup = false keepBackup = false
[mergetool "fugitive"] [mergetool "fugitive"]
cmd = nvim -f -c \"Gvdiff\" \"$MERGED\" cmd = nvim -f -c \"Gvdiffsplit!\" \"$MERGED\"
[pretty] [pretty]
log = format:%h %s%d [%cn] (%ad) log = format:%h %s%d [%cn] (%ad)

View File

@ -26,4 +26,3 @@ right_meters=CPU LoadAverage Tasks Uptime Clock
right_meter_modes=2 2 2 2 2 right_meter_modes=2 2 2 2 2
# vim:ft=cfg: # vim:ft=cfg:

View File

@ -1,6 +1,177 @@
t cycle video-unscaled # cycle {{{
k add sub-scale -0.1 d cycle deinterlace
K add sub-scale +0.1 u cycle video-unscaled
WHEEL_UP add volume 5 v cycle sub-visibility
x cycle sub
X cycle sub down
, cycle video
. cycle video down
a cycle audio
A cycle audio down
m cycle mute
W cycle ontop
SPACE cycle pause
MBTN_LEFT_DBL cycle fullscreen
# }}}
# cycle-values {{{
R cycle-values video-aspect "16:9" "4:3" "-1"
L cycle-values loop-file "inf" "no"
H cycle-values hwdec "no" "vaapi"
# }}}
# set {{{
= set volume 100
BS set speed 1.0
Alt+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0
ESC set fullscreen no
# }}}
# seek {{{
RIGHT seek +5
LEFT seek -5
UP seek +60
DOWN seek -60
Shift+right seek +2 exact
Shift+left seek -2 exact
Shift+up seek +10 exact
Shift+down seek -10 exact
# }}}
# add {{{
# audio-delay {{{
g add audio-delay +0.1
G add audio-delay -0.1
# }}}
# brightness {{{
n add brightness +1
N add brightness -1
# }}}
# chapter {{{
PGUP add chapter +1
PGDWN add chapter -1
# }}}
# sub-pos {{{
k add sub-pos -1
K add sub-pos +1
# }}}
# sub-scale {{{
K add sub-scale +0.1
k add sub-scale -0.1
# }}}
# sub-delay {{{
j add sub-delay -0.1
J add sub-delay +0.1
# }}}
# volume {{{
+ add volume +2
- add volume -2
WHEEL_UP add volume +5
WHEEL_DOWN add volume -5 WHEEL_DOWN add volume -5
# }}}
# video-pan {{{
Alt+LEFT add video-pan-x +0.1
Alt+RIGHT add video-pan-x -0.1
Alt+UP add video-pan-y +0.1
Alt+DOWN add video-pan-y -0.1
# }}}
# video-zoom {{{
Alt++ add video-zoom +0.1
Alt+- add video-zoom -0.1
# }}}
# }}}
# multiply {{{
# speed {{{
[ multiply speed 1/1.1
] multiply speed 1.1
{ multiply speed 0.5
} multiply speed 2.0
# }}}
# }}}
# screenshot {{{
s screenshot
S screenshot video
Ctrl+s screenshot window
# }}}
# sub-step {{{
< sub-step -1
> sub-step +1
# }}}
# show-text {{{
? show-text ${playlist}
I show-text ${track-list}
# }}}
# script-binding {{{
i script-binding stats/display-stats-toggle
o script-binding kdialog/open-files
O script-binding kdialog/open-url
T script-binding kdialog/open-subs
c script-binding clipshot/clipshot-subs
C script-binding clipshot/clipshot-video
DEL script-binding osc/visibility
Ctrl+t script-binding misc/show-time
# }}}
# script-message {{{
y script-message osc-visibility never
Y script-message osc-visibility auto
# }}}
# other {{{
b playlist-prev
n playlist-next
f playlist-shuffle
p show-progress
l ab-loop
q stop
Ctrl+q quit
Ctrl+c quit 4
Shift+RIGHT frame-step
Shift+LEFT frame-back-step
# }}}
# ignore {{{
MBTN_LEFT ignore
# }}}
# vim:ft=dosini:fdm=marker:fdl=1:

View File

@ -5,6 +5,13 @@ ao=alsa
# }}} # }}}
# Input {{{
# Disable default key bindings.
input-default-bindings=no
# }}}
# Miscellaneous {{{ # Miscellaneous {{{
# How the player synchronizes audio and video. # How the player synchronizes audio and video.
@ -22,11 +29,14 @@ user-agent="Mozilla/5.0 (X11; Linux x86_64) mpv/0.29.1"
# OSD {{{ # OSD {{{
# Set the duration of the OSD messages in ms. # Set the duration of the OSD messages in ms.
osd-duration=750 osd-duration=2000
# Specify font to use for OSD. # Specify font to use for OSD.
osd-font="Fantasque Sans Mono" osd-font="Fantasque Sans Mono"
# Specify the OSD font size.
osd-font-size=35
# }}} # }}}
# Program Behavior {{{ # Program Behavior {{{
@ -58,7 +68,7 @@ screenshot-format=png
screenshot-png-compression=8 screenshot-png-compression=8
# Specify the filename template used to save screenshots. # Specify the filename template used to save screenshots.
screenshot-template=shot_%F_%p screenshot-template=shot_%F_%wH-%wM-%wS
# }}} # }}}
@ -99,4 +109,3 @@ sub-pos=95
# }}} # }}}
# vim:ft=cfg:fdm=marker:fdl=1: # vim:ft=cfg:fdm=marker:fdl=1:

View File

@ -3,13 +3,13 @@
auto-reload "yes" auto-reload "yes"
# Set the browser command to use when opening an article in the browser. # Set the browser command to use when opening an article in the browser.
browser "firefox -- %u" browser "firefox %u"
# This format specifies the date/time format in the article list. # This format specifies the date/time format in the article list.
datetime-format "%Y-%m-%d" datetime-format "%Y-%m-%d"
# User errors will be logged to this file. # User errors will be logged to this file.
error-log "~/.newsboat/error.log" error-log "~/.local/share/newsboat/error.log"
# Specifies which feed property shall be used for sorting. # Specifies which feed property shall be used for sorting.
feed-sort-order "title" feed-sort-order "title"
@ -18,7 +18,7 @@ feed-sort-order "title"
notify-format "%d new articles" notify-format "%d new articles"
# The configured program will be executed if new articles arrived. # The configured program will be executed if new articles arrived.
notify-program "~/.newsboat/notif.sh" notify-program "~/.config/newsboat/notif.sh"
# The number of parallel reload threads that # The number of parallel reload threads that
# shall be started when all feeds are reloaded. # shall be started when all feeds are reloaded.
@ -58,5 +58,6 @@ highlight article "(https?|ftp)://[^ ]+" color175 color235
highlight article " \\(link\\)$" color235 color235 highlight article " \\(link\\)$" color235 color235
# }}} # }}}
# vim:ft=conf:fdm=marker:fdl=1: include "~/.config/newsboat/filters"
# vim:ft=conf:fdm=marker:fdl=1:

View File

@ -33,4 +33,3 @@ pre = true
progress-bar = pretty progress-bar = pretty
# vim:ft=dosini: # vim:ft=dosini:

View File

@ -11,4 +11,3 @@ useDetailed=true
LANGUAGE=en_GB LANGUAGE=en_GB
# vim:ft=cfg: # vim:ft=cfg:

View File

@ -1,11 +1,6 @@
[pycodestyle] [pycodestyle]
# W391: blank line at end of file
# W504: line break after binary operator # W504: line break after binary operator
# E701: multiple statements on one line (colon) ignore = W504
# E704: multiple statements on one line (def)
# E731: do not assign a lambda expression, use a def
ignore = W391,W504,E701,E704,E731
max_line_length = 80 max_line_length = 80
# vim:ft=cfg: # vim:ft=cfg:

View File

@ -0,0 +1,6 @@
[settings.virtualenvs]
in-project = true
create = true
[repositories.testpypi]
url = "https://test.pypi.org/legacy/"

View File

@ -1,3 +1,5 @@
config, c = config, c
# Default encoding to use for websites. # Default encoding to use for websites.
c.content.default_encoding = 'utf-8' c.content.default_encoding = 'utf-8'
@ -8,9 +10,9 @@ c.content.headers.accept_language = 'en_GB,en'
c.content.headers.user_agent = ' '.join([ c.content.headers.user_agent = ' '.join([
'Mozilla/5.0', 'Mozilla/5.0',
'(X11; Linux x86_64)', '(X11; Linux x86_64)',
'QtWebEngine/5.12.4', 'QtWebEngine/5.13.0',
'Chromium/69.0.3497.128', 'Chromium/73.0.3683.105',
'qutebrowser/1.6.2' 'qutebrowser/1.7.0'
]) ])
# Allow JavaScript to read from or write to the clipboard. # Allow JavaScript to read from or write to the clipboard.
@ -90,8 +92,8 @@ c.url.start_pages = [ # {{{1
# Search engines which can be used via the address bar. # Search engines which can be used via the address bar.
c.url.searchengines = { c.url.searchengines = {
'DEFAULT': c.url.start_pages[0] + '&q={}', 'DEFAULT': c.url.start_pages[0] + '&q={}',
'g': 'https://google.com/?q={}', 'G': 'https://google.com/?q={}',
'q': 'https://qwant.com/?q={}' 'Q': 'https://qwant.com/?q={}'
} }
# Keybindings {{{0 # Keybindings {{{0
@ -103,5 +105,4 @@ config.bind(';M', 'hint links spawn mpv {hint-url}')
# Load autoconfig.yml # Load autoconfig.yml
config.load_autoconfig() config.load_autoconfig()
# vim:fdm=marker:fdl=0:fdt=getline(v\:foldstart): # vim:fdm=marker:fdl=0:

View File

@ -388,4 +388,3 @@ nnoremap Q :quit<CR>
" }}} " }}}
" vim:fdm=marker:fdl=1: " vim:fdm=marker:fdl=1:

View File

@ -1,11 +1,8 @@
# Force resume of partially downloaded files. # Force resume of partially downloaded files.
--continue --continue
# Embed thumbnail in the audio as cover art.
--embed-thumbnail
# Use the specified external downloader. # Use the specified external downloader.
--external-downloader aria2c --external-downloader "aria2c"
# Give these arguments to the external downloader. # Give these arguments to the external downloader.
--external-downloader-args "--file-allocation=none" --external-downloader-args "--file-allocation=none"
@ -20,6 +17,6 @@
--output "%(title)s.%(ext)s" --output "%(title)s.%(ext)s"
# Specify a custom user agent. # Specify a custom user agent.
--user-agent "Mozilla/5.0 (X11; Linux x86_64) youtube-dl/2019.08.13" --user-agent "Mozilla/5.0 (X11; Linux x86_64) youtube-dl/2019.09.12"
# vim:ft=conf: # vim:ft=conf:

View File

@ -114,4 +114,3 @@
} }
] ]
} }

58
.gitattributes vendored
View File

@ -1,29 +1,52 @@
* text=auto linguist-detectable=true # no linguist language for dircolors as of yet
# .config/dircolors linguist-language=dircolors
.gitconfig linguist-language=gitconfig .config/git/config linguist-language=gitconfig
*.json linguist-language=JSON .config/yarn/global/package.json linguist-language=JSON
.config/yay/config.json linguist-language=JSON
.eslintrc.json linguist-language=JSON
.htmlhintrc.json linguist-language=JSON
.pug-lintrc.json linguist-language=JSON
.stylelintrc.json linguist-language=JSON
*.conf linguist-language=INI .config/aria2/aria2.conf linguist-language=INI
config linguist-language=INI .config/ccache.cfg linguist-language=INI
htoprc linguist-language=INI .config/htop/htoprc linguist-language=INI
konsole/* linguist-language=INI .config/konsolerc linguist-language=INI
konsolerc linguist-language=INI .config/mpv/input.conf linguist-language=INI
plasma-localerc linguist-language=INI .config/mpv/mpv.conf linguist-language=INI
pycodestyle linguist-language=INI .config/newsboat/config linguist-language=INI
.config/pip/pip.conf linguist-language=INI
.config/plasma-localerc linguist-language=INI
.config/pycodestyle linguist-language=INI
.config/youtube-dl/config linguist-language=INI
.gnupg/gpg.conf linguist-language=INI
.local/share/konsole/Default.profile linguist-language=INI
.local/share/konsole/Gruvbox8.colorscheme linguist-language=INI
.local/share/konsole/NvimTerm.profile linguist-language=INI
config.py linguist-language=Python .config/qutebrowser/config.py linguist-language=Python
Gemfile linguist-language=Ruby .bash_aliases linguist-language=Shell
.bash_funcs linguist-language=Shell
.bash_profile linguist-language=Shell
.bashrc linguist-language=Shell
.config/aria2/notif.sh linguist-language=Shell
.config/newsboat/notif.sh linguist-language=Shell
.local/arch/init.sh linguist-language=Shell
*.sh linguist-language=Shell .local/arch/packages.aur.txt linguist-language=Text
.bash* linguist-language=Shell .local/arch/packages.repo.txt linguist-language=Text
vifmrc linguist-language=viml .config/pypoetry/config.toml linguist-language=TOML
fonts.conf linguist-language=XML .config/vifm/vifmrc linguist-language=Vim
.clang-* linguist-language=YAML .config/fontconfig/fonts.conf linguist-language=XML
.clang-format linguist-language=YAML
.clang-tidy linguist-language=YAML
# skews the stats due to its size # skews the stats due to its size
.XCompose linguist-language=XCompose linguist-detectable=false .XCompose linguist-language=XCompose linguist-detectable=false
@ -33,4 +56,3 @@ fonts.conf linguist-language=XML
.gitignore linguist-detectable=false .gitignore linguist-detectable=false
LICENSE linguist-detectable=false LICENSE linguist-detectable=false
README.md linguist-detectable=false README.md linguist-detectable=false

6
.gitignore vendored
View File

@ -27,16 +27,11 @@ Videos/
.v8flags* .v8flags*
# Misc commonly generated files # Misc commonly generated files
.bash_history
.zsh_history
.bazaar/ .bazaar/
.dbus/ .dbus/
.dropbox/ .dropbox/
.ICEauthority .ICEauthority
.lesshst .lesshst
.python_history
.sqlite_history
.psql_history
.subversion/ .subversion/
.wine/ .wine/
.Xauthority .Xauthority
@ -54,3 +49,4 @@ Videos/
node_modules/ node_modules/
.yarn/ .yarn/
.yarnrc .yarnrc
.*history

View File

@ -1,5 +1,5 @@
# The message digest algorithm used when signing a key # The message digest algorithm used when signing a key
cert-digest-algo SHA256 cert-digest-algo SHA512
# The default key to sign with # The default key to sign with
default-key C3FC4EB6371B04CC6DDB9EA88A2DEA1DBAEBCA9E default-key C3FC4EB6371B04CC6DDB9EA88A2DEA1DBAEBCA9E
@ -30,5 +30,4 @@ personal-digest-preferences SHA256 SHA512 SHA384 SHA224
photo-viewer "eog %i" photo-viewer "eog %i"
# Use the following options when verifying signatures # Use the following options when verifying signatures
verify-options show-photos verify-options show-photos pka-lookup

View File

@ -66,20 +66,17 @@ unset NAME PACKAGER ARIA WGET
# Install packages via yay {{{ # Install packages via yay {{{
# shellcheck disable=SC2046,SC2086 # shellcheck disable=SC2046,SC2086
_yay() { yay -S --$1 --needed ${*:2} $(<~/.local/arch/packages.$1.txt); } _yay() (yay -S --$1 --needed ${*:2} $(<~/.local/arch/packages.$1.txt))
_yay repo --noconfirm && _yay aur _yay repo --noconfirm && _yay aur
unset -f _yay unset -f _yay
# }}} # }}}
# Install local packages {{{ # Install node packages {{{
pip3 install --user -r ~/.config/pip/requirements.txt yarn global install
pip2 install --user -r ~/.config/pip/requirements.txt
yarn global add # ~/.config/yarn/global/package.json
(cd "$GEM_HOME" && bundle install)
# }}} # }}}
# Download binaries from github {{{ # Download binaries from github {{{
ghdl() { wget https://git.io/"$1" -qO ~/.local/bin/"$2"; chmod +x "$_"; } ghdl() (curl -L https://git.io/"$1" -o ~/.local/bin/"$2"; chmod +x "$_")
ghdl vhMor aria2magnet ghdl vhMor aria2magnet
ghdl fjlNS lnk-parse ghdl fjlNS lnk-parse
unset -f ghdl unset -f ghdl
@ -87,7 +84,7 @@ unset -f ghdl
# Install bash completions {{{ # Install bash completions {{{
DIRECTORY=/etc/bash_completion.d DIRECTORY=/etc/bash_completion.d
raw() { printf 'https://raw.githubusercontent.com/%s' "$1/$2/master/$3"; } raw() (printf 'https://raw.githubusercontent.com/%s' "$1/$2/master/$3")
sudo wget -P "$DIRECTORY" \ sudo wget -P "$DIRECTORY" \
"$(raw mbrubeck android-completion android)" \ "$(raw mbrubeck android-completion android)" \
"$(raw clerk67 ffmpeg-completion ffmpeg)" \ "$(raw clerk67 ffmpeg-completion ffmpeg)" \
@ -101,8 +98,7 @@ grunt --completion=bash | sudo tee \
"$DIRECTORY/grunt-completion.bash" >/dev/null "$DIRECTORY/grunt-completion.bash" >/dev/null
gulp --completion=bash | sudo tee \ gulp --completion=bash | sudo tee \
"$DIRECTORY/gulp-completion.bash" >/dev/null "$DIRECTORY/gulp-completion.bash" >/dev/null
pip completion -b | awk '1;/^complete/{print $0"2"}' | \ pip completion -b | sudo tee "$DIRECTORY/pip-completion.bash" >/dev/null
sudo tee "$DIRECTORY/pip-completion.bash" >/dev/null
unset -f DIRECTORY raw unset -f DIRECTORY raw
# }}} # }}}
@ -124,7 +120,8 @@ sudo -E /tmp/sddm-patema/install.sh
# Configure grub {{{ # Configure grub {{{
THEME=/boot/grub/themes/Lain THEME=/boot/grub/themes/Lain
PARTITION="$(df / | awk 'FNR==2 {print $1}')" SWAP="$(swapon --show=NAME --noheadings)"
SWAP="${SWAP+ resume=$SWAP}"
clone ObserverOfTime/grub2-theme-lain clone ObserverOfTime/grub2-theme-lain
sudo cp -r /tmp/grub2-theme-lain/Lain "$THEME" sudo cp -r /tmp/grub2-theme-lain/Lain "$THEME"
sudo cp /etc/default/grub{,.bak} sudo cp /etc/default/grub{,.bak}
@ -132,7 +129,7 @@ sudo tee /etc/default/grub >/dev/null <<EOF
GRUB_DEFAULT=0 GRUB_DEFAULT=0
GRUB_TIMEOUT=10 GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR="Arch" GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="profile ipv6.disable=1 resume=${PARTITION:?}" GRUB_CMDLINE_LINUX_DEFAULT="profile ipv6.disable=1${SWAP}"
GRUB_CMDLINE_LINUX="" GRUB_CMDLINE_LINUX=""
GRUB_TERMINAL_INPUT=console GRUB_TERMINAL_INPUT=console
GRUB_GFXMODE=1600x1200x24 GRUB_GFXMODE=1600x1200x24
@ -146,10 +143,7 @@ GRUB_FONT=$THEME/fonts/DejaVuSansMono14.pf2
EOF EOF
sudo cp /boot/grub/grub.cfg{,.bak} sudo cp /boot/grub/grub.cfg{,.bak}
sudo grub-mkconfig -o /boot/grub/grub.cfg sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo sed -i /boot/grub/grub.cfg \ unset -f URL THEME SWAP clone
-re "s/(menuentry '.* )Linux -( Fallback')/\1\2/" \
-re "s/(menuentry 'Windows)[^']*'/\1 8.1'/"
unset -f URL THEME PARTITION clone
# }}} # }}}
# Setup neovim {{{ # Setup neovim {{{
@ -188,23 +182,10 @@ Target = usr/bin/firefox-developer-edition
Description = Disabling Firefox downgrade protection Description = Disabling Firefox downgrade protection
When = PostTransaction When = PostTransaction
Exec = /bin/sed -i /usr/bin/firefox-developer-edition \ Exec = /bin/sed -i /usr/bin/firefox-developer-edition \
-e 's/exec/GTK_USE_PORTAl=1 &/;s/"\$@"/-allow-downgrade &/' -e 's/exec/GTK_USE_PORTAL=1 &/;s/"\$@"/-allow-downgrade &/'
EOF EOF
# }}} # }}}
# Create symlinks {{{
WIN_USER=/media/windows/Users/Johnnie
winsl() { ln -s "$WIN_USER/Desktop/$1" "$HOME/${3:-$1}/$2"; }
ln -s ~/.config/yarn/global/node_modules ~/node_modules
ln -s "$WIN_USER" ~/Windows
winsl Pictures WindowsPics
winsl Music WindowsMusic
winsl Videos WindowsVids
winsl Documents WindowsDocs
winsl 'Nerd Stuff/Code' WindowsCode Documents
unset -f WIN_USER winsl
# }}}
# Set tty font {{{ # Set tty font {{{
sudo tee /etc/vconsole.conf >/dev/null <<'EOF' sudo tee /etc/vconsole.conf >/dev/null <<'EOF'
KEYMAP=us KEYMAP=us
@ -217,4 +198,3 @@ sudo mkinitcpio -p linux
# }}} # }}}
# vim:fdm=marker:fdl=0: # vim:fdm=marker:fdl=0:

View File

@ -4,7 +4,6 @@ cfr
clion clion
clion-jre clion-jre
clion-lldb clion-lldb
discord
discord-canary discord-canary
discord-ptb discord-ptb
drawio-desktop-bin drawio-desktop-bin
@ -32,7 +31,6 @@ typora
vale-bin vale-bin
waifu2x-converter-cpp waifu2x-converter-cpp
webp-pixbuf-loader webp-pixbuf-loader
webtorrent-desktop-bin
winetricks-git winetricks-git
yarn-completion-git yarn-completion-git
yay yay

View File

@ -13,6 +13,7 @@ clang
cmake cmake
ctags ctags
desmume desmume
discord
docx2txt docx2txt
dolphin dolphin
dolphin-plugins dolphin-plugins
@ -86,9 +87,9 @@ ppsspp
pygmentize pygmentize
python-isort python-isort
python-netifaces python-netifaces
python-neovim
python-pip python-pip
python-py-cpuinfo python-py-cpuinfo
python-pynvim
python-sphinx python-sphinx
python2-pip python2-pip
qbittorrent qbittorrent

View File

@ -32,4 +32,3 @@ ScrollBarPosition=2
BlinkingCursorEnabled=true BlinkingCursorEnabled=true
# vim:ft=cfg: # vim:ft=cfg:

View File

@ -1,5 +1,10 @@
# Based on lifepillar/vim-gruvbox8 # Based on lifepillar/vim-gruvbox8
[General]
Description=Gruvbox8
Opacity=1.0
Wallpaper=
[Background] [Background]
Color=40,40,40 Color=40,40,40
@ -60,10 +65,4 @@ Color=235,219,178
[ForegroundIntense] [ForegroundIntense]
Color=213,196,161 Color=213,196,161
[General]
Description=Gruvbox8
Opacity=1.0
Wallpaper=
# vim:ft=cfg: # vim:ft=cfg:

View File

@ -30,4 +30,3 @@ ScrollBarPosition=2
BlinkingCursorEnabled=true BlinkingCursorEnabled=true
# vim:ft=cfg: # vim:ft=cfg:

View File

@ -1,6 +1,4 @@
MIT No Attribution Copyright (c) 2018-2019 ObserverOfTime
Copyright (c) 2018 ObserverOfTime
Permission is hereby granted, free of charge, to any person Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation obtaining a copy of this software and associated documentation
@ -16,4 +14,3 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -12,8 +12,8 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [Aria2](https://aria2.github.io/) ## [Aria2](https://aria2.github.io/)
* [.aria2/aria2.conf](.aria2/aria2.conf): configuration file * [.config/aria2/aria2.conf](.config/aria2/aria2.conf): configuration file
* [.aria2/notif.sh](.aria2/notif.sh): `on-bt-download-complete` hook * [.config/aria2/notif.sh](.config/aria2/notif.sh): `on-bt-download-complete` hook
## [Bash](https://www.gnu.org/software/bash/) ## [Bash](https://www.gnu.org/software/bash/)
@ -22,6 +22,10 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
* [.bash\_profile](.bash_profile): login shell configuration file * [.bash\_profile](.bash_profile): login shell configuration file
* [.bashrc](.bashrc): interactive shell configuration file * [.bashrc](.bashrc): interactive shell configuration file
## [Ccache](https://github.com/ccache/ccache)
* [.config/ccache.cfg](.config/ccache.cfg): configuration file
## [Clang](https://clang.llvm.org/) ## [Clang](https://clang.llvm.org/)
* [.clang-format](.clang-format): configuration file for `clang-format` * [.clang-format](.clang-format): configuration file for `clang-format`
@ -29,7 +33,7 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [Coreutils](https://www.gnu.org/software/coreutils/) ## [Coreutils](https://www.gnu.org/software/coreutils/)
* [.dir\_colors](.dir_colors): configuration file for `dircolors` * [.config/dircolors](.config/dircolors): configuration file for `dircolors`
## [ESLint](https://eslint.org/) ## [ESLint](https://eslint.org/)
@ -49,7 +53,7 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [Git](https://git-scm.com/) ## [Git](https://git-scm.com/)
* [.gitconfig](.gitconfig): configuration file * [.config/git/config](.config/git/config): configuration file
## [GnuPG](https://gnupg.org/) ## [GnuPG](https://gnupg.org/)
@ -77,13 +81,17 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [Newsboat](https://newsboat.org/) ## [Newsboat](https://newsboat.org/)
* [.newsboat/config](.newsboat/config): configuration file * [.config/newsboat/config](.config/newsboat/config): configuration file
* [.newsboat/notif.sh](.newsboat/notif.sh): notification wrapper * [.config/newsboat/notif.sh](.config/newsboat/notif.sh): notification wrapper
## [Pip](https://pypi.org/project/pip/) ## [Pip](https://pypi.org/project/pip/)
* [.config/pip/pip.conf](.config/pip/pip.conf): configuration file * [.config/pip/pip.conf](.config/pip/pip.conf): configuration file
## [Poetry](https://github.com/sdispater/poetry)
* [.config/pypoetry/config.toml](.config/pypoetry/config.toml): configuration file
## [Pycodestyle](http://pycodestyle.pycqa.org/en/latest/) ## [Pycodestyle](http://pycodestyle.pycqa.org/en/latest/)
* [.config/pycodestyle](.config/pycodestyle): configuration file * [.config/pycodestyle](.config/pycodestyle): configuration file
@ -102,7 +110,7 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [Vifm](https://vifm.info/) ## [Vifm](https://vifm.info/)
* [.vifm/vifmrc](.vifm/vifmrc): configuration file * [.config/vifm/vifmrc](.config/vifm/vifmrc): configuration file
## [X.Org](https://www.x.org/wiki/) ## [X.Org](https://www.x.org/wiki/)
@ -119,4 +127,3 @@ Managed via [dotfiles.sh](https://github.com/eli-schwartz/dotfiles.sh)
## [Youtube-dl](https://ytdl-org.github.io/youtube-dl/) ## [Youtube-dl](https://ytdl-org.github.io/youtube-dl/)
* [.config/youtube-dl/config](.config/youtube-dl/config): configuration file * [.config/youtube-dl/config](.config/youtube-dl/config): configuration file