Merge branch 'main' of git.clustercockpit.org:moebiusband/dotfiles

This commit is contained in:
Jan Eitzinger 2024-02-15 09:57:54 +01:00
commit af83f64756
10 changed files with 300 additions and 273 deletions

View File

@ -0,0 +1,80 @@
# vim:ft=kitty
## name: Catppuccin-Mocha
## author: Pocco81 (https://github.com/Pocco81)
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf
## blurb: Soothing pastel theme for the high-spirited!
# The basic colors
foreground #CDD6F4
background #1E1E2E
selection_foreground #1E1E2E
selection_background #F5E0DC
# Cursor colors
cursor #F5E0DC
cursor_text_color #1E1E2E
# URL underline color when hovering with mouse
url_color #F5E0DC
# Kitty window border colors
active_border_color #B4BEFE
inactive_border_color #6C7086
bell_border_color #F9E2AF
# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system
# Tab bar colors
active_tab_foreground #11111B
active_tab_background #CBA6F7
inactive_tab_foreground #CDD6F4
inactive_tab_background #181825
tab_bar_background #11111B
# Colors for marks (marked text in the terminal)
mark1_foreground #1E1E2E
mark1_background #B4BEFE
mark2_foreground #1E1E2E
mark2_background #CBA6F7
mark3_foreground #1E1E2E
mark3_background #74C7EC
# The 16 terminal colors
# black
color0 #45475A
color8 #585B70
# red
color1 #F38BA8
color9 #F38BA8
# green
color2 #A6E3A1
color10 #A6E3A1
# yellow
color3 #F9E2AF
color11 #F9E2AF
# blue
color4 #89B4FA
color12 #89B4FA
# magenta
color5 #F5C2E7
color13 #F5C2E7
# cyan
color6 #94E2D5
color14 #94E2D5
# white
color7 #BAC2DE
color15 #A6ADC8

View File

