From 9b667c9143928ca93b40250b18cbf628ba968ab6 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Wed, 28 Feb 2024 11:56:18 +0100 Subject: Ranger JSON preview; sxhkd window resizing. --- stow/XserverDotfiles/.xinitrcgnome | 3 ++- stow/dunst/.config/dunst/dunstrc | 27 ++++++++++++++++------ stow/ranger/.config/ranger/rc.conf | 2 +- stow/ranger/.config/ranger/scope.sh | 44 ++++++++++++++++++++---------------- stow/rcs/.config/rcs/bash_aliases | 7 ++++-- stow/rcs/.config/rcs/bash_vars | 2 ++ stow/sxhkd/.config/sxhkd/sxhkdrc | 11 +++++++-- stow/sxhkd/.config/sxhkd/sxhkdrcbspc | 2 +- stow/vim/.vim/ftplugin/sh/sh.vim | 4 ++-- stow/vim/.vim/rc/vimwiki.vim | 3 +++ 10 files changed, 70 insertions(+), 35 deletions(-) diff --git a/stow/XserverDotfiles/.xinitrcgnome b/stow/XserverDotfiles/.xinitrcgnome index 74f16d6..a91de61 100644 --- a/stow/XserverDotfiles/.xinitrcgnome +++ b/stow/XserverDotfiles/.xinitrcgnome @@ -1,3 +1,4 @@ export XDG_SESSION_TYPE=x11 export GDK_BACKEND=x11 -xinit.sh; exec gnome-session +#xinit.sh +exec gnome-session diff --git a/stow/dunst/.config/dunst/dunstrc b/stow/dunst/.config/dunst/dunstrc index 1d0403e..29a45f7 100644 --- a/stow/dunst/.config/dunst/dunstrc +++ b/stow/dunst/.config/dunst/dunstrc @@ -2,21 +2,26 @@ monitor = 0 follow = keyboard #geometry = "500x5-25+20" + origin = top-right + offset = 30x30 indicate_hidden = yes shrink = yes transparency = 0 #notification_height = 0 separator_height = 2 - padding = 8 - horizontal_padding = 8 - frame_width = 3 + padding = 12 + horizontal_padding = 20 frame_color = "#000000" + frame_width = 2 + corner_radius = 5 separator_color = frame + gap_size = 6 sort = yes idle_threshold = 120 + width = (50, 5000) ### Text ### - font = Inconsolata 10 + font = Inconsolata 12 line_height = 0 markup = full format = "%s\n%b" @@ -30,10 +35,16 @@ show_indicators = yes ### Icons ### - icon_position = off - #max_icon_size = 128 + icon_position = left + max_icon_size = 128 + icon_corner_radius = 5 #icon_path = /usr/share/icons/hicolor/16x16/status/:/usr/share/icons/hicolor/16x16/devices/ + ### Progress bar ### + progress_bar_height = 16 + progress_bar_max_width = 5000 + progress_bar_frame_width = 2 + ### History ### sticky_history = yes history_length = 20 @@ -68,9 +79,11 @@ [urgency_normal] #background = "#285577" # default #foreground = "#ffffff" # default + frame_color = "#447090" background = "#2e3440" - #foreground = "#81a1c1" foreground = "#88c0d0" + #highlight = "#88c0d0" + highlight = "#3ded97" timeout = 5 [urgency_critical] diff --git a/stow/ranger/.config/ranger/rc.conf b/stow/ranger/.config/ranger/rc.conf index d5e1f05..5256c6e 100644 --- a/stow/ranger/.config/ranger/rc.conf +++ b/stow/ranger/.config/ranger/rc.conf @@ -254,7 +254,7 @@ alias travel scout -aefiklst # Custom map ,b bulkrename map ,d shell rm.sh %s -map ,s shell tmux split-window -p 60 -c %d & +map ,s shell tmux split-window -l '30' -c %d & map ,S shell tmux new-window -a -n shell -c %d & map ,e shell tmux new-window -a -n $EDITOR "$EDITOR %s" map ,w shell setWP.sh %f & diff --git a/stow/ranger/.config/ranger/scope.sh b/stow/ranger/.config/ranger/scope.sh index 17fa0e0..538f044 100755 --- a/stow/ranger/.config/ranger/scope.sh +++ b/stow/ranger/.config/ranger/scope.sh @@ -289,6 +289,31 @@ handle_mime() { xls2csv -- "${FILE_PATH}" && exit 5 exit 1;; + ## DjVu + image/vnd.djvu) + ## Preview as text conversion (requires djvulibre) + djvutxt "${FILE_PATH}" | fmt -w "${PV_WIDTH}" && exit 5 + exiftool "${FILE_PATH}" && exit 5 + exit 1;; + + ## Image + image/*) + ## Preview as text conversion + # img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4 + exiftool "${FILE_PATH}" && exit 5 + exit 1;; + + ## Video and audio + video/* | audio/*) + mediainfo "${FILE_PATH}" && exit 5 + exiftool "${FILE_PATH}" && exit 5 + exit 1;; + + ## JSON + */json) + jq --color-output . <"${FILE_PATH}" && exit 5 + exit 1;; + ## Text text/* | */xml) ## Syntax highlight @@ -311,25 +336,6 @@ handle_mime() { -- "${FILE_PATH}" && exit 5 exit 2;; - ## DjVu - image/vnd.djvu) - ## Preview as text conversion (requires djvulibre) - djvutxt "${FILE_PATH}" | fmt -w "${PV_WIDTH}" && exit 5 - exiftool "${FILE_PATH}" && exit 5 - exit 1;; - - ## Image - image/*) - ## Preview as text conversion - # img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4 - exiftool "${FILE_PATH}" && exit 5 - exit 1;; - - ## Video and audio - video/* | audio/*) - mediainfo "${FILE_PATH}" && exit 5 - exiftool "${FILE_PATH}" && exit 5 - exit 1;; esac } diff --git a/stow/rcs/.config/rcs/bash_aliases b/stow/rcs/.config/rcs/bash_aliases index 1b021f1..2591899 100644 --- a/stow/rcs/.config/rcs/bash_aliases +++ b/stow/rcs/.config/rcs/bash_aliases @@ -52,7 +52,10 @@ alias syu="sudo pacman -Syu" alias upgrade="sudo pacman -Syu" alias starwars="telnet towel.blinkenlights.nl" -alias adormir="mpv -vo caca ~/videos/Adormir.mp4 && clear 2>/dev/null" -alias adormirloop="mpv --loop-file -vo caca ~/videos/Adormir.mp4 2>/dev/null && clear" +alias adormir="mpv ~/media/videos/Adormir.mp4" +alias adormirs="mpv ~/media/videos/Adormir.mp4 && poweroff" +alias adormirloop="mpv --loop-file ~/media/videos/Adormir.mp4 2>/dev/null && clear" +alias adormirterm="mpv -vo caca ~/media/videos/Adormir.mp4 && clear 2>/dev/null" +alias adormirloopterm="mpv --loop-file -vo caca ~/media/videos/Adormir.mp4 2>/dev/null && clear" alias nintendos="mpv -vo caca https://www.youtube.com/watch?v=hYNcJj2QDhk 2>/dev/null" alias netris="ssh netris.rocketnine.space" diff --git a/stow/rcs/.config/rcs/bash_vars b/stow/rcs/.config/rcs/bash_vars index 75b2e97..8efbf5b 100644 --- a/stow/rcs/.config/rcs/bash_vars +++ b/stow/rcs/.config/rcs/bash_vars @@ -11,6 +11,8 @@ export BROWSER="qutebrowser" export READER="zathura" export VIEWER="sxiv" +export TMUX_URL_SELECT_OPEN_CMD='qutebrowser' + export GPG_TTY="$(tty)" # Default installation place by the Arch plantuml package diff --git a/stow/sxhkd/.config/sxhkd/sxhkdrc b/stow/sxhkd/.config/sxhkd/sxhkdrc index cb0606f..31f2e85 100644 --- a/stow/sxhkd/.config/sxhkd/sxhkdrc +++ b/stow/sxhkd/.config/sxhkd/sxhkdrc @@ -65,7 +65,12 @@ XF86Audio{Prev,Next} super + alt + m cmusShow.sh -## Programs +# Resize windows + +super + {minus,plus} + setWindowSize.sh -{p,n} + +# Programs super + q qutebrowser @@ -111,6 +116,8 @@ super + e super + shift + e emoji.sh -g +# Misc + super + shift + m dmenuMount.sh @@ -124,7 +131,7 @@ super + shift + b btConnect.sh -d super + control + shift + c - notify-send "$(fortune)" + notify-send -t 20000 "$(fortune)" super + y surfraw.sh diff --git a/stow/sxhkd/.config/sxhkd/sxhkdrcbspc b/stow/sxhkd/.config/sxhkd/sxhkdrcbspc index d231aae..0f1ff0b 100644 --- a/stow/sxhkd/.config/sxhkd/sxhkdrcbspc +++ b/stow/sxhkd/.config/sxhkd/sxhkdrcbspc @@ -81,4 +81,4 @@ super + shift + q # Notify number of windows super + c - dunstify -r "$(dunstifyIDs.sh "bspwmRunningStuff")" -t 1000 "Running stuff" "bspwm nodes:\n$(bspc query -N any.leaf.window | wc -l)\ntmux sessions:\n$(tmux list-sessions | cut -d':' -f1)" + dunstify -r "$(dunstifyIDs.sh bspwmRunningStuff)" -t 10000 "Running stuff" "bspwm nodes:\n$(bspc query -N any.leaf.window | wc -l)\ntmux sessions:\n$(tmux list-sessions | cut -d':' -f1)" diff --git a/stow/vim/.vim/ftplugin/sh/sh.vim b/stow/vim/.vim/ftplugin/sh/sh.vim index 11ecb48..b9ce4a3 100644 --- a/stow/vim/.vim/ftplugin/sh/sh.vim +++ b/stow/vim/.vim/ftplugin/sh/sh.vim @@ -12,8 +12,8 @@ let mapleader = " " nnoremap C :sp ~/.vim/ftplugin/sh/sh.vim nnoremap +x :!chmod 744 % -nnoremap x :w:!./% -nnoremap X :w:!./% +nnoremap x :w:!tmux new-window './% \| less' +nnoremap X :w:!tmux new-window './% \| less' let mapleader = "," diff --git a/stow/vim/.vim/rc/vimwiki.vim b/stow/vim/.vim/rc/vimwiki.vim index fe58c00..7ef5671 100644 --- a/stow/vim/.vim/rc/vimwiki.vim +++ b/stow/vim/.vim/rc/vimwiki.vim @@ -13,6 +13,9 @@ let g:vimwiki_list = [{'path': '~/docs/notas/', \'diary_header': 'Diario', \'diary_index': 'index'}, \ {'path': '~/docs/vimwiki/', + \'syntax': 'markdown', + \'ext': '.md'}, + \ {'path': '~/trabajo/acteu/vimwiki/', \'syntax': 'markdown', \'ext': '.md'}] -- cgit v1.2.1