From: Daniel Liu Date: Sat, 20 Feb 2021 05:22:47 +0000 (-0500) Subject: update (mpd-change fix) X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=280abf6fd7d3541bf0bed20c9335f640087de257;p=dotfiles.git update (mpd-change fix) --- diff --git a/.Xresources b/.Xresources index 60bd532..24a168b 100644 --- a/.Xresources +++ b/.Xresources @@ -113,7 +113,7 @@ dmenu.selbackground: themehl /* herbe */ herbe.background_color: themebg -herbe.font_pattern: Source Code Pro:size=10 +herbe.font_pattern: Sauce Code Pro Nerd Font:size=10 /* herbe.font_pattern: Symbols Nerd Font:style=2048-em */ herbe.width: 300 herbe.pos_x: 20 diff --git a/.bashrc b/.bashrc index 5810692..9aa20e5 100644 --- a/.bashrc +++ b/.bashrc @@ -9,9 +9,8 @@ [[ $- != *i* ]] && return # prompt lmao -# PS1='\e[01;33m λ_\e[m\e[01;37m \W \e[m\e[01;33m> \e[m' -# PS2='\e[01;37m> \e[m' -PS1=' λ_ \W > ' +PS1='\[\033[01;33m\] λ_\[\033[01;37m\] \W\[\033[01;33m\] > \[\033[00m\]' +PS2='\[\033[01;37m\]> \[\033[00m\]' #set vi mode set -o vi diff --git a/.vim/mysnippets/cpp.snippets b/.vim/mysnippets/cpp.snippets new file mode 100644 index 0000000..8d5468c --- /dev/null +++ b/.vim/mysnippets/cpp.snippets @@ -0,0 +1,20 @@ +snippet guard "header guard" w +#ifndef $1 +#define $1 + +$0 + +#endif // $1 +endsnippet + +snippet cpp "cpp extern" w +#ifdef __cplusplus +extern "C" { +#endif + +$0 + +#ifdef __cplusplus +} +#endif +endsnippet diff --git a/.vimrc b/.vimrc index 49ee3db..b32ec0c 100644 --- a/.vimrc +++ b/.vimrc @@ -81,17 +81,27 @@ call StatusModifiedColor() set laststatus=2 set statusline= set statusline+=%{StatusModeColor()} -set statusline+=%{StatusModifiedColor()} -set statusline+=%1*\ | +set statusline+=%1*\ | set statusline+=%0*\ vim\ \[%{mode()}\] -set statusline+=\[%{BufCount()}\] -set statusline+=\ %1*\ %F\ %m +set statusline+=\ %1*\ %{expand('%:~:.')}\ %m set statusline+=%= -set statusline+=%0* -set statusline+=\ %ff +set statusline+=%y +set statusline+=\ %0* set statusline+=\ %r\[%{v:register}\] set statusline+=\ %l/%L:%c\ | set statusline+=%1*\ | +" set statusline+=%{StatusModeColor()} +" set statusline+=%{StatusModifiedColor()} +" set statusline+=%1*\ | +" set statusline+=%0*\ vim\ \[%{mode()}\] +" set statusline+=\[%{BufCount()}\] +" set statusline+=\ %1*\ %{expand('%:~:.')}\ %m +" set statusline+=%= +" set statusline+=%y +" set statusline+=\ %0* +" set statusline+=\ %r\[%{v:register}\] +" set statusline+=\ %l/%L:%c\ | +" set statusline+=%1*\ | " Templates augroup templates diff --git a/Scripts/mousetrack b/Scripts/mousetrack new file mode 100755 index 0000000..560be26 --- /dev/null +++ b/Scripts/mousetrack @@ -0,0 +1,6 @@ +#!/bin/sh + +while [ 1 ]; +do + xdotool getmouselocation +done diff --git a/Scripts/mpd-change b/Scripts/mpd-change index 470dcb7..ad71e6d 100755 --- a/Scripts/mpd-change +++ b/Scripts/mpd-change @@ -11,10 +11,9 @@ do # make sure the song acc changed cur_song="$(mpc current)" - [ "$cur_song" == "$playing" ] && continue; + [ "$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 diff --git a/Scripts/notify b/Scripts/notify index 9e428e2..29e7f15 100755 --- a/Scripts/notify +++ b/Scripts/notify @@ -7,5 +7,5 @@ get_json() { while read line; do icon="$(echo $line | get_json app_icon)" msg="$(echo $line | get_json summary)" - herbe "$icon $msg" & + herbe "$icon $msg" & done diff --git a/Scripts/plumb b/Scripts/plumb index f60994e..4ae1c72 100755 --- a/Scripts/plumb +++ b/Scripts/plumb @@ -6,7 +6,7 @@ openlink() { } link=$(echo "$2" | grep -P "https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\//=]*)") >/dev/null 2>&1 -[ -n "$link" ] && openlink "$link" && notify-send "Opening Link: $link" +[ -n "$link" ] && openlink "$link" && notify-send -i "" "Opening Link: $link"