commit fc784674af303236c66b8daebb4f78d68779129b
Author: Bakar Chargeishvili <bakar.chargeishvili@gmx.de>
Date: Fri, 1 Apr 2022 11:02:50 +0200
Initialize project
Diffstat:
6 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md
@@ -0,0 +1,3 @@
+# scripts - some usefult shell scripts
+
+More details will follow...
diff --git a/beep b/beep
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+speaker-test -t sine -f 3900 -l 1 & sleep 1 && kill -9 $!
diff --git a/displayselect b/displayselect
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+secondMonName=$(xrandr | awk '{if($2=="connected" && $1!="eDP-1"){print $1}}')
+resol=$(xrandr | sed -n "/^$secondMonName/{n;p}" | awk '{print $1}')
+resol_x=$(echo $resol | awk -F "x" '{print $1}')
+resol_y=$(echo $resol | awk -F "x" '{print $2}')
+
+choices="laptopdual\nlaptop\nsecond\nmirror\nmirror2\nManual selection"
+
+chosen=$(echo -e "$choices" | dmenu -i)
+
+
+case "$chosen" in
+ laptopdual) xrandr --output eDP-1 --auto --output $secondMonName --auto --right-of eDP-1 ;;
+ laptop) xrandr --output eDP-1 --auto --output $secondMonName --off ;;
+ second) xrandr --output $secondMonName --auto --output eDP-1 --off ;;
+ mirror) xrandr --addmode eDP-1 "$resol" && xrandr --output eDP-1 --mode $resol --output $secondMonName --mode $resol --same-as eDP-1 ;;
+ mirror2) xrandr --output eDP-1 --mode 1366x768 --output $secondMonName --same-as eDP-1 --scale `echo "1366/$resol_x" | bc -l`x`echo "768/$resol_y" | bc -l`;;
+ "Manual selection") arandr ;;
+esac
+
+~/.fehbg
+# Relaunch polybar if there was a selection.
+#[ "$chosen" == "" ] || polybar_launch
diff --git a/lat b/lat
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+curl -v --stderr - "https://en.wiktionary.org/wiki/$1" | awk '/<h2><span class="mw-headline" id="Latin">Latin<\/span>/{p=1} /References/{p=0} p' | w3m -dump -T text/html | less
diff --git a/mirrorscreen b/mirrorscreen
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+xrandr --output eDP-1 --mode 1366x768 --output DP-1 --same-as eDP-1 --scale `echo "1366/1920" | bc -l`x`echo "768/1200" | bc -l`
diff --git a/mirrorscreen2 b/mirrorscreen2
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+secondMonName=$(xrandr | awk '{if($2=="connected" && $1!="eDP-1"){print $1}}')
+
+xrandr --addmode eDP-1 "$1" && xrandr --output eDP-1 --mode $1 --output $secondMonName --mode $1 --same-as eDP-1
+
+~/.fehbg