More fixes to various things

This commit is contained in:
Daniel Flanagan 2020-01-22 17:25:47 -06:00
parent 58f6626280
commit b09a25cc17
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
20 changed files with 88 additions and 195 deletions

View file

@ -8,8 +8,9 @@
[ -f "$DOTFILES_PATH/apps/de/x/loadresources" ] && "$DOTFILES_PATH/apps/de/x/loadresources"
[ -f "$HOME/.xmodmap" ] && xmodmap "$HOME/.xmodmap"
has_command xcape && xcape -e 'Control_L=Escape' &
has_command autocutsel && autocutsel -fork &
has_command libinput-gestures-setup && libinput-gestures-setup start
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 &

View file

@ -5,7 +5,7 @@ sort_key=2
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
hide_userland_threads=1
shadow_other_users=0
show_thread_names=0
show_program_path=1

View file

@ -11,8 +11,11 @@ adjust_line_height 0
window_padding_width 5.0
window_margin_width 0.0
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
enable_audio_bell yes
@ -46,3 +49,5 @@ color14 #cc6633
color15 #f9f8f5
color18 #333333
kitty_mod ctrl+shift+alt
open_url_modifiers ctrl

View file

@ -8,28 +8,30 @@ command! Q q
" best leader
let mapleader = "\<Space>"
if has('nvim')
" terminal mappings
" open a terminal split at 80 columns
nnoremap <C-t> :vsplit term://bash<CR>
nnoremap <C-S-T> :split term://bash<CR>
" tnoremap <C-t> <C-\><C-n>:call TerminalSplit()<CR>
" close the terminal
tnoremap <C-w> <C-\><C-n>:q!<CR>
" moving between terminal splits
tnoremap <C-h> :TmuxNavigateLeft<CR>
tnoremap <C-j> :TmuxNavigateDown<CR>
tnoremap <C-k> :TmuxNavigateUp<CR>
tnoremap <C-l> :TmuxNavigateRight<CR>
endif
" enter insert mode when entering a terminal buffer
augroup InsertModeOnBlankTerminal
autocmd BufWinEnter,WinEnter term://* startinsert
augroup END
" terminal mappings
nnoremap <leader>t :split term://$SHELL<CR><C-\><C-n>:resize 24<CR>i
nnoremap <C-t> :split term://$SHELL<CR><C-\><C-n>:resize 24<CR>i
nnoremap <leader><leader>t :vsplit term://$SHELL<CR><C-\><C-n>:vertical resize 120<CR>i
" nnoremap <C-S-T> :vsplit term://$SHELL<CR><C-\><C-n>:vertical resize 120<CR>i
nnoremap <C-v> :vsplit term://$SHELL<CR><C-\><C-n>:vertical resize 120<CR>i
" close the terminal
tnoremap <C-w> <C-\><C-n>:q!<CR>
tnoremap <leader>w <C-\><C-n>:q!<CR>
tnoremap <C-n> <C-\><C-n>
tnoremap <C-[> <C-\><C-n>
" moving between terminal splits
tnoremap <C-h> <C-\><C-n>:TmuxNavigateLeft<CR>
tnoremap <C-j> <C-\><C-n>:TmuxNavigateDown<CR>
tnoremap <C-k> <C-\><C-n>:TmuxNavigateUp<CR>
tnoremap <C-l> <C-\><C-n>:TmuxNavigateRight<CR>
" Jump to the next or previous line that has the same level or a lower
" level of indentation than the current line.
"
@ -121,8 +123,12 @@ nnoremap <leader>h :b#<CR>
" use leader j and k to switch buffers as well
nnoremap <leader>k :bnext<CR>
nnoremap <leader>j :bprevious<CR>
nnoremap <C-k> :bnext<CR>
nnoremap <C-j> :bprevious<CR>
" window/pane navigation
nnoremap <C-h> :TmuxNavigateLeft<CR>
nnoremap <C-j> :TmuxNavigateDown<CR>
nnoremap <C-k> :TmuxNavigateUp<CR>
nnoremap <C-l> :TmuxNavigateRight<CR>
if has('nvim')
nnoremap <leader>r :source $vimdir/init.vim<CR>

View file

@ -18,22 +18,6 @@ if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") && index(jump_to_pos_blacklist, &ft) | exe "normal! g'\"" | endif
endif
" terminal split in neovim even tho we tmux
if has('nvim')
function! TerminalSplit()
let current_file = @%
echo current_file
if match(current_file, "term://*") != -1
split
terminal
else
split
resize 24
terminal
endif
endfunction
endif
" make any necessary directories in the path when saving a file
fun! <SID>AutoMakeDirectory()
let s:directory = expand("<afile>:p:h")

View file

@ -38,6 +38,8 @@ let g:indent_guide_auto_colors = 1
let g:indent_guides_enable_on_vim_startup = 1
let g:prosession_dir = $vimdir."/session/"
let g:polyglot_disabled = ['cue', 'cuesheet']
" let g:fzf_layout = { 'window': 'enew' }
" check if we're using vim as the manpage viewer before loading session plugins
@ -73,7 +75,6 @@ Plug 'dbakker/vim-projectroot' " adds helper fu
Plug 'junegunn/goyo.vim' " better distraction-free editing
Plug 'tpope/vim-sleuth' " try and detect indent method
Plug 'editorconfig/editorconfig-vim' " loads project-specific editor settings
Plug 'sheerun/vim-polyglot' " vim plugin loader for many languages
Plug 'leafo/moonscript-vim', {'for': ['moon', 'moonscript']} " moonscript language
Plug 'OmniSharp/omnisharp-vim', {'for': ['cs']} " C# language
Plug 'scrooloose/nerdtree' " file browser
@ -90,4 +91,5 @@ Plug 'tpope/vim-dadbod' " vim
Plug 'lytedev/elm-vim', {'for': ['elm']} " elm lang
Plug 'google/vim-jsonnet', {'for': ['jsonnet', 'libsonnet']} " jsonnet
Plug 'sirtaj/vim-openscad', {'for': ['scad']} " openscad
Plug 'jjo/vim-cue'
" Plug 'ssh://git@git.lyte.dev:2222/lytedev/vim-lytlang.git'

View file

@ -153,6 +153,7 @@ alias man "vman"
# neomutt is better
alias mutt "neomutt"
alias mail "mutt"
# fsw aliases
alias fsw-mix-test 'fsw "mix test" ./**/*.{ex,exs,erl,hrl,xrl,yrl}'
@ -160,5 +161,5 @@ alias fsw-mix-test 'fsw "mix test" ./**/*.{ex,exs,erl,hrl,xrl,yrl}'
# weechat aliases
function chat
set -l pass (pass config/weechat-passphrase | head -n 1)
env WEECHAT_PASSPHRASE $pass weechat
env WEECHAT_PASSPHRASE=$pass weechat
end

View file

@ -1,8 +1,8 @@
#!/usr/bin/env fish
set -U XDG_CONFIG_HOME $HOME/.config
set -U DOTFILES_PATH $XDG_CONFIG_HOME/dotfiles
set -U ENV_PATH $HOME/.env
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
@ -16,10 +16,10 @@ for f in key-bindings colors prompt aliases
source $DOTFILES_PATH/apps/shell/fish/$f.fish
end
set -U _JAVA_AWT_WM_NONREPARENTING 1
set -U TERMINAL kitty
set -U BROWSER firefox-developer-edition
set -U ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" # iex history
set -Ux _JAVA_AWT_WM_NONREPARENTING 1
set -Ux TERMINAL kitty
set -Ux BROWSER firefox-developer-edition
set -Ux ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" # iex history
# set our EDITOR to neovim if we've got it
set -Ux EDITOR vim
@ -29,6 +29,9 @@ if has_command nvim
set -Ux EDITOR nvim
end
# more sane ls colors
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
@ -36,7 +39,7 @@ maybe_source_env_file .hidden/config.fish
mkdir -p $NOTES_PATH $USER_LOGS_PATH $SCROTS_PATH
command -v fd 2>&1 >/dev/null && set -U FZF_DEFAULT_COMMAND 'fd --type f --hidden --follow --exclude .git'
has_command fd && set -Ux FZF_DEFAULT_COMMAND 'fd --type f --hidden --follow --exclude .git'
# we assume the user uses "$HOME" to just store their mess of dotfiles and other
# nonsense that clutters it up and that they have a preferred starting

View file

@ -2,7 +2,7 @@
function fish_user_key_bindings
fzf_key_bindings
fish_vi_key_bindings --no-erase
fish_vi_key_bindings insert --no-erase
set vi_esc "if commandline -P; commandline -f cancel; else; set fish_bind_mode default; commandline -f backward-char force-repaint; end"
@ -17,6 +17,8 @@ function fish_user_key_bindings
bind -M insert \cp up-or-search
bind -M insert \cn down-or-search
bind -M insert \cs fzf-cd-widget
bind -M insert \cf end-of-line
bind -M insert \ce end-of-line
bind -M insert \ca beginning-of-line
bind -M insert \cw forward-word
# bind -M insert \t forward-word
end

View file

@ -16,15 +16,30 @@ has_command python && set -U fish_user_paths (python -m site --user-base)"/bin"
has_command ruby && set -U fish_user_paths (ruby -e 'print Gem.user_dir')"/bin" $fish_user_paths
if test (dirname (basename $HOME)) = $USER
set -U NICE_HOME $HOME
set -Ux NICE_HOME $HOME
else
set -U NICE_HOME /home/$USER
set -Ux NICE_HOME /home/$USER
end
for p in $NICE_HOME $HOME $ENV_PATH
test -f $p/.nice_home && set -U NICE_HOME (cat $p/.nice_home)
test -f $p/.nice_home && set -Ux NICE_HOME (cat $p/.nice_home)
end
set -U NOTES_PATH $NICE_HOME/doc/notes
set -U SCROTS_PATH $NICE_HOME/img/scrots
set -U USER_LOGS_PATH $NICE_HOME/doc/logs
set -Ux NOTES_PATH $NICE_HOME/doc/notes
set -Ux SCROTS_PATH $NICE_HOME/img/scrots
set -Ux USER_LOGS_PATH $NICE_HOME/doc/logs
set -Ux XDG_DESKTOP_DIR $HOME/desktop
set -Ux XDG_PUBLICSHARE_DIR $HOME/public
set -Ux XDG_TEMPLATES_DIR $HOME/templates
set -Ux XDG_DOCUMENTS_DIR $NICE_HOME/doc
set -Ux XDG_DOWNLOAD_DIR $NICE_HOME/dl
set -Ux XDG_MUSIC_DIR $NICE_HOME/music
set -Ux XDG_PICTURES_DIR $NICE_HOME/img
set -Ux XDG_VIDEOS_DIR $NICE_HOME/video
set -Ux XDG_GAMES_DIR $NICE_HOME/games
set -Ux NOTES_PATH $NOTES_PATH $XDG_DOCUMENTS_DIR/notes
set -Ux USER_LOGS_PATH $USER_LOGS_PATH $XDG_DOCUMENTS_DIR/logs
set -Ux SCROTS_PATH $SCROTS_PATH $XDG_PICTURES_DIR/scrots

View file

@ -9,7 +9,6 @@
!/logger.conf
!/lua.conf
!/perl.conf
!/plugins.conf
!/python.conf
!/relay.conf
!/script.conf

View file

@ -30,6 +30,7 @@ display_join_message = "329,332,333,366"
display_old_topic = on
display_pv_away_once = on
display_pv_back = on
display_pv_warning_address = off
highlight_channel = "$nick"
highlight_pv = "$nick"
highlight_server = "$nick"
@ -75,10 +76,12 @@ item_lag_finished = yellow
item_nick_modes = default
message_chghost = brown
message_join = green
message_kick = red
message_quit = red
mirc_remap = "1,-1:darkgray"
nick_prefixes = "y:lightred;q:lightred;a:lightcyan;o:lightgreen;h:lightmagenta;v:yellow;*:lightblue"
notice = green
reason_kick = default
reason_quit = default
topic_current = default
topic_new = white
@ -88,7 +91,6 @@ topic_old = default
autoreconnect_delay_growing = 2
autoreconnect_delay_max = 600
ban_mask_default = "*!$ident@$host"
channel_encode = off
colors_receive = on
colors_send = on
lag_check = 60
@ -121,6 +123,7 @@ autorejoin_delay = 30
away_check = 0
away_check_max_nicks = 25
capabilities = ""
charset_message = message
command = ""
command_delay = 0
connection_timeout = 60
@ -146,6 +149,7 @@ ssl = off
ssl_cert = ""
ssl_dhkey_size = 2048
ssl_fingerprint = ""
ssl_password = ""
ssl_priorities = "NORMAL:-VERS-SSL3.0"
ssl_verify = on
usermode = ""

View file

@ -19,6 +19,7 @@ backlog_line = default
[file]
auto_log = on
color_lines = off
flush_delay = 120
fsync = off
info_lines = off

View file

@ -1,138 +0,0 @@
#
# weechat -- plugins.conf
#
# WARNING: It is NOT recommended to edit this file by hand,
# especially if WeeChat is running.
#
# Use /set or similar command to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart
#
[var]
perl.highmon.alignment = "channel"
perl.highmon.away_only = "off"
perl.highmon.color_buf = "on"
perl.highmon.first_run = "true"
perl.highmon.hotlist_show = "off"
perl.highmon.logging = "off"
perl.highmon.merge_private = "off"
perl.highmon.nick_prefix = "<"
perl.highmon.nick_suffix = ">"
perl.highmon.output = "buffer"
perl.highmon.short_names = "off"
python.autobump.highprio_buffers = "irc.server.*,core.weechat"
python.autobump.lowprio_buffers = ""
python.autobump.tags = "notify_message,notify_private,self_msg"
python.buffer_open.layout_apply = "off"
python.buffer_open.max_closed = "10"
python.go.auto_jump = "off"
python.go.buffer_number = "on"
python.go.color_name = "black,cyan"
python.go.color_name_highlight = "red,cyan"
python.go.color_name_highlight_selected = "red,brown"
python.go.color_name_selected = "black,brown"
python.go.color_number = "yellow,magenta"
python.go.color_number_selected = "yellow,red"
python.go.fuzzy_search = "off"
python.go.message = "Go to: "
python.go.short_name = "off"
python.go.sort = "number,beginning"
python.go.use_core_instead_weechat = "off"
python.grep.clear_buffer = "off"
python.grep.default_tail_head = "10"
python.grep.go_to_buffer = "on"
python.grep.log_filter = ""
python.grep.max_lines = "4000"
python.grep.show_summary = "on"
python.grep.size_limit = "2048"
python.grep.timeout_secs = "300"
python.slack.auto_open_threads = "false"
python.slack.background_load_all_history = "false"
python.slack.channel_name_typing_indicator = "true"
python.slack.color_buflist_muted_channels = "darkgray"
python.slack.color_edited_suffix = "095"
python.slack.color_reaction_suffix = "darkgray"
python.slack.color_thread_suffix = "lightcyan"
python.slack.colorize_private_chats = "false"
python.slack.debug_level = "3"
python.slack.debug_mode = "false"
python.slack.distracting_channels = ""
python.slack.external_user_suffix = "*"
python.slack.files_download_location = ""
python.slack.group_name_prefix = "&"
python.slack.map_underline_to = "_"
python.slack.migrated = "true"
python.slack.muted_channels_activity = "personal_highlights"
python.slack.never_away = "false"
python.slack.notify_usergroup_handle_updated = "false"
python.slack.record_events = "false"
python.slack.render_bold_as = "bold"
python.slack.render_italic_as = "italic"
python.slack.send_typing_notice = "true"
python.slack.server_aliases = ""
python.slack.shared_name_prefix = "%"
python.slack.short_buffer_names = "false"
python.slack.show_buflist_presence = "true"
python.slack.show_reaction_nicks = "false"
python.slack.slack_api_token = "INSERT VALID KEY HERE!"
python.slack.slack_timeout = "20000"
python.slack.switch_buffer_on_join = "true"
python.slack.thread_messages_in_channel = "false"
python.slack.unfurl_auto_link_display = "both"
python.slack.unfurl_ignore_alt_text = "false"
python.slack.unhide_buffers_with_activity = "false"
[desc]
python.autobump.highprio_buffers = "List of buffers to be sorted with high priority"
python.autobump.lowprio_buffers = "List of buffers to be sorted with low priority"
python.autobump.tags = "List of message tags that are considered activity"
python.buffer_open.layout_apply = "open closed layout buffers on /layout apply (default: "off")"
python.buffer_open.max_closed = "maximum number of closed buffers to remember (default: "10")"
python.go.auto_jump = "automatically jump to buffer when it is uniquely selected (default: "off")"
python.go.buffer_number = "display buffer number (default: "on")"
python.go.color_name = "color for buffer name (not selected) (default: "black,cyan")"
python.go.color_name_highlight = "color for highlight in buffer name (not selected) (default: "red,cyan")"
python.go.color_name_highlight_selected = "color for highlight in a selected buffer name (default: "red,brown")"
python.go.color_name_selected = "color for a selected buffer name (default: "black,brown")"
python.go.color_number = "color for buffer number (not selected) (default: "yellow,magenta")"
python.go.color_number_selected = "color for selected buffer number (default: "yellow,red")"
python.go.fuzzy_search = "search buffer matches using approximation (default: "off")"
python.go.message = "message to display before list of buffers (default: "Go to: ")"
python.go.short_name = "display and search in short names instead of buffer name (default: "off")"
python.go.sort = "comma-separated list of keys to sort buffers (the order is important, sorts are performed in the given order): name = sort by name (or short name), (default: "number,beginning")"
python.go.use_core_instead_weechat = "use name "core" instead of "weechat" for core buffer (default: "off")"
python.slack.auto_open_threads = "Automatically open threads when mentioned or inresponse to own messages."
python.slack.background_load_all_history = "Load history for each channel in the background as soon as it opens, rather than waiting for the user to look at it."
python.slack.channel_name_typing_indicator = "Change the prefix of a channel from # to > when someone is typing in it. Note that this will (temporarily) affect the sort order if you sort buffers by name rather than by number."
python.slack.color_buflist_muted_channels = "Color to use for muted channels in the buflist"
python.slack.color_edited_suffix = "Color to use for (edited) suffix on messages that have been edited."
python.slack.color_reaction_suffix = "Color to use for the [:wave:(@user)] suffix on messages that have reactions attached to them."
python.slack.color_thread_suffix = "Color to use for the [thread: XXX] suffix on messages that have threads attached to them."
python.slack.colorize_private_chats = "Whether to use nick-colors in DM windows."
python.slack.debug_level = "Show only this level of debug info (or higher) when debug_mode is on. Lower levels -> more messages."
python.slack.debug_mode = "Open a dedicated buffer for debug messages and start logging to it. How verbose the logging is depends on log_level."
python.slack.distracting_channels = "List of channels to hide."
python.slack.external_user_suffix = "The suffix appended to nicks to indicate external users."
python.slack.files_download_location = "If set, file attachments will be automatically downloaded to this location."
python.slack.group_name_prefix = "The prefix of buffer names for groups (private channels)."
python.slack.map_underline_to = "When sending underlined text to slack, use this formatting character for it. The default ("_") sends it as italics. Use "*" to send bold instead."
python.slack.muted_channels_activity = "Control which activity you see from muted channels, either none, personal_highlights, all_highlights or all. none: Don't show any activity. personal_highlights: Only show personal highlights, i.e. not @channel and @here. all_highlights: Show all highlights, but not other messages. all: Show all activity, like other channels."
python.slack.never_away = "Poke Slack every five minutes so that it never marks you "away"."
python.slack.notify_usergroup_handle_updated = "Control if you want to see notification when a usergroup's handle has changed, either true or false"
python.slack.record_events = "Log all traffic from Slack to disk as JSON."
python.slack.render_bold_as = "When receiving bold text from Slack, render it as this in weechat."
python.slack.render_italic_as = "When receiving bold text from Slack, render it as this in weechat. If your terminal lacks italic support, consider using "underline" instead."
python.slack.send_typing_notice = "Alert Slack users when you are typing a message in the input bar (Requires reload)"
python.slack.server_aliases = "A comma separated list of `subdomain:alias` pairs. The alias will be used instead of the actual name of the slack (in buffer names, logging, etc). E.g `work:no_fun_allowed` would make your work slack show up as `no_fun_allowed` rather than `work.slack.com`."
python.slack.shared_name_prefix = "The prefix of buffer names for shared channels."
python.slack.short_buffer_names = "Use `foo.#channel` rather than `foo.slack.com.#channel` as the internal name for Slack buffers."
python.slack.show_buflist_presence = "Display a `+` character in the buffer list for present users."
python.slack.show_reaction_nicks = "Display the name of the reacting user(s) alongside each reactji."
python.slack.slack_api_token = "List of Slack API tokens, one per Slack instance you want to connect to. See the README for details on how to get these."
python.slack.slack_timeout = "How long (ms) to wait when communicating with Slack."
python.slack.switch_buffer_on_join = "When /joining a channel, automatically switch to it as well."
python.slack.thread_messages_in_channel = "When enabled shows thread messages in the parent channel."
python.slack.unfurl_auto_link_display = "When displaying ("unfurling") links to channels/users/etc, determine what is displayed when the text matches the url without the protocol. This happens when Slack automatically creates links, e.g. from words separated by dots or email addresses. Set it to "text" to only display the text written by the user, "url" to only display the url or "both" (the default) to display both."
python.slack.unfurl_ignore_alt_text = "When displaying ("unfurling") links to channels/users/etc, ignore the "alt text" present in the message and instead use the canonical name of the thing being linked to."
python.slack.unhide_buffers_with_activity = "When activity occurs on a buffer, unhide it even if it was previously hidden (whether by the user or by the distracting_channels setting)."

View file

@ -90,6 +90,7 @@ mouse = off
mouse_timer_delay = 100
nick_color_force = ""
nick_color_hash = djb2
nick_color_hash_salt = ""
nick_color_stop_chars = "_|["
nick_prefix = ""
nick_suffix = ""

View file

@ -44,5 +44,6 @@ auto_rename = on
auto_resume = on
convert_spaces = on
download_path = "%h/xfer"
download_temporary_suffix = ".part"
upload_path = "~"
use_nick_in_filename = on

5
bin/clipstatus Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env sh
echo "Primary : $(xclip -out -selection primary)"
echo "Secondary: $(xclip -out -selection primary)"
echo "Clipboard: $(xclip -out -selection clipboard)"

0
bin/paths Normal file → Executable file
View file

View file

@ -22,6 +22,7 @@ ssh ld mkdir -p "${internal_dir}"
rsync --progress --no-owner --no-group --no-perms --stats --ignore-existing "${f}" "${HOST}:${internal_dir}/${fname}" | tee "${HOME}/.upload.log"
code="$?"
ssh ld chmod a+r "${internal_dir}/${fname}"
echo "Uploaded to: ${url}"
if [ "$code" -ne 0 ]; then
printf "ERROR: The file failed to upload - perhaps rsync failed for some reason?\n See \"%s/.upload.log\" for details\n" "$HOME"

View file