dotfiles

My collection of dotfiles
git clone git://git.noxz.tech/dotfiles
Log | Files | Refs

commit 349ccdff3c2f84aa3975df9611251586706eed87
parent 35d44fd00c1264639398c2d7755db84825879278
Author: Chris Noxz <chris@noxz.tech>
Date:   Sun,  6 Oct 2019 10:21:58 +0200

Moving more to .config (some problems with GTK requires ~/.gtkrc-2.0 though...)

Diffstat:
Abin/.bin/alias/tmux | 3+++
Mbin/.bin/alias/vim | 1+
Mbin/.bin/alias/vimb-tabbed | 1-
Mbin/.bin/mkthemes | 2+-
Mbin/.bin/operations | 2+-
Dcdm/.cdmrc | 91-------------------------------------------------------------------------------
Rcdm/.cdm-dialogrc -> cdm/.config/cdm/cdm-dialogrc | 0
Acdm/.config/cdm/cdmrc | 91+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rgit/.gitconfig -> git/.config/git/config | 0
Agtk/.config/gtk-2.0/gtkfilechooser.ini | 11+++++++++++
Rgtk/.gtkrc-2.0 -> gtk/.config/gtk-2.0/gtkrc-2.0 | 0
Agtk/.gtkrc-2.0 | 2++
Mksh/.profile | 9+++++++++
Rmbsync/.mbsyncrc-template -> mbsync/.config/mbsync/template | 0
Rmsmtp/.msmtprc-template -> msmtp/.config/mstmp/template | 0
Rmutt/.mutt/mailcap -> mutt/.config/mutt/mailcap | 0
Amutt/.config/mutt/muttrc | 125+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dmutt/.mutt/muttrc | 126-------------------------------------------------------------------------------
Dmutt/.mutt/signature.muttrc | 9---------
Rthemes/.themes/ashes.vt -> themes/.config/themes/ashes.vt | 0
Rthemes/.themes/blaquebeard.vt -> themes/.config/themes/blaquebeard.vt | 0
Rthemes/.themes/blue.vt -> themes/.config/themes/blue.vt | 0
Rthemes/.themes/dark.vt -> themes/.config/themes/dark.vt | 0
Rthemes/.themes/electric-warlock.vt -> themes/.config/themes/electric-warlock.vt | 0
Rthemes/.themes/fray.vt -> themes/.config/themes/fray.vt | 0
Rthemes/.themes/grey.vt -> themes/.config/themes/grey.vt | 0
Rthemes/.themes/light.vt -> themes/.config/themes/light.vt | 0
Rthemes/.themes/lightv2.vt -> themes/.config/themes/lightv2.vt | 0
Rthemes/.themes/nixio.vt -> themes/.config/themes/nixio.vt | 0
Rthemes/.themes/ocean.vt -> themes/.config/themes/ocean.vt | 0
Rthemes/.themes/oxide.vt -> themes/.config/themes/oxide.vt | 0
Rthemes/.themes/purple.vt -> themes/.config/themes/purple.vt | 0
Rthemes/.themes/ricing-is-fun.vt -> themes/.config/themes/ricing-is-fun.vt | 0
Rthemes/.themes/synthwave.vt -> themes/.config/themes/synthwave.vt | 0
Rthemes/.themes/tube.vt -> themes/.config/themes/tube.vt | 0
Rthemes/.themes/vtrgb2theme -> themes/.config/themes/vtrgb2theme | 0
Atmux/.config/tmux/tmux.conf | 195+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dtmux/.tmux.conf | 195-------------------------------------------------------------------------------
Mvim/.config/vim/vimrc | 20++++++++++++++++++++
Dvim/.vim | 2--
Dvim/.vimrc | 2--
41 files changed, 459 insertions(+), 428 deletions(-)

diff --git a/bin/.bin/alias/tmux b/bin/.bin/alias/tmux @@ -0,0 +1,3 @@ +#!/bin/sh + +/bin/tmux -f "$XDG_CONFIG_HOME/tmux/tmux.conf" "$@" diff --git a/bin/.bin/alias/vim b/bin/.bin/alias/vim @@ -1,3 +1,4 @@ #!/bin/sh +#/bin/vim -S "$HOME/.config/vim/vimrc" "$@" /bin/vim "$@" diff --git a/bin/.bin/alias/vimb-tabbed b/bin/.bin/alias/vimb-tabbed @@ -3,5 +3,4 @@ tabbed \ -n vimb \ -c vimb "$@" \ - -c ~/.vimb/config \ -e diff --git a/bin/.bin/mkthemes b/bin/.bin/mkthemes @@ -1,6 +1,6 @@ #!/bin/sh -for vt in $HOME/.themes/*.vt +for vt in $HOME/.config/themes/*.vt do _r=""; _g=""; _b="" _n=${vt##*/} diff --git a/bin/.bin/operations b/bin/.bin/operations @@ -42,7 +42,7 @@ ztatus) esac ;; sync-mail) - ~/.bin/mbsync-stdin < ~/.mbsyncrc-template -a -V + ~/.bin/mbsync-stdin < ~/.config/mbsync/template -a -V for f in ~/mail/webmail-*/INBOX/new/*; do touch "$f" 2>/dev/null; done ;; dmenu|"") diff --git a/cdm/.cdmrc b/cdm/.cdmrc @@ -1,91 +0,0 @@ -#!/bin/bash -# -# Example config file for cdm(1). -# Values set here is the default as in cdm(1). - -# List of programs, commands with whitespaces should be quoted or escaped. -# If unset, all sessions in /etc/X11/Sessions or /usr/share/xsessions are -# offered as choices. -# -# (An example:) -# binlist=( -# '~/.xsession' # Launch your X session, -# '/bin/bash --login' # or just execute your shell, -# '/usr/bin/fbterm' # or start a frame buffer console, -# '/usr/bin/cdm ~/.submenu.cdmrc' # or go to a submenu :) -# ) - -binlist=( - '/usr/bin/startx /home/z0noxz/.xinitrc dwm' - 'echo /bin/tmux | /usr/bin/ksh -l' - '/usr/bin/ksh -l' - 'sudo runit-init 6' - 'sudo runit-init 0' -) - -# List all program display names, one-by-one matched with $binlist. -# Names with whitespaces should be quoted or escaped. -# -# (Continued example:) -# namelist=('X session' Console FBTerm 'Sub menu') - -namelist=( - 'dwm (x11)' - 'tmux (tty)' - 'ksh (tty)' - 'reboot' - 'shutdown' -) - -# Type of the programs, one-by-one matched with $binlist. -# `C' for *C*onsole programs, which would be `exec'ed. -# `X' for *X* programs, which would be run with cdm-xlaunch(1). -# -# (Continued example:) -# flaglist=(X C C C) - -flaglist=( - C # Override cdm-xlaunch, and use startx - C - C - C - C -) - -# Style for the cdm dialog, which is printed with dialog(1). -# Default to unset, causing dialog(1) to use the system wide default. -# See /usr/share/doc/cdm/themes for some nice choices. -dialogrc=~/.cdm-dialogrc - -# Index of the first item in the menu. -countfrom=1 - -# Set default display. -display=0 - -# Where should the first X tty be spawned? -# special value `keep' causes to run X in current tty. -xtty=keep - -# Should cdm(1) stick to the specified display? -locktty=no - -# Use ConsoleKit for X session? -consolekit=yes - -# Timeout for waiting for X session to register with ConsoleKit. -cktimeout=30 - -# Additional arguments to pass to X server, which is usually called as: -# /usr/bin/X :$display "${serverargs[@]}" vt$((xtty+display)) -# Arguments with whitespaces should be quoted or escaped. -serverargs=(-nolisten tcp) - -# Alternative method of calling startx(/setsid). Should only be set if cdm -# does not start X as expected (bash -x shows call to setsid startx, but for -# no apparent reason does not start X). -# Only provided in the hope it may be useful, not a guaranteed fix. -altstartx=no - -# Destination for stdout and stderr output from startx. -startxlog=/dev/null diff --git a/cdm/.cdm-dialogrc b/cdm/.config/cdm/cdm-dialogrc diff --git a/cdm/.config/cdm/cdmrc b/cdm/.config/cdm/cdmrc @@ -0,0 +1,91 @@ +#!/bin/bash +# +# Example config file for cdm(1). +# Values set here is the default as in cdm(1). + +# List of programs, commands with whitespaces should be quoted or escaped. +# If unset, all sessions in /etc/X11/Sessions or /usr/share/xsessions are +# offered as choices. +# +# (An example:) +# binlist=( +# '~/.xsession' # Launch your X session, +# '/bin/bash --login' # or just execute your shell, +# '/usr/bin/fbterm' # or start a frame buffer console, +# '/usr/bin/cdm ~/.submenu.cdmrc' # or go to a submenu :) +# ) + +binlist=( + '/usr/bin/startx /home/z0noxz/.xinitrc dwm' + 'echo /bin/tmux | /usr/bin/ksh -l' + '/usr/bin/ksh -l' + 'sudo runit-init 6' + 'sudo runit-init 0' +) + +# List all program display names, one-by-one matched with $binlist. +# Names with whitespaces should be quoted or escaped. +# +# (Continued example:) +# namelist=('X session' Console FBTerm 'Sub menu') + +namelist=( + 'dwm (x11)' + 'tmux (tty)' + 'ksh (tty)' + 'reboot' + 'shutdown' +) + +# Type of the programs, one-by-one matched with $binlist. +# `C' for *C*onsole programs, which would be `exec'ed. +# `X' for *X* programs, which would be run with cdm-xlaunch(1). +# +# (Continued example:) +# flaglist=(X C C C) + +flaglist=( + C # Override cdm-xlaunch, and use startx + C + C + C + C +) + +# Style for the cdm dialog, which is printed with dialog(1). +# Default to unset, causing dialog(1) to use the system wide default. +# See /usr/share/doc/cdm/themes for some nice choices. +dialogrc="${XDG_CONFIG_HOME:-$HOME/.config}/cdm/cdm-dialogrc" + +# Index of the first item in the menu. +countfrom=1 + +# Set default display. +display=0 + +# Where should the first X tty be spawned? +# special value `keep' causes to run X in current tty. +xtty=keep + +# Should cdm(1) stick to the specified display? +locktty=no + +# Use ConsoleKit for X session? +consolekit=yes + +# Timeout for waiting for X session to register with ConsoleKit. +cktimeout=30 + +# Additional arguments to pass to X server, which is usually called as: +# /usr/bin/X :$display "${serverargs[@]}" vt$((xtty+display)) +# Arguments with whitespaces should be quoted or escaped. +serverargs=(-nolisten tcp) + +# Alternative method of calling startx(/setsid). Should only be set if cdm +# does not start X as expected (bash -x shows call to setsid startx, but for +# no apparent reason does not start X). +# Only provided in the hope it may be useful, not a guaranteed fix. +altstartx=no + +# Destination for stdout and stderr output from startx. +startxlog=/dev/null diff --git a/git/.gitconfig b/git/.config/git/config diff --git a/gtk/.config/gtk-2.0/gtkfilechooser.ini b/gtk/.config/gtk-2.0/gtkfilechooser.ini @@ -0,0 +1,11 @@ +[Filechooser Settings] +LocationMode=path-bar +ShowHidden=false +ShowSizeColumn=true +GeometryX=36 +GeometryY=258 +GeometryWidth=780 +GeometryHeight=585 +SortColumn=modified +SortOrder=ascending +StartupMode=recent diff --git a/gtk/.gtkrc-2.0 b/gtk/.config/gtk-2.0/gtkrc-2.0 diff --git a/gtk/.gtkrc-2.0 b/gtk/.gtkrc-2.0 @@ -0,0 +1 @@ +.config/gtk-2.0/gtkrc-2.0+ \ No newline at end of file diff --git a/ksh/.profile b/ksh/.profile @@ -1,9 +1,18 @@ # set .kshrc as ENV if it exists [ -f "$HOME/.kshrc" ] && export ENV="$HOME/.kshrc" +# setup XDG +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_DATA_HOME="$HOME/.local/share" + # add local paths export PATH="$PATH:$HOME/.bin:/xtra/bin" +# setup vimrc with XDG support +export VIMINIT="source $XDG_CONFIG_HOME/vim/vimrc" + +export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0" export TERMINAL="/usr/local/bin/st" export WM="dwm" diff --git a/mbsync/.mbsyncrc-template b/mbsync/.config/mbsync/template diff --git a/msmtp/.msmtprc-template b/msmtp/.config/mstmp/template diff --git a/mutt/.mutt/mailcap b/mutt/.config/mutt/mailcap diff --git a/mutt/.config/mutt/muttrc b/mutt/.config/mutt/muttrc @@ -0,0 +1,125 @@ +# Basic +set editor = "/usr/bin/vim" +set sendmail = "msmtp-tpl ~/.config/mstmp/template" +set use_from = yes +set envelope_from = yes +set mail_check = 0 + +# composing mail +set forward_format = "Fwd: %s" +set include +set forward_quote +set sig_dashes = yes +set send_charset = "us-ascii:utf-8" + +# Bindings +bind index j next-entry +bind index k previous-entry +bind attach,index,pager \ej next-page +bind attach,index,pager \ek previous-page +bind pager g noop +bind pager gg top +bind pager G bottom +bind attach,index g noop +bind attach,index gg first-entry +bind attach,index G last-entry +bind index,pager D delete-message +bind index d noop +bind index \Cy previous-entry +bind index \Ce next-entry +macro index,pager c "<change-folder>?<toggle-mailboxes>" +macro index,pager >m "<tag-prefix><save-message>?<toggle-mailboxes>" +macro index,pager >c "<tag-prefix><copy-message>?<toggle-mailboxes>" +macro compose >a "<attach-message>?<toggle-mailboxes>" +macro index,pager R "<shell-escape>operations sync-mail<enter><change-folder>!<enter>" + +# Sidebar +set sleep_time = 0 +set sidebar_visible = yes +set sidebar_format = " %B%?F? [%F]?%* %?N?%N/?%?S?%S? " +set sidebar_short_path +set sidebar_delim_chars = "/" +set sidebar_folder_indent +set sidebar_indent_string = " " +set sidebar_width = 34 +set sidebar_divider_char = '│' +set mail_check_stats +bind index,pager J sidebar-next +bind index,pager K sidebar-prev +bind index,pager L sidebar-open +bind index,pager B sidebar-toggle-visible + +# Index +set date_format = "%Y-%m-%d %H:%M:%S" +set index_format = "%3C [ %Z ] %D %-20.20F %s (%-4.4c)" +set sort = "threads" +set sort_aux = "reverse-date" + +# Hide help +set help = "yes" + +# Colorize index +color normal default default +color tilde color2 color0 +color index color14 default "~b \".*\" !~N !~O !~U !~F !~T !~D" +color indicator color6 color5 +color index color15 default ~N +color index color15 default ~O +color index color15 default ~U +color index color10 default ~F +color index color11 default ~T +color index color9 default ~D +color index_number color15 default +color index_size color8 default +color body color9 default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ +color body color12 default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ +color status color6 color5 +color message color14 default +color attachment color14 color5 +color error color9 default +color tree color13 default +color search color6 color5 +color hdrdefault color30 color6 +color header color0 color2 '^date:' +color header color0 color2 '^(to|cc|bcc):' +color header color0 color2 '^from:' +color header color0 color2 '^subject:' +color header color0 color2 '^user-agent:' +color header color0 color2 '^reply-to:' +color quoted color14 color2 + +# mailcap +set mailcap_path = "~/.config/mutt/mailcap" +alternative_order = text/plain text/enriched text/html +auto_view = text/html +# open message in html view +bind index,pager V noop +macro index,pager V "<view-attachments><search>html<enter><view-mailcap>" + +# Pager +set pager_index_lines = 10 +set pager_context = 3 +set tilde +unset markers + +# status bar +set status_chars = " *%A" +set status_format = " %f (%m messages%?n?, %n new?%?d?, %d to delete?%?t?, %t tagged?)%> %?p?(%p postponed)? %P " + +# headers +set edit_headers = yes +unset use_domain +unset user_agent +unmy_hdr * +#my_hdr X-Info: Keep It Simple, Stupid. +#my_hdr X-Operating-System: `uname -s`, kernel `uname -r` +#my_hdr X-Message-Flag: WARNING: you are using an inferior email client +#my_hdr User-Agent: Every email client sucks, this one just sucks less. + +set my_accf_0 = "/tmp/mutt-webmail-0-local.tld" +set my_accf_1 = "/tmp/mutt-webmail-1-local.tld" +source "[ ! -f $my_accf_0 ] && pass mail/muttrc/webmail-0-local.tld > $my_accf_0; cat $my_accf_0 |" +source "[ ! -f $my_accf_1 ] && pass mail/muttrc/webmail-1-local.tld > $my_accf_1; cat $my_accf_1 |" +source "$my_accf_0" +macro index "\e1" ":source $my_accf_0<enter><change-folder>!<enter>" +macro index "\e2" ":source $my_accf_1<enter><change-folder>!<enter>" diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc @@ -1,126 +0,0 @@ -# Basic -set editor = "/usr/bin/vim" -set sendmail = "msmtp-tpl ~/.msmtprc-template" -set use_from = yes -set envelope_from = yes -set mail_check = 0 - -# composing mail -set forward_format = "Fwd: %s" -set include -set forward_quote -#set signature = "~/.mutt/signature.muttrc" -set sig_dashes = yes -set send_charset = "us-ascii:utf-8" - -# Bindings -bind index j next-entry -bind index k previous-entry -bind attach,index,pager \ej next-page -bind attach,index,pager \ek previous-page -bind pager g noop -bind pager gg top -bind pager G bottom -bind attach,index g noop -bind attach,index gg first-entry -bind attach,index G last-entry -bind index,pager D delete-message -bind index d noop -bind index \Cy previous-entry -bind index \Ce next-entry -macro index,pager c "<change-folder>?<toggle-mailboxes>" -macro index,pager >m "<tag-prefix><save-message>?<toggle-mailboxes>" -macro index,pager >c "<tag-prefix><copy-message>?<toggle-mailboxes>" -macro compose >a "<attach-message>?<toggle-mailboxes>" -macro index,pager R "<shell-escape>operations sync-mail<enter><change-folder>!<enter>" - -# Sidebar -set sleep_time = 0 -set sidebar_visible = yes -set sidebar_format = " %B%?F? [%F]?%* %?N?%N/?%?S?%S? " -set sidebar_short_path -set sidebar_delim_chars = "/" -set sidebar_folder_indent -set sidebar_indent_string = " " -set sidebar_width = 34 -set sidebar_divider_char = '│' -set mail_check_stats -bind index,pager J sidebar-next -bind index,pager K sidebar-prev -bind index,pager L sidebar-open -bind index,pager B sidebar-toggle-visible - -# Index -set date_format = "%Y-%m-%d %H:%M:%S" -set index_format = "%3C [ %Z ] %D %-20.20F %s (%-4.4c)" -set sort = "threads" -set sort_aux = "reverse-date" - -# Hide help -set help = "yes" - -# Colorize index -color normal default default -color tilde color2 color0 -color index color14 default "~b \".*\" !~N !~O !~U !~F !~T !~D" -color indicator color6 color5 -color index color15 default ~N -color index color15 default ~O -color index color15 default ~U -color index color10 default ~F -color index color11 default ~T -color index color9 default ~D -color index_number color15 default -color index_size color8 default -color body color9 default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ -color body color12 default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ -color status color6 color5 -color message color14 default -color attachment color14 color5 -color error color9 default -color tree color13 default -color search color6 color5 -color hdrdefault color30 color6 -color header color0 color2 '^date:' -color header color0 color2 '^(to|cc|bcc):' -color header color0 color2 '^from:' -color header color0 color2 '^subject:' -color header color0 color2 '^user-agent:' -color header color0 color2 '^reply-to:' -color quoted color14 color2 - -# mailcap -set mailcap_path = "~/.mutt/mailcap" -alternative_order = text/plain text/enriched text/html -auto_view = text/html -# open message in html view -bind index,pager V noop -macro index,pager V "<view-attachments><search>html<enter><view-mailcap>" - -# Pager -set pager_index_lines = 10 -set pager_context = 3 -set tilde -unset markers - -# status bar -set status_chars = " *%A" -set status_format = " %f (%m messages%?n?, %n new?%?d?, %d to delete?%?t?, %t tagged?)%> %?p?(%p postponed)? %P " - -# headers -set edit_headers = yes -unset use_domain -unset user_agent -unmy_hdr * -#my_hdr X-Info: Keep It Simple, Stupid. -#my_hdr X-Operating-System: `uname -s`, kernel `uname -r` -#my_hdr X-Message-Flag: WARNING: you are using an inferior email client -#my_hdr User-Agent: Every email client sucks, this one just sucks less. - -set my_accf_0 = "/tmp/mutt-webmail-0-local.tld" -set my_accf_1 = "/tmp/mutt-webmail-1-local.tld" -source "[ ! -f $my_accf_0 ] && pass mail/muttrc/webmail-0-local.tld > $my_accf_0; cat $my_accf_0 |" -source "[ ! -f $my_accf_1 ] && pass mail/muttrc/webmail-1-local.tld > $my_accf_1; cat $my_accf_1 |" -source "$my_accf_0" -macro index "\e1" ":source $my_accf_0<enter><change-folder>!<enter>" -macro index "\e2" ":source $my_accf_1<enter><change-folder>!<enter>" diff --git a/mutt/.mutt/signature.muttrc b/mutt/.mutt/signature.muttrc @@ -1,9 +0,0 @@ ------------------------------------ - - Chris Noxz - - e-mail : chris@noxz.tech - web : https://noxz.tech - git : https://git.noxz.tech - ------------------------------------ diff --git a/themes/.themes/ashes.vt b/themes/.config/themes/ashes.vt diff --git a/themes/.themes/blaquebeard.vt b/themes/.config/themes/blaquebeard.vt diff --git a/themes/.themes/blue.vt b/themes/.config/themes/blue.vt diff --git a/themes/.themes/dark.vt b/themes/.config/themes/dark.vt diff --git a/themes/.themes/electric-warlock.vt b/themes/.config/themes/electric-warlock.vt diff --git a/themes/.themes/fray.vt b/themes/.config/themes/fray.vt diff --git a/themes/.themes/grey.vt b/themes/.config/themes/grey.vt diff --git a/themes/.themes/light.vt b/themes/.config/themes/light.vt diff --git a/themes/.themes/lightv2.vt b/themes/.config/themes/lightv2.vt diff --git a/themes/.themes/nixio.vt b/themes/.config/themes/nixio.vt diff --git a/themes/.themes/ocean.vt b/themes/.config/themes/ocean.vt diff --git a/themes/.themes/oxide.vt b/themes/.config/themes/oxide.vt diff --git a/themes/.themes/purple.vt b/themes/.config/themes/purple.vt diff --git a/themes/.themes/ricing-is-fun.vt b/themes/.config/themes/ricing-is-fun.vt diff --git a/themes/.themes/synthwave.vt b/themes/.config/themes/synthwave.vt diff --git a/themes/.themes/tube.vt b/themes/.config/themes/tube.vt diff --git a/themes/.themes/vtrgb2theme b/themes/.config/themes/vtrgb2theme diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf @@ -0,0 +1,195 @@ +############################################################################# +# _ __ # +# | |_ _ __ ___ _ ___ __ ___ ___ _ __ / _| # +# | __| '_ ` _ \| | | \ \/ / / __/ _ \| '_ \| |_ # +# | |_| | | | | | |_| |> < | (_| (_) | | | | _| # +# (_)__|_| |_| |_|\__,_/_/\_(_)___\___/|_| |_|_| # +# # +############################################################################# + +############################################################################# +# base settings # +############################################################################# + +# set default terminal and shell +set -g default-terminal "st-256color" +set -g default-shell /bin/ksh + +# enable mouse mode +set -g mouse on + +# 1-based index +set -g base-index 1 +set -g pane-base-index 1 + +# use vi keys where possible +setw -g mode-keys vi +set -g status-keys vi + +# misc. settings +set -s escape-time 0 +set -g renumber-windows on +set -g status-interval 10 + +############################################################################# +# functionality # +############################################################################# + +# bind prefix to M-` instead +unbind -T root C-b +set -g prefix M-` + +# copy mode extensions +bind -T copy-mode-vi v send -X begin-selection +bind -T copy-mode-vi C-v send -X rectangle-toggle \; \ + send -X begin-selection +bind -T copy-mode-vi y send -X copy-pipe \ + "xclip -i -sel p -f | xclip -i -sel c" \; \ + send -X cancel +bind -T copy-mode-vi Enter send -X copy-pipe \ + "xclip -i -sel p -f | xclip -i -sel c" \; \ + send -X cancel +bind -T copy-mode-vi MouseDragEnd1Pane \ + send -X copy-pipe \ + "xclip -i -sel p -f | xclip -i -sel c" \; \ + send -X cancel +bind -T copy-mode-vi Escape send -X cancel + +# split panes using | and - instead +unbind -T prefix '"' +unbind -T prefix % +bind -T prefix | split-window -h -c "#{pane_current_path}" +bind -T prefix - split-window -v -c "#{pane_current_path}" + +# quick reload config using 'r' +bind -T prefix r source-file ~/.config/tmux/tmux.conf \; \ + display "config reloaded" + +# switch panes using hjkl (dwm like) +bind -T root M-j select-pane -t :.+ +bind -T root M-k select-pane -t :.- +bind -T root M-J swap-pane -s :. -t :.+ \; select-pane -t :.+ +bind -T root M-K swap-pane -s :. -t :.- \; select-pane -t :.- + +# copy and paste +bind -T prefix v run "xclip -o -sel p | tmux loadb -bp -" \; \ + pasteb -bp +bind -T prefix V run "xclip -o -sel c | tmux loadb -bc -" \; \ + pasteb -bc +bind -n MouseDown3Pane run "xclip -o -sel p | tmux loadb -bp -" \; \ + pasteb -bp +bind -n C-MouseDown3Pane run "xclip -o -sel c | tmux loadb -bc -" \; \ + pasteb -bc +# misc. key bindings +unbind -T prefix c +bind -T root M-z resize-pane -Z +bind -T prefix w new-window -c "#{pane_current_path}" +bind -T prefix u run -b "fzf-url.tmux" + +# mouse scrolling +unbind -T root WheelUpPane +unbind -T copy-mode WheelUpPane +unbind -T copy-mode WheelDownPane +unbind -T copy-mode-vi WheelUpPane +unbind -T copy-mode-vi WheelDownPane +bind -T root C-WheelUpPane \ + if-shell -F -t = "#{mouse_any_flag}" \ + "send-keys -M" \ + "if -Ft= \"#{pane_in_mode}\" \ + \"send-keys -M\" \"copy-mode -et=\"" +bind -T copy-mode-vi WheelUpPane \ + select-pane \; send-keys -X -N 1 scroll-up +bind -T copy-mode-vi WheelDownPane \ + select-pane \; send-keys -X -N 1 scroll-down +bind -T copy-mode-vi C-WheelUpPane \ + select-pane \; send-keys -X -N 5 scroll-up +bind -T copy-mode-vi C-WheelDownPane \ + select-pane \; send-keys -X -N 5 scroll-down + +# double and tripple click, to select word and line +bind -T copy-mode-vi DoubleClick1Pane \ + select-pane \; \ + send -X select-word \; \ + send -X copy-pipe \ + "xclip -i -sel p -f | xclip -i -sel c" +bind -T root DoubleClick1Pane \ + select-pane \; \ + copy-mode -M \; \ + send -X select-word \; \ + send -X copy-pipe \ + "xclip -i -sel p -f | xclip -i -sel c" +bind -T copy-mode-vi TripleClick1Pane \ + select-pane \; \ + send -X select-line \; \ + send -X copy-pipe \ + "xclip -i -sel p -f | xclip -i -sel c" +bind -T root TripleClick1Pane \ + select-pane \; \ + copy-mode -M \; \ + send -X select-line \; \ + send -X copy-pipe \ + "xclip -i -sel p -f | xclip -i -sel c" + +# nrowgrid implementation for tmux +bind -T root M-Enter split-window -b -t :.1 \ + -c "#{pane_current_path}" \; \ + run "nrowgrid.tmux" \; \ + select-pane -t :.1 +bind -T root M-= run "nrowgrid.tmux ++" +bind -T root M-- run "nrowgrid.tmux --" +set-hook -g after-kill-pane 'run "nrowgrid.tmux"' +set-hook -g pane-exited 'run "nrowgrid.tmux"' + +############################################################################# +# look and feel # +############################################################################# + +# quiet +set -g visual-activity off +set -g visual-bell off +set -g visual-silence off +setw -g monitor-activity off +set -g bell-action none + +# modes +setw -g clock-mode-colour 'colour6' +setw -g mode-style 'fg=colour0,bg=colour6' + +# panes +set -g pane-border-style 'bg=colour0,fg=colour5' +set -g pane-active-border-style 'bg=colour0,fg=colour11' + +# statusbar +set -g status-position top +set -g status-justify left +set -g status-right-length 64 +set -g status-style 'bg=colour0,fg=colour15' +set -g status-right-style 'bg=colour0,fg=colour15' +set -g status-right '#(/bin/hostname) #[ \ + fg=colour5,bg=colour0]#[ \ + fg=colour6,bg=colour5 \ + ] #(status.tmux battery) #[ \ + ] #(status.tmux temp) #[ \ + fg=colour5,bg=colour6,reverse]#[ \ + fg=colour0,bg=colour6,noreverse \ + ] %Y-%m-%d  %R #[ \ + ]#{?client_prefix,#[ \ + ]#[fg=colour1]#[reverse \ + bg=colour0]#[fg=colour1] PREFIX #[ \ + ],#[ \ + bg=colour6,fg=colour0]#[ \ + bg=colour0,fg=colour1] NORMAL }' +set -g status-left '' + +# window tabs +setw -g window-status-format '#[ \ + fg=colour5,bg=colour2] #I #[ \ + fg=colour2,bg=colour5] #W ' +setw -g window-status-current-format \ + '#[ \ + fg=colour5,bg=colour6] #I #[ \ + fg=colour6,bg=colour5] #W ' + +# messages +set -g message-style 'bg=colour5,fg=colour6' +setw -g message-command-style 'fg=colour0,bg=colour6' diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf @@ -1,195 +0,0 @@ -############################################################################# -# _ __ # -# | |_ _ __ ___ _ ___ __ ___ ___ _ __ / _| # -# | __| '_ ` _ \| | | \ \/ / / __/ _ \| '_ \| |_ # -# | |_| | | | | | |_| |> < | (_| (_) | | | | _| # -# (_)__|_| |_| |_|\__,_/_/\_(_)___\___/|_| |_|_| # -# # -############################################################################# - -############################################################################# -# base settings # -############################################################################# - -# set default terminal and shell -set -g default-terminal "st-256color" -set -g default-shell /bin/ksh - -# enable mouse mode -set -g mouse on - -# 1-based index -set -g base-index 1 -set -g pane-base-index 1 - -# use vi keys where possible -setw -g mode-keys vi -set -g status-keys vi - -# misc. settings -set -s escape-time 0 -set -g renumber-windows on -set -g status-interval 10 - -############################################################################# -# functionality # -############################################################################# - -# bind prefix to M-` instead -unbind -T root C-b -set -g prefix M-` - -# copy mode extensions -bind -T copy-mode-vi v send -X begin-selection -bind -T copy-mode-vi C-v send -X rectangle-toggle \; \ - send -X begin-selection -bind -T copy-mode-vi y send -X copy-pipe \ - "xclip -i -sel p -f | xclip -i -sel c" \; \ - send -X cancel -bind -T copy-mode-vi Enter send -X copy-pipe \ - "xclip -i -sel p -f | xclip -i -sel c" \; \ - send -X cancel -bind -T copy-mode-vi MouseDragEnd1Pane \ - send -X copy-pipe \ - "xclip -i -sel p -f | xclip -i -sel c" \; \ - send -X cancel -bind -T copy-mode-vi Escape send -X cancel - -# split panes using | and - instead -unbind -T prefix '"' -unbind -T prefix % -bind -T prefix | split-window -h -c "#{pane_current_path}" -bind -T prefix - split-window -v -c "#{pane_current_path}" - -# quick reload config using 'r' -bind -T prefix r source-file ~/.tmux.conf \; \ - display "config reloaded" - -# switch panes using hjkl (dwm like) -bind -T root M-j select-pane -t :.+ -bind -T root M-k select-pane -t :.- -bind -T root M-J swap-pane -s :. -t :.+ \; select-pane -t :.+ -bind -T root M-K swap-pane -s :. -t :.- \; select-pane -t :.- - -# copy and paste -bind -T prefix v run "xclip -o -sel p | tmux loadb -bp -" \; \ - pasteb -bp -bind -T prefix V run "xclip -o -sel c | tmux loadb -bc -" \; \ - pasteb -bc -bind -n MouseDown3Pane run "xclip -o -sel p | tmux loadb -bp -" \; \ - pasteb -bp -bind -n C-MouseDown3Pane run "xclip -o -sel c | tmux loadb -bc -" \; \ - pasteb -bc -# misc. key bindings -unbind -T prefix c -bind -T root M-z resize-pane -Z -bind -T prefix w new-window -c "#{pane_current_path}" -bind -T prefix u run -b "fzf-url.tmux" - -# mouse scrolling -unbind -T root WheelUpPane -unbind -T copy-mode WheelUpPane -unbind -T copy-mode WheelDownPane -unbind -T copy-mode-vi WheelUpPane -unbind -T copy-mode-vi WheelDownPane -bind -T root C-WheelUpPane \ - if-shell -F -t = "#{mouse_any_flag}" \ - "send-keys -M" \ - "if -Ft= \"#{pane_in_mode}\" \ - \"send-keys -M\" \"copy-mode -et=\"" -bind -T copy-mode-vi WheelUpPane \ - select-pane \; send-keys -X -N 1 scroll-up -bind -T copy-mode-vi WheelDownPane \ - select-pane \; send-keys -X -N 1 scroll-down -bind -T copy-mode-vi C-WheelUpPane \ - select-pane \; send-keys -X -N 5 scroll-up -bind -T copy-mode-vi C-WheelDownPane \ - select-pane \; send-keys -X -N 5 scroll-down - -# double and tripple click, to select word and line -bind -T copy-mode-vi DoubleClick1Pane \ - select-pane \; \ - send -X select-word \; \ - send -X copy-pipe \ - "xclip -i -sel p -f | xclip -i -sel c" -bind -T root DoubleClick1Pane \ - select-pane \; \ - copy-mode -M \; \ - send -X select-word \; \ - send -X copy-pipe \ - "xclip -i -sel p -f | xclip -i -sel c" -bind -T copy-mode-vi TripleClick1Pane \ - select-pane \; \ - send -X select-line \; \ - send -X copy-pipe \ - "xclip -i -sel p -f | xclip -i -sel c" -bind -T root TripleClick1Pane \ - select-pane \; \ - copy-mode -M \; \ - send -X select-line \; \ - send -X copy-pipe \ - "xclip -i -sel p -f | xclip -i -sel c" - -# nrowgrid implementation for tmux -bind -T root M-Enter split-window -b -t :.1 \ - -c "#{pane_current_path}" \; \ - run "nrowgrid.tmux" \; \ - select-pane -t :.1 -bind -T root M-= run "nrowgrid.tmux ++" -bind -T root M-- run "nrowgrid.tmux --" -set-hook -g after-kill-pane 'run "nrowgrid.tmux"' -set-hook -g pane-exited 'run "nrowgrid.tmux"' - -############################################################################# -# look and feel # -############################################################################# - -# quiet -set -g visual-activity off -set -g visual-bell off -set -g visual-silence off -setw -g monitor-activity off -set -g bell-action none - -# modes -setw -g clock-mode-colour 'colour6' -setw -g mode-style 'fg=colour0,bg=colour6' - -# panes -set -g pane-border-style 'bg=colour0,fg=colour5' -set -g pane-active-border-style 'bg=colour0,fg=colour11' - -# statusbar -set -g status-position top -set -g status-justify left -set -g status-right-length 64 -set -g status-style 'bg=colour0,fg=colour15' -set -g status-right-style 'bg=colour0,fg=colour15' -set -g status-right '#(/bin/hostname) #[ \ - fg=colour5,bg=colour0]#[ \ - fg=colour6,bg=colour5 \ - ] #(status.tmux battery) #[ \ - ] #(status.tmux temp) #[ \ - fg=colour5,bg=colour6,reverse]#[ \ - fg=colour0,bg=colour6,noreverse \ - ] %Y-%m-%d  %R #[ \ - ]#{?client_prefix,#[ \ - ]#[fg=colour1]#[reverse \ - bg=colour0]#[fg=colour1] PREFIX #[ \ - ],#[ \ - bg=colour6,fg=colour0]#[ \ - bg=colour0,fg=colour1] NORMAL }' -set -g status-left '' - -# window tabs -setw -g window-status-format '#[ \ - fg=colour5,bg=colour2] #I #[ \ - fg=colour2,bg=colour5] #W ' -setw -g window-status-current-format \ - '#[ \ - fg=colour5,bg=colour6] #I #[ \ - fg=colour6,bg=colour5] #W ' - -# messages -set -g message-style 'bg=colour5,fg=colour6' -setw -g message-command-style 'fg=colour0,bg=colour6' diff --git a/vim/.config/vim/vimrc b/vim/.config/vim/vimrc @@ -1,6 +1,26 @@ " TODO :: " * some sort of macro for 'make', 'groff' etc...? +"XDG {{{ +if empty("$XDG_CACHE_HOME") + let $XDG_CACHE_HOME="$HOME/.cache" +endif + +if empty("$XDG_CONFIG_HOME") + let $XDG_CONFIG_HOME="$HOME/.config" +endif + +if empty("$XDG_DATA_HOME") + let $XDG_DATA_HOME="$HOME/.local/share" +endif + +set directory=$XDG_CACHE_HOME/vim/swap,~/,/tmp +set backupdir=$XDG_CACHE_HOME/vim/backup,~/,/tmp +set undodir=$XDG_CACHE_HOME/vim/undo,~/,/tmp +set viminfo+=n$XDG_CACHE_HOME/vim/viminfo +set runtimepath+=$XDG_CONFIG_HOME/vim,$XDG_CONFIG_HOME/vim/after,$VIM,$VIMRUNTIME +"}}} + " load plugins {{{ runtime plugins/vim-status/vim-status.vim runtime plugins/vim-tabline/vim-tabline.vim diff --git a/vim/.vim b/vim/.vim @@ -1 +0,0 @@ -.config/vim/- \ No newline at end of file diff --git a/vim/.vimrc b/vim/.vimrc @@ -1 +0,0 @@ -.config/vim/vimrc- \ No newline at end of file