Browse Source

Remove bashisms from scripts

Frans Bergman 5 years ago
parent
commit
c34ce41403
4 changed files with 11 additions and 7 deletions
  1. 1 1
      .scripts/lock.sh
  2. 7 3
      .scripts/screenconf.sh
  3. 2 2
      .scripts/screenshot.sh
  4. 1 1
      .scripts/set_background.sh

+ 1 - 1
.scripts/lock.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 playerctl pause
 

+ 7 - 3
.scripts/screenconf.sh

@@ -1,7 +1,11 @@
-#!/bin/bash
+#!/bin/sh
 
-CHOICE=$(echo -e "left-of\nbelow" | dmenu)
+CHOICE=$(dmenu -i -b << EOF
+left-of
+below
+EOF
+)
 
-xrandr --output HDMI-0 --auto --$CHOICE DP-2
+xrandr --output HDMI-0 --auto --"$CHOICE" DP-2
 
 ~/.scripts/set_background.sh

+ 2 - 2
.scripts/screenshot.sh

@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/bin/sh
 maim -us screenshot.png
 
 UUID=$(uuidgen)
-UUID="${UUID[@]:0:5}"
+UUID="${UUID[*]:0:5}"
 
 scp screenshot.png "frans@tankernn.eu:/srv/www/scr/$UUID.png"
 

+ 1 - 1
.scripts/set_background.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/bin/sh
 feh --bg-fill ~/desktop_background.png