Initial dotfiles commit
Laptop config: zsh, emacs (with WSL detection for work), ghostty, tmux, ranger, newsboat, neomutt + mbsync + msmtp (Outlook OAuth2), neomutt signature. Work config: emacs with C#/TS/JS/CSS/HTML dev settings for WSL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
166
laptop/.config/ranger/colorschemes/catppuccin.py
Normal file
166
laptop/.config/ranger/colorschemes/catppuccin.py
Normal file
@@ -0,0 +1,166 @@
|
||||
from ranger.gui.colorscheme import ColorScheme
|
||||
from ranger.gui.color import *
|
||||
|
||||
# Catppuccin Mocha — 256-color approximations
|
||||
rosewater = 224
|
||||
flamingo = 217
|
||||
pink = 218
|
||||
mauve = 183
|
||||
red = 211
|
||||
maroon = 217
|
||||
peach = 216
|
||||
yellow = 223
|
||||
green = 150
|
||||
teal = 116
|
||||
sky = 117
|
||||
sapphire = 110
|
||||
blue = 111
|
||||
lavender = 147
|
||||
text = 189
|
||||
subtext1 = 182
|
||||
subtext0 = 146
|
||||
overlay2 = 103
|
||||
overlay1 = 244
|
||||
overlay0 = 242
|
||||
surface2 = 240
|
||||
surface1 = 238
|
||||
surface0 = 237
|
||||
base = 235
|
||||
mantle = 234
|
||||
crust = 233
|
||||
|
||||
|
||||
class Default(ColorScheme):
|
||||
progress_bar_color = blue
|
||||
|
||||
def use(self, context):
|
||||
fg, bg, attr = default_colors
|
||||
|
||||
if context.reset:
|
||||
return default_colors
|
||||
|
||||
elif context.in_browser:
|
||||
fg = text
|
||||
if context.selected:
|
||||
attr = reverse
|
||||
else:
|
||||
attr = normal
|
||||
if context.empty or context.error:
|
||||
fg = red
|
||||
attr = bold
|
||||
if context.border:
|
||||
fg = overlay0
|
||||
bg = default
|
||||
if context.media:
|
||||
fg = mauve if context.image else flamingo
|
||||
if context.container:
|
||||
fg = red
|
||||
attr = bold
|
||||
if context.directory:
|
||||
attr = bold
|
||||
fg = blue
|
||||
elif context.executable and not any((
|
||||
context.media, context.container,
|
||||
context.fifo, context.socket)):
|
||||
attr = bold
|
||||
fg = green
|
||||
if context.socket:
|
||||
fg = yellow
|
||||
attr = bold
|
||||
if context.fifo or context.device:
|
||||
fg = peach
|
||||
if context.device:
|
||||
attr = bold
|
||||
if context.link:
|
||||
fg = teal if context.good else red
|
||||
if context.tag_marker and not context.selected:
|
||||
attr = bold
|
||||
fg = red if context.tag in 'Rr' else yellow
|
||||
if not context.selected and context.cut:
|
||||
attr = bold
|
||||
fg = red
|
||||
if not context.selected and context.copied:
|
||||
attr = bold
|
||||
fg = yellow
|
||||
if context.main_column:
|
||||
if context.selected:
|
||||
attr = bold
|
||||
if context.marked:
|
||||
attr = bold | reverse
|
||||
fg = yellow
|
||||
if context.badinfo:
|
||||
fg = red if not (attr & reverse) else default
|
||||
if attr & reverse:
|
||||
bg = red
|
||||
|
||||
elif context.text:
|
||||
if context.highlight:
|
||||
attr = reverse
|
||||
|
||||
elif context.in_titlebar:
|
||||
fg = subtext1
|
||||
if context.hostname:
|
||||
attr = bold
|
||||
fg = red if context.bad else green
|
||||
elif context.directory:
|
||||
fg = blue
|
||||
elif context.tab:
|
||||
if context.good:
|
||||
bg = green
|
||||
fg = base
|
||||
elif context.link:
|
||||
fg = teal
|
||||
|
||||
elif context.in_statusbar:
|
||||
fg = text
|
||||
if context.permissions:
|
||||
fg = teal if context.good else red
|
||||
if context.marked:
|
||||
attr = bold | reverse
|
||||
fg = yellow
|
||||
if context.message:
|
||||
if context.bad:
|
||||
attr = bold
|
||||
fg = red
|
||||
if context.loaded:
|
||||
bg = self.progress_bar_color
|
||||
fg = base
|
||||
if context.vcsinfo:
|
||||
attr = bold
|
||||
fg = blue
|
||||
if context.vcscommit:
|
||||
attr = bold
|
||||
fg = yellow
|
||||
if context.vcsdate:
|
||||
attr = bold
|
||||
fg = teal
|
||||
|
||||
if context.vcsfile and not context.selected:
|
||||
attr = normal
|
||||
if context.vcschanged:
|
||||
fg = red
|
||||
elif context.vcsunknown:
|
||||
fg = red
|
||||
elif context.vcsstaged:
|
||||
fg = green
|
||||
elif context.vcsnewfile:
|
||||
fg = yellow
|
||||
elif context.vcsrenamed:
|
||||
fg = blue
|
||||
elif context.vcsignored:
|
||||
fg = overlay0
|
||||
|
||||
elif context.vcsremote and not context.selected:
|
||||
attr = normal
|
||||
if context.vcssync:
|
||||
fg = green
|
||||
elif context.vcsbehind:
|
||||
fg = red
|
||||
elif context.vcsahead:
|
||||
fg = blue
|
||||
elif context.vcsdiverged:
|
||||
fg = red
|
||||
elif context.vcsunknown:
|
||||
fg = red
|
||||
|
||||
return fg, bg, attr
|
||||
11
laptop/.config/ranger/rc.conf
Normal file
11
laptop/.config/ranger/rc.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
set colorscheme catppuccin
|
||||
set preview_images true
|
||||
set preview_images_method kitty
|
||||
set unicode_ellipsis true
|
||||
set show_hidden false
|
||||
set confirm_on_delete multiple
|
||||
set use_preview_script true
|
||||
set automatically_count_files true
|
||||
set open_all_images true
|
||||
set vcs_aware true
|
||||
set vcs_backend_git enabled
|
||||
Reference in New Issue
Block a user