scripts: use /bin/sh whenever possible

This commit is contained in:
lelgenio 2020-11-03 02:15:23 -03:00
parent 000e479286
commit 6d48b0a743
7 changed files with 48 additions and 44 deletions

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Papirus Icon Theme
{

View file

@ -1,16 +1,18 @@
#!/bin/fish
#!/bin/sh
# wrapper around bemenu
# bmenu * - use as dmenu, -p for custom prompt (man bemenu)
# bmenu run - select from .desktop files and run it
# bmenu start - internal option
if test "$argv[1]" != "start" || test "$argv[1]" = "run"
if test "$1" != "start" || test "$1" = "run"
then
test -n "$SWAYSOCK" && swaymsg fullscreen off > /dev/null
end
fi
if test "$argv[1]" = "run"
test -n "$2" && set t "$2" || set t "terminal"
if test "$1" = "run"
then
test -n "$2" && t="$2" || t="terminal"
exec j4-dmenu-desktop --dmenu="bmenu start -p Iniciar:" --term "$t"
end
fi
# t title
# f filter
@ -19,35 +21,35 @@ end
# s selected
# sc scrollbar
set -l fn "{{@@ font.mono @@}} 12"
fn="{{@@ font.mono @@}} 12"
set -l tb "{{@@ color.bg @@}}"
set -l tf "{{@@ accent_color @@}}"
tb="{{@@ color.bg @@}}"
tf="{{@@ accent_color @@}}"
set -l fb "{{@@ color.bg @@}}"
set -l ff "{{@@ color.txt @@}}"
fb="{{@@ color.bg @@}}"
ff="{{@@ color.txt @@}}"
set -l nb "{{@@ color.bg @@}}"
set -l nf "{{@@ color.txt @@}}"
nb="{{@@ color.bg @@}}"
nf="{{@@ color.txt @@}}"
set -l hb "{{@@ color.bg_light @@}}"
set -l hf "{{@@ accent_color @@}}"
hb="{{@@ color.bg_light @@}}"
hf="{{@@ accent_color @@}}"
#{%@@ if False @@%}#
# Hacks to allow runnning even if not templated
set -l fn "Fira Code 12"
fn="Fira Code 12"
set -l tf "#D9534F"
set -l tb "#202020"
tf="#D9534F"
tb="#202020"
set -l ff "#ffffff"
set -l fb "#202020"
ff="#ffffff"
fb="#202020"
set -l nf "#ffffff"
set -l nb "#202020"
nf="#ffffff"
nb="#202020"
set -l hf "#D9534F"
set -l hb "#404040"
hf="#D9534F"
hb="#404040"
#{%@@ endif @@%}#
bemenu \
@ -61,4 +63,4 @@ bemenu \
--fb "$fb" --ff "$ff" \
--nb "$nb" --nf "$nf" \
--hb "$hb" --hf "$hf" \
$argv
$@

View file

@ -1,9 +1,9 @@
#!/bin/fish
#!/bin/sh
test -n "$SWAYSOCK" && swaymsg fullscreen off > /dev/null
# {%@@ if launcher == "wofi" @@%} #
command -qs wofi &&
which wofi &> /dev/null &&
exec wofi \
--show drun \
--allow-images \
@ -11,7 +11,7 @@ test -n "$SWAYSOCK" && swaymsg fullscreen off > /dev/null
--prompt 'Iniciar: ' \
# {%@@ else @@%} #
command -qs bmenu &&
which bmenu &> /dev/null &&
exec bmenu run
# {%@@ endif @@%} #

View file

@ -1,6 +1,6 @@
#!/bin/env sh
#!/bin/sh
if which xdg-user-dir 1>&2 2> /dev/null
if which xdg-user-dir &> /dev/null
then
DESTFOLDER=$(xdg-user-dir PICTURES)
else

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -x
#!/bin/sh
set -x
if ! lsmod | grep v4l2loopback > /dev/null; then
echo "Adding v42loopback module to kernel"
sudo modprobe v4l2loopback

View file

@ -1,12 +1,12 @@
#!/bin/fish
#!/bin/sh
test -n "$SWAYSOCK" && swaymsg fullscreen off > /dev/null
# {%@@ if launcher == "wofi" @@%} #
command -qs wofi &&
which wofi &> /dev/null &&
exec wofi -d $argv
# {%@@ else @@%} #
command -qs bmenu &&
which bemenu &> /dev/null &&
exec bmenu $argv
# {%@@ endif @@%} #

View file

@ -1,9 +1,10 @@
#!/usr/bin/fish
#!/bin/sh
if not command -v qemu-system-x86_64 > /dev/null
if ! which qemu-system-x86_64 &> /dev/null
then
echo qemu not installed
exit 1
end
fi
# -cdrom ~/Downloads/win10.iso \
# -boot order=d \
@ -15,9 +16,10 @@ qemu-system-x86_64 \
-enable-kvm \
-m 2G \
-cpu host \
-smp (nproc) \
-smp `nproc` \
-display sdl,gl=on \
-audiodev pa,id=snd0 \
-device ich9-intel-hda \
-device hda-output,audiodev=snd0\
-drive file="$HOME/.local/share/windows10.img",format=raw
-audiodev pa,id=snd0 \
-device ich9-intel-hda \
-device hda-output,audiodev=snd0 \
-drive file="$HOME/.local/share/windows10.img",format=raw \