updates
This commit is contained in:
@@ -1,27 +0,0 @@
|
|||||||
function fish_prompt --description 'Write out the prompt'
|
|
||||||
set -l last_pipestatus $pipestatus
|
|
||||||
set -l last_status $status
|
|
||||||
set -l normal (set_color normal)
|
|
||||||
|
|
||||||
# Color the prompt differently when we're root
|
|
||||||
set -l color_cwd $fish_color_cwd
|
|
||||||
set -l prefix
|
|
||||||
set -l suffix '>'
|
|
||||||
if contains -- $USER root toor
|
|
||||||
if set -q fish_color_cwd_root
|
|
||||||
set color_cwd $fish_color_cwd_root
|
|
||||||
end
|
|
||||||
set suffix '#'
|
|
||||||
end
|
|
||||||
|
|
||||||
# If we're running via SSH, change the host color.
|
|
||||||
set -l color_host $fish_color_host
|
|
||||||
if set -q SSH_TTY
|
|
||||||
set color_host $fish_color_host_remote
|
|
||||||
end
|
|
||||||
|
|
||||||
# Write pipestatus
|
|
||||||
set -l prompt_status (__fish_print_pipestatus " [" "]" "|" (set_color $fish_color_status) (set_color --bold $fish_color_status) $last_pipestatus)
|
|
||||||
|
|
||||||
echo -n -s (set_color $fish_color_user) "$USER" $normal @ (set_color $color_host) (prompt_hostname) $normal ' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal $prompt_status $suffix " "
|
|
||||||
end
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
# This file contains fish universal variable definitions.
|
|
||||||
# VERSION: 3.0
|
|
||||||
SETUVAR __fish_initialized:3100
|
|
||||||
SETUVAR fish_color_autosuggestion:969896
|
|
||||||
SETUVAR fish_color_cancel:\x2dr
|
|
||||||
SETUVAR fish_color_command:c397d8
|
|
||||||
SETUVAR fish_color_comment:e7c547
|
|
||||||
SETUVAR fish_color_cwd:green
|
|
||||||
SETUVAR fish_color_cwd_root:red
|
|
||||||
SETUVAR fish_color_end:c397d8
|
|
||||||
SETUVAR fish_color_error:d54e53
|
|
||||||
SETUVAR fish_color_escape:00a6b2
|
|
||||||
SETUVAR fish_color_history_current:\x2d\x2dbold
|
|
||||||
SETUVAR fish_color_host:normal
|
|
||||||
SETUVAR fish_color_host_remote:yellow
|
|
||||||
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
|
|
||||||
SETUVAR fish_color_normal:normal
|
|
||||||
SETUVAR fish_color_operator:00a6b2
|
|
||||||
SETUVAR fish_color_param:7aa6da
|
|
||||||
SETUVAR fish_color_quote:b9ca4a
|
|
||||||
SETUVAR fish_color_redirection:70c0b1
|
|
||||||
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
|
|
||||||
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
|
||||||
SETUVAR fish_color_status:red
|
|
||||||
SETUVAR fish_color_user:brgreen
|
|
||||||
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
|
||||||
SETUVAR fish_greeting:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell\x0aType\x20\x60help\x60\x20for\x20instructions\x20on\x20how\x20to\x20use\x20fish
|
|
||||||
SETUVAR fish_key_bindings:fish_default_key_bindings
|
|
||||||
SETUVAR fish_pager_color_completion:normal
|
|
||||||
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
|
|
||||||
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
|
||||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
|
||||||
SETUVAR fish_user_paths:/home/hjalmarlucius/\x2efzf/bin
|
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
# For explanations of all config options below see docs/USAGE.md or the man page.
|
# For explanations of all config options below see docs/USAGE.md or the man page.
|
||||||
#
|
#
|
||||||
sync_dir="/mnt/OneDrive"
|
sync_dir="/mnt/OneDrive"
|
||||||
skip_dir="Programming/logs|Bilder/Camera Roll|Backup|Datasets|Pictures|Videos|Music|Library|Research*|*/__pycache__|*/.ipynb_checkpoints|*/.mypy_cache"
|
skip_dir="Bilder/Camera Roll|Backup|Datasets|Pictures|Videos|*/_*|*/.*"
|
||||||
skip_file="*.tmp|.~*|~*"
|
skip_file="*.*|.~*|~*"
|
||||||
# monitor_interval = "45"
|
# monitor_interval = "45"
|
||||||
# skip_dir = "Videos"
|
# skip_dir = "Videos"
|
||||||
# log_dir = "/var/log/onedrive/"
|
# log_dir = "/var/log/onedrive/"
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
# For explanations of all config options below see docs/USAGE.md or the man page.
|
# For explanations of all config options below see docs/USAGE.md or the man page.
|
||||||
#
|
#
|
||||||
sync_dir="/mnt/OneDrive"
|
sync_dir="/mnt/OneDrive"
|
||||||
skip_dir="Programming/logs|Bilder/Camera Roll|Backup|Datasets|Pictures|Videos|*/__pycache__|*/.ipynb_checkpoints|*/.mypy_cache"
|
skip_dir="*/_*|*/.*"
|
||||||
skip_file="*.tmp|.~*|~*"
|
skip_file="*.*|.~*|~*"
|
||||||
# monitor_interval = "45"
|
# monitor_interval = "45"
|
||||||
# skip_dir = "Videos"
|
# skip_dir = "Videos"
|
||||||
# log_dir = "/var/log/onedrive/"
|
# log_dir = "/var/log/onedrive/"
|
||||||
|
|||||||
-121
@@ -1,121 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# ranger supports enhanced previews. If the option "use_preview_script"
|
|
||||||
# is set to True and this file exists, this script will be called and its
|
|
||||||
# output is displayed in ranger. ANSI color codes are supported.
|
|
||||||
|
|
||||||
# NOTES: This script is considered a configuration file. If you upgrade
|
|
||||||
# ranger, it will be left untouched. (You must update it yourself.)
|
|
||||||
# Also, ranger disables STDIN here, so interactive scripts won't work properly
|
|
||||||
|
|
||||||
# Meanings of exit codes:
|
|
||||||
# code | meaning | action of ranger
|
|
||||||
# -----+------------+-------------------------------------------
|
|
||||||
# 0 | success | success. display stdout as preview
|
|
||||||
# 1 | no preview | failure. display no preview at all
|
|
||||||
# 2 | plain text | display the plain content of the file
|
|
||||||
# 3 | fix width | success. Don't reload when width changes
|
|
||||||
# 4 | fix height | success. Don't reload when height changes
|
|
||||||
# 5 | fix both | success. Don't ever reload
|
|
||||||
# 6 | image | success. display the image $cached points to as an image preview
|
|
||||||
# 7 | image | success. display the file directly as an image
|
|
||||||
|
|
||||||
# Meaningful aliases for arguments:
|
|
||||||
path="$1" # Full path of the selected file
|
|
||||||
width="$2" # Width of the preview pane (number of fitting characters)
|
|
||||||
height="$3" # Height of the preview pane (number of fitting characters)
|
|
||||||
cached="$4" # Path that should be used to cache image previews
|
|
||||||
preview_images="$5" # "True" if image previews are enabled, "False" otherwise.
|
|
||||||
|
|
||||||
maxln=200 # Stop after $maxln lines. Can be used like ls | head -n $maxln
|
|
||||||
|
|
||||||
# Find out something about the file:
|
|
||||||
mimetype=$(file --mime-type -Lb "$path")
|
|
||||||
extension=$(/bin/echo "${path##*.}" | awk '{print tolower($0)}')
|
|
||||||
|
|
||||||
# Functions:
|
|
||||||
# runs a command and saves its output into $output. Useful if you need
|
|
||||||
# the return value AND want to use the output in a pipe
|
|
||||||
try() { output=$(eval '"$@"'); }
|
|
||||||
|
|
||||||
# writes the output of the previously used "try" command
|
|
||||||
dump() { /bin/echo "$output"; }
|
|
||||||
|
|
||||||
# a common post-processing function used after most commands
|
|
||||||
trim() { head -n "$maxln"; }
|
|
||||||
|
|
||||||
# wraps highlight to treat exit code 141 (killed by SIGPIPE) as success
|
|
||||||
safepipe() { "$@"; test $? = 0 -o $? = 141; }
|
|
||||||
|
|
||||||
# Image previews, if enabled in ranger.
|
|
||||||
if [ "$preview_images" = "True" ]; then
|
|
||||||
case "$mimetype" in
|
|
||||||
# Image previews for SVG files, disabled by default.
|
|
||||||
image/svg+xml)
|
|
||||||
convert "$path" "$cached" && exit 6 || exit 1;;
|
|
||||||
# Image previews for image files. w3mimgdisplay will be called for all
|
|
||||||
# image files (unless overriden as above), but might fail for
|
|
||||||
# unsupported types.
|
|
||||||
image/*)
|
|
||||||
exit 7;;
|
|
||||||
# Image preview for video, disabled by default.:
|
|
||||||
video/*)
|
|
||||||
ffmpegthumbnailer -i "$path" -o "$cached" -s 0 && exit 6 || exit 1;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$extension" in
|
|
||||||
# Archive extensions:
|
|
||||||
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
|
|
||||||
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
|
|
||||||
try als "$path" && { dump | trim; exit 0; }
|
|
||||||
try acat "$path" && { dump | trim; exit 3; }
|
|
||||||
try bsdtar -lf "$path" && { dump | trim; exit 0; }
|
|
||||||
exit 1;;
|
|
||||||
rar)
|
|
||||||
# avoid password prompt by providing empty password
|
|
||||||
try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;
|
|
||||||
7z)
|
|
||||||
# avoid password prompt by providing empty password
|
|
||||||
try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;;
|
|
||||||
# PDF documents:
|
|
||||||
pdf)
|
|
||||||
try pdftotext -l 10 -nopgbrk -q "$path" - && \
|
|
||||||
{ dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
|
|
||||||
# BitTorrent Files
|
|
||||||
torrent)
|
|
||||||
try transmission-show "$path" && { dump | trim; exit 5; } || exit 1;;
|
|
||||||
# ODT Files
|
|
||||||
odt|ods|odp|sxw)
|
|
||||||
try odt2txt "$path" && { dump | trim; exit 5; } || exit 1;;
|
|
||||||
# HTML Pages:
|
|
||||||
htm|html|xhtml)
|
|
||||||
try w3m -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
|
|
||||||
try lynx -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
|
|
||||||
try elinks -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
|
|
||||||
;; # fall back to highlight/cat if the text browsers fail
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$mimetype" in
|
|
||||||
# Syntax highlight for text files:
|
|
||||||
text/* | */xml)
|
|
||||||
if [ "$(tput colors)" -ge 256 ]; then
|
|
||||||
pygmentize_format=terminal256
|
|
||||||
highlight_format=xterm256
|
|
||||||
else
|
|
||||||
pygmentize_format=terminal
|
|
||||||
highlight_format=ansi
|
|
||||||
fi
|
|
||||||
try safepipe highlight --out-format=${highlight_format} "$path" && { dump | trim; exit 5; }
|
|
||||||
try safepipe pygmentize -f ${pygmentize_format} "$path" && { dump | trim; exit 5; }
|
|
||||||
exit 2;;
|
|
||||||
# Ascii-previews of images:
|
|
||||||
image/*)
|
|
||||||
img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;
|
|
||||||
# Display information about media files:
|
|
||||||
video/* | audio/*)
|
|
||||||
exiftool "$path" && exit 5
|
|
||||||
# Use sed to remove spaces so the output fits into the narrow window
|
|
||||||
try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
+6
-5
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
|
|
||||||
! font config
|
! font config
|
||||||
URxvt.font: xft:hack:size=12
|
URxvt.font: xft:hack:size=10
|
||||||
URxvt.boldFont: xft:hack:size=12:bold
|
URxvt.boldFont: xft:hack:size=10:bold
|
||||||
URxvt.italicFont: xft:hack:size=12:italic
|
URxvt.italicFont: xft:hack:size=10:italic
|
||||||
URxvt.boldItalicFont: xft:hack:size=12:bolditalic
|
URxvt.boldItalicFont: xft:hack:size=10:bolditalic
|
||||||
! xft:SauceCodePro Nerd Font
|
! xft:SauceCodePro Nerd Font
|
||||||
! xft:Inconsolata for Powerline
|
! xft:Inconsolata for Powerline
|
||||||
! xft:Droid Sans Mono for Powerline
|
! xft:Droid Sans Mono for Powerline
|
||||||
@@ -23,6 +23,7 @@ URxvt.keysym.Shift-Control-V: eval:paste_clipboard
|
|||||||
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
|
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
|
||||||
|
|
||||||
! font config
|
! font config
|
||||||
|
Xft.dpi: 108
|
||||||
Xft.antialias: true
|
Xft.antialias: true
|
||||||
Xft.hinting: true
|
Xft.hinting: true
|
||||||
Xft.rgba: rgb
|
Xft.rgba: rgb
|
||||||
@@ -35,7 +36,7 @@ Xft.lcdfilter: lcddefault
|
|||||||
*fadeColor: black
|
*fadeColor: black
|
||||||
|
|
||||||
! cursor when hovering
|
! cursor when hovering
|
||||||
Xcursor.theme: Maia-Cursor
|
Xcursor.theme: Maia-Cursor
|
||||||
Xcursor.size: 0
|
Xcursor.size: 0
|
||||||
|
|
||||||
! settings
|
! settings
|
||||||
|
|||||||
+1
-1
@@ -67,7 +67,7 @@ ChallengeResponseAuthentication no
|
|||||||
#KerberosGetAFSToken no
|
#KerberosGetAFSToken no
|
||||||
|
|
||||||
# GSSAPI options
|
# GSSAPI options
|
||||||
GSSAPIAuthentication no
|
# GSSAPIAuthentication no
|
||||||
#GSSAPICleanupCredentials yes
|
#GSSAPICleanupCredentials yes
|
||||||
|
|
||||||
# Set this to 'yes' to enable PAM authentication, account processing,
|
# Set this to 'yes' to enable PAM authentication, account processing,
|
||||||
|
|||||||
Reference in New Issue
Block a user