Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
roktas committed Oct 30, 2023
1 parent 04a984c commit e5c2d8f
Show file tree
Hide file tree
Showing 8 changed files with 245 additions and 23 deletions.
27 changes: 14 additions & 13 deletions bash/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ shopt -s histappend
shopt -s nocaseglob
shopt -s no_empty_cmd_completion

# ----------------------------------------------------------------------------------------------------------------------
# Bindings
# ----------------------------------------------------------------------------------------------------------------------

bind '"\eq":"\C-d"'
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
bind '"\e[C": forward-char'
bind '"\e[D": backward-char'
bind 'set completion-ignore-case on'
bind 'set completion-map-case on'
bind 'set mark-symlinked-directories on'
bind 'set show-all-if-ambiguous on'

# ----------------------------------------------------------------------------------------------------------------------
# Portability
# ----------------------------------------------------------------------------------------------------------------------
Expand All @@ -52,19 +66,6 @@ darwin*)
;;
esac

# ----------------------------------------------------------------------------------------------------------------------
# Bindings
# ----------------------------------------------------------------------------------------------------------------------

bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
bind '"\e[C": forward-char'
bind '"\e[D": backward-char'
bind 'set completion-ignore-case on'
bind 'set completion-map-case on'
bind 'set mark-symlinked-directories on'
bind 'set show-all-if-ambiguous on'

# ----------------------------------------------------------------------------------------------------------------------
# Completion
# ----------------------------------------------------------------------------------------------------------------------
Expand Down
6 changes: 6 additions & 0 deletions fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ status --is-interactive; and type -q direnv; and source (direnv hook fish | psub
set fish_greeting ""
set fish_color_valid_path

# ----------------------------------------------------------------------------------------------------------------------
# Bindings
# ----------------------------------------------------------------------------------------------------------------------

bind \eq exit

# ----------------------------------------------------------------------------------------------------------------------
# Colors
# ----------------------------------------------------------------------------------------------------------------------
Expand Down
15 changes: 15 additions & 0 deletions mc/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -euo pipefail; [[ -z ${TRACE:-} ]] || set -x; cd "$(dirname "$0")"

config=${XDG_CONFIG_HOME:-$HOME/.config}/mc

rm -rf "$config" && install -d "$config" && {
ln -sf "$PWD"/mc.keymap -t "$config"
cp "$PWD"/mc.ini "$config"/ini # MC overwrites ini, hence copy
}

data=${XDG_DATA_HOME:-$HOME/.local/share}/mc
rm -rf "$data" && install -d "$data" && {
cp -a "$PWD"/skins "$data"
}
17 changes: 17 additions & 0 deletions mc/mc.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[Midnight-Commander]
use_internal_edit=false
use_internal_view=false
confirm_exit=false
skin=nord

[Layout]
message_visible=false
keybar_visible=false
xterm_title=true
output_lines=0
command_prompt=true
menubar_visible=false
free_space=true

[Panels]
navigate_with_arrows=true
6 changes: 6 additions & 0 deletions mc/mc.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[filemanager]
Quit = f10; alt-q

[panel]
SortByName = alt-N
SortByMTime = alt-M
175 changes: 175 additions & 0 deletions mc/skins/nord.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
[skin]
description = Nord
truecolors = true

[Lines]
horiz = ─
vert = │
lefttop = ┌
righttop = ┐
leftbottom = └
rightbottom = ┘
topmiddle = ┬
bottommiddle = ┴
leftmiddle = ├
rightmiddle = ┤
cross = ┼
dhoriz = ─
dvert = │
dlefttop = ┌
drighttop = ┐
dleftbottom = └
drightbottom = ┘
dtopmiddle = ┬
dbottommiddle = ┴
dleftmiddle = ├
drightmiddle = ┤

[aliases]
black = #3b4252
red = #bf616a
green = #a3be8c
yellow = #ebcb8b
blue = #81a1c1
purple = #b48ead
cyan = #88c0d0
white = #e5e9f0
brightblack = #4c566a
brightred = #bf616a
brightgreen = #a3be8c
brightyellow = #ebcb8b
brightblue = #81a1c1
brightpurple = #b48ead
brightcyan = #8fbcbb
brightwhite = #eceff4
background = #2e3440
foreground = #d8dee9

[core]
_default_ = foreground;background
selected = white;gray
marked = brown;background
markselect = brown;gray
gauge = background;white
input = magenta;background
inputmark = magenta;gray
inputunchanged = blue;background
commandlinemark = background;white
reverse = brown;background
header = white;background
disabled = gray;background
#inputhistory =
#commandhistory =

[dialog]
_default_ = white;background
dhotnormal = brown;background
dfocus = white;gray
dhotfocus = brown;gray
dtitle = brown;background

[error]
_default_ = red;background
errdfocus = red;gray
errdhotnormal = brightred;background
errdhotfocus = brown;gray
errdtitle = brown;background

[filehighlight]
directory = blue; #bold
executable = brightgreen;
symlink = foreground;
hardlink =
stalelink = brightred;
device = brightmagenta;
special = gray;
core = red;
temp = gray;
archive = magenta;
doc =
source = brightcyan;
media = green;
graph = cyan;
database = brightred;

[menu]
_default_ = white;background
menusel = white;gray
menuhot = brown;background
menuhotsel = brown;gray
menuinactive = foreground;background

[popupmenu]
_default_ = white;background
menusel = white;gray
menutitle = white;background

[buttonbar]
button = foreground;background
hotkey = brown;background

[statusbar]
_default_ = white;background

[help]
_default_ = white;background
helpitalic = red;background
helpbold = brown;background
helplink = gray;background
helpslink = white;gray
helptitle = brown;background

[editor]
_default_ = lightgray;background
editbold = white;gray
editmarked = white;gray
editwhitespace = gray;background
editlinestate = white;cyan
bookmark = white;red
bookmarkfound = white;gray
editrightmargin = brightblue;background
#editbg =
editframe = gray;
editframeactive = white;
editframedrag = brightblue;

[viewer]
_default_ = lightgray;background
viewbold = brown;background
viewunderline = brightred;background
viewselected = brown;gray

[diffviewer]
changedline = blue;gray
changednew = red;gray
changed = white;gray
added = white;brown
removed = white;red
error = red;white

[widget-common]
sort-sign-up = ↑
sort-sign-down = ↓

[widget-panel]
sort-up-char = ↑
sort-down-char = ↓
hiddenfiles-show-char = •
hiddenfiles-hide-char = ○
history-prev-item-char = «
history-next-item-char = »
history-show-list-char = ^
filename-scroll-left-char = «
filename-scroll-right-char = »

[widget-scollbar]
first-vert-char = ↑
last-vert-char = ↓
first-horiz-char = «
last-horiz-char = »
current-char = ■
background-char = ▒

[widget-editor]
window-state-char = ↕
window-close-char = ✕
12 changes: 4 additions & 8 deletions tmux/tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# ----------------------------------------------------------------------------------------------------------------------

set -g base-index 1
set -g default-command "/usr/bin/fish"
set -g default-shell "/bin/bash"
set -g history-limit 50000
set -g message-style bg=default,fg=yellow,bold
Expand Down Expand Up @@ -85,7 +86,7 @@ if-shell '[ -z "$WEZTERM_PANE" ]' '
bind -n M-8 select-window -t 8; \
bind -n M-9 select-window -t 9; \
bind -n M-\" last-window; \
bind -n M-a new-window -c "#{pane_current_path}" -n "sh" "exec $SHELL"; \
bind -n M-a new-window -c "#{pane_current_path}" -n "sh" "exec fish"; \
bind -n M-b new-window -c "#{pane_current_path}" -n "bash" "exec bash"; \
bind -n M-m new-window -c "#{pane_current_path}" -n "mc" "exec bash -c mc"; \
'
Expand All @@ -96,10 +97,5 @@ if-shell '[ -z "$WEZTERM_PANE" ]' '

if-shell '[ -n "$SSH_CONNECTION" ]' 'set -g prefix2 C-b; unbind C-b; bind C-b last-window; set -g status-position top'

run-shell ' \
viewer=$(command -v viewer); \
[ -n "$viewer" ] && tmux setenv VIEWER "$viewer"; \
\
editor=$(command -v editor); \
[ -n "$editor" ] && tmux setenv EDITOR "$editor"; \
'
set-environment -g VIEWER "viewer"
set-environment -g EDITOR "editor"
10 changes: 8 additions & 2 deletions zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ setopt extended_glob
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
autoload -U zmv
bindkey '^[m' copy-prev-shell-word
bindkey '^R' history-incremental-pattern-search-backward
HISTFILE=$HOME/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
Expand All @@ -37,6 +35,14 @@ setopt extended_history
setopt hist_expire_dups_first
setopt hist_ignore_space

# ----------------------------------------------------------------------------------------------------------------------
# Bindings
# ----------------------------------------------------------------------------------------------------------------------

bindkey -s '^[q' '^d'
bindkey '^[m' copy-prev-shell-word
bindkey '^R' history-incremental-pattern-search-backward

# ----------------------------------------------------------------------------------------------------------------------
# Portability
# ----------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit e5c2d8f

Please sign in to comment.