mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-22 02:50:24 +10:00
Minor edits.
This commit is contained in:
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -1,25 +1,18 @@
|
|||||||
" ____ _____
|
|
||||||
" | _ \_ _| Derek Taylor (DistroTube)
|
|
||||||
" | | | || | http://www.youtube.com/c/DistroTube
|
" | | | || | http://www.youtube.com/c/DistroTube
|
||||||
" | |_| || | http://www.gitlab.com/dwt1/
|
" | |_| || | http://www.gitlab.com/dwt1/
|
||||||
" |____/ |_|
|
" |____/ |_|
|
||||||
|
|
||||||
" vim: filetype=vifm :
|
" vim: filetype=vifm :
|
||||||
" Sample configuration file for vifm (last updated: 20 July, 2018)
|
" My config file for the vifm terminal file manager.
|
||||||
" 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.
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
" This is the actual command used to start vi. The default is vim.
|
" 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
|
" If you would like to use emacs or emacsclient, you can use them.
|
||||||
" you will need to change this setting.
|
" Since emacs is a GUI app and not a terminal app like vim, append the command
|
||||||
|
" with an ampersand (&).
|
||||||
|
|
||||||
set vicmd=vim
|
set vicmd=emacsclient\ -c\ &
|
||||||
" set vicmd=elvis\ -G\ termcap
|
" set vicmd=vim
|
||||||
" set vicmd=vile
|
|
||||||
|
|
||||||
" This makes vifm perform file operations on its own instead of relying on
|
" 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
|
" standard utilities like `cp`. While using `cp` and alike is a more universal
|
||||||
@@ -201,6 +194,8 @@ filextype *.djvu
|
|||||||
|
|
||||||
" Audio
|
" Audio
|
||||||
filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus
|
filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus
|
||||||
|
\ {View using cmus}
|
||||||
|
\ alacritty -e cmus %f &,
|
||||||
\ {Play using ffplay}
|
\ {Play using ffplay}
|
||||||
\ ffplay -nodisp -autoexit %c,
|
\ ffplay -nodisp -autoexit %c,
|
||||||
\ {Play using MPlayer}
|
\ {Play using MPlayer}
|
||||||
@@ -228,6 +223,10 @@ fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
|||||||
|
|
||||||
" Web
|
" Web
|
||||||
filextype *.html,*.htm
|
filextype *.html,*.htm
|
||||||
|
\ {Open with emacs}
|
||||||
|
\ emacsclient -c %c &,
|
||||||
|
\ {Open with vim}
|
||||||
|
\ vim %c &,
|
||||||
\ {Open with dwb}
|
\ {Open with dwb}
|
||||||
\ dwb %f %i &,
|
\ dwb %f %i &,
|
||||||
\ {Open with firefox}
|
\ {Open with firefox}
|
||||||
@@ -246,7 +245,7 @@ fileviewer *.[1-8] man ./%c | col -b
|
|||||||
" Images
|
" Images
|
||||||
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
||||||
\ {View in sxiv}
|
\ {View in sxiv}
|
||||||
\ sxiv -ia %c %d &,
|
\ sxiv -ia %f &,
|
||||||
\ {View in imv}
|
\ {View in imv}
|
||||||
\ imv -b 1D2330 -d %d &,
|
\ imv -b 1D2330 -d %d &,
|
||||||
\ {View in feh}
|
\ {View in feh}
|
||||||
@@ -257,10 +256,6 @@ fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm
|
|||||||
\ vifmimg draw %px %py %pw %ph %c
|
\ vifmimg draw %px %py %pw %ph %c
|
||||||
\ %pc
|
\ %pc
|
||||||
\ vifmimg clear
|
\ 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
|
fileviewer *.gif
|
||||||
\ vifmimg gifpreview %px %py %pw %ph %c
|
\ vifmimg gifpreview %px %py %pw %ph %c
|
||||||
\ %pc
|
\ %pc
|
||||||
@@ -441,6 +436,12 @@ set vifminfo=dhistory,savedirs,chistory,state,tui,shistory,
|
|||||||
|
|
||||||
" Sample mappings
|
" Sample mappings
|
||||||
|
|
||||||
|
"Open all images in current directory in sxiv thumbnail mode
|
||||||
|
nnoremap sx :!sxiv -t %d & <cr>
|
||||||
|
|
||||||
|
"Open selected images in gimp
|
||||||
|
nnoremap gp :!gimp %f & <cr>
|
||||||
|
|
||||||
" Start shell in current directory
|
" Start shell in current directory
|
||||||
nnoremap s :shell<cr>
|
nnoremap s :shell<cr>
|
||||||
|
|
||||||
@@ -451,11 +452,6 @@ nnoremap S :sort<cr>
|
|||||||
nnoremap w :view<cr>
|
nnoremap w :view<cr>
|
||||||
vnoremap w :view<cr>gv
|
vnoremap w :view<cr>gv
|
||||||
|
|
||||||
" Open file in existing instance of gvim
|
|
||||||
nnoremap o :!gvim --remote-tab-silent %f<cr>
|
|
||||||
" Open file in new instance of gvim
|
|
||||||
nnoremap O :!gvim %f<cr>
|
|
||||||
|
|
||||||
" Open file in the background using its default program
|
" Open file in the background using its default program
|
||||||
nnoremap gb :file &<cr>l
|
nnoremap gb :file &<cr>l
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,11 @@
|
|||||||
highlight-indent-guides-delay 0.01
|
highlight-indent-guides-delay 0.01
|
||||||
highlight-indent-guides-responsive 'top
|
highlight-indent-guides-responsive 'top
|
||||||
highlight-indent-guides-auto-enabled nil))
|
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.
|
;; Setting up mu4e which is an email client that works within emacs.
|
||||||
;; You must install mu4e and mbsync through your Linux distribution's
|
;; You must install mu4e and mbsync through your Linux distribution's
|
||||||
;; package manager.
|
;; package manager.
|
||||||
|
|||||||
9
.vimrc
9
.vimrc
@@ -108,18 +108,9 @@ let NERDTreeShowHidden=1
|
|||||||
let NERDTreeMinimalUI = 1
|
let NERDTreeMinimalUI = 1
|
||||||
|
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
||||||
" => Minimap
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
||||||
let g:minimap_show='<leader>mm'
|
|
||||||
let g:minimap_update='<leader>mu'
|
|
||||||
let g:minimap_close='<leader>mc'
|
|
||||||
let g:minimap_toggle='<leader>mt'
|
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" => Colors
|
" => Colors
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
colorscheme default
|
|
||||||
hi LineNr ctermfg=242
|
hi LineNr ctermfg=242
|
||||||
hi CursorLineNr ctermfg=15
|
hi CursorLineNr ctermfg=15
|
||||||
hi VertSplit ctermfg=8 ctermbg=0
|
hi VertSplit ctermfg=8 ctermbg=0
|
||||||
|
|||||||
Reference in New Issue
Block a user