From 2b16c541286c2976b2cebf1ae52e2242be89729f Mon Sep 17 00:00:00 2001 From: scbj Date: Fri, 8 Nov 2024 16:54:26 +0100 Subject: [PATCH] moved bash scripts from 'collections' to {repo}/misc/scripts/ adjusted bashrc accordingly --- bashrc/.bashrc | 6 ++++-- code/.config/Code/User/settings.json | 3 ++- misc/scripts/colors.sh | 5 +++++ misc/scripts/dunst.sh | 15 +++++++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 misc/scripts/colors.sh create mode 100644 misc/scripts/dunst.sh diff --git a/bashrc/.bashrc b/bashrc/.bashrc index ec9375d..299bb28 100644 --- a/bashrc/.bashrc +++ b/bashrc/.bashrc @@ -28,6 +28,7 @@ alias dirs='dirs -v' alias bashsource='source ~/.bashrc' ## short forms for tmux commands +alias tma='tmux attach' alias trs='tmux rename-session' alias trw='tmux rename-window' alias tnw='tmux new-window -c "#{pane_current_path}"' @@ -49,8 +50,9 @@ eval "$(starship init bash)" # source /home/scbj/repos/qmk_firmware/util/qmk_tab_complete.sh # custom functions for specific purposes -source ~/collection/commands/colors.sh -source ~/collection/commands/dunst.sh +script_path=~/dotfiles/misc/scripts/ +source "${script_path}"/colors.sh +source "${script_path}"/dunst.sh # source alias file source ~/.bash_alias diff --git a/code/.config/Code/User/settings.json b/code/.config/Code/User/settings.json index efe2ada..68a3261 100755 --- a/code/.config/Code/User/settings.json +++ b/code/.config/Code/User/settings.json @@ -37,5 +37,6 @@ "cortex-debug.gdbPath": "/usr/bin/arm-none-eabi-gdb", "cortex-debug.JLinkGDBServerPath": "/home/scbj/repos/jlink_linux/JLinkGDBServer", "pdf-preview.default.sidebar": true, - "workbench.tree.indent": 20 + "workbench.tree.indent": 20, + "cortex-debug.enableTelemetry": false } \ No newline at end of file diff --git a/misc/scripts/colors.sh b/misc/scripts/colors.sh new file mode 100644 index 0000000..59c1988 --- /dev/null +++ b/misc/scripts/colors.sh @@ -0,0 +1,5 @@ +show256colors () { + for code in {0..255}; do + echo -e "\e[38;05;${code}m $code: Color"; + done +} diff --git a/misc/scripts/dunst.sh b/misc/scripts/dunst.sh new file mode 100644 index 0000000..3f4b359 --- /dev/null +++ b/misc/scripts/dunst.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# reset dunst and send notification to Test dUNST config +tunst() { + killall -9 dunst + + if [[ -z $1 ]]; then + notify-send "Henlo" "fren of fren of very fren"; + else + for n in $(seq 1 $1); do + notify-send "Henlo(${n})" "fren of fren of fren number ${n}"; + done + fi +} +