aboutsummaryrefslogtreecommitdiff
path: root/scripts/.scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/.scripts')
-rwxr-xr-xscripts/.scripts/books.sh32
-rwxr-xr-xscripts/.scripts/compiler_cpp.sh5
-rwxr-xr-xscripts/.scripts/dmenuscripts.sh6
-rwxr-xr-xscripts/.scripts/klayoutar.sh3
-rwxr-xr-xscripts/.scripts/klayoutus.sh3
-rwxr-xr-xscripts/.scripts/pause.sh3
-rwxr-xr-xscripts/.scripts/pomodoro.sh46
-rwxr-xr-xscripts/.scripts/pscontests.sh15
-rwxr-xr-xscripts/.scripts/screenshot.sh13
-rwxr-xr-xscripts/.scripts/wally.sh9
10 files changed, 135 insertions, 0 deletions
diff --git a/scripts/.scripts/books.sh b/scripts/.scripts/books.sh
new file mode 100755
index 0000000..be224aa
--- /dev/null
+++ b/scripts/.scripts/books.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+##################################################################
+# ___ __ __ _
+# / _ \ _ __ ___ __ _ _ __ | \/ | __ _ __ _ __| |_ _
+#| | | | '_ ` _ \ / _` | '__| | |\/| |/ _` |/ _` |/ _` | | | |
+#| |_| | | | | | | (_| | | | | | | (_| | (_| | (_| | |_| |
+# \___/|_| |_| |_|\__,_|_| |_| |_|\__,_|\__, |\__,_|\__ |
+# |___/ |___/
+#
+##################################################################
+
+path="/mnt/CEBE20B1BE2093CD/Omar/Self learning/Books/English books"
+choice=$(ls "$path" | dmenu -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
+done
+
+zathura --mode fullscreen "$path/$new_choice"
+
+
+
+
+
+
+
+
diff --git a/scripts/.scripts/compiler_cpp.sh b/scripts/.scripts/compiler_cpp.sh
new file mode 100755
index 0000000..14f78a5
--- /dev/null
+++ b/scripts/.scripts/compiler_cpp.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+NOCPP=$(echo $1 | sed "s/\.cpp//")
+g++ $1 -o $NOCPP
+./$NOCPP
+
diff --git a/scripts/.scripts/dmenuscripts.sh b/scripts/.scripts/dmenuscripts.sh
new file mode 100755
index 0000000..6ac17b1
--- /dev/null
+++ b/scripts/.scripts/dmenuscripts.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+path="/home/peng/.scripts"
+command=$(ls $path | dmenu -l 5)
+$path/$command
+
diff --git a/scripts/.scripts/klayoutar.sh b/scripts/.scripts/klayoutar.sh
new file mode 100755
index 0000000..cf3182c
--- /dev/null
+++ b/scripts/.scripts/klayoutar.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+setxkbmap ar
diff --git a/scripts/.scripts/klayoutus.sh b/scripts/.scripts/klayoutus.sh
new file mode 100755
index 0000000..70394bd
--- /dev/null
+++ b/scripts/.scripts/klayoutus.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+setxkbmap us
diff --git a/scripts/.scripts/pause.sh b/scripts/.scripts/pause.sh
new file mode 100755
index 0000000..1a359f5
--- /dev/null
+++ b/scripts/.scripts/pause.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+playerctl -p spotify play-pause
diff --git a/scripts/.scripts/pomodoro.sh b/scripts/.scripts/pomodoro.sh
new file mode 100755
index 0000000..b8878ec
--- /dev/null
+++ b/scripts/.scripts/pomodoro.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+
+# To-DO
+# (1) Make it store sessions for everyday in a file and group a year in a folder and months in sub folders and the days in the months folder
+# (2) Add sound to the notifcations
+# (3) Add pause and start cabability
+# (4) Make it so that you can specify a task for each sessions
+# (5) Come up with better messeages for the notifcations
+# (6) Add something like pomo -status which displayes the timer of that session(Would be really useful to add to the bar in WMs)
+
+# stop_watch() {
+# MINUTES=$1
+# SECS=$(($MINUTES*60))
+# S=60
+# while [[ $SECS != 0 ]]
+# do
+# # sleep 1
+# SECS=$((SECS-1))
+# S=$((S-1))
+# if [[ $(($SECS%60)) == 0 ]];
+# then
+# MINUTES=$((MINUTES-1))
+# S=59
+# fi
+# [[ $S -le 9 ]] && echo $MINUTES:0$S || echo $MINUTES:$S
+# done
+# }
+
+stopwatch() {
+ seconds=$(($1*60))
+ date1=$((`date +%s` + $seconds))
+ while [ "$date1" -ge `date +%s` ];
+ do
+ echo -ne "$(date -u --date @$(($date1 - `date +%s` )) +%H:%M:%S)\r";
+ done
+}
+
+toggle_watch=true
+DURATION=$1
+TIME_IN_SECONDS=$(($DURATION*60))
+START=$(date | awk '{print $4}' | sed 's/^0//')
+notify-send -i ~/Downloads/tomato_1f345.png -t 3000 "POMODORO" "Timer started at $START"
+(sleep $TIME_IN_SECONDS && notify-send -i ~/Downloads/tomato_1f345.png -t 9999999 "POMODORO" "Take a break you desrve it.") & disown
+stopwatch $DURATION
+
diff --git a/scripts/.scripts/pscontests.sh b/scripts/.scripts/pscontests.sh
new file mode 100755
index 0000000..d476cc8
--- /dev/null
+++ b/scripts/.scripts/pscontests.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+echo -n "Contest Name? : "
+read
+PROBLEMS="A B C D E F"
+mkdir ${REPLY}
+cd ${REPLY}
+for p in $PROBLEMS
+do
+ mkdir $p
+ cd $p
+ touch $p.cpp
+ cd ..
+done
+cd ..
diff --git a/scripts/.scripts/screenshot.sh b/scripts/.scripts/screenshot.sh
new file mode 100755
index 0000000..e0bd39f
--- /dev/null
+++ b/scripts/.scripts/screenshot.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+CHOICE=$(echo -e "Area\nWindow" | dmenu -i -l 2)
+
+if [ "$CHOICE"="Area" ]; then
+ gnome-screenshot -a -c
+else
+ gnome-screenshot -w -c
+fi
+
+
+
+
diff --git a/scripts/.scripts/wally.sh b/scripts/.scripts/wally.sh
new file mode 100755
index 0000000..fd68acd
--- /dev/null
+++ b/scripts/.scripts/wally.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# WALL_ARR=()
+WALLPAPERDIR="$HOME/Pictures/wallpapers"
+RANDWALL=$(ls ${WALLPAPERDIR} | shuf -n1)
+# WALL_ARR+=$RANDWALL
+wal -i "$WALLPAPERDIR/$RANDWALL"
+nitrogen --set-scaled $WALLPAPERDIR/$RANDWALL
+