Setting up lf

This commit is contained in:
2021-05-23 20:32:50 +01:00
parent 8b109fc010
commit bc8d62e90b
9 changed files with 50 additions and 10 deletions

View File

@@ -76,8 +76,8 @@ map J $lf -remote "send $id cd $(cut -d' ' -f2 ${XDG_CONFIG_HOME:-$HOME/.config}
map gh
map g top
map D delete
map E extract
map C copyto
map zx extract
map cp copyto
map M moveto
map <c-n> push :mkdir<space>
map <c-r> reload
@@ -89,7 +89,7 @@ map o &mimeopen $f
map O $mimeopen --ask $f
map A rename # at the very end
map c push A<c-u> # new rename
#map c push A<c-u> # new rename
map I push A<c-a> # at the very beginning
map i push A<a-b><a-b><a-f> # before extension
map a push A<a-b> # after extension

8
.config/lf/scope Normal file → Executable file
View File

@@ -32,9 +32,9 @@ HIGHLIGHT_STYLE='pablo'
handle_mime() {
local mimetype="${1}"
case "${mimetype}" in
text/html) w3m -dump "${FILE_PATH}" ;;
text/troff) man ./ "${FILE_PATH}" | col -b ;;
text/* | */xml)
text/html) w3m -dump "${FILE_PATH}" ;;
text/troff) man ./ "${FILE_PATH}" | col -b ;;
text/* | */xml)
if [ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]; then
exit 2
fi
@@ -45,7 +45,7 @@ handle_mime() {
fi
highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
--style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" ;;
application/zip) atool --list -- "${FILE_PATH}" ;;
application/zip) atool --list -- "${FILE_PATH}" ;;
image/*) chafa --fill=block --symbols=block -c 256 -s 80x"${HEIGHT}" "${FILE_PATH}" || exit 1;;
video/* | audio/*|application/octet-stream) mediainfo "${FILE_PATH}" || exit 1;;
*/pdf) pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - ;;

View File

@@ -4,6 +4,8 @@ D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
d ${XDG_DOCUMENTS_DIR:-$HOME/Tower/Documents}
dt ${XDG_DATA_HOME:-$HOME/.local/share}
h $HOME
l $HOME/Tower/Library
r $HOME/Tower/Resources
m ${XDG_MUSIC_DIR:-$HOME/Tower/Music}
mn /mnt
pp ${XDG_PICTURES_DIR:-$HOME/Tower/Pictures}

View File

@@ -1,4 +1,4 @@
$inclue /etc/inputrc
$include /etc/inputrc
set editing-mode vi
$if mode=vi

View File

@@ -12,9 +12,13 @@ if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/.DPI" ]; then
fi
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export $(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gpg)
dbus-update-activation-environment --systemd DISPLAY
export SSH_AUTH_SOCK
setbg "$HOME/.local/wallpapers" & # set the background
#source /etc/X11/xinit/xinitrc.d/50-systemd-user.h
setbg "$HOME/.local/share/wallpapers/" & # set the background
enpass & # start password manager
nextcloud & # start Nextcloud
xcompmgr & # xcompmgr for transparency

View File

@@ -17,4 +17,8 @@ done
echo "Password set successfuly"
./ssh
./setupssh
./setupdev
./setupwacom
./setupmaptool
./setupkeyring

14
.local/bin/setup/setupdev Executable file
View File

@@ -0,0 +1,14 @@
#! /bin/bash
mkdir "$HOME/Code"
mkdir "$HOME/Code/DevOps" # For server and computer admin
mkdir "$HOME/Code/FSharp"
mkdir "$HOME/Code/JavaScript"
mkdir "$HOME/Code/Scala"
mkdir "$HOME/Code/Rust"
mkdir "$HOME/Code/PHP"
mkdir "$HOME/Code/Tutorials" # For doing tutorials/courses
mkdir "$HOME/Code/Websites" # Websites in any language
mkdir "$HOME/Code/MobileApps" # Websites in any language
mkdir "$HOME/Code/Tests" # Small test files/scripts

11
.local/bin/setup/setupjoplin Executable file
View File

@@ -0,0 +1,11 @@
#! /bin/bash
TOWER=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "Scarif: Tower" 2>&1)
TOWERUN=$(echo "$TOWER" | grep -Po "(?<=login: )\w+")
TOWERPW=$(echo "$TOWER" | grep -Po "(?<=pass : ).+(?=\")")
joplin config sync.target 5
joplin config sync.5.path https://tower.scarif.space/remote.php/dav/files/chris/Joplin
joplin config sync.5.username "$TOWERUN"
joplin config sync.5.password "$TOWERPW"
joplin sync

5
.local/bin/setup/setupkeyring Executable file
View File

@@ -0,0 +1,5 @@
#! /bin/bash
# Start gnome keyring at login
sudo -A sed -i '/auth include system-local-login/a auth optional pam_gnome_keyring.so' /etc/pam.d/login
sudo -A sed -i '/session include system-local-login/a session optional pam_gnome_keyring.so auto_start' /etc/pam.d/login