From 6094a9fa1548a1b6ca510d0707f1d317121f75ea Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 3 Mar 2022 23:15:35 +0530 Subject: config sync --- scripts/bin/clocks | 24 ++++++++++++++++++++++++ scripts/commands/:music | 4 +++- scripts/sessions/project.sh | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100755 scripts/bin/clocks (limited to 'scripts') 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; -- cgit v1.3.1