First few new slackware configs
This commit is contained in:
parent
2f46871e56
commit
585cc29048
9 changed files with 215 additions and 9 deletions
5
Makefile
Normal file
5
Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.PHONY: link
|
||||
|
||||
link:
|
||||
bash link.sh
|
||||
sudo bash link.sh
|
||||
|
|
@ -5,3 +5,10 @@ starship init fish | source
|
|||
|
||||
# Load aliases if they exist
|
||||
test -f ~/.config/fish/aliases.fish && source ~/.config/fish/aliases.fish
|
||||
|
||||
# Parse Slackware's system locale setup cleanly into Fish configuration
|
||||
if test -f /etc/profile.d/lang.sh
|
||||
set -gx LANG (string match -r '(?<=export LANG=).*' < /etc/profile.d/lang.sh | string trim -c '"\'')
|
||||
end
|
||||
|
||||
set -gx LANG en_US.UTF-8
|
||||
|
|
|
|||
3
config/fish/functions/nyxt.fish
Normal file
3
config/fish/functions/nyxt.fish
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function nyxt
|
||||
flatpak run engineer.atlas.Nyxt $argv
|
||||
end
|
||||
43
config/kanata/kanata.kbd
Normal file
43
config/kanata/kanata.kbd
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
;; Kanata Configuration
|
||||
|
||||
(defcfg
|
||||
process-unmapped-keys yes
|
||||
)
|
||||
|
||||
;; Source layout - matches physical key positions
|
||||
(defsrc
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||
tab q w e r t y u i o p [ ] \
|
||||
caps a s d f g h j k l ; ' ret
|
||||
lsft z x c v b n m , . / rsft
|
||||
lctl lmet lalt spc ralt rmet rctl up
|
||||
left down rght
|
||||
)
|
||||
|
||||
;; Aliases for cleaner configuration
|
||||
(defalias
|
||||
;; Modifiers and special keys
|
||||
ctl lctl ;; Regular control key
|
||||
cps (tap-hold 200 150 esc lctl) ;; Caps = Esc on tap, Ctrl on hold
|
||||
met (layer-toggle meta) ;; Meta (Windows/Command) key with layer
|
||||
)
|
||||
|
||||
;; Default layer
|
||||
(deflayer default
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||
tab q w e r t y u i o p [ ] \
|
||||
@cps a s d f g h j k l ; ' ret
|
||||
lsft z x c v b n m , . / rsft
|
||||
@ctl lalt lmet spc rmet ralt rmet _
|
||||
_ _ _
|
||||
)
|
||||
|
||||
;; Meta (Windows/Command) layer
|
||||
(deflayer meta
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ left down up rght _ _ _
|
||||
_ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _
|
||||
_ _ _
|
||||
)
|
||||
26
config/kanata/rc.kanata
Normal file
26
config/kanata/rc.kanata
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
KANATA_BIN="/usr/local/bin/kanata"
|
||||
KANATA_CFG="/home/green/.config/kanata/kanata.kbd"
|
||||
PIDFILE="/var/run/kanata.pid"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting kanata..."
|
||||
$KANATA_BIN --cfg $KANATA_CFG &
|
||||
echo $! > $PIDFILE
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping kanata..."
|
||||
kill $(cat $PIDFILE) && rm -f $PIDFILE
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
41
config/nyxt/config.lisp
Normal file
41
config/nyxt/config.lisp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
;; Nyxt Configuration
|
||||
|
||||
;; Theme - OceanicNext
|
||||
(define-configuration browser
|
||||
((theme (make-instance 'theme:theme
|
||||
:dark-p t
|
||||
:background-color "#1B2B34"
|
||||
:on-background-color "#CDD3DE"
|
||||
:primary-color "#6699CC"
|
||||
:on-primary-color "#1B2B34"
|
||||
:secondary-color "#4F5B66"
|
||||
:on-secondary-color "#CDD3DE"
|
||||
:accent-color "#99C794"
|
||||
:on-accent-color "#1B2B34"))))
|
||||
|
||||
;; Enable vi keybindings and dark mode globally
|
||||
(define-configuration web-buffer
|
||||
((default-modes (append '(nyxt/mode/vi:vi-normal-mode
|
||||
nyxt/mode/force-https:force-https-mode)
|
||||
%slot-value%))
|
||||
;; Request dark mode from sites that support it
|
||||
(prefers-color-scheme :dark)))
|
||||
|
||||
;; Default search engine
|
||||
(define-configuration context-buffer
|
||||
((search-engines (list (make-instance 'search-engine
|
||||
:shortcut "ddg"
|
||||
:search-url "https://duckduckgo.com/?q=~a"
|
||||
:fallback-url (quri:uri "https://duckduckgo.com"))))))
|
||||
|
||||
;; Send video URLs to mpv
|
||||
(define-command-global mpv-current-url ()
|
||||
"Open the current page URL in mpv."
|
||||
(uiop:launch-program (list "mpv" (render-url (url (current-buffer))))))
|
||||
|
||||
(define-configuration web-buffer
|
||||
((context-menu-commands (append %slot-value%
|
||||
(list (make-instance 'command :name "Open in mpv"
|
||||
:fn (lambda ()
|
||||
(uiop:launch-program
|
||||
(list "mpv" (render-url (url (current-buffer)))))))))))))
|
||||
|
|
@ -2,8 +2,18 @@ local wezterm = require 'wezterm'
|
|||
local config = {}
|
||||
|
||||
config.color_scheme = 'OceanicNext (base16)'
|
||||
config.font = wezterm.font 'FiraCode Nerd Font Mono'
|
||||
config.font_size = 12
|
||||
-- config.font = wezterm.font 'FiraCode Nerd Font Mono'
|
||||
|
||||
config.font = wezterm.font_with_fallback {
|
||||
"FiraCode Nerd Font Mono",
|
||||
{ family = "Noto Color Emoji", assume_emoji_presentation = true },
|
||||
}
|
||||
|
||||
config.font_size = 14
|
||||
config.enable_tab_bar = false
|
||||
|
||||
-- Wayland-specific settings
|
||||
config.enable_wayland = true
|
||||
config.window_decorations = "NONE"
|
||||
|
||||
return config
|
||||
|
|
|
|||
68
link.sh
68
link.sh
|
|
@ -1,7 +1,61 @@
|
|||
ln -s $PWD/config/starship.toml ~/.config
|
||||
ln -s $PWD/vimrc ~/.vimrc
|
||||
ln -s $PWD/config/wezterm ~/.config/
|
||||
ln -s $PWD/config/fish ~/.config
|
||||
ln -s $PWD/config/tmux ~/.config
|
||||
ln -s $PWD/config/senpai ~/.config
|
||||
ln -s $PWD/config/zed/* ~/.config/zed
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
DOTFILES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
backup_and_link() {
|
||||
local src="$1"
|
||||
local dst="$2"
|
||||
|
||||
if [ -L "$dst" ]; then
|
||||
echo "already a symlink, skipping: $dst"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -e "$dst" ]; then
|
||||
echo "backing up: $dst -> $dst.bak"
|
||||
mv "$dst" "$dst.bak"
|
||||
fi
|
||||
|
||||
echo "linking: $dst -> $src"
|
||||
ln -s "$src" "$dst"
|
||||
}
|
||||
|
||||
backup_and_link "$DOTFILES/config/starship.toml" "$HOME/.config/starship.toml"
|
||||
backup_and_link "$DOTFILES/vimrc" "$HOME/.vimrc"
|
||||
backup_and_link "$DOTFILES/config/wezterm" "$HOME/.config/wezterm"
|
||||
backup_and_link "$DOTFILES/config/fish" "$HOME/.config/fish"
|
||||
backup_and_link "$DOTFILES/config/tmux" "$HOME/.config/tmux"
|
||||
backup_and_link "$DOTFILES/config/senpai" "$HOME/.config/senpai"
|
||||
backup_and_link "$DOTFILES/config/kanata" "$HOME/.config/kanata"
|
||||
backup_and_link "$DOTFILES/config/nyxt" "$HOME/.var/app/engineer.atlas.Nyxt/config/nyxt"
|
||||
|
||||
# Zed: link individual files to preserve extra live data (themes, backups, etc.)
|
||||
mkdir -p "$HOME/.config/zed"
|
||||
for src in "$DOTFILES/config/zed/"*; do
|
||||
dst="$HOME/.config/zed/$(basename "$src")"
|
||||
backup_and_link "$src" "$dst"
|
||||
done
|
||||
|
||||
# System-level links (requires root)
|
||||
if [ "$EUID" -eq 0 ]; then
|
||||
echo ""
|
||||
echo "=== system links ==="
|
||||
backup_and_link "$DOTFILES/config/kanata/rc.kanata" "/etc/rc.d/rc.kanata"
|
||||
chmod +x /etc/rc.d/rc.kanata
|
||||
|
||||
if ! grep -q "rc.kanata" /etc/rc.d/rc.local; then
|
||||
echo "" >> /etc/rc.d/rc.local
|
||||
echo "# Start kanata key remapper" >> /etc/rc.d/rc.local
|
||||
echo "if [ -x /etc/rc.d/rc.kanata ]; then" >> /etc/rc.d/rc.local
|
||||
echo " /etc/rc.d/rc.kanata start" >> /etc/rc.d/rc.local
|
||||
echo "fi" >> /etc/rc.d/rc.local
|
||||
echo "added kanata to rc.local"
|
||||
else
|
||||
echo "rc.local already has kanata entry, skipping"
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
echo "skipping system links (run as root to install /etc/rc.d/rc.kanata and hook into rc.local)"
|
||||
fi
|
||||
|
|
|
|||
17
todo.org
Executable file
17
todo.org
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
* TODO
|
||||
- bspwm / sxhkd config (separate org file?)
|
||||
- reconcile vimrc with mac
|
||||
- get iterm settings from mac
|
||||
- separate mac-specific tangles
|
||||
- get pass setup handled
|
||||
- setup multi-git-push alias
|
||||
- blog:
|
||||
- advanced git:
|
||||
- per-directory identity
|
||||
- multiple ssh keys
|
||||
- multi-push
|
||||
- delta
|
||||
- aliases
|
||||
- taskwarrior flow
|
||||
- lambda connection to EKS
|
||||
- literate configuration
|
||||
Loading…
Add table
Add a link
Reference in a new issue