summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJack Jamison <53350163+JackJ30@users.noreply.github.com>2024-11-09 14:09:38 -0500
committerGitHub <noreply@github.com>2024-11-09 14:09:38 -0500
commit2d4198da6a59e52278255d22e7aba394b3ce1688 (patch)
treee16ab66261797c06580679daffc13ef1b6ffd0cb /scripts
parente70986a9c299f004aa290bde0ec430ca864f7e74 (diff)
parentddd43ed96249932652c7427dbdbbac92e5ef49ed (diff)
Merge pull request #1 from JackJ30/laptop
Merge Laptop, it's my main workspace now
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/colors17
-rwxr-xr-xscripts/get-brightness-percentage5
-rwxr-xr-xscripts/git-ps19
-rwxr-xr-xscripts/restart3
-rwxr-xr-xscripts/restartemacs3
-rwxr-xr-xscripts/restartsearxng3
-rwxr-xr-xscripts/startup11
-rwxr-xr-xscripts/yt-dla8
-rw-r--r--scripts/yt-dlv8
9 files changed, 67 insertions, 0 deletions
diff --git a/scripts/colors b/scripts/colors
new file mode 100755
index 0000000..1abfd0e
--- /dev/null
+++ b/scripts/colors
@@ -0,0 +1,17 @@
+#!/bin/bash
+T='gYw' # The test text
+
+echo -e "\n 40m 41m 42m 43m\
+ 44m 45m 46m 47m";
+
+for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \
+ '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \
+ ' 36m' '1;36m' ' 37m' '1;37m';
+ do FG=${FGs// /}
+ echo -en " $FGs \033[$FG $T "
+ for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
+ do echo -en "$EINS \033[$FG\033[$BG $T \033[0m";
+ done
+ echo;
+done
+echo
diff --git a/scripts/get-brightness-percentage b/scripts/get-brightness-percentage
new file mode 100755
index 0000000..40073f0
--- /dev/null
+++ b/scripts/get-brightness-percentage
@@ -0,0 +1,5 @@
+#!/bin/bash
+brightness=$(cat /sys/class/backlight/amdgpu_bl1/brightness)
+max_brightness=$(cat /sys/class/backlight/amdgpu_bl1/max_brightness)
+brightness_percentage=$(( $brightness * 100 / $max_brightness ))
+echo "$brightness_percentage%"
diff --git a/scripts/git-ps1 b/scripts/git-ps1
new file mode 100755
index 0000000..0b860cd
--- /dev/null
+++ b/scripts/git-ps1
@@ -0,0 +1,9 @@
+#!/bin/sh
+out=$(git branch --show-current 2>/dev/null)
+if [ -z "$out" ] ; then
+ out=""
+else
+ out="($out) "
+fi
+echo -n "$out"
+
diff --git a/scripts/restart b/scripts/restart
new file mode 100755
index 0000000..8528a0a
--- /dev/null
+++ b/scripts/restart
@@ -0,0 +1,3 @@
+#!/bin/sh
+pkill -x "$1"
+$1 &
diff --git a/scripts/restartemacs b/scripts/restartemacs
new file mode 100755
index 0000000..7f2cee4
--- /dev/null
+++ b/scripts/restartemacs
@@ -0,0 +1,3 @@
+#!/bin/sh
+pkill -x emacs
+emacs --daemon
diff --git a/scripts/restartsearxng b/scripts/restartsearxng
new file mode 100755
index 0000000..0593803
--- /dev/null
+++ b/scripts/restartsearxng
@@ -0,0 +1,3 @@
+#!/bin/sh
+pkill -x uwsgi
+uwsgi --ini $HOME/opt/searxng/searxng.ini
diff --git a/scripts/startup b/scripts/startup
new file mode 100755
index 0000000..818acb4
--- /dev/null
+++ b/scripts/startup
@@ -0,0 +1,11 @@
+#!/bin/sh
+gpgconf -K gpg-agent
+restartsearxng &
+restartemacs >/dev/null &
+pipewire &
+mpd &
+dunst &
+waybar &
+hyprpaper &
+hypridle &
+gpg-agent --daemon
diff --git a/scripts/yt-dla b/scripts/yt-dla
new file mode 100755
index 0000000..f87f145
--- /dev/null
+++ b/scripts/yt-dla
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+echo "$1"
+if [ -z "$1" ] ; then
+ echo "usage: $0 [url of youtube video]"
+ exit 1
+fi
+yt-dlp -x --audio-format mp3 --audio-quality 0 "$1"
diff --git a/scripts/yt-dlv b/scripts/yt-dlv
new file mode 100644
index 0000000..6b96b4e
--- /dev/null
+++ b/scripts/yt-dlv
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+echo "$1"
+if [ -z "$1" ] ; then
+ echo "usage: $0 [url of youtube video]"
+ exit 1
+fi
+yt-dlp "$1" \ No newline at end of file