aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git.cheat3
-rw-r--r--linux.cheat4
-rw-r--r--noteutil.cheat4
3 files changed, 9 insertions, 2 deletions
diff --git a/git.cheat b/git.cheat
index a32b322..33f396e 100644
--- a/git.cheat
+++ b/git.cheat
@@ -12,5 +12,8 @@ git checkout <branch>
# Delete a branch
git branch -d <branch>
+# Get the remote url of origin
+git remote get-url origin
+
$ commit_id: git log --pretty=reference --- --column 1 --delimiter '\s'
$ branch: git branch | awk '{print $NF}'
diff --git a/linux.cheat b/linux.cheat
new file mode 100644
index 0000000..5d82a82
--- /dev/null
+++ b/linux.cheat
@@ -0,0 +1,4 @@
+% linux
+
+# Suspend and lock the screen
+systemctl suspend && swaylock
diff --git a/noteutil.cheat b/noteutil.cheat
index 9f20b19..a37ccb1 100644
--- a/noteutil.cheat
+++ b/noteutil.cheat
@@ -1,10 +1,10 @@
% noteutil
# Generate weekly journal by template
-noteutil template weekly -o <weekly_journal>
+[ ! -f <weekly_journal> ] && noteutil template weekly -o <weekly_journal>
# Generate monthly journal by template
-noteutil template monthly -o <monthly_journal>
+[ ! -f <monthly_journal> ] && noteutil template monthly -o <monthly_journal>
$ weekly_journal: noteutil journal --period weekly --date today
$ monthly_journal: noteutil journal --period monthly --date today