Compare commits

...

5 commits

6 changed files with 37 additions and 13 deletions

View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
COLUMNS=$(tput cols)
PREFIX='%C(bold magenta)%h%C(reset)'
SUFFIX='%C(dim white)%aN%C(reset)%C(auto)%d%C(reset)'
if [[ "$COLUMNS" -gt 100 ]]; then
format='%C(bold)%<(50,trunc)%s%C(reset) %C(green)%><(15,trunc)%ar%C(reset)'
else
format='%C(bold)%s%C(reset) %C(green)%as%C(reset)'
fi
format="$PREFIX $format $SUFFIX"
exec git \
log \
--format=tformat:"$format" \
"$@"

View file

@ -1,14 +1,14 @@
#!/usr/bin/env nu #!/usr/bin/env nu
# TODO: add tunnel show subcmd to quickly view open tunnels use std log
def start-ssh-controller [host: string] { def start-ssh-controller [host: string] {
print "initializing connection to $host" log info "initializing connection to $host"
ssh -M -f -N $host ssh -M -f -N $host
} }
def is-null [ name: string, arg: any] { def is-null [ name: string, arg: any] {
if $arg == null { if $arg == null {
print $"expected argument for --($name)" log error $"expected argument for --($name)"
exit 1 exit 1
} }
} }
@ -44,6 +44,17 @@ def "main down" [
--host: string # host name --host: string # host name
] { ] {
is-null "host" $host is-null "host" $host
print "exiting connection to $host" log info "exiting connection to $host"
ssh -O exit $host ssh -O exit $host
} }
def "main show" [] {
let sockets = ls ~/.ssh/ | where name =~ control | get name
let n_sockets = $sockets | length
if $n_sockets > 0 {
print $"($n_sockets) active connections"
$sockets | split column "-" | get column2
} else {
log info "no open connections"
}
}

View file

@ -31,8 +31,8 @@ autosetuprebase = always
autoSetupRemote = true autoSetupRemote = true
[alias] [alias]
; l = log --format=tformat:'%C(bold magenta)%h%C(reset) %C(bold)%s%C(reset)%C(auto)%d%C(reset) %C(green)%ar%C(reset) %C(dim white)%aN%C(reset)'
adog = log --all --decorate --oneline --graph adog = log --all --decorate --oneline --graph
l = log --format=tformat:'%C(bold magenta)%h%C(reset) %C(bold)%s%C(reset)%C(auto)%d%C(reset) %C(green)%ar%C(reset) %C(dim white)%aN%C(reset)'
lf = log --graph --format=tformat:'%C(bold yellow)%h%C(reset) %C(cyan)%aD%C(reset) %C(green)(%ar) %C(dim white)%aN%C(reset)%w(0,0,9)%n %C(bold)%s%C(auto)%+d%C(reset)%w(0,0,10)%+b' lf = log --graph --format=tformat:'%C(bold yellow)%h%C(reset) %C(cyan)%aD%C(reset) %C(green)(%ar) %C(dim white)%aN%C(reset)%w(0,0,9)%n %C(bold)%s%C(auto)%+d%C(reset)%w(0,0,10)%+b'
lg = "!f() { x=${1-6};\ lg = "!f() { x=${1-6};\
length=$(expr $x + 8);\ length=$(expr $x + 8);\

View file

@ -1,6 +1,7 @@
# exec-once = flameshot & # exec-once = flameshot &
# exec-once = dunst -conf ~/.config/hypr/dunstrc # exec-once = dunst -conf ~/.config/hypr/dunstrc
exec-once = hyprctl setcursor catppuccin-mocha-dark-cursors 24
exec-once = swww-daemon exec-once = swww-daemon
exec-once = mako exec-once = mako
exec-once = udiskie exec-once = udiskie

View file

@ -1,12 +1,5 @@
return { return {
require("util").setup_lang({ treesitter = { "python", "toml" }, mason = { "ruff", "ruff-lsp" } }), require("util").setup_lang({ treesitter = { "python", "toml" }, mason = { "ruff", "ruff-lsp" } }),
-- {
-- "nvimtools/none-ls.nvim",
-- opts = function(_, opts)
-- local nls = require("null-ls")
-- table.insert(opts.sources or {}, nls.builtins.formatting.ruff)
-- end,
-- },
-- modified from https://www.lazyvim.org/extras/lang/python#nvim-lspconfig -- modified from https://www.lazyvim.org/extras/lang/python#nvim-lspconfig
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",

View file

@ -21,7 +21,7 @@ fpath=(
) )
path=( path=(
$HOME/{,.local/}{,s}bin(N) $HOME/{,.local/,.dotfiles/}{,s}bin(N)
$HOME/.{go,cargo,pyenv,pixi,zig}/bin(N) $HOME/.{go,cargo,pyenv,pixi,zig}/bin(N)