aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2022-03-03 23:15:35 +0530
committerAkshay Nair <phenax5@gmail.com>2022-03-03 23:15:35 +0530
commit6094a9fa1548a1b6ca510d0707f1d317121f75ea (patch)
tree0610ae5a52e2c55268e410b15622352ff27350c0 /scripts
parente160c24728bad4076f148b0a31de92f88df365d8 (diff)
downloadnixos-config-6094a9fa1548a1b6ca510d0707f1d317121f75ea.tar.gz
nixos-config-6094a9fa1548a1b6ca510d0707f1d317121f75ea.zip
config sync
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bin/clocks24
-rwxr-xr-xscripts/commands/:music4
-rwxr-xr-xscripts/sessions/project.sh2
3 files changed, 28 insertions, 2 deletions
diff --git a/scripts/bin/clocks b/scripts/bin/clocks
new file mode 100755
index 0000000..ee10ac1
--- /dev/null
+++ b/scripts/bin/clocks
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+format="%H:%M"
+current_time=$(date +"$format")
+time="${1:-$current_time}"
+
+C_RESET=`tput sgr0`
+C_GRAY="$(tput setaf 7)$(tput dim)";
+C_HIGHLIGHT="$(tput setaf 7)$(tput bold)"
+
+label() { printf "$C_GRAY$1: $C_HIGHLIGHT"; }
+space() { echo -e "$C_RESET"; }
+
+space
+
+label "IST -> CET"
+TZ=CET date --date="$time IST" +"$format CET"
+
+space
+
+label "CET -> IST"
+date --date="$time CET" +"$format IST"
+
+space
diff --git a/scripts/commands/:music b/scripts/commands/:music
index 8ac1653..300a39f 100755
--- a/scripts/commands/:music
+++ b/scripts/commands/:music
@@ -1,3 +1,5 @@
#!/usr/bin/env sh
-sensible-terminal -e ncmpcpp
+#sensible-terminal -e ncmpcpp
+
+spotify
diff --git a/scripts/sessions/project.sh b/scripts/sessions/project.sh
index f642a9e..4250f67 100755
--- a/scripts/sessions/project.sh
+++ b/scripts/sessions/project.sh
@@ -9,7 +9,7 @@ if [[ -f "$dir/default.nix" ]]; then
fi;
term() { sensible-terminal -d "$dir" "$@"; }
-editor() { term -e sh -c "echo 'Loading...'; $editor"; }
+editor() { term -e sh -c "echo 'Loading...'; $editor; zsh"; }
editor &
sleep 0.1;