Compare commits
6
Commits
f394df154a
...
178a51d75e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
178a51d75e | ||
|
|
d35575326b | ||
|
|
761102fd35 | ||
|
|
665727cb3d | ||
|
|
22600b2ca6 | ||
|
|
30dfcb6141 |
No files matched your search
@@ -1,57 +0,0 @@
|
|||||||
# shellcheck shell=bash
|
|
||||||
# vim: set ft=bash :
|
|
||||||
|
|
||||||
alias ..="cd .."
|
|
||||||
|
|
||||||
alias ls="ls --color=auto"
|
|
||||||
alias l="ls -1p"
|
|
||||||
alias ll="ls -lhp"
|
|
||||||
alias lt="ls -lhtp"
|
|
||||||
alias la="ls -lhap"
|
|
||||||
alias lta="ls -lhatp"
|
|
||||||
alias ldir="ls -dp" # list directories
|
|
||||||
|
|
||||||
alias grep="grep --color=auto"
|
|
||||||
|
|
||||||
alias rm="rm -I --preserve-root"
|
|
||||||
alias mv="mv -iv"
|
|
||||||
alias cp="cp -iv"
|
|
||||||
alias ln="ln -i"
|
|
||||||
alias mkdir="mkdir -pv"
|
|
||||||
alias chown="chown --preserve-root"
|
|
||||||
alias chmod="chmod --preserve-root"
|
|
||||||
alias chgrp="chgrp --preserve-root"
|
|
||||||
|
|
||||||
alias ip="ip --color"
|
|
||||||
alias ipa="ip -brief address"
|
|
||||||
alias ipl="ip -brief link"
|
|
||||||
alias ipr="ip route"
|
|
||||||
|
|
||||||
alias df="df -kTh"
|
|
||||||
alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
|
|
||||||
alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables
|
|
||||||
|
|
||||||
# Programs
|
|
||||||
alias h="history"
|
|
||||||
alias o="xdg-open"
|
|
||||||
alias v="nvim"
|
|
||||||
alias vf="fzf --bind 'enter:become(nvim {})'"
|
|
||||||
alias g='git'
|
|
||||||
alias k="kubectl"
|
|
||||||
alias t='task'
|
|
||||||
alias tsh='tasksh'
|
|
||||||
alias z='zathura --fork'
|
|
||||||
alias f='fzf'
|
|
||||||
alias fm='pcmanfm &>/dev/null &'
|
|
||||||
alias mm='micromamba'
|
|
||||||
|
|
||||||
# Languages
|
|
||||||
alias r5="plt-r5rs --no-prim"
|
|
||||||
alias hs="ghci"
|
|
||||||
alias pl="swipl"
|
|
||||||
alias py="python"
|
|
||||||
alias r="R"
|
|
||||||
|
|
||||||
alias azerty="setxkbmap be"
|
|
||||||
alias qwerty="setxkbmap us"
|
|
||||||
alias cole="setxkbmap us -variant colemak"
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# shellcheck shell=bash
|
|
||||||
# vim: set ft=bash :
|
|
||||||
|
|
||||||
reboot-to-windows ()
|
|
||||||
{
|
|
||||||
# Check if grub is installed by checking if the command exists, if it does
|
|
||||||
# not, then assume that the system is using systemd-boot
|
|
||||||
if grub-install --version &>/dev/null; then
|
|
||||||
windows_title=$(grep -i windows /boot/grub/grub.cfg | cut -d "'" -f 2)
|
|
||||||
sudo grub-reboot "$windows_title"
|
|
||||||
echo "Grub set to reboot to Windows"
|
|
||||||
else
|
|
||||||
sudo bootctl set-oneshot windows.conf
|
|
||||||
echo "Systemd set to reboot to Windows"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# shellcheck shell=bash
|
|
||||||
# vim: set ft=bash :
|
|
||||||
|
|
||||||
source "$HOME/.bash_aliases/dualboot"
|
|
||||||
|
|
||||||
alias lm='ddcutil setvcp 10'
|
|
||||||
alias cuda-available='python -c "import torch; print(\"CUDA enabled:\", torch.cuda.is_available());"'
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# shellcheck shell=bash
|
|
||||||
# vim: set ft=bash :
|
|
||||||
|
|
||||||
source "$HOME/.bash_aliases/dualboot"
|
|
||||||
|
|
||||||
alias lm='xbacklight -set'
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# shellcheck shell=bash
|
|
||||||
# shellcheck disable=SC1090
|
|
||||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
|
||||||
|
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
||||||
|
|
||||||
if [[ -z "${DISPLAY}" ]] && [[ "${XDG_VTNR}" -eq 1 ]]; then
|
|
||||||
exec startx "$HOME/.config/X11/xinitrc" >& ~/.xsession-errors
|
|
||||||
fi
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
# shellcheck shell=bash
|
|
||||||
# shellcheck disable=SC1091,SC1090
|
|
||||||
# If not running interactively, don't do anything
|
|
||||||
[[ $- != *i* ]] && return
|
|
||||||
|
|
||||||
. /etc/os-release
|
|
||||||
|
|
||||||
# Prompt configuration
|
|
||||||
[ -f "$HOME/.bashrc.d/prompt" ] && . "$HOME/.bashrc.d/prompt"
|
|
||||||
|
|
||||||
# Aliases {{{
|
|
||||||
# Load aliases dynamically
|
|
||||||
[ -f "$HOME/.bash_aliases/all" ] && . "$HOME/.bash_aliases/all"
|
|
||||||
[ -f "$HOME/.bash_aliases/hosts/$HOSTNAME" ] && . "$HOME/.bash_aliases/hosts/$HOSTNAME"
|
|
||||||
[ -f "$HOME/.bash_aliases/private" ] && . "$HOME/.bash_aliases/private"
|
|
||||||
[ -f "$HOME/.bash_aliases/lang-js" ] && . "$HOME/.bash_aliases/lang-js"
|
|
||||||
|
|
||||||
# Completions {{{
|
|
||||||
[ -d "$HOME/.bash_completions" ] && for file in "$HOME/.bash_completions"/*; do
|
|
||||||
[ -f "$file" ] && . "$file"
|
|
||||||
done
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# Host-specific and private configurations
|
|
||||||
[ -f "$HOME/.bashrc.d/hosts/$HOSTNAME" ] && . "$HOME/.bashrc.d/hosts/$HOSTNAME"
|
|
||||||
[ -f "$HOME/.bashrc.d/private" ] && . "$HOME/.bashrc.d/private"
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# Prompt {{{
|
|
||||||
[ -f "$HOME/.bashrc.d/prompt" ] && . "$HOME/.bashrc.d/prompt"
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# X11 {{{
|
|
||||||
export XDG_SESSION_TYPE=X11
|
|
||||||
export XDG_CONFIG_HOME=$HOME/.config
|
|
||||||
export XDG_DATA_HOME=$HOME/.local/share
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# FZF {{{
|
|
||||||
# Check if fzf is installed
|
|
||||||
if [ -f "/usr/bin/fzf" ]; then
|
|
||||||
if [[ $ID == "raspbian" ]]; then
|
|
||||||
. /usr/share/doc/fzf/examples/completion.bash
|
|
||||||
. /usr/share/doc/fzf/examples/key-bindings.bash
|
|
||||||
elif [[ $ID == "arch" ]]; then
|
|
||||||
. /usr/share/fzf/completion.bash
|
|
||||||
. /usr/share/fzf/key-bindings.bash
|
|
||||||
fi
|
|
||||||
|
|
||||||
_fzf_setup_completion path vim zathura xournalpp nvim mpv
|
|
||||||
else
|
|
||||||
echo "fzf not installed"
|
|
||||||
fi
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# Jupyter {{{
|
|
||||||
export JUPYTERLAB_DIR=$HOME/.local/share/jupyter/lab
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# Conda {{{
|
|
||||||
[ -f /opt/miniconda3/etc/profile.d/conda.sh ] && . /opt/miniconda3/etc/profile.d/conda.sh
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# Codi
|
|
||||||
# Usage: codi [filetype] [filename]
|
|
||||||
codi() {
|
|
||||||
local syntax="${1:-python}"
|
|
||||||
shift
|
|
||||||
nvim -c \
|
|
||||||
"let g:startify_disable_at_vimenter = 1 |\
|
|
||||||
set bt=nofile ls=0 noru nonu nornu |\
|
|
||||||
hi ColorColumn ctermbg=NONE |\
|
|
||||||
hi VertSplit ctermbg=NONE |\
|
|
||||||
hi NonText ctermfg=0 |\
|
|
||||||
Codi $syntax" "$@"
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# Desktop configuration
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# shellcheck shell=bash
|
|
||||||
# vim: set ft=bash :
|
|
||||||
|
|
||||||
# >>> mamba initialize >>>
|
|
||||||
# !! Contents within this block are managed by 'mamba init' !!
|
|
||||||
export MAMBA_EXE="/usr/bin/micromamba";
|
|
||||||
export MAMBA_ROOT_PREFIX="/home/h/.local/share/micromamba";
|
|
||||||
__mamba_setup="$("$MAMBA_EXE" shell hook --shell bash --prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
eval "$__mamba_setup"
|
|
||||||
else
|
|
||||||
if [ -f "/home/h/.local/share/micromamba/etc/profile.d/micromamba.sh" ]; then
|
|
||||||
. "/home/h/.local/share/micromamba/etc/profile.d/micromamba.sh"
|
|
||||||
else
|
|
||||||
export PATH="/home/h/.local/share/micromamba/bin:$PATH" # extra space after export prevents interference from conda init
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
unset __mamba_setup
|
|
||||||
# <<< mamba initialize <<<
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# shellcheck shell=bash
|
|
||||||
# vim: set ft=bash :
|
|
||||||
|
|
||||||
get_branch_name() {
|
|
||||||
git symbolic-ref --quiet --short HEAD 2>/dev/null \
|
|
||||||
|| git rev-parse --short HEAD 2>/dev/null \
|
|
||||||
|| echo 'some branch'
|
|
||||||
}
|
|
||||||
get_git_info() {
|
|
||||||
git rev-parse --is-inside-work-tree &>/dev/null || return
|
|
||||||
echo -e "($(get_branch_name))"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ $SSH_CONNECTION ]]; then
|
|
||||||
PS1='\[\033[01;31m\]\u@\h\[\033[00m\] $(get_git_info)\W❭\[$(tput sgr0)\] '
|
|
||||||
else
|
|
||||||
PS1='\u $(get_git_info)\W❭\[$(tput sgr0)\] '
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ellipsis when deep in directory
|
|
||||||
export PROMPT_DIRTRIM=2
|
|
||||||
export PS1
|
|
||||||
Whitespace-only changes.
@@ -1,147 +0,0 @@
|
|||||||
#: Fonts {{{
|
|
||||||
|
|
||||||
font_family Iosevka Term SS08
|
|
||||||
bold_font auto
|
|
||||||
italic_font auto
|
|
||||||
bold_italic_font auto
|
|
||||||
font_size 12.0
|
|
||||||
disable_ligatures never
|
|
||||||
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
#: Cursor {{{
|
|
||||||
|
|
||||||
cursor_shape block
|
|
||||||
cursor_blink_interval 0
|
|
||||||
|
|
||||||
#: }}}
|
|
||||||
|
|
||||||
#: Scrollback {{{
|
|
||||||
|
|
||||||
scrollback_lines 8192
|
|
||||||
scrollbar scrolled
|
|
||||||
scrollback_pager_history_size 1024
|
|
||||||
|
|
||||||
#: }}}
|
|
||||||
|
|
||||||
#: Mouse {{{
|
|
||||||
|
|
||||||
mouse_hide_wait 0.0
|
|
||||||
paste_actions quote-urls-at-prompt
|
|
||||||
|
|
||||||
#: }}}
|
|
||||||
|
|
||||||
#: Performance tuning {{{
|
|
||||||
|
|
||||||
repaint_delay 8
|
|
||||||
input_delay 2
|
|
||||||
|
|
||||||
#: }}}
|
|
||||||
|
|
||||||
#: Terminal bell {{{
|
|
||||||
|
|
||||||
enable_audio_bell yes
|
|
||||||
window_alert_on_bell yes
|
|
||||||
|
|
||||||
#: }}}
|
|
||||||
|
|
||||||
#: Window layout {{{
|
|
||||||
|
|
||||||
remember_window_size no
|
|
||||||
remember_window_position no
|
|
||||||
enabled_layouts *
|
|
||||||
hide_window_decorations yes
|
|
||||||
|
|
||||||
#: }}}
|
|
||||||
|
|
||||||
#: Advanced {{{
|
|
||||||
|
|
||||||
notify_on_cmd_finish unfocused
|
|
||||||
|
|
||||||
#: }}}
|
|
||||||
|
|
||||||
#: OS specific tweaks {{{
|
|
||||||
|
|
||||||
linux_display_server auto
|
|
||||||
wayland_enable_ime no
|
|
||||||
|
|
||||||
#: }}}
|
|
||||||
|
|
||||||
#: Keyboard shortcuts {{{
|
|
||||||
|
|
||||||
kitty_mod ctrl+shift
|
|
||||||
map kitty_mod+c copy_to_clipboard
|
|
||||||
map kitty_mod+v paste_from_clipboard
|
|
||||||
map cmd+v
|
|
||||||
# map kitty_mod+o pass_selection_to_program
|
|
||||||
# map kitty_mod+o pass_selection_to_program firefox
|
|
||||||
# map kitty_mod+y new_window less @selection
|
|
||||||
map kitty_mod+z scroll_to_prompt -1
|
|
||||||
map kitty_mod+x scroll_to_prompt 1
|
|
||||||
map kitty_mod+h show_scrollback
|
|
||||||
# map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R
|
|
||||||
#:: For more details on piping screen and buffer contents to external
|
|
||||||
#:: programs, see launch <https://sw.kovidgoyal.net/kitty/launch/>.
|
|
||||||
# map kitty_mod+g show_last_command_output
|
|
||||||
# map kitty_mod+enter launch --cwd=current
|
|
||||||
# map cmd+enter
|
|
||||||
# map ctrl+n launch --location=neighbor
|
|
||||||
# map ctrl+f launch --location=first
|
|
||||||
map kitty_mod+n
|
|
||||||
map cmd+n
|
|
||||||
map kitty_mod+w
|
|
||||||
map shift+cmd+d
|
|
||||||
map kitty_mod+]
|
|
||||||
map kitty_mod+[
|
|
||||||
map kitty_mod+f
|
|
||||||
map kitty_mod+b
|
|
||||||
map kitty_mod+`
|
|
||||||
map kitty_mod+r
|
|
||||||
map cmd+r
|
|
||||||
map kitty_mod+1
|
|
||||||
map cmd+1
|
|
||||||
map kitty_mod+2
|
|
||||||
map cmd+2
|
|
||||||
map kitty_mod+3
|
|
||||||
map cmd+3
|
|
||||||
map kitty_mod+4
|
|
||||||
map cmd+4
|
|
||||||
map kitty_mod+5
|
|
||||||
map cmd+5
|
|
||||||
map kitty_mod+6
|
|
||||||
map cmd+6
|
|
||||||
map kitty_mod+7
|
|
||||||
map cmd+7
|
|
||||||
map kitty_mod+8
|
|
||||||
map cmd+8
|
|
||||||
map kitty_mod+9
|
|
||||||
map cmd+9
|
|
||||||
map kitty_mod+0
|
|
||||||
# map kitty_mod+c new_tab # FIXME: conflict with 'copy'
|
|
||||||
map cmd+t
|
|
||||||
map kitty_mod+q
|
|
||||||
map cmd+w
|
|
||||||
map kitty_mod+.
|
|
||||||
map kitty_mod+,
|
|
||||||
map kitty_mod+alt+t
|
|
||||||
map shift+cmd+i
|
|
||||||
map kitty_mod+f1
|
|
||||||
map kitty_mod+f11
|
|
||||||
map ctrl+cmd+f
|
|
||||||
map kitty_mod+f10
|
|
||||||
map opt+cmd+s
|
|
||||||
map kitty_mod+u kitten unicode_input
|
|
||||||
map ctrl+cmd+space
|
|
||||||
map kitty_mod+/ kitty_shell window
|
|
||||||
map kitty_mod+f5
|
|
||||||
map kitty_mod+r load_config_file
|
|
||||||
|
|
||||||
map shift+cmd+/
|
|
||||||
map cmd+h
|
|
||||||
map opt+cmd+
|
|
||||||
map cmd+m
|
|
||||||
map cmd+q
|
|
||||||
|
|
||||||
#: }}}
|
|
||||||
|
|
||||||
include ./nvim.conf
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
allow_remote_control socket-only
|
|
||||||
listen_on unix:/tmp/kitty
|
|
||||||
shell_integration enabled
|
|
||||||
|
|
||||||
action_alias kitty_scrollback_nvim kitten ~/.local/share/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py
|
|
||||||
map kitty_mod+h kitty_scrollback_nvim
|
|
||||||
map kitty_mod+g kitty_scrollback_nvim --config ksb_builtin_last_cmd_output
|
|
||||||
mouse_map ctrl+shift+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
default_keybindings = false
|
|
||||||
flip_status_indicators = true
|
|
||||||
library_tabs = ["tracks", "albums", "artists", "playlists", "browse"] # remove podcasts tab
|
|
||||||
|
|
||||||
[keybindings]
|
|
||||||
"Enter" = "play"
|
|
||||||
" " = "playpause"
|
|
||||||
"S" = "stop"
|
|
||||||
"<" = "seek -10000"
|
|
||||||
">" = "seek +10000"
|
|
||||||
"H" = "previous"
|
|
||||||
"L" = "next"
|
|
||||||
"r" = "repeat"
|
|
||||||
"z" = "shuffle"
|
|
||||||
"d" = "delete"
|
|
||||||
"s" = "save"
|
|
||||||
"O" = "open current"
|
|
||||||
"o" = "open selected"
|
|
||||||
"Backspace" = "back"
|
|
||||||
"A" = "goto artist"
|
|
||||||
"a" = "goto album"
|
|
||||||
"q" = "queue"
|
|
||||||
"J" = "shift down 1"
|
|
||||||
"K" = "shift up 1"
|
|
||||||
"c" = "clear"
|
|
||||||
"=" = "volup 1"
|
|
||||||
"-" = "voldown 1"
|
|
||||||
"1" = "focus queue"
|
|
||||||
"2" = "focus search"
|
|
||||||
"3" = "focus library"
|
|
||||||
"4" = "focus cover"
|
|
||||||
"h" = "move left 1"
|
|
||||||
"j" = "move down 1"
|
|
||||||
"k" = "move up 1"
|
|
||||||
"l" = "move right 1"
|
|
||||||
"g" = "move top"
|
|
||||||
"G" = "move bottom"
|
|
||||||
"t" = "sort added d"
|
|
||||||
"T" = "sort title a"
|
|
||||||
"y" = "share current"
|
|
||||||
"Y" = "share selected"
|
|
||||||
"U" = "update"
|
|
||||||
|
|
||||||
backend="pipe"
|
|
||||||
notify="false"
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
# statusbar
|
|
||||||
setw -g monitor-activity on
|
|
||||||
set -g visual-activity on
|
|
||||||
set -g history-limit 100000
|
|
||||||
set -g default-command "${SHELL}"
|
|
||||||
setw -g aggressive-resize on
|
|
||||||
set -sg escape-time 0
|
|
||||||
|
|
||||||
# keybindings
|
|
||||||
# NOTE: I intend to use defaults whenever feasible
|
|
||||||
# - my prefix key is still C-b
|
|
||||||
# - however, I do use vi mode
|
|
||||||
setw -g mode-keys vi
|
|
||||||
set -g status-keys vi
|
|
||||||
bind r source-file ~/.config/tmux/tmux.conf # reload tmux conf
|
|
||||||
# Splits
|
|
||||||
unbind v
|
|
||||||
unbind s
|
|
||||||
unbind % # vsplit
|
|
||||||
unbind '"' # hsplit
|
|
||||||
bind v split-window -h -c "#{pane_current_path}"
|
|
||||||
bind s split-window -v -c "#{pane_current_path}"
|
|
||||||
bind -r h select-pane -L
|
|
||||||
bind -r j select-pane -D
|
|
||||||
bind -r k select-pane -U
|
|
||||||
bind -r l select-pane -R
|
|
||||||
bind -r H resize-pane -L 4
|
|
||||||
bind -r J resize-pane -D 4
|
|
||||||
bind -r K resize-pane -U 4
|
|
||||||
bind -r L resize-pane -R 4
|
|
||||||
|
|
||||||
bind-key -T root F1 select-window -t 1
|
|
||||||
bind-key -T root F2 select-window -t 2
|
|
||||||
bind-key -T root F3 select-window -t 3
|
|
||||||
bind-key -T root F4 select-window -t 4
|
|
||||||
bind-key -T root F5 select-window -t 5
|
|
||||||
bind-key -T root F6 select-window -t 6
|
|
||||||
bind-key -T root F7 select-window -t 7
|
|
||||||
bind-key -T root F8 select-window -t 8
|
|
||||||
bind-key -T root F9 select-window -t 9
|
|
||||||
|
|
||||||
|
|
||||||
# bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
|
|
||||||
# bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
|
|
||||||
bind-key -T root S-F1 join-pane -s :1
|
|
||||||
bind-key -T root S-F2 join-pane -s :2
|
|
||||||
bind-key -T root S-F3 join-pane -s :3
|
|
||||||
bind-key -T root S-F4 join-pane -s :4
|
|
||||||
bind-key -T root S-F5 join-pane -s :5
|
|
||||||
bind-key -T root S-F6 join-pane -s :6
|
|
||||||
bind-key -T root S-F7 join-pane -s :7
|
|
||||||
bind-key -T root S-F8 join-pane -s :8
|
|
||||||
bind-key -T root S-F9 join-pane -s :9
|
|
||||||
|
|
||||||
# 1-based indexing makes most sense for keyboard layouts (where number row start at 1)
|
|
||||||
set -g base-index 1
|
|
||||||
set -g pane-base-index 1
|
|
||||||
|
|
||||||
# statusbar
|
|
||||||
set -g status-position top
|
|
||||||
set -g status-left-length 20
|
|
||||||
set -g window-status-separator ""
|
|
||||||
%if "#{==:#{host},desktop-arch}"
|
|
||||||
set -g status-left "#[bg=colour235,fg=colour255] #S #[fg=colour235,bg=default] "
|
|
||||||
set -g status-right ""
|
|
||||||
%else
|
|
||||||
set -g status-left '#h '
|
|
||||||
set -g status-right '#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") %a %l:%M:%S %p %Y-%m-%d'
|
|
||||||
%endif
|
|
||||||
|
|
||||||
set -g default-terminal "tmux-256color"
|
|
||||||
|
|
||||||
# Vi copypaste mode
|
|
||||||
if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 4 \)'" 'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel'
|
|
||||||
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 4\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'bind-key -t vi-copy v begin-selection; bind-key -t vi-copy y copy-selection'
|
|
||||||
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 2\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set-option -g status-utf8 on'
|
|
||||||
|
|
||||||
set -g allow-passthrough on
|
|
||||||
set -s extended-keys on
|
|
||||||
set -as terminal-features 'xterm*:extkeys'
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
NPM_TOKEN=
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
$include /etc/inputrc
|
|
||||||
|
|
||||||
set editing-mode vi
|
|
||||||
set keymap vi
|
|
||||||
set show-mode-in-prompt on
|
|
||||||
set vi-ins-mode-string "\1\e[1;32m\2■ \1\e[0m\2"
|
|
||||||
set vi-cmd-mode-string "\1\e[1;31m\2■ \1\e[0m\2"
|
|
||||||
|
|
||||||
set show-all-if-ambiguous on
|
|
||||||
set show-all-if-unmodified off
|
|
||||||
set completion-ignore-case on
|
|
||||||
set completion-map-case on
|
|
||||||
set completion-display-width 0
|
|
||||||
set page-completions off
|
|
||||||
set completion-query-items 128
|
|
||||||
set visible-stats on
|
|
||||||
set skip-completed-text on
|
|
||||||
set mark-symlinked-directories on
|
|
||||||
set colored-completion-prefix on
|
|
||||||
|
|
||||||
$if mode=vi
|
|
||||||
set keyseq-timeout 200
|
|
||||||
set keymap vi-command
|
|
||||||
"\e[A": history-search-backward
|
|
||||||
"\e[B": history-search-forward
|
|
||||||
j: history-search-forward
|
|
||||||
k: history-search-backward
|
|
||||||
set keymap vi-insert
|
|
||||||
"jj": vi-movement-mode
|
|
||||||
"\e[A": history-search-backward
|
|
||||||
"\e[B": history-search-forward
|
|
||||||
"\C-l": clear-screen
|
|
||||||
$endif
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Include config.d/*
|
|
||||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.fzf.enable = lib.mkEnableOption "fzf";
|
||||||
|
|
||||||
|
config = lib.mkIf config.fzf.enable {
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = lib.mkDefault true;
|
||||||
|
defaultCommand = "rg --files";
|
||||||
|
defaultOptions = [
|
||||||
|
"--pointer='❭'"
|
||||||
|
"--height 10%"
|
||||||
|
];
|
||||||
|
fileWidget = {
|
||||||
|
command = "rg --files";
|
||||||
|
options = [ "--preview 'bat {} | head -500'" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
ripgrep
|
||||||
|
bat
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -98,9 +98,7 @@ dkms.conf
|
|||||||
desg/
|
desg/
|
||||||
dev/
|
dev/
|
||||||
dl/*
|
dl/*
|
||||||
!dl/.gitkeep
|
|
||||||
doc/
|
doc/
|
||||||
!doc/clips/.gitkeep
|
|
||||||
.zk/*
|
.zk/*
|
||||||
!.zk/Makefile
|
!.zk/Makefile
|
||||||
!.zk/pandoc.css
|
!.zk/pandoc.css
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
dotsPath,
|
osConfig ? null,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -23,10 +23,60 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = [ spotifyWithWayland ];
|
home.packages = [ spotifyWithWayland ];
|
||||||
|
|
||||||
programs.ncspot = {
|
programs.ncspot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = fromTOML (builtins.readFile (dotsPath + "/.config/ncspot/config.toml"));
|
settings = {
|
||||||
|
backend = lib.mkIf (osConfig.audio.enable or false) (lib.mkDefault "pulseaudio");
|
||||||
|
default_keybindings = false;
|
||||||
|
flip_status_indicators = true;
|
||||||
|
library_tabs = [
|
||||||
|
"tracks"
|
||||||
|
"albums"
|
||||||
|
"artists"
|
||||||
|
"playlists"
|
||||||
|
"browse"
|
||||||
|
]; # remove podcasts tab
|
||||||
|
keybindings = {
|
||||||
|
"Enter" = "play";
|
||||||
|
" " = "playpause";
|
||||||
|
"S" = "stop";
|
||||||
|
"<" = "seek -10000";
|
||||||
|
">" = "seek +10000";
|
||||||
|
"H" = "previous";
|
||||||
|
"L" = "next";
|
||||||
|
"r" = "repeat";
|
||||||
|
"z" = "shuffle";
|
||||||
|
"d" = "delete";
|
||||||
|
"s" = "save";
|
||||||
|
"O" = "open current";
|
||||||
|
"o" = "open selected";
|
||||||
|
"Backspace" = "back";
|
||||||
|
"A" = "goto artist";
|
||||||
|
"a" = "goto album";
|
||||||
|
"q" = "queue";
|
||||||
|
"J" = "shift down 1";
|
||||||
|
"K" = "shift up 1";
|
||||||
|
"c" = "clear";
|
||||||
|
"=" = "volup 1";
|
||||||
|
"-" = "voldown 1";
|
||||||
|
"1" = "focus queue";
|
||||||
|
"2" = "focus search";
|
||||||
|
"3" = "focus library";
|
||||||
|
"4" = "focus cover";
|
||||||
|
"h" = "move left 1";
|
||||||
|
"j" = "move down 1";
|
||||||
|
"k" = "move up 1";
|
||||||
|
"l" = "move right 1";
|
||||||
|
"g" = "move top";
|
||||||
|
"G" = "move bottom";
|
||||||
|
"t" = "sort added d";
|
||||||
|
"T" = "sort title a";
|
||||||
|
"y" = "share current";
|
||||||
|
"Y" = "share selected";
|
||||||
|
"U" = "update";
|
||||||
|
notify = "false";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
{ lib, config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.readline.enable = lib.mkEnableOption "readline";
|
||||||
|
|
||||||
|
config = lib.mkIf config.readline.enable {
|
||||||
|
programs.readline = {
|
||||||
|
enable = true;
|
||||||
|
includeSystemConfig = true;
|
||||||
|
variables = {
|
||||||
|
editing-mode = "vi";
|
||||||
|
keymap = "vi";
|
||||||
|
show-mode-in-prompt = true;
|
||||||
|
vi-ins-mode-string = ''"\1\e[1;32m\2■ \1\e[0m\2"'';
|
||||||
|
vi-cmd-mode-string = ''"\1\e[1;31m\2■ \1\e[0m\2"'';
|
||||||
|
|
||||||
|
show-all-if-ambiguous = true;
|
||||||
|
show-all-if-unmodified = false;
|
||||||
|
completion-ignore-case = true;
|
||||||
|
completion-map-case = true;
|
||||||
|
completion-display-width = 0;
|
||||||
|
page-completions = false;
|
||||||
|
completion-query-items = 128;
|
||||||
|
visible-stats = true;
|
||||||
|
skip-completed-text = true;
|
||||||
|
mark-symlinked-directories = true;
|
||||||
|
colored-completion-prefix = true;
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
$if mode=vi
|
||||||
|
set keyseq-timeout 200
|
||||||
|
set keymap vi-command
|
||||||
|
"\e[A": history-search-backward
|
||||||
|
"\e[B": history-search-forward
|
||||||
|
j: history-search-forward
|
||||||
|
k: history-search-backward
|
||||||
|
set keymap vi-insert
|
||||||
|
"jj": vi-movement-mode
|
||||||
|
"\e[A": history-search-backward
|
||||||
|
"\e[B": history-search-forward
|
||||||
|
"\C-l": clear-screen
|
||||||
|
$endif
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
".." = "cd ..";
|
||||||
|
|
||||||
|
ls = "ls --color=auto";
|
||||||
|
l = "ls -1p";
|
||||||
|
ll = "ls -lhp";
|
||||||
|
lt = "ls -lhtp";
|
||||||
|
la = "ls -lhap";
|
||||||
|
lta = "ls -lhatp";
|
||||||
|
ldir = "ls -dp"; # list directories
|
||||||
|
grep = "grep --color=auto";
|
||||||
|
|
||||||
|
rm = "rm -I --preserve-root";
|
||||||
|
mv = "mv -iv";
|
||||||
|
cp = "cp -iv";
|
||||||
|
ln = "ln -i";
|
||||||
|
mkdir = "mkdir -pv";
|
||||||
|
chown = "chown --preserve-root";
|
||||||
|
chmod = "chmod --preserve-root";
|
||||||
|
chgrp = "chgrp --preserve-root";
|
||||||
|
|
||||||
|
ip = "ip --color";
|
||||||
|
ipa = "ip -brief address";
|
||||||
|
ipl = "ip -brief link";
|
||||||
|
ipr = "ip route";
|
||||||
|
df = "df -kTh";
|
||||||
|
fzfpac = "pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S";
|
||||||
|
path = ''echo -e ''${PATH//:/\\n}''; # Pretty print path variables
|
||||||
|
|
||||||
|
# Programs
|
||||||
|
h = "history";
|
||||||
|
o = "xdg-open";
|
||||||
|
v = "nvim";
|
||||||
|
vf = "fzf --bind 'enter:become(nvim {})'";
|
||||||
|
g = "git";
|
||||||
|
k = "kubectl";
|
||||||
|
t = "task";
|
||||||
|
tsh = "tasksh";
|
||||||
|
z = "zathura --fork";
|
||||||
|
f = "fzf";
|
||||||
|
fm = "pcmanfm &>/dev/null &";
|
||||||
|
mm = "micromamba";
|
||||||
|
|
||||||
|
# Languages
|
||||||
|
r5 = "plt-r5rs --no-prim";
|
||||||
|
hs = "ghci";
|
||||||
|
pl = "swipl";
|
||||||
|
py = "python";
|
||||||
|
r = "R";
|
||||||
|
|
||||||
|
azerty = "setxkbmap be";
|
||||||
|
qwerty = "setxkbmap us";
|
||||||
|
cole = "setxkbmap us -variant colemak";
|
||||||
|
}
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# vim: set ft=bash :
|
|
||||||
|
|
||||||
alias js="node"
|
|
||||||
alias ts="ts-node"
|
|
||||||
|
|
||||||
yarn() {
|
yarn() {
|
||||||
if [[ -f "package-lock.json" ]]; then
|
if [[ -f "package-lock.json" ]]; then
|
||||||
@@ -37,7 +37,12 @@ in
|
|||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
|
shellAliases =
|
||||||
|
lib.optionalAttrs cfg.aliases.all (import ./bash-aliases.nix)
|
||||||
|
// lib.optionalAttrs cfg.aliases.lang-js {
|
||||||
|
js = "node";
|
||||||
|
ts = "ts-node";
|
||||||
|
};
|
||||||
historySize = 999999;
|
historySize = 999999;
|
||||||
historyFileSize = -1; # unlimited
|
historyFileSize = -1; # unlimited
|
||||||
historyControl = [
|
historyControl = [
|
||||||
@@ -52,29 +57,15 @@ in
|
|||||||
"ls"
|
"ls"
|
||||||
"cd"
|
"cd"
|
||||||
];
|
];
|
||||||
|
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
for f in ${homeDirectory}/.bashrc.d/*; do
|
for f in ${homeDirectory}/.bashrc.d/*; do
|
||||||
[ -f "$f" ] && source "$f"
|
[ -f "$f" ] && source "$f"
|
||||||
done
|
done
|
||||||
|
${lib.optionalString cfg.aliases.lang-js (builtins.readFile ./bash-js.bash)}
|
||||||
${lib.optionalString cfg.aliases.all "source ${homeDirectory}/.bash_aliases/all"}
|
|
||||||
${lib.optionalString cfg.aliases.lang-js "source ${homeDirectory}/.bash_aliases/lang-js"}
|
|
||||||
|
|
||||||
${cfg.extraInit}
|
${cfg.extraInit}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file = {
|
|
||||||
".inputrc".source = dotsPath + "/.inputrc";
|
|
||||||
".bashrc.d/prompt".source = dotsPath + "/.bashrc.d/prompt";
|
|
||||||
}
|
|
||||||
// lib.optionalAttrs cfg.aliases.all {
|
|
||||||
".bash_aliases/all".source = dotsPath + "/.bash_aliases/all";
|
|
||||||
}
|
|
||||||
// lib.optionalAttrs cfg.aliases.lang-js {
|
|
||||||
".bash_aliases/lang-js".source = dotsPath + "/.bash_aliases/lang-js";
|
|
||||||
};
|
|
||||||
home.sessionPath = lib.optional cfg.addBinToPath "${dotsPath}/.bin";
|
home.sessionPath = lib.optional cfg.addBinToPath "${dotsPath}/.bin";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -7,13 +7,23 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./bash.nix
|
./bash.nix
|
||||||
./utils.nix
|
|
||||||
./prompt.nix
|
./prompt.nix
|
||||||
|
./utils.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.shell.enable = lib.mkEnableOption "shell";
|
options = {
|
||||||
|
shell.enable = lib.mkEnableOption "shell";
|
||||||
|
prompt.enable = lib.mkEnableOption "shell prompt" // {
|
||||||
|
default = config.shell.enable;
|
||||||
|
};
|
||||||
|
utils.enable = lib.mkEnableOption "shell utilities" // {
|
||||||
|
default = config.shell.enable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.shell.enable {
|
config = lib.mkIf config.shell.enable {
|
||||||
|
fzf.enable = lib.mkDefault true;
|
||||||
|
readline.enable = lib.mkDefault true;
|
||||||
tmux.enable = lib.mkDefault true;
|
tmux.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
config = lib.mkIf config.shell.enable {
|
config = lib.mkIf config.prompt.enable {
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|||||||
@@ -1,29 +1,13 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
config = lib.mkIf config.shell.enable {
|
config = lib.mkIf config.utils.enable {
|
||||||
programs.fzf = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = lib.mkDefault true;
|
|
||||||
defaultCommand = "rg --files";
|
|
||||||
defaultOptions = [
|
|
||||||
"--pointer='❭'"
|
|
||||||
"--height 10%"
|
|
||||||
];
|
|
||||||
fileWidget = {
|
|
||||||
command = "rg --files";
|
|
||||||
options = [ "--preview 'bat {} | head -500'" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
ripgrep
|
|
||||||
bat
|
|
||||||
jq
|
jq
|
||||||
entr
|
entr
|
||||||
parallel
|
parallel
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
dotsPath,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -20,10 +19,145 @@ in
|
|||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = config.nixgl.wrap pkgs.kitty;
|
package = config.nixgl.wrap pkgs.kitty;
|
||||||
extraConfig = builtins.readFile (dotsPath + "/.config/kitty/kitty.conf");
|
settings = {
|
||||||
|
#: Fonts {{{
|
||||||
|
font_family = "Iosevka Term SS08";
|
||||||
|
bold_font = "auto";
|
||||||
|
italic_font = "auto";
|
||||||
|
bold_italic_font = "auto";
|
||||||
|
font_size = 12.0;
|
||||||
|
disable_ligatures = "never";
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
#: Cursor {{{
|
||||||
|
cursor_shape = "block";
|
||||||
|
cursor_blink_interval = 0;
|
||||||
|
#: }}}
|
||||||
|
|
||||||
|
#: Scrollback {{{
|
||||||
|
scrollback_lines = 8192;
|
||||||
|
scrollbar = "scrolled";
|
||||||
|
scrollback_pager_history_size = 1024;
|
||||||
|
#: }}}
|
||||||
|
|
||||||
|
#: Mouse {{{
|
||||||
|
mouse_hide_wait = 0.0;
|
||||||
|
paste_actions = "quote-urls-at-prompt";
|
||||||
|
#: }}}
|
||||||
|
|
||||||
|
#: Performance tuning {{{
|
||||||
|
repaint_delay = 8;
|
||||||
|
input_delay = 2;
|
||||||
|
#: }}}
|
||||||
|
|
||||||
|
#: Terminal bell {{{
|
||||||
|
enable_audio_bell = true;
|
||||||
|
window_alert_on_bell = true;
|
||||||
|
#: }}}
|
||||||
|
|
||||||
|
#: Window layout {{{
|
||||||
|
remember_window_size = false;
|
||||||
|
remember_window_position = false;
|
||||||
|
enabled_layouts = "*";
|
||||||
|
hide_window_decorations = true;
|
||||||
|
#: }}}
|
||||||
|
|
||||||
|
#: Advanced {{{
|
||||||
|
notify_on_cmd_finish = "unfocused";
|
||||||
|
#: }}}
|
||||||
|
|
||||||
|
#: OS specific tweaks {{{
|
||||||
|
linux_display_server = "auto";
|
||||||
|
wayland_enable_ime = false;
|
||||||
|
#: }}}
|
||||||
|
|
||||||
|
kitty_mod = "ctrl+shift";
|
||||||
|
allow_remote_control = "socket-only";
|
||||||
|
listen_on = "unix:/tmp/kitty";
|
||||||
|
shell_integration = "enabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
#: Keyboard shortcuts {{{
|
||||||
|
keybindings = {
|
||||||
|
"kitty_mod+c" = "copy_to_clipboard";
|
||||||
|
"kitty_mod+v" = "paste_from_clipboard";
|
||||||
|
"cmd+v" = "";
|
||||||
|
# map kitty_mod+o pass_selection_to_program
|
||||||
|
# map kitty_mod+o pass_selection_to_program firefox
|
||||||
|
# map kitty_mod+y new_window less @selection
|
||||||
|
"kitty_mod+z" = "scroll_to_prompt -1";
|
||||||
|
"kitty_mod+x" = "scroll_to_prompt 1";
|
||||||
|
"kitty_mod+h" = "kitty_scrollback_nvim";
|
||||||
|
# map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R
|
||||||
|
#:: For more details on piping screen and buffer contents to external
|
||||||
|
#:: programs, see launch <https://sw.kovidgoyal.net/kitty/launch/>.
|
||||||
|
# map kitty_mod+g show_last_command_output
|
||||||
|
# map kitty_mod+enter launch --cwd=current
|
||||||
|
# map cmd+enter
|
||||||
|
# map ctrl+n launch --location=neighbor
|
||||||
|
# map ctrl+f launch --location=first
|
||||||
|
"kitty_mod+n" = "";
|
||||||
|
"cmd+n" = "";
|
||||||
|
"kitty_mod+w" = "";
|
||||||
|
"shift+cmd+d" = "";
|
||||||
|
"kitty_mod+]" = "";
|
||||||
|
"kitty_mod+[" = "";
|
||||||
|
"kitty_mod+f" = "";
|
||||||
|
"kitty_mod+b" = "";
|
||||||
|
"kitty_mod+`" = "";
|
||||||
|
"cmd+r" = "";
|
||||||
|
"kitty_mod+1" = "";
|
||||||
|
"cmd+1" = "";
|
||||||
|
"kitty_mod+2" = "";
|
||||||
|
"cmd+2" = "";
|
||||||
|
"kitty_mod+3" = "";
|
||||||
|
"cmd+3" = "";
|
||||||
|
"kitty_mod+4" = "";
|
||||||
|
"cmd+4" = "";
|
||||||
|
"kitty_mod+5" = "";
|
||||||
|
"cmd+5" = "";
|
||||||
|
"kitty_mod+6" = "";
|
||||||
|
"cmd+6" = "";
|
||||||
|
"kitty_mod+7" = "";
|
||||||
|
"cmd+7" = "";
|
||||||
|
"kitty_mod+8" = "";
|
||||||
|
"cmd+8" = "";
|
||||||
|
"kitty_mod+9" = "";
|
||||||
|
"cmd+9" = "";
|
||||||
|
"kitty_mod+0" = "";
|
||||||
|
# map kitty_mod+c new_tab # FIXME: conflict with 'copy'
|
||||||
|
"cmd+t" = "";
|
||||||
|
"kitty_mod+q" = "";
|
||||||
|
"cmd+w" = "";
|
||||||
|
"kitty_mod+." = "";
|
||||||
|
"kitty_mod+," = "";
|
||||||
|
"kitty_mod+alt+t" = "";
|
||||||
|
"shift+cmd+i" = "";
|
||||||
|
"kitty_mod+f1" = "";
|
||||||
|
"kitty_mod+f11" = "";
|
||||||
|
"ctrl+cmd+f" = "";
|
||||||
|
"kitty_mod+f10" = "";
|
||||||
|
"opt+cmd+s" = "";
|
||||||
|
"kitty_mod+u" = "kitten unicode_input";
|
||||||
|
"ctrl+cmd+space" = "";
|
||||||
|
"kitty_mod+/" = "kitty_shell window";
|
||||||
|
"kitty_mod+f5" = "";
|
||||||
|
"kitty_mod+r" = "load_config_file";
|
||||||
|
|
||||||
|
"shift+cmd+/" = "";
|
||||||
|
"cmd+h" = "";
|
||||||
|
"opt+cmd+" = "";
|
||||||
|
"cmd+m" = "";
|
||||||
|
"cmd+q" = "";
|
||||||
|
|
||||||
|
"kitty_mod+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
|
||||||
|
};
|
||||||
|
#: }}}
|
||||||
|
actionAliases.kitty_scrollback_nvim = "kitten ~/.local/share/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py";
|
||||||
|
mouseBindings."ctrl+shift+right press" =
|
||||||
|
"ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file.".config/kitty/nvim.conf".source = dotsPath + "/.config/kitty/nvim.conf";
|
|
||||||
home.file.".local/share/kitty-scrollback.nvim".source = pkgs.vimPlugins.kitty-scrollback-nvim;
|
home.file.".local/share/kitty-scrollback.nvim".source = pkgs.vimPlugins.kitty-scrollback-nvim;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -2,17 +2,13 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
dotsPath,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.tmux;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options.tmux.enable = lib.mkEnableOption "tmux";
|
options.tmux.enable = lib.mkEnableOption "tmux";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf config.tmux.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
tmuxp
|
tmuxp
|
||||||
reptyr
|
reptyr
|
||||||
@@ -20,7 +16,83 @@ in
|
|||||||
|
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = builtins.readFile (dotsPath + "/.config/tmux/tmux.conf");
|
historyLimit = 100000;
|
||||||
|
aggressiveResize = true;
|
||||||
|
escapeTime = 0;
|
||||||
|
keyMode = "vi";
|
||||||
|
# 1-based indexing makes most sense for keyboard layouts (where number row start at 1)
|
||||||
|
baseIndex = 1;
|
||||||
|
terminal = "tmux-256color";
|
||||||
|
extraConfig = ''
|
||||||
|
# statusbar
|
||||||
|
setw -g monitor-activity on
|
||||||
|
set -g visual-activity on
|
||||||
|
set -g default-command "''${SHELL}"
|
||||||
|
|
||||||
|
# keybindings
|
||||||
|
# NOTE: I intend to use defaults whenever feasible
|
||||||
|
# - my prefix key is still C-b
|
||||||
|
# - however, I do use vi mode
|
||||||
|
bind r source-file ~/.config/tmux/tmux.conf # reload tmux conf
|
||||||
|
# Splits
|
||||||
|
unbind v
|
||||||
|
unbind s
|
||||||
|
unbind % # vsplit
|
||||||
|
unbind '"' # hsplit
|
||||||
|
bind v split-window -h -c "#{pane_current_path}"
|
||||||
|
bind s split-window -v -c "#{pane_current_path}"
|
||||||
|
bind -r h select-pane -L
|
||||||
|
bind -r j select-pane -D
|
||||||
|
bind -r k select-pane -U
|
||||||
|
bind -r l select-pane -R
|
||||||
|
bind -r H resize-pane -L 4
|
||||||
|
bind -r J resize-pane -D 4
|
||||||
|
bind -r K resize-pane -U 4
|
||||||
|
bind -r L resize-pane -R 4
|
||||||
|
|
||||||
|
bind-key -T root F1 select-window -t 1
|
||||||
|
bind-key -T root F2 select-window -t 2
|
||||||
|
bind-key -T root F3 select-window -t 3
|
||||||
|
bind-key -T root F4 select-window -t 4
|
||||||
|
bind-key -T root F5 select-window -t 5
|
||||||
|
bind-key -T root F6 select-window -t 6
|
||||||
|
bind-key -T root F7 select-window -t 7
|
||||||
|
bind-key -T root F8 select-window -t 8
|
||||||
|
bind-key -T root F9 select-window -t 9
|
||||||
|
|
||||||
|
# bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
|
||||||
|
# bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
|
||||||
|
bind-key -T root S-F1 join-pane -s :1
|
||||||
|
bind-key -T root S-F2 join-pane -s :2
|
||||||
|
bind-key -T root S-F3 join-pane -s :3
|
||||||
|
bind-key -T root S-F4 join-pane -s :4
|
||||||
|
bind-key -T root S-F5 join-pane -s :5
|
||||||
|
bind-key -T root S-F6 join-pane -s :6
|
||||||
|
bind-key -T root S-F7 join-pane -s :7
|
||||||
|
bind-key -T root S-F8 join-pane -s :8
|
||||||
|
bind-key -T root S-F9 join-pane -s :9
|
||||||
|
|
||||||
|
# statusbar
|
||||||
|
set -g status-position top
|
||||||
|
set -g status-left-length 20
|
||||||
|
set -g window-status-separator ""
|
||||||
|
%if "#{==:#{host},desktop-arch}"
|
||||||
|
set -g status-left "#[bg=colour235,fg=colour255] #S #[fg=colour235,bg=default] "
|
||||||
|
set -g status-right ""
|
||||||
|
%else
|
||||||
|
set -g status-left '#h '
|
||||||
|
set -g status-right '#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") %a %l:%M:%S %p %Y-%m-%d'
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Vi copypaste mode
|
||||||
|
if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 4 \)'" 'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel'
|
||||||
|
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 4\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'bind-key -t vi-copy v begin-selection; bind-key -t vi-copy y copy-selection'
|
||||||
|
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 2\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set-option -g status-utf8 on'
|
||||||
|
|
||||||
|
set -g allow-passthrough on
|
||||||
|
set -s extended-keys on
|
||||||
|
set -as terminal-features 'xterm*:extkeys'
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,11 @@
|
|||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.audio;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [ ./audio-automation.nix ];
|
imports = [ ./audio-automation.nix ];
|
||||||
|
|
||||||
options.audio.enable = lib.mkEnableOption "audio";
|
options.audio.enable = lib.mkEnableOption "audio";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf config.audio.enable {
|
||||||
nixpkgs.allowedUnfree = [
|
nixpkgs.allowedUnfree = [
|
||||||
"spotify"
|
"spotify"
|
||||||
"spotify-unwrapped"
|
"spotify-unwrapped"
|
||||||
|
|||||||
Reference in new issue
Block a user