aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/lf/lfrc55
-rwxr-xr-xconfig/lf/previewer.sh6
m---------config/nvim0
-rw-r--r--config/qutebrowser/quickmarks1
-rw-r--r--config/zsh/aliases/dev.zsh11
-rw-r--r--config/zsh/aliases/edit.zsh1
-rw-r--r--config/zsh/aliases/ls.zsh21
7 files changed, 37 insertions, 58 deletions
diff --git a/config/lf/lfrc b/config/lf/lfrc
index 952762a..3a9b26d 100644
--- a/config/lf/lfrc
+++ b/config/lf/lfrc
@@ -1,5 +1,4 @@
set hidden true
-# set color256 true
set drawbox true
set icons true
set ignorecase true
@@ -9,35 +8,17 @@ set ratios 2:3
set preview false
set previewer ~/.config/lf/previewer.sh
-# Function definitions {{{
-cmd open_inplace ${{
- case $(file --mime-type "$f" -bL) in
- text/*|application/json) $EDITOR "$fx" 2&> /dev/null ;;
- video/*) setsid -f swallow mpv "$f" 2&> /dev/null ;;
- image/gif) setsid -f swallow mpv "$f" 2&> /dev/null ;;
- image/*) setsid -f swallow sxiv "$f" 2&> /dev/null ;;
- application/pdf) setsid -f swallow zathura "$f" 2&> /dev/null ;;
- *)
- for f in "$fx"; do
- ~/scripts/bin/open "$f"
- done
- ;;
- esac;
- disown;
-}}
-
-cmd open ${{
+cmd open_internal ${{
case $(file --mime-type "$f" -bL) in
text/*|application/json) $EDITOR "$fx" ;;
- video/*|application/pdf) ~/scripts/bin/open "$f" & ;;
- *)
- for f in "$fx"; do
- ~/scripts/bin/open "$f"
- done
- ;;
+ video/*|application/pdf) ~/scripts/bin/open "$f" >/dev/null 2>&1 & ;;
+ *) for f in "$fx"; do
+ ~/scripts/bin/open "$f" 2>/dev/null
+ done ;;
esac;
- disown;
+ disown 2>/dev/null;
}}
+cmd open open_internal
cmd mkdir ${{
printf "Directory Name: "
@@ -61,16 +42,14 @@ cmd move_to_trash ${{
cmd rename %{{
printf " Rename to: "
read ans
- mv "$f" "$ans"
+ mv -i "$f" "$ans"
}}
-cmd set_wallpaper $feh --bg-scale "$f"
-
cmd show_images ${{
if [ "$(echo "$fx" | wc -l)" = "1" ]; then
- swallow sxiv $(dirname "$fx") &
+ sxiv $(dirname "$fx") &
else
- swallow sxiv $fx &
+ sxiv $fx &
fi;
}}
@@ -95,23 +74,23 @@ map x cut
map y copy
map mf mkfile
map md mkdir
-map wp set_wallpaper
map rr rename
# View changes
-map <enter> open_inplace
+map <enter> open_internal
+map <c-o> open_internal
map si show_images
-map du $du -h -d1 | less
-map sh :set hidden!
-map st :set sortby time
+map . :set hidden!
+map st :set sortby time; set info time
+map ss :set sortby size; set info size
# Traversal keys
-map gde cd ~/Desktop
map gdl cd ~/Downloads/dl
map gdm cd ~/Downloads/music
map gdv cd ~/dev
-map gs cd ~/scripts
+map gdp cd ~/dump
map gp cd ~/Pictures
+map gmnt cd /run/media/imsohexy
diff --git a/config/lf/previewer.sh b/config/lf/previewer.sh
index 1b748e1..05a1f34 100755
--- a/config/lf/previewer.sh
+++ b/config/lf/previewer.sh
@@ -22,7 +22,7 @@ case "$1" in
# Docs
*.md|*.org) glow -s dark "$1" ;;
- *.csv) cat "$1" | sed s/,/\\n/g ;;
+ *.csv) cat "$1" | sed 's/,/ \| /g' ;;
*.pdf) pdftotext "$1" - ;;
*.docx) docx2txt "$1" - ;;
*.epub) mediainfo "$1" ;;
@@ -41,10 +41,10 @@ case "$1" in
;;
# Video
- *.avi|*.mp4|*.wmv|*.dat|*.3gp|*.ogv|*.mkv|*.mpg|*.mpeg|*.vob|*.fl[icv]|*.m2v|*.mov|*.webm|*.ts|*.mts|*.m4v|*.r[am]|*.qt|*.divx)
+ *.avi|*.mp4|*.wmv|*.dat|*.3gp|*.ogv|*.mkv|*.mpg|*.mpeg|*.vob|*.fl[icv]|*.m2v|*.mov|*.webm|*.mts|*.m4v|*.r[am]|*.qt|*.divx)
mediainfo "$1";
;;
# Syntax
- *) highlight --out-format ansi "$1" || cat "$1" ;;
+ *) bat --color always "$1" || cat "$1" ;;
esac
diff --git a/config/nvim b/config/nvim
-Subproject 96a52f23557715ac4d14922a675be95e63711f4
+Subproject d8335c8214717bb718b3ef60d0dac81d9ab2e4c
diff --git a/config/qutebrowser/quickmarks b/config/qutebrowser/quickmarks
index 8ac3fb0..a5c1b35 100644
--- a/config/qutebrowser/quickmarks
+++ b/config/qutebrowser/quickmarks
@@ -1,3 +1,4 @@
Whatsapp https://web.whatsapp.com/
Gmail:personal https://mail.google.com/mail/u/0
Gmail:colabra https://mail.google.com/mail/u/1
+Twitch:dashboard https://dashboard.twitch.tv/u/ediblemonad/stream-manager
diff --git a/config/zsh/aliases/dev.zsh b/config/zsh/aliases/dev.zsh
index 083fa3e..793d823 100644
--- a/config/zsh/aliases/dev.zsh
+++ b/config/zsh/aliases/dev.zsh
@@ -6,15 +6,6 @@ alias aws="docker run --rm -it amazon/aws-cli"
# nix shell with zsh
nix-zsh() { nix-shell --run "WITH_NIX_PREFIX='${NX_PREFIX:-':'}' zsh" "$@"; }
-# shell for node 14
-with_node_14() { NX_PREFIX="node14" nix-zsh -p nodejs-14_x "$@"; }
-
-# shell for docker-compose
-with_dcomp() { TMPDIR=$HOME/dump/tempdir NX_PREFIX=docker-compose nix-zsh -p docker-compose; }
-
-# npm run for node_14
-nrx() { with_node_14 --run "npm run $*"; }
-
# :: Filename Pattern Replacetext
far() {
local file_r="$1"; shift;
@@ -88,7 +79,7 @@ p__enter_nixshell() {
return 0;
else
echo "";
- echo "ERR: default.nix already exists in directory";
+ echo "ERR: No default.nix or shell.nix in directory";
zle send-break;
return 1;
fi;
diff --git a/config/zsh/aliases/edit.zsh b/config/zsh/aliases/edit.zsh
index 5b0d1bc..fe14d92 100644
--- a/config/zsh/aliases/edit.zsh
+++ b/config/zsh/aliases/edit.zsh
@@ -13,3 +13,4 @@ alias equte='gqute && sensible-editor config.py';
alias eas='sensible-editor ~/nixos/packages/dwm/autostart.sh';
alias emime="sensible-editor ~/nixos/scripts/bin/open";
+alias fedit='sensible-editor `fzf`'
diff --git a/config/zsh/aliases/ls.zsh b/config/zsh/aliases/ls.zsh
index b199563..88fabf0 100644
--- a/config/zsh/aliases/ls.zsh
+++ b/config/zsh/aliases/ls.zsh
@@ -11,12 +11,19 @@ alias la='ls -A';
alias lsize='du -h -d1';
lc () { # lf with cd to navigated directory on quit
- tmp="$(mktemp)"
- lf -last-dir-path="$tmp" "$@"
- if [ -f "$tmp" ]; then
- dir="$(cat "$tmp")"
- rm -f "$tmp"
- [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
- fi
+ tmp="$(mktemp)"
+ lf -last-dir-path="$tmp" "$@"
+ if [ -f "$tmp" ]; then
+ dir="$(cat "$tmp")"
+ rm -f "$tmp"
+ [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
+ fi
}
+lfshow() {
+ local TMP_F="$(mktemp)";
+ lf -selection-path "$TMP_F" "$@" >/dev/null 2>&1;
+ local res="$(< "$TMP_F")";
+ rm -f "$TMP_F";
+ echo "$res"
+}