@ -1,74 +1,19 @@
# vim:fileencoding=utf-8:ft=conf:foldmethod=marker
#: Fonts {{{
#: kitty has very powerful font management. You can configure
#: individual font faces and even specify special fonts for particular
#: characters.
# font_family Source Code Pro
font_family BrutalistMono Nerd Font Regular
# font_family Fira Code Medium
# font_family Fira Code
# font_family Hack Regular
bold_font BrutalistMono Nerd Font Regular
# italic_font auto
# bold_italic_font auto
#: You can specify different fonts for the bold/italic/bold-italic
#: variants. By default they are derived automatically, by the OSes
#: font system. Setting them manually is useful for font families that
#: have many weight variants like Book, Medium, Thick, etc. For
#: example::
#: font_family Operator Mono Book
#: bold_font Operator Mono Medium
#: italic_font Operator Mono Book Italic
#: bold_italic_font Operator Mono Medium Italic
font_size 16.0
text_composition_strategy 1.0
#: Font size (in pts)
# adjust_line_height 0
# adjust_column_width 0
#: Change the size of each character cell kitty renders. You can use
#: either numbers, which are interpreted as pixels or percentages
#: (number followed by %), which are interpreted as percentages of the
#: unmodified values. You can use negative pixels or percentages less
#: than 100% to reduce sizes (but this might cause rendering
#: artifacts).
# symbol_map U+E0A0-U+E0A2,U+E0B0-U+E0B3 PowerlineSymbols
#: Map the specified unicode codepoints to a particular font. Useful
#: if you need special rendering for some symbols, such as for
#: Powerline. Avoids the need for patched fonts. Each unicode code
#: point is specified in the form U+<code point in hexadecimal>. You
#: can specify multiple code points, separated by commas and ranges
#: separated by hyphens. symbol_map itself can be specified multiple
#: times. Syntax is::
#: symbol_map codepoints Font Family Name
# box_drawing_scale 0.001, 1, 1.5, 2
#: Change the sizes of the lines used for the box drawing unicode
#: characters These values are in pts. They will be scaled by the
#: monitor DPI to arrive at a pixel value. There must be four values
#: corresponding to thin, normal, thick, and very thick lines.
#: }}}
#: Cursor customization {{{
cursor #32cd32
# cursor #32cd32
#: Default cursor color
cursor_text_color #000000
# cursor_text_color #000000
#: Choose the color of text under the cursor. If you want it rendered
#: with the background color of the cell underneath instead, use the
@ -81,12 +26,6 @@ cursor_text_color #000000
# cursor_blink_interval 0.5
# cursor_stop_blinking_after 15.0
#: The interval (in seconds) at which to blink the cursor. Set to zero
#: to disable blinking. Note that numbers smaller than repaint_delay
#: will be limited to repaint_delay. Stop blinking cursor after the
#: specified number of seconds of keyboard inactivity. Set to zero to
#: never stop blinking.
#: }}}
#: Scrollback {{{
@ -203,31 +142,6 @@ sync_to_monitor yes
#: }}}
#: Terminal bell {{{
# enable_audio_bell yes
#: Enable/disable the audio bell. Useful in environments that require
#: silence.
# visual_bell_duration 0.0
#: Visual bell duration. Flash the screen when a bell occurs for the
#: specified number of seconds. Set to zero to disable.
# window_alert_on_bell yes
#: Request window attention on bell. Makes the dock icon bounce on
#: macOS or the taskbar flash on linux.
# bell_on_tab yes
#: Show a bell symbol on the tab if a bell occurs in one of the
#: windows in the tab and the window is not the currently focused
#: window
#: }}}
#: Window layout {{{
# remember_window_size yes
@ -285,12 +199,10 @@ enabled_layouts Horizontal,Stack
#: The window padding (in pts) (blank area between the text and the
#: window border)
active_border_color #d65d0e
# active_border_color #d65d0e
#: The color for the border of the active window
inactive_border_color #d5c4a1
# inactive_border_color #d5c4a1
#: The color for the border of inactive windows
@ -310,111 +222,10 @@ inactive_border_color #d5c4a1
tab_bar_edge top
# tab_bar_margin_width 0.0
#: The margin to the left and right of the tab bar (in pts)
tab_bar_style separator
# tab_fade 0.25 0.5 0.75 1
tab_separator " ┇"
#: The separator between tabs in the tab bar when using separator as
#: the tab_bar_style.
active_tab_foreground #d65d0e
active_tab_background #665c54
# active_tab_font_style bold-italic
inactive_tab_foreground #ebdbb2
inactive_tab_background #32302f
# inactive_tab_font_style normal
#: Tab bar colors and styles
#: }}}
#: Color scheme {{{
foreground #ebdbb2
background #1b1b1b
#: The foreground and background colors
# background_opacity 1.0
# dynamic_background_opacity no
#: The opacity of the background. A number between 0 and 1, where 1 is
#: opaque and 0 is fully transparent. This will only work if
#: supported by the OS (for instance, when using a compositor under
#: X11). Note that it only sets the default background color's
#: opacity. This is so that things like the status bar in vim,
#: powerline prompts, etc. still look good. But it means that if you
#: use a color theme with a background color in your editor, it will
#: not be rendered as transparent. Instead you should change the
#: default background color in your kitty config and not use a
#: background color in the editor color scheme. Or use the escape
#: codes to set the terminals default colors in a shell script to
#: launch your editor. Be aware that using a value less than 1.0 is a
#: (possibly significant) performance hit. If you want to dynamically
#: change transparency of windows set dynamic_background_opacity to
#: yes (this is off by default as it has a performance cost)
# dim_opacity 0.75
#: How much to dim text that has the DIM/FAINT attribute set. One
#: means no dimming and zero means fully dimmed (i.e. invisible).
selection_foreground #bdae93
selection_background #3c3836
#: The foreground and background for text selected with the mouse
#: The 16 terminal colors. There are 8 basic colors, each color has a
#: dull and bright version. You can also set the remaining colors from
#: the 256 color table as color16 to color255.
color0 #282828
color8 #928374
#: black
color1 #cc241d
color9 #fb4934
#: red
color2 #98971a
color10 #b8bb26
#: green
color3 #d79921
color11 #fabd2f
#: yellow
color4 #458588
color12 #83a598
#: blue
color5 #b16286
color13 #d3869b
#: magenta
color6 #689d6a
color14 #8ec07c
#: cyan
color7 #a89984
color15 #ebdbb2
#: white
#: }}}
#: Advanced {{{
@ -500,30 +311,6 @@ color15 #ebdbb2
#: OS specific tweaks {{{
# macos_titlebar_color system
#: Change the color of the kitty window's titlebar on macOS. A value
#: of system means to use the default system color, a value of
#: background means to use the background color of the currently
#: active window and finally you can use an arbitrary color, such as
#: #12af59 or red. WARNING: This option works by using a hack, as
#: there is no proper Cocoa API for it. It sets the background color
#: of the entire window and makes the titlebar transparent. As such it
#: is incompatible with background_opacity. If you want to use both,
#: you are probably better off just hiding the titlebar with
#: macos_hide_titlebar.
# macos_hide_titlebar no
#: Hide the kitty window's title bar on macOS.
# x11_hide_window_decorations no
#: Hide the window decorations (title bar and window borders) on X11
#: and Wayland. Whether this works and exactly what effect it has
#: depends on the window manager, as it is the job of the window
#: manager/compositor to draw window decorations.
macos_option_as_alt yes
#: Use the option key as an alt key. With this set to no, kitty will
@ -896,3 +683,9 @@ macos_custom_beam_cursor yes
#: }}}
# }}}
# BEGIN_KITTY_THEME
# Catppuccin-Mocha
include current-theme.conf
# END_KITTY_THEME

View File

@ -8,3 +8,16 @@ vim.api.nvim_create_autocmd("FileType", {
vim.opt_local.spell = true
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = { "markdown" },
callback = function()
vim.opt_local.textwidth = 80
vim.opt_local.wrap = true
vim.opt_local.spell = true
vim.opt_local.tabstop = 2
vim.opt_local.softtabstop = 2
vim.opt_local.shiftwidth = 2
vim.opt_local.expandtab = true
end,
})

View File

@ -10,3 +10,10 @@ map("v", "Q", "<cmd>norm @q<CR>")
-- Easier in-file navigation with Tab and S-Tab
map("n", "<S-Tab>", "<C-U>")
map("n", "<Tab>", "<C-D>")
-- Testing
map("n", "<leader>tr", "require('neotest').run.run()<CR>")
map("n", "<leader>td", "require('dap-go').debug_test()<CR>")
map("n", "<leader>to", "require('neotest').output.open({enter = true})<CR>")
map("n", "<leader>tS", "require('neotest').run.stop()<CR>")
map("n", "<leader>ts", "require('neotest').summary.toggle()<CR>")

View File

@ -12,9 +12,14 @@ require("lazy").setup({
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
{ import = "lazyvim.plugins.extras.editor.leap" },
{ import = "lazyvim.plugins.extras.test.core" },
{ import = "lazyvim.plugins.extras.dap.core" },
{ import = "lazyvim.plugins.extras.lang.go" },
{ import = "lazyvim.plugins.extras.lang.rust" },
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.lang.markdown" },
{ import = "lazyvim.plugins.extras.lang.clangd" },
{ import = "lazyvim.plugins.extras.lang.tex" },
-- import/override with your plugins
{ import = "plugins" },
},

View File

@ -2,7 +2,7 @@ return {
-- add telescope-fzf-native
{
"telescope.nvim",
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",

View File

@ -232,4 +232,40 @@ return {
-- ui components
{ "MunifTanjim/nui.nvim", lazy = true },
-- change lualine
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(_, opts)
opts.sections.lualine_b = { { "branch", icon = "" } }
end,
},
{
"RRethy/vim-illuminate",
config = function()
-- change the highlight style
vim.api.nvim_set_hl(0, "IlluminatedWordText", { link = "Visual" })
vim.api.nvim_set_hl(0, "IlluminatedWordRead", { link = "Visual" })
vim.api.nvim_set_hl(0, "IlluminatedWordWrite", { link = "Visual" })
end,
},
{
"NvChad/nvim-colorizer.lua",
opts = function(_, opts)
opts.filetypes = {
"html",
"css",
"scss",
"javascript",
"typescript",
"typescriptreact",
"javascriptreact",
"lua",
}
opts.user_default_options = {
mode = "background",
tailwind = false, -- Enable tailwind colors
}
end,
},
}

105
dot_config/starship.toml Normal file
View File

@ -0,0 +1,105 @@
command_timeout = 10000
[golang]
symbol = " "
format = '\[[$symbol($version)]($style)\]'
[c]
symbol = " "
format = '\[[$symbol($version(-$name))]($style)\]'
[cmd_duration]
format = '\[[ $duration]($style)\]'
[directory]
read_only = " "
format = '[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) '
[directory.substitutions]
"Android" = ""
"Desktop" = ""
"Documents" = "󰈙"
"Downloads" = "󰇚"
"Dropbox" = ""
"Games" = ""
"Music" = ""
"Pictures" = ""
"Videos" = ""
[docker_context]
symbol = " "
format = '\[[$symbol$context]($style)\]'
[fennel]
format = '\[[$symbol($version)]($style)\]'
[fossil_branch]
symbol = " "
format = '\[[$symbol$branch]($style)\]'
[git_branch]
symbol = " "
format = '\[[$symbol$branch]($style)\]'
[git_status]
format = '([\[$all_status$ahead_behind\]]($style))'
[hostname]
ssh_symbol = "󰣀 "
ssh_only = true
format = '[$ssh_symbol$hostname]($style):'
style = 'bright-green'
[julia]
symbol = " "
format = '\[[$symbol($version)]($style)\]'
[lua]
symbol = " "
format = '\[[$symbol($version)]($style)\]'
[memory_usage]
symbol = "󰍛 "
format = '\[$symbol[$ram( | $swap)]($style)\]'
[nodejs]
symbol = " "
format = '\[[$symbol($version)]($style)\]'
[perl]
symbol = " "
format = '\[[$symbol($version)]($style)\]'
[package]
symbol = " "
format = '\[[$symbol$version]($style)\]'
[php]
symbol = " "
format = '\[[$symbol($version)]($style)\]'
[python]
symbol = " "
format = '\[[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
[ruby]
symbol = " "
format = '\[[$symbol($version)]($style)\]'
[rust]
symbol = " "
format = '\[[$symbol($version)]($style)\]'
[sudo]
format = '\[[as $symbol]($style)\]'
[swift]
format = '\[[$symbol($version)]($style)\]'
[time]
format = '\[[$time]($style)\]'
[username]
format = '[$user@]($style)'
style_user = 'bright-green'
style_root = 'bright red'

View File

@ -39,56 +39,51 @@ setw -g mode-keys vi
# don't allow tmux to rename the window based on commands running
set-option -wg automatic-rename off
# address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# increase scrollback buffer size
set -g history-limit 50000
# tmux messages are displayed for 4 seconds
set -g display-time 4000
# refresh 'status-left' and 'status-right' more often
set -g status-interval 5
# upgrade $TERM
set -g default-terminal "tmux-256color"
set-option -sa terminal-features ',{{ .term }}:RGB'
# emacs key bindings in tmux command prompt (prefix + :) are better than
# vi keys, even for vim users
set -g status-keys emacs
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# focus events enabled for terminals that support them
set -g focus-events on
# super useful when using "grouped sessions" and multi-monitor setup
setw -g aggressive-resize on
set -g default-command {{ .shell }}
set -g default-shell {{ .shell }}
# status bar
set-option -g status-position top
set -g status-bg 'colour235'
set -g status-fg 'colour223'
set -g status-justify 'centre'
set -g status-left-length '100'
set -g status 'on'
set -g status-right-length '100'
set -g status-left '#[fg=colour232,bg=colour154] #S #[fg=colour222,bg=colour238] #W #[fg=colour8,bg=colour237] #(whoami) '
set -g status-right '#[fg=colour8,bg=colour237] %H:%M %a %d #[fg=colour222,bg=colour238] #h #[fg=colour232,bg=colour154] {{ .status }} '
setw -g window-status-format '#[default] #I #W '
setw -g window-status-current-format '#[fg=colour222,bg=colour238] #I #W #F '
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " █"
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_status_modules_right "directory user host date_time session"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{pane_current_path}"
set -g @catppuccin_host_text "#{host_short}"
set -g @catppuccin_directory_icon " "
set -g @catppuccin_user_icon " "
set -g @catppuccin_host_icon " "
set -g @catppuccin_date_time_icon " "
set -g @catppuccin_session_icon " "
set -g @catppuccin_date_time_text "%H:%M"
# List of plugins
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'olimorris/tmux-pomodoro-plus'
set -g @plugin "jlipps/tmux-safekill"
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'catppuccin/tmux'
{{- if eq .chezmoi.os "openbsd" }}
set -g @plugin 'tmux-plugins/tmux-battery'
{{- end }}

View File

@ -1,12 +1,7 @@
eval $(keychain --eval --agents ssh id_rsa)
eval $(keychain --eval --agents ssh {{ .sshkey }})
[ -f ~/.keychain/$HOSTNAME-sh ] && . ~/.keychain/$HOSTNAME-sh 2>/dev/null
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="powerlevel10k/powerlevel10k"
ZSH_DISABLE_COMPFIX="true"
# CASE_SENSITIVE="true"
@ -27,22 +22,20 @@ zle -N zle-line-init
zle -N zle-keymap-select
export KEYTIMEOUT=1
function ll {
cd "$(llama "$@")"
}
plugins={{ .plugins }}
#chezmoi aliases
alias ccd='chezmoi cd'
alias cdi='chezmoi diff'
alias cap='chezmoi apply'
source $ZSH/oh-my-zsh.sh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export EDITOR='nvim'
export GOPATH=$HOME/go
export GPG_TTY=$TTY
{{- if eq .chezmoi.os "openbsd" }}
export PORTSDIR_PATH=/usr/ports/:/usr/ports/openbsd-wip
@ -80,14 +73,14 @@ alias bkp-home='doas restic -r /mnt/nfs/BSD/restic-repo --verbose backup --one-
alias bkp-etc='doas restic -r /mnt/nfs/BSD/restic-repo --verbose backup /etc'
alias bkp-list='doas restic -r /mnt/nfs/BSD/restic-repo snapshots'
{{- else }}
{{ if eq .chezmoi.os "darwin" }}
>>>>>>> b65a36a66505545d7857f131e3710918bf255bab
source $HOME/perl5/perlbrew/etc/bashrc
export PATH=$HOME/local/bin:$GOPATH/bin:$PATH
{{- if eq .chezmoi.arch "arm64" }}
export PATH=/opt/homebrew/bin:$PATH
{{- else }}
export PATH=/usr/local/opt/sqlite/bin:/usr/local/opt/ruby/bin:/usr/local/opt/mariadb@10.4/bin:$PATH
{{- end }}
{{- end }}
{{ end }}
{{ end }}
{{ end }}
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
eval "$(zoxide init zsh)"
eval "$(starship init zsh)"