diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2023-12-21 16:00:27 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2023-12-21 16:00:27 +0200 |
| commit | e0bd28ee2886e14119208b3a05e0dd48fb3531ae (patch) | |
| tree | 35423c42e123c6d1882d7b9cf6f567b01b5887db /scripts | |
| parent | e845dae21c63af9a015d7a095d66624ca011fe12 (diff) | |
| download | dotfiles-e0bd28ee2886e14119208b3a05e0dd48fb3531ae.tar.xz dotfiles-e0bd28ee2886e14119208b3a05e0dd48fb3531ae.zip | |
Added two new bindkeys in zsh to go up and own the history using C-k and C-j instead of C-p and C-n
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/.scripts/books.sh | 22 | ||||
| -rwxr-xr-x | scripts/.scripts/execute_shell.sh | 6 | ||||
| -rwxr-xr-x | scripts/.scripts/rust_template.sh | 15 |
3 files changed, 27 insertions, 16 deletions
diff --git a/scripts/.scripts/books.sh b/scripts/.scripts/books.sh index 7879479..d2f8da4 100755 --- a/scripts/.scripts/books.sh +++ b/scripts/.scripts/books.sh @@ -1,7 +1,7 @@ #!/bin/sh ################################################################## # ___ __ __ _ # -# / _ \ _ __ ___ __ _ _ __ | \/ | __ _ __ _ __| |_ _ # +# / _ \ _ __ ___ __ _ _ __ | \/ | __ _ __ _ __| |_ _ # #| | | | '_ ` _ \ / _` | '__| | |\/| |/ _` |/ _` |/ _` | | | | # #| |_| | | | | | | (_| | | | | | | (_| | (_| | (_| | |_| | # # \___/|_| |_| |_|\__,_|_| |_| |_|\__,_|\__, |\__,_|\__ | # @@ -10,23 +10,13 @@ ################################################################## path="/run/media/omar/Storage/omar/Books" -choice=$(ls "$path" | dmenu -i -l 10) +choice=$(ls -a "$path" | dmenu -i -l 10) new_choice=$choice -while [ -d "$path/$new_choice" ] -do - choice=$(ls "$path/$new_choice" | dmenu -l 10) - new_choice+="/" - new_choice+=$choice #path/books for cs/ - echo $new_choice +while [ -d "$path/$new_choice" ]; do + choice=$(ls -a "$path/$new_choice" | dmenu -l 10) + new_choice+="/" + new_choice+=$choice #path/books for cs/ done zathura --mode fullscreen "$path/$new_choice" - - - - - - - - diff --git a/scripts/.scripts/execute_shell.sh b/scripts/.scripts/execute_shell.sh new file mode 100755 index 0000000..538f222 --- /dev/null +++ b/scripts/.scripts/execute_shell.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +cmd=$(: | dmenu -p "command") +# quality=$(echo -e "1080p\n720p\n480p\n360p" | dmenu -i -l 4) + +sh -c "$cmd" diff --git a/scripts/.scripts/rust_template.sh b/scripts/.scripts/rust_template.sh new file mode 100755 index 0000000..f4ab224 --- /dev/null +++ b/scripts/.scripts/rust_template.sh @@ -0,0 +1,15 @@ +#!/bin/sh +echo -e "sure? y)es n)o d)on't open the file" +read input +if [ "$input" = "y" ]; then + mkdir "$1" + cd "$1" || exit + cp ~/programming/rust-template/main.rs . + cp ~/programming/rust-template/rust-project.json . + nvim main.rs +fi +if [ "$input" = "d" ]; then + mkdir "$1" + cp ~/programming/rust-template/main.rs "$1" + cp ~/programming/rust-template/rust-project.json . +fi |
