about summary refs log tree commit diff stats
path: root/home-manager/packages/scripts/small_functions
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xhome-manager/packages/scripts/small_functions/gtk-themes1
-rwxr-xr-xhome-manager/packages/scripts/small_functions/screen_shot7
-rwxr-xr-xhome-manager/packages/scripts/small_functions/update-sys6
3 files changed, 9 insertions, 5 deletions
diff --git a/home-manager/packages/scripts/small_functions/gtk-themes b/home-manager/packages/scripts/small_functions/gtk-themes
index 3d81aee8..95dd1daf 100755
--- a/home-manager/packages/scripts/small_functions/gtk-themes
+++ b/home-manager/packages/scripts/small_functions/gtk-themes
@@ -4,6 +4,7 @@
 SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH
 
 
+# TODO document, what this does
 
 # usage: import-gsettings
 config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
diff --git a/home-manager/packages/scripts/small_functions/screen_shot b/home-manager/packages/scripts/small_functions/screen_shot
index d0cbeb5c..815fd4fe 100755
--- a/home-manager/packages/scripts/small_functions/screen_shot
+++ b/home-manager/packages/scripts/small_functions/screen_shot
@@ -3,5 +3,8 @@
 # shellcheck source=/dev/null
 SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH
 
-grim -g "$(slurp)" ~/media/pictures/screenshots/"$(date +%s)".png &&
-    alacritty -e llp -command ":{{ set sortby atime; set reverse!; }}" ~/media/pictures/screenshots
+date="$(date +%s)"
+grim -g "$(slurp)" "$HOME/media/pictures/screenshots/$date.png" &&
+    alacritty -e ll -command ":{{ set sortby atime; set reverse!; }}" "$HOME/media/pictures/screenshots/$date.png"
+
+# vim: ft=sh
diff --git a/home-manager/packages/scripts/small_functions/update-sys b/home-manager/packages/scripts/small_functions/update-sys
index c1df4f48..067647b4 100755
--- a/home-manager/packages/scripts/small_functions/update-sys
+++ b/home-manager/packages/scripts/small_functions/update-sys
@@ -20,7 +20,7 @@ Options:
 EOF
     exit "$1";
 }
-tmp=$(mktmp);
+default_branch=$(mktmp);
 BRANCH="";
 
 while [ "$#" -gt 0 ];do
@@ -63,7 +63,7 @@ fi
 msg2 "Updating git repository...";
 git pull --rebase;
 
-git remote show origin | grep 'HEAD' | cut -d':' -f2 | sed -e 's/^ *//g' -e 's/ *$//g' > $tmp &
+git remote show origin | grep 'HEAD' | cut -d':' -f2 | sed -e 's/^ *//g' -e 's/ *$//g' > "$default_branch" &
 
 msg2 "Updating system...";
 if [ -n "$MODE" ]; then
@@ -72,7 +72,7 @@ else
     nixos-rebuild switch;
 fi
 
-git switch "$(cat $tmp)" > /dev/null 2>&1 && msg2 "Switched to branch '$(cat $tmp)'";
+git switch "$(cat "$default_branch")" > /dev/null 2>&1 && msg2 "Switched to branch '$(cat "$default_branch")'";
 msg "Finished Update!";
 
 # vim: ft=sh