From 9b859f14d7a1f9c9a1bb01d12e97e2d1d39abef6 Mon Sep 17 00:00:00 2001 From: Johannes Rothe Date: Wed, 4 Jan 2023 20:42:28 +0100 Subject: [PATCH] Add did aliases --- roles/dotfiles/files/fish/config.fish | 3 +++ roles/dotfiles/files/fish/functions/did.fish | 4 ++++ roles/dotfiles/files/fish/functions/didc.fish | 3 +++ roles/dotfiles/files/fish/functions/dide.fish | 3 +++ roles/dotfiles/files/fish/functions/done.fish | 4 ---- .../tasks/templates/systemd/note-sync/note-sync.service.j2 | 1 - 6 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 roles/dotfiles/files/fish/functions/did.fish create mode 100644 roles/dotfiles/files/fish/functions/didc.fish create mode 100644 roles/dotfiles/files/fish/functions/dide.fish delete mode 100644 roles/dotfiles/files/fish/functions/done.fish diff --git a/roles/dotfiles/files/fish/config.fish b/roles/dotfiles/files/fish/config.fish index 4509fbc..c635ef4 100644 --- a/roles/dotfiles/files/fish/config.fish +++ b/roles/dotfiles/files/fish/config.fish @@ -27,5 +27,8 @@ end fish_add_path ~/go/bin/ fish_add_path ~/bin/ +# being able to use ssh in systemd user service +systemctl --user import-environment SSH_AUTH_SOCK + # set work specific stuff in there like GIT_AUTHOR_EMAIL and JIRA_API_TOKEN bass source ~/.profile diff --git a/roles/dotfiles/files/fish/functions/did.fish b/roles/dotfiles/files/fish/functions/did.fish new file mode 100644 index 0000000..5ca858a --- /dev/null +++ b/roles/dotfiles/files/fish/functions/did.fish @@ -0,0 +1,4 @@ +# Defined in - @ line 1 +function did + echo "$(date +"%F") $argv" >> ~/notes/did.md; +end diff --git a/roles/dotfiles/files/fish/functions/didc.fish b/roles/dotfiles/files/fish/functions/didc.fish new file mode 100644 index 0000000..382f87e --- /dev/null +++ b/roles/dotfiles/files/fish/functions/didc.fish @@ -0,0 +1,3 @@ +function didc --wraps='cat ~/notes/did.md | tail -n 10' --description 'alias didc=cat ~/notes/did.md | tail -n 10' + cat ~/notes/did.md | tail -n 10 $argv; +end diff --git a/roles/dotfiles/files/fish/functions/dide.fish b/roles/dotfiles/files/fish/functions/dide.fish new file mode 100644 index 0000000..6cb9c03 --- /dev/null +++ b/roles/dotfiles/files/fish/functions/dide.fish @@ -0,0 +1,3 @@ +function dide --wraps='vim ~/notes/did.md' --wraps=vim\ \'+normal\ G\'\ \~/notes/did.md --description alias\ dide=vim\ \'+normal\ G\'\ \~/notes/did.md + vim '+normal G' ~/notes/did.md $argv; +end diff --git a/roles/dotfiles/files/fish/functions/done.fish b/roles/dotfiles/files/fish/functions/done.fish deleted file mode 100644 index ddf40fa..0000000 --- a/roles/dotfiles/files/fish/functions/done.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function done - echo "$(date +"%F %H:%M") $argv" >> ~/Documents/done.txt; -end diff --git a/roles/dotfiles/tasks/templates/systemd/note-sync/note-sync.service.j2 b/roles/dotfiles/tasks/templates/systemd/note-sync/note-sync.service.j2 index e48a06e..c6a8b68 100644 --- a/roles/dotfiles/tasks/templates/systemd/note-sync/note-sync.service.j2 +++ b/roles/dotfiles/tasks/templates/systemd/note-sync/note-sync.service.j2 @@ -3,6 +3,5 @@ Description=Sync notes with git-sync [Service] Type=oneshot -ExecStartPre=systemctl --user import-environment SSH_AUTH_SOCK WorkingDirectory={{ home }}/notes/ ExecStart={{ home }}/bin/git-sync -ns