Remove more generated fish stuff, more fixes

This commit is contained in:
Daniel Flanagan 2020-01-23 09:51:03 -06:00
parent b09a25cc17
commit dadb7da642
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
10 changed files with 61 additions and 35 deletions

View file

@ -13,6 +13,7 @@ has_command autocutsel && autocutsel -s PRIMARY &
has_command autocutsel && autocutsel -s CLIPBOARD &
has_command autorandr && autorandr -c
has_command redshift && redshift -r -l 39.1:-94.6 -t 6500K:3000K &
has_command kdeconnect-indicator && kdeconnect-indicator &
eval "$(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)"
export SSH_AUTH_SOCK

View file

@ -15,7 +15,8 @@ clear_all_shortcuts yes
map ctrl+shift+equal change_font_size all +0.5
map ctrl+shift+minus change_font_size all -0.5
map shift+insert paste_from_selection
map shift+insert paste_from_clipboard
map ctrl+shift+v paste_from_selection
enable_audio_bell yes

View file

@ -66,7 +66,7 @@ Plug 'tmux-plugins/vim-tmux-focus-events' " allow transiti
Plug 'christoomey/vim-tmux-navigator' " allow transitions within tmux
Plug 'godlygeek/tabular' " align text
Plug 'lytedev/vim-superman' " view man pages with vim
Plug 'tpope/vim-surround' " quickly modify text surrounding objects
Plug 'machakann/vim-sandwich' " quickly modify text surrounding objects
Plug 'tpope/vim-speeddating' " vim knows about date-like text objects
Plug 'tpope/vim-fugitive' " vim git commands
Plug 'michaeljsmith/vim-indent-object' " adds an indentation level text object

View file

@ -1 +1,2 @@
fish_variables
functions

View file

@ -32,6 +32,10 @@ function ltl
echo $l
end
function scount -d "Silent count" -w count
count $argv > /dev/null
end
function ltld
set d $argv[1] .
set -l l ""
@ -48,31 +52,42 @@ alias vltl "vim (ltl)"
alias cdltl "cd (ltld)"
alias ltlv vltl
# navigation aliases
function c
if count $argv
cd $NICE_HOME && cd $argv[1] || exit 1
function d -w cd
if scount $argv
cd $argv || exit 1
else
cd $NICE_HOME || exit 1
end
la
end
alias cd.. "cd .."
alias cdd "cd $DOTFILES_PATH" # go to dotfiles
alias cde "cd $ENV_PATH" # go to env dotfiles
alias cdc "cd $XDG_CONFIG_HOME" # go to ~/.config
alias cdn "cd $NOTES_PATH"
alias cdl "cd $NICE_HOME/dl"
alias cdg "cd $NICE_HOME/games"
# navigation aliases
function c -w cd
if scount $argv
cd $NICE_HOME && d $argv || exit 1
else
d $NICE_HOME
end
la
end
alias cd.. "d .."
alias cdd "d $DOTFILES_PATH" # go to dotfiles
alias cde "d $ENV_PATH" # go to env dotfiles
alias cdc "d $XDG_CONFIG_HOME" # go to ~/.config
alias cdn "d $NOTES_PATH"
alias cdl "d $NICE_HOME/dl"
alias cdg "d $NICE_HOME/games"
# quick parent-directory aliases
alias .. "cd .."
alias ... "cd ../.."
alias .... "cd ../../.."
alias ..... "cd ../../../.."
alias ...... "cd ../../../../.."
alias ....... "cd ../../../../../.."
alias ........ "cd ../../../../../../.."
alias ......... "cd ../../../../../../../.."
alias .. "d .."
alias ... "d ../.."
alias .... "d ../../.."
alias ..... "d ../../../.."
alias ...... "d ../../../../.."
alias ....... "d ../../../../../.."
alias ........ "d ../../../../../../.."
alias ......... "d ../../../../../../../.."
# tmux aliases
# TODO: see if this can be worked around?
@ -89,7 +104,7 @@ alias tm "tmux attach -t music || tmux new -s music"
# git aliases
# TODO: make these git aliases in the gitconfig?
function g
if count $argv >/dev/null
if scount $argv
git $argv
else
git status
@ -158,6 +173,11 @@ alias mail "mutt"
# fsw aliases
alias fsw-mix-test 'fsw "mix test" ./**/*.{ex,exs,erl,hrl,xrl,yrl}'
function field
not scount $argv && echo "No field index provided"; exit 1
awk "{print \$$argv[1]}"
end
# weechat aliases
function chat
set -l pass (pass config/weechat-passphrase | head -n 1)

View file

@ -4,8 +4,6 @@ set -Ux XDG_CONFIG_HOME $HOME/.config
set -Ux DOTFILES_PATH $XDG_CONFIG_HOME/dotfiles
set -Ux ENV_PATH $HOME/.env
function source_if_exists; test -f $ENV_PATH/$argv[1] && source $argv[1]; end
function maybe_source_env_file; source_if_exists $ENV_PATH/$argv[1]; end
function has_command; command -v $argv[1] 2>&1 >/dev/null; end
source $DOTFILES_PATH/apps/shell/fish/paths.fish
@ -33,9 +31,10 @@ end
set -Ux LS_COLORS 'ow=01;36;40'
# load a per-device config last so anything can be overridden
# TODO: this does not work quite right for fish?
maybe_source_env_file config.fish
maybe_source_env_file .hidden/config.fish
for cf in config.fish .hidden/config.fish
set f $ENV_PATH/$cf
test -f $f && source $f
end
mkdir -p $NOTES_PATH $USER_LOGS_PATH $SCROTS_PATH

View file

@ -1,3 +0,0 @@
function fish_user_key_bindings
fzf_key_bindings
end

View file

@ -1 +0,0 @@
/home/daniel/.home/.fzf/shell/key-bindings.fish

3
env/desktop/bash vendored
View file

@ -1,3 +1,4 @@
#!/usr/bin/env bash
. "$ENV_PATH/.hidden/bash"
hb="$ENV_PATH/.hidden/bash"
[ -f "$hb" ] && . "$hb"

View file

@ -1,6 +1,13 @@
#!/usr/bin/env fish
echo whee
function I_AM_HELP
help
# TODO: completion
function src-hidden-dir
not scount $argv && echo "No directory specified" && exit 1
set f $ENV_PATH/.hidden/fish.d/$argv[1]/config.fish
echo "Checking $f..."
test -f $f && source $f
end
set hc $ENV_PATH/.hidden/config.fish
test -f $hc && source $hc