From: Daniel Liu Date: Wed, 30 Dec 2020 18:05:52 +0000 (-0500) Subject: mpd script + overall update X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=6b58ea8b8d9799698f147e5677b4b6e6d47a7e9d;p=dotfiles.git mpd script + overall update --- diff --git a/.Xresources b/.Xresources index 0817443..ec4d39d 100644 --- a/.Xresources +++ b/.Xresources @@ -1,5 +1,5 @@ -*.font: Source Code Pro:size=12 +/* nord */ #define nord0 #2E3440 #define nord1 #3B4252 #define nord2 #434C5E @@ -12,49 +12,68 @@ #define nord9 #81A1C1 #define nord10 #5E81AC #define nord11 #BF616A -#define nord12 #D08770 +#define nord12 #D08770 #define nord13 #EBCB8B #define nord14 #A3BE8C #define nord15 #B48EAD -*.foreground: nord4 -*.background: nord0 -*.cursorColor: nord4 +#define theme0 nord0 +#define theme1 nord1 +#define theme2 nord2 +#define theme3 nord3 +#define theme4 nord4 +#define theme5 nord5 +#define theme6 nord6 +#define theme7 nord7 +#define theme8 nord8 +#define theme9 nord9 +#define theme10 nord10 +#define theme11 nord11 +#define theme12 nord12 +#define theme13 nord13 +#define theme14 nord14 +#define theme15 nord15 + +*.font: Source Code Pro:size=12 + +*.foreground: theme4 +*.background: theme0 +*.cursorColor: theme4 *.termname: st-256color *.borderpx: 5 -*.normbordercolor: nord0 -*.selbordercolor: nord6 - -*.normbgcolor: nord0 -*.selbgcolor: nord8 - -*.selfgcolor: nord0 - -*.color0: nord1 -*.color1: nord11 -*.color2: nord14 -*.color3: nord13 -*.color4: nord9 -*.color5: nord15 -*.color6: nord8 -*.color7: nord5 -*.color8: nord3 -*.color9: nord11 -*.color10: nord14 -*.color11: nord13 -*.color12: nord9 -*.color13: nord15 -*.color14: nord7 -*.color15: nord6 - -# dmenu -dmenu.selbackground: nord8 - -# herbe -herbe.background_color: nord0 -# herbe.font_pattern: Source Code Pro:size=10,Symbols Nerd Font:style=2048-em +*.normbordercolor: theme0 +*.selbordercolor: theme6 + +*.normbgcolor: theme0 +*.selbgcolor: theme8 + +*.selfgcolor: theme0 + +*.color0: theme1 +*.color1: theme11 +*.color2: theme14 +*.color3: theme13 +*.color4: theme9 +*.color5: theme15 +*.color6: theme8 +*.color7: theme5 +*.color8: theme3 +*.color9: theme11 +*.color10: theme14 +*.color11: theme13 +*.color12: theme9 +*.color13: theme15 +*.color14: theme7 +*.color15: theme6 + +/* dmenu */ +dmenu.selbackground: theme8 + +/* herbe */ +herbe.background_color: theme0 herbe.font_pattern: Source Code Pro:size=10 +/* herbe.font_pattern: Symbols Nerd Font:style=2048-em */ herbe.width: 300 herbe.pos_x: 20 herbe.pos_y: 50 diff --git a/.config/mpv/input.conf b/.config/mpv/input.conf index bb96d58..09ccf19 100644 --- a/.config/mpv/input.conf +++ b/.config/mpv/input.conf @@ -124,7 +124,7 @@ o show-progress #r add sub-pos -1 # move subtitles up #R add sub-pos +1 # down #t add sub-pos +1 # same as previous binding (discouraged) -#v cycle sub-visibility +v cycle sub-visibility # stretch SSA/ASS subtitles with anamorphic videos to match historical #V cycle sub-ass-vsfilter-aspect-compat # switch between applying no style overrides to SSA/ASS subtitles, and diff --git a/.config/ncmpcpp/config b/.config/ncmpcpp/config index 1ee7798..1486904 100644 --- a/.config/ncmpcpp/config +++ b/.config/ncmpcpp/config @@ -1,5 +1,5 @@ -execute_on_song_change = notify-send "Now Playing: $(mpc current)" -i "" +/* execute_on_song_change = notify-send "Now Playing: $(mpc current)" -i "" */ visualizer_fifo_path = "/tmp/mpd.fifo" visualizer_output_name = "toggle_visualizer" diff --git a/.vimrc b/.vimrc index afb2c7d..13df5e9 100644 --- a/.vimrc +++ b/.vimrc @@ -25,6 +25,9 @@ set conceallevel=2 hi Conceal ctermbg=Black hi SpellBad ctermfg=Red ctermbg=Black cterm=underline +" Bindings +nnoremap + " Some macros " vim plug @@ -37,12 +40,13 @@ if empty(glob('~/.vim/autoload/plug.vim')) call plug#begin('~/.vim/plugged') -" Plug 'sirver/ultisnips' +Plug 'sirver/ultisnips' Plug 'lervag/vimtex' Plug 'jiangmiao/auto-pairs' Plug 'PietroPate/vim-tex-conceal' Plug 'vim-airline/vim-airline' - " Plug 'neoclide/coc.nvim', {'branch': 'release'} +Plug 'ctrlpvim/ctrlp.vim' +" Plug 'neoclide/coc.nvim', {'branch': 'release'} " Plug 'habamax/vim-godot' Plug 'tpope/vim-commentary' @@ -68,3 +72,5 @@ let g:vimtex_compiler_latexmk = { "let g:airline#extensions#tabline#enabled = 1 let g:airline_powerline_fonts=1 +" Ctrlp +let g:ctrlp_cmd='CtrlPTag' diff --git a/Scripts/fzfutil b/Scripts/fzfutil index 6080d4c..3ecdea6 100755 --- a/Scripts/fzfutil +++ b/Scripts/fzfutil @@ -2,21 +2,13 @@ fuzzy_dirs="$HOME/Scripts/* $HOME/School/* $HOME/.vim/mysnippets/* $HOME/.bashrc $HOME/.xinitrc $HOME/.Xresources $HOME/.Xmodmap $HOME/.config/* $HOME/Repos/* $HOME/installs/*" -ffi() { # standard fzf on files - fname="$(find $fuzzy_dirs -type f | fzf)" - [ -z "$fname" ] && exit 1 - echo "$fname" -} -fdi() { # standard fzf on dirs - dname="$(find $fuzzy_dirs -type d | fzf)" - [ -z "$dname" ] && exit 1 - echo "$dname" -} - -fvi() { # shortcut ffi for editor - ffi && $EDITOR "$fname" -} - -fcd() { # shortcuz fdi for cding - fdi && cd "$dname" +fvi() { + [ -z "$1" ] && search="$fuzzy_dirs" || search="$1" + fname="$(find $search -type f | fzf)" + [ -z "$fname" ] || $EDITOR "$fname" +} +fcd() { + [ -z "$1" ] && search="$fuzzy_dirs" || search="$1" + dname="$(find $search -type d | fzf)" + [ -z "$dname" ] || cd "$dname" } diff --git a/Scripts/mpd-change b/Scripts/mpd-change new file mode 100755 index 0000000..470dcb7 --- /dev/null +++ b/Scripts/mpd-change @@ -0,0 +1,24 @@ +#!/bin/sh + +# sends a notification on mpd song change :> + +playing="$(mpc current)" + +while true +do + # block until song change + mpc idle player > /dev/null + + # make sure the song acc changed + cur_song="$(mpc current)" + [ "$cur_song" == "$playing" ] && continue; + + playing="$cur_song"; + + [ -z "$cur_song" ] && continue; # don't send notify if no song tho + + out="${cur_song%.*}" # get rid of extension + notify-send "Now Playing: ${out##*/}" -i "" # get rid of dir + +done + diff --git a/Scripts/statusbar/blocks_date b/Scripts/statusbar/blocks_date index 7f93768..9b4f86a 100755 --- a/Scripts/statusbar/blocks_date +++ b/Scripts/statusbar/blocks_date @@ -1,4 +1,4 @@ #!/bin/sh dte="$(date +"%a, %b %d %H:%M")" -echo -e "$dte" +echo -e " $dte" diff --git a/Scripts/statusbar/blocks_mem b/Scripts/statusbar/blocks_mem index 38c9219..959ffc7 100755 --- a/Scripts/statusbar/blocks_mem +++ b/Scripts/statusbar/blocks_mem @@ -3,4 +3,4 @@ # alternate to display total mem too #mem="$(df -h | grep /dev/sda5 | awk '{printf "%s:%s", $3, $2}')" mem="$(df -h | grep /dev/sda5 | awk '{print $3}')" -echo -e "$mem" +echo -e " $mem" diff --git a/Scripts/statusbar/blocks_ram b/Scripts/statusbar/blocks_ram index a7b2235..f775a17 100755 --- a/Scripts/statusbar/blocks_ram +++ b/Scripts/statusbar/blocks_ram @@ -3,5 +3,5 @@ # alternate script to display total ram too #ram="$(free -t -m | grep Mem | awk '{printf "%sM:%sM", $3, $2}')" ram="$(free -t -m | grep Mem | awk '{printf "%sM", $3}')" -echo -e "$ram" +echo -e " $ram" diff --git a/Scripts/statusbar/blocks_vol b/Scripts/statusbar/blocks_vol index 4bb4ab9..846d638 100755 --- a/Scripts/statusbar/blocks_vol +++ b/Scripts/statusbar/blocks_vol @@ -2,7 +2,7 @@ volume="$(amixer sget Master | grep 'Mono:' | awk -F'[][]' '{ print $2 }')" -icon="" +icon="" [ ${volume%\%} -gt "0" ] && icon="" [ ${volume%\%} -gt "50" ] && icon="" [ ${volume%\%} -gt "75" ] && icon=""