mpd script + overall update
authorDaniel Liu <mr.picklepinosaur@gmail.com>
Wed, 30 Dec 2020 18:05:52 +0000 (13:05 -0500)
committerDaniel Liu <mr.picklepinosaur@gmail.com>
Wed, 30 Dec 2020 18:05:52 +0000 (13:05 -0500)
.Xresources
.config/mpv/input.conf
.config/ncmpcpp/config
.vimrc
Scripts/fzfutil
Scripts/mpd-change [new file with mode: 0755]
Scripts/statusbar/blocks_date
Scripts/statusbar/blocks_mem
Scripts/statusbar/blocks_ram
Scripts/statusbar/blocks_vol

index 0817443..ec4d39d 100644 (file)
@@ -1,5 +1,5 @@
-*.font: Source Code Pro:size=12
 
 
+/* nord */
 #define nord0 #2E3440
 #define nord1 #3B4252
 #define nord2 #434C5E
 #define nord0 #2E3440
 #define nord1 #3B4252
 #define nord2 #434C5E
 #define nord9 #81A1C1
 #define nord10 #5E81AC
 #define nord11 #BF616A
 #define nord9 #81A1C1
 #define nord10 #5E81AC
 #define nord11 #BF616A
-#define nord12 #D08770
+#define nord12 #D08770 
 #define nord13 #EBCB8B
 #define nord14 #A3BE8C
 #define nord15 #B48EAD
 
 #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
 *.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: 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
 herbe.width: 300
 herbe.pos_x: 20
 herbe.pos_y: 50
index bb96d58..09ccf19 100644 (file)
@@ -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)
 #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
 # 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
index 1ee7798..1486904 100644 (file)
@@ -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"
 
 visualizer_fifo_path = "/tmp/mpd.fifo"
 visualizer_output_name = "toggle_visualizer"
diff --git a/.vimrc b/.vimrc
index afb2c7d..13df5e9 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -25,6 +25,9 @@ set conceallevel=2
 hi Conceal ctermbg=Black
 hi SpellBad ctermfg=Red ctermbg=Black cterm=underline
 
 hi Conceal ctermbg=Black
 hi SpellBad ctermfg=Red ctermbg=Black cterm=underline
 
+" Bindings
+nnoremap <C-[> <C-t>
+
 " Some macros
 
 " vim plug
 " Some macros
 
 " vim plug
@@ -37,12 +40,13 @@ if empty(glob('~/.vim/autoload/plug.vim'))
 
 call plug#begin('~/.vim/plugged')
 
 
 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 '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'
 
 " 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
 
 "let g:airline#extensions#tabline#enabled = 1
 let g:airline_powerline_fonts=1
 
+" Ctrlp
+let g:ctrlp_cmd='CtrlPTag'
index 6080d4c..3ecdea6 100755 (executable)
@@ -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/*"
 
 
 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 (executable)
index 0000000..470dcb7
--- /dev/null
@@ -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
+
index 7f93768..9b4f86a 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 dte="$(date +"%a, %b %d %H:%M")"
 #!/bin/sh
 
 dte="$(date +"%a, %b %d %H:%M")"
-echo -e "$dte"
+echo -e " $dte"
index 38c9219..959ffc7 100755 (executable)
@@ -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}')"
 # 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"
index a7b2235..f775a17 100755 (executable)
@@ -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}')"
 # 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"
 
 
index 4bb4ab9..846d638 100755 (executable)
@@ -2,7 +2,7 @@
 
 volume="$(amixer sget Master | grep 'Mono:' | awk -F'[][]' '{ print $2  }')"
 
 
 volume="$(amixer sget Master | grep 'Mono:' | awk -F'[][]' '{ print $2  }')"
 
-icon="ï\9a©"
+icon="ï\91¦"
 [ ${volume%\%} -gt "0" ] && icon="" 
 [ ${volume%\%} -gt "50" ] && icon="" 
 [ ${volume%\%} -gt "75" ] && icon="" 
 [ ${volume%\%} -gt "0" ] && icon="" 
 [ ${volume%\%} -gt "50" ] && icon="" 
 [ ${volume%\%} -gt "75" ] && icon=""