From 05907aa17dd4163d42a9abc64d0fa79aefc2f1bc Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Fri, 9 Dec 2022 15:59:12 +0200 Subject: Added some new aliases and added some new keymaps to my nvim config --- scripts/.scripts/books.sh | 14 +++++++------- scripts/.scripts/cpp_ps.sh | 7 +++++-- scripts/.scripts/power.sh | 12 ++++++++++++ scripts/.scripts/pscontests.sh | 2 +- 4 files changed, 25 insertions(+), 10 deletions(-) create mode 100755 scripts/.scripts/power.sh (limited to 'scripts') diff --git a/scripts/.scripts/books.sh b/scripts/.scripts/books.sh index 12741f4..f119107 100755 --- a/scripts/.scripts/books.sh +++ b/scripts/.scripts/books.sh @@ -1,12 +1,12 @@ #!/bin/sh ################################################################## -# ___ __ __ _ -# / _ \ _ __ ___ __ _ _ __ | \/ | __ _ __ _ __| |_ _ -#| | | | '_ ` _ \ / _` | '__| | |\/| |/ _` |/ _` |/ _` | | | | -#| |_| | | | | | | (_| | | | | | | (_| | (_| | (_| | |_| | -# \___/|_| |_| |_|\__,_|_| |_| |_|\__,_|\__, |\__,_|\__ | -# |___/ |___/ -# +# ___ __ __ _ # +# / _ \ _ __ ___ __ _ _ __ | \/ | __ _ __ _ __| |_ _ # +#| | | | '_ ` _ \ / _` | '__| | |\/| |/ _` |/ _` |/ _` | | | | # +#| |_| | | | | | | (_| | | | | | | (_| | (_| | (_| | |_| | # +# \___/|_| |_| |_|\__,_|_| |_| |_|\__,_|\__, |\__,_|\__ | # +# |___/ |___/ # +# # ################################################################## path="/home/pengu/Books/" diff --git a/scripts/.scripts/cpp_ps.sh b/scripts/.scripts/cpp_ps.sh index b2c2600..95b110f 100755 --- a/scripts/.scripts/cpp_ps.sh +++ b/scripts/.scripts/cpp_ps.sh @@ -1,5 +1,5 @@ #!/bin/sh -echo -e "Are you sure? y)es n)o" +echo -e "sure? y)es n)o d)on't open the file" read input if [ "$input" = "y" ]; then mkdir $1 @@ -7,6 +7,9 @@ if [ "$input" = "y" ]; then cp ~/test/cptemplate/main.cpp . nvim main.cpp fi - +if [ "$input" = "d" ]; then + mkdir $1 + cp ~/test/cptemplate/main.cpp $1 +fi diff --git a/scripts/.scripts/power.sh b/scripts/.scripts/power.sh new file mode 100755 index 0000000..8722719 --- /dev/null +++ b/scripts/.scripts/power.sh @@ -0,0 +1,12 @@ +#!/bin/sh + + +CHOICES="poweroff\nreboot" + +CHOICE=$(echo -e $CHOICES | dmenu -l 3) + +systemctl $CHOICE + + + + diff --git a/scripts/.scripts/pscontests.sh b/scripts/.scripts/pscontests.sh index ff4f1e3..3705a7f 100755 --- a/scripts/.scripts/pscontests.sh +++ b/scripts/.scripts/pscontests.sh @@ -7,5 +7,5 @@ mkdir ${REPLY} cd ${REPLY} for p in $PROBLEMS do - echo "y" | ~/.scripts/cpp_ps.sh $p + echo "d" | ~/.scripts/cpp_ps.sh $p done -- cgit v1.2.3