From cdeb3b35bdda5944f3e6ca262f2c982b49602911 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Fri, 7 Feb 2020 14:24:08 -0600 Subject: [PATCH] Minor edits. --- .config/vifm/scripts/imgc | 16 --------------- .config/vifm/scripts/imgt | 38 ----------------------------------- .config/vifm/vifmrc | 42 ++++++++++++++++++--------------------- .doom.d/config.el | 6 +++++- .vimrc | 9 --------- 5 files changed, 24 insertions(+), 87 deletions(-) delete mode 100755 .config/vifm/scripts/imgc delete mode 100755 .config/vifm/scripts/imgt diff --git a/.config/vifm/scripts/imgc b/.config/vifm/scripts/imgc deleted file mode 100755 index 941b7e7..0000000 --- a/.config/vifm/scripts/imgc +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -W3MIMGDISPLAY="/usr/lib/w3m/w3mimgdisplay" -FONTH=18 # Size of one terminal row -FONTW=9 # Size of one terminal column - -X=$1 -Y=$2 -COLUMNS=$3 -LINES=$4 - -x=$((FONTW * X)) -y=$((FONTH * Y)) - -erase="6;$x;$y;$(( FONTW*COLUMNS ));$(( FONTH*LINES ))\n3;" -echo -e "$erase" | $W3MIMGDISPLAY diff --git a/.config/vifm/scripts/imgt b/.config/vifm/scripts/imgt deleted file mode 100755 index 5d76d5d..0000000 --- a/.config/vifm/scripts/imgt +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# -# Based on script by z3bra -- 2014-01-21 - -W3MIMGDISPLAY="/usr/lib/w3m/w3mimgdisplay" -FONTH=16 # Size of one terminal row -FONTW=9 # Size of one terminal column - -X=$1 -Y=$2 -COLUMNS=$3 -LINES=$4 -FILENAME=$5 - -read width height <<< `echo "5;$FILENAME" | $W3MIMGDISPLAY` -if [ -z "$width" -o -z "$height" ]; then - echo 'Error: Failed to obtain image size.' - exit 1 -fi - -x=$((FONTW * X)) -y=$((FONTH * Y)) - -max_width=$((FONTW * COLUMNS)) -max_height=$((FONTH * LINES)) - -if [ "$width" -gt "$max_width" ]; then - height=$((height * max_width / width)) - width=$max_width -fi -if [ "$height" -gt "$max_height" ]; then - width=$((width * max_height / height)) - height=$max_height -fi - -w3m_command="0;1;$x;$y;$width;$height;;;;;$FILENAME\n4;\n3;" - -echo -e "$w3m_command" | $W3MIMGDISPLAY diff --git a/.config/vifm/vifmrc b/.config/vifm/vifmrc index b4ee1fb..ad39291 100644 --- a/.config/vifm/vifmrc +++ b/.config/vifm/vifmrc @@ -1,25 +1,18 @@ -" ____ _____ -" | _ \_ _| Derek Taylor (DistroTube) " | | | || | http://www.youtube.com/c/DistroTube " | |_| || | http://www.gitlab.com/dwt1/ " |____/ |_| " vim: filetype=vifm : -" Sample configuration file for vifm (last updated: 20 July, 2018) -" You can edit this file by hand. -" The " character at the beginning of a line comments out the line. -" Blank lines are ignored. -" The basic format for each item is shown with an example. - +" My config file for the vifm terminal file manager. " ------------------------------------------------------------------------------ " This is the actual command used to start vi. The default is vim. -" If you would like to use another vi clone such as Elvis or Vile -" you will need to change this setting. +" If you would like to use emacs or emacsclient, you can use them. +" Since emacs is a GUI app and not a terminal app like vim, append the command +" with an ampersand (&). -set vicmd=vim -" set vicmd=elvis\ -G\ termcap -" set vicmd=vile +set vicmd=emacsclient\ -c\ & +" set vicmd=vim " This makes vifm perform file operations on its own instead of relying on " standard utilities like `cp`. While using `cp` and alike is a more universal @@ -201,6 +194,8 @@ filextype *.djvu " Audio filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus + \ {View using cmus} + \ alacritty -e cmus %f &, \ {Play using ffplay} \ ffplay -nodisp -autoexit %c, \ {Play using MPlayer} @@ -228,6 +223,10 @@ fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, " Web filextype *.html,*.htm + \ {Open with emacs} + \ emacsclient -c %c &, + \ {Open with vim} + \ vim %c &, \ {Open with dwb} \ dwb %f %i &, \ {Open with firefox} @@ -246,7 +245,7 @@ fileviewer *.[1-8] man ./%c | col -b " Images filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm \ {View in sxiv} - \ sxiv -ia %c %d &, + \ sxiv -ia %f &, \ {View in imv} \ imv -b 1D2330 -d %d &, \ {View in feh} @@ -257,10 +256,6 @@ fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm \ vifmimg draw %px %py %pw %ph %c \ %pc \ vifmimg clear - " Get w3m image previews inside vifm - " \ imgt %px %py %pw %ph %c - " \ %pc - " \ imgc %px %py %pw %ph NOT NEEDED IN XTERM fileviewer *.gif \ vifmimg gifpreview %px %py %pw %ph %c \ %pc @@ -441,6 +436,12 @@ set vifminfo=dhistory,savedirs,chistory,state,tui,shistory, " Sample mappings +"Open all images in current directory in sxiv thumbnail mode +nnoremap sx :!sxiv -t %d & + +"Open selected images in gimp +nnoremap gp :!gimp %f & + " Start shell in current directory nnoremap s :shell @@ -451,11 +452,6 @@ nnoremap S :sort nnoremap w :view vnoremap w :viewgv -" Open file in existing instance of gvim -nnoremap o :!gvim --remote-tab-silent %f -" Open file in new instance of gvim -nnoremap O :!gvim %f - " Open file in the background using its default program nnoremap gb :file &l diff --git a/.doom.d/config.el b/.doom.d/config.el index 1a0c6af..476dfaf 100644 --- a/.doom.d/config.el +++ b/.doom.d/config.el @@ -29,7 +29,11 @@ highlight-indent-guides-delay 0.01 highlight-indent-guides-responsive 'top highlight-indent-guides-auto-enabled nil)) - + +(require 'emms-setup) +(emms-standard) +(emms-default-players) + ;; Setting up mu4e which is an email client that works within emacs. ;; You must install mu4e and mbsync through your Linux distribution's ;; package manager. diff --git a/.vimrc b/.vimrc index f3b77d3..55d246c 100644 --- a/.vimrc +++ b/.vimrc @@ -108,18 +108,9 @@ let NERDTreeShowHidden=1 let NERDTreeMinimalUI = 1 -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" => Minimap -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -let g:minimap_show='mm' -let g:minimap_update='mu' -let g:minimap_close='mc' -let g:minimap_toggle='mt' - """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Colors """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -colorscheme default hi LineNr ctermfg=242 hi CursorLineNr ctermfg=15 hi VertSplit ctermfg=8 ctermbg=0