Compare commits

...

4 Commits

Author SHA1 Message Date
16a2536955 swayidle: Tweak notifications 2026-02-19 14:09:26 +01:00
bab464f8f3 Fix mullpod script 2026-02-10 14:35:12 +01:00
378da0e7be nu: Add git sha command 2026-02-10 14:34:51 +01:00
50e4f8528d nu: set MULLVAD_SETUP_PLATFORM 2026-02-10 14:33:52 +01:00
4 changed files with 41 additions and 16 deletions

View File

@@ -107,6 +107,9 @@ $env.MOZ_ENABLE_WAYLAND = "1"
$env.VOLTA_HOME = $"($env.HOME)/.volta"
$env.CARGO_TARGET_DIR = $"($env.HOME)/.cargo/target"
# For the mullvadvpn-app setup-rust git hook
$env.MULLVAD_SETUP_PLATFORM = "linux"
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
zoxide init nushell | save -f ~/.cache/zoxide.nu

View File

@@ -1,10 +1,10 @@
before-sleep 'loginctl lock-session'
{% if hostname == "sputnik" %}
timeout 1770 'notify-send "Locking in 30s"'
timeout 1770 'notify-send --app-name=swayidle "Locking in 30s"'
timeout 1800 'loginctl lock-session'
{% else %}
timeout 530 'notify-send "Locking in 30s"'
timeout 530 'notify-send --app-name=swayidle "Locking in 30s"'
timeout 600 'loginctl lock-session'
{% end %}

View File

@@ -37,8 +37,7 @@ RUN chmod +x /entrypoint.sh
ENTRYPOINT [\"/entrypoint.sh\"]
" > $tmp_dockerfile
" >$tmp_dockerfile
podman build -f $tmp_dockerfile -t $custom_tag || exit 1
rm $tmp_dockerfile
@@ -50,4 +49,4 @@ podman run --rm -it \
-v cargo-target:/cargo-target:Z \
-v cargo-registry:/root/.cargo/registry:Z \
-v gradle-cache:/root/.gradle:Z \
$custom_tag mold -run fish
$custom_tag fish

View File

@@ -18,3 +18,26 @@ def gitfixremote [
print $"Unknown host: ($parsed.host)"
}
}
def "git sha" [
--no-copy(-c), # don't copy to clipboard
--full(-f), # output the complete sha
]: nothing -> record {
mut sha = (git show -q | lines | parse "commit {sha}" | first);
if ($sha | is-empty) {
return;
}
$sha = $sha.sha
if not $full {
$sha = ($sha | str substring 0..7)
}
if not $no_copy {
$sha | pbc
}
$sha
}