From 74cc8fa92e890153855597467cb0cc6981acb5ba Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 24 Jan 2020 12:45:49 -0600 Subject: [PATCH] MIC SCRIPT --- apps/de/polybar/mic.sh | 6 +++-- apps/de/sxhkd/rc | 2 +- apps/neovim/bindings.vim | 2 +- apps/neovim/plugins.vim | 1 + apps/shell/fish/aliases.fish | 1 - apps/shell/fish/colors.fish | 47 ++++++++++++++++++++---------------- apps/shell/fish/prompt.fish | 30 +++++++++++------------ 7 files changed, 48 insertions(+), 41 deletions(-) diff --git a/apps/de/polybar/mic.sh b/apps/de/polybar/mic.sh index aaf7dec..7b7fc76 100755 --- a/apps/de/polybar/mic.sh +++ b/apps/de/polybar/mic.sh @@ -13,9 +13,11 @@ cleanup() { print_status() { if amixer get Capture | grep -q '\[off\]'; then - echo "" + # red means recording + echo "%{F$(xrdb -query | grep -Po 'color4:.*#\K\w[0-9a-f]+')}" else - echo " " + # blue means nobody can hear you scream + echo "%{F$(xrdb -query | grep -Po 'color1:.*#\K\w[0-9a-f]+')}" fi } diff --git a/apps/de/sxhkd/rc b/apps/de/sxhkd/rc index 7110b8e..3baf885 100755 --- a/apps/de/sxhkd/rc +++ b/apps/de/sxhkd/rc @@ -231,7 +231,7 @@ super + w "app-launcher" -modi window,run -show window super + shift + v - sh -c 'kill -USR1 $(cat "/var/run/user/$UID/polybar-mic-script.pid")' + sh -c 'kill -USR1 $(cat "/var/run/user/$UID/polybar-mic-script.sh.pid")' # close the current application super + c diff --git a/apps/neovim/bindings.vim b/apps/neovim/bindings.vim index a3ec5bf..a2c8b11 100644 --- a/apps/neovim/bindings.vim +++ b/apps/neovim/bindings.vim @@ -18,7 +18,7 @@ nnoremap t :split term://$SHELL:resize 24i nnoremap :split term://$SHELL:resize 24i nnoremap t :vsplit term://$SHELL:vertical resize 120i " nnoremap :vsplit term://$SHELL:vertical resize 120i -nnoremap :vsplit term://$SHELL:vertical resize 120i +nnoremap :vsplit term://$SHELL:vertical resize 120i " close the terminal tnoremap :q! diff --git a/apps/neovim/plugins.vim b/apps/neovim/plugins.vim index ce845d6..187ffa8 100644 --- a/apps/neovim/plugins.vim +++ b/apps/neovim/plugins.vim @@ -79,6 +79,7 @@ Plug 'leafo/moonscript-vim', {'for': ['moon', 'moonscript']} " moonscript lan Plug 'OmniSharp/omnisharp-vim', {'for': ['cs']} " C# language Plug 'scrooloose/nerdtree' " file browser Plug 'tpope/vim-eunuch' " unix helper commands +Plug 'mbbill/undotree' " undo tree visualizer " Plug 'junegunn/vim-peekaboo' " preview registers " language support diff --git a/apps/shell/fish/aliases.fish b/apps/shell/fish/aliases.fish index e820740..120fe91 100755 --- a/apps/shell/fish/aliases.fish +++ b/apps/shell/fish/aliases.fish @@ -68,7 +68,6 @@ function c -w cd else d $NICE_HOME end - la end alias cd.. "d .." diff --git a/apps/shell/fish/colors.fish b/apps/shell/fish/colors.fish index 992915b..88164b7 100755 --- a/apps/shell/fish/colors.fish +++ b/apps/shell/fish/colors.fish @@ -1,28 +1,33 @@ #!/usr/bin/env fish -set -U fish_color_autosuggestion 555\x1ebrblack -set -U fish_color_cancel \x2dred -set -U fish_color_command white -set -U fish_color_comment brblack +# TODO: once, I could set backgrounds + +# unused since we handle it ourselves in fish_prompt set -U fish_color_cwd magenta set -U fish_color_cwd_root red -set -U fish_color_end green -set -U fish_color_error red -set -U fish_color_escape yellow -set -U fish_color_history_current white set -U fish_color_host normal -set -U fish_color_match \x2d\x2dbackground\x3dbrblue -set -U fish_color_normal normal -set -U fish_color_operator blue -set -U fish_color_param white -set -U fish_color_quote yellow -set -U fish_color_redirection blue -set -U fish_color_search_match bryellow\x1e\x2d\x2dbackground\x3dbrblack -set -U fish_color_selection white\x1e\x2d\x2dbackground\x3dbrblack set -U fish_color_user blue -set -U fish_color_valid_path \x2d\x2dunderline -set -U fish_pager_color_completion \x1d -set -U fish_pager_color_description yellow\x1eyellow -set -U fish_pager_color_prefix white\x1e\x2d\x2dunderline -set -U fish_pager_color_progress brwhite\x1e\x2d\x2dbackground\x3dcyan +set -U fish_color_normal normal # default color +set -U fish_color_command white # base command being run (>ls< -la) +set -U fish_color_param white # command's parameters +set -U fish_color_end green # command delimiter/separators (; and &) +set -U fish_color_error red # color of errors +set -U fish_color_escape yellow # color of escape codes (\n, \x2d, etc.) +set -U fish_color_operator blue # expansion operators (~, *) +set -U fish_color_quote yellow # quoted expressions (ls >"/tmp/test dir"<) +set -U fish_color_redirection blue # redirection operators (|, >, etc.) +set -U fish_color_cancel 333 brblack # sigint (cancel current comment) at prompt (^C) +set -U fish_color_autosuggestion 666 brblack # as-you-type suggestions +set -U fish_color_match blue # matching parens and the like +set -U fish_color_search_match white\x1e\x2d\x2dbackground\x3d333 # selected pager item +set -U fish_color_selection blue # vi mode visual selection (only fg) +set -U fish_color_valid_path yellow # if an argument is a valid path (only -u?) +set -U fish_color_comment 666 brblack # comments like this one! + +# pager shown when completing +set -U fish_pager_color_completion white # main color for pager +set -U fish_pager_color_description magenta # color for meta description +set -U fish_pager_color_prefix blue # the string being completed +set -U fish_pager_color_progress white\x1e\x2d\x2dbackground\x3d333 # status indicator at the bottom +# set -U fish_pager_color_secondary \x2d\x2dbackground\x3d181818 # alternating rows diff --git a/apps/shell/fish/prompt.fish b/apps/shell/fish/prompt.fish index 406fcf0..4706379 100755 --- a/apps/shell/fish/prompt.fish +++ b/apps/shell/fish/prompt.fish @@ -27,18 +27,18 @@ end function fish_mode_prompt; end -function fish_right_prompt - set_color brblack - switch $fish_bind_mode - case default - echo 'N' - case insert - echo 'I' - case replace_one - echo 'R' - case replace - echo 'R' - case visual - echo 'V' - end - end +# function fish_right_prompt +# set_color brblack +# switch $fish_bind_mode +# case default +# echo 'N' +# case insert +# echo 'I' +# case replace_one +# echo 'R' +# case replace +# echo 'R' +# case visual +# echo 'V' +# end +# end