Ajout du tableau des arguments dans les scripts

This commit is contained in:
Hippolyte Chauvin 2023-04-16 22:58:56 +02:00
parent d6adc2a82b
commit 1ad833846b
13 changed files with 24 additions and 50 deletions

View file

@ -10,7 +10,8 @@ export PATH="/opt/wine-wl/usr/bin:$PATH"
export BROWSER=librewolf
# Execution
exec \
dbus-launch --exit-with-session \
ssh-agent \
/usr/bin/Hyprland
/usr/bin/Hyprland "$@"

View file

@ -1,6 +1,6 @@
#!/bin/sh
env \
export \
LESSOPEN='| /usr/bin/src-hilite-lesspipe.sh %s' \
LESS=' -R ' \
LESS=-R
less "$@"

View file

@ -1,5 +1,5 @@
#!/bin/sh -e
path="${1:-.}/$(date +'%Y_%m_%d')"
mkdir -p "$path"
mkdir "$@" -p "$path"
echo "$path"

View file

@ -1,7 +1,7 @@
#!/bin/bash
# Variable
dest="/mnt/ahurac/phone"
dest=/mnt/ahurac/phone
# Commands building
# Create destination

View file

@ -1,7 +0,0 @@
#!/bin/sh
if [ -n "$BROWSER" ]; then
exec "$BROWSER"
else
exit 127
fi

View file

@ -1,5 +1,6 @@
#!/bin/sh
exec printf \
"$@"
"screenshot-%s.${1:-png}" \
"$(date +"%Y_%m_%d-%N")"

View file

@ -1,25 +0,0 @@
#!/bin/sh -xe
# cd
cd
# Environment
# XDG
export \
XDG_CURRENT_DESKTOP=sway \
XDG_SESSION_DESKTOP=sway
# Backends
export \
QT_QPA_PLATFORM='wayland;xcb' \
QT_QPA_PLATFORMTHEME=qt6ct \
CLUTTER_BACKEND=wayland \
SDL_VIDEODRIVER=wayland \
_JAVA_AWT_WM_NONREPARENTING=1 \
MOZ_ENABLE_WAYLAND=1
# Execution
exec dbus-launch --exit-with-session \
ssh-agent \
/usr/bin/sway

View file

@ -2,6 +2,7 @@
# Run swaylock
exec /usr/bin/swaylock \
"$@" \
--daemonize \
--indicator \
--clock \

View file

@ -7,10 +7,10 @@ vncviewer=wlvncc
localhost=localhost
# Arguments
ssh_host="$1"
local_port="${2:-9900}"
distant_port="${3:-5900}"
target="$4"
ssh_host="$1" ; shift
local_port="${1:-9900}" ; shift
distant_port="${1:-5900}"; shift
target="$1" ; shift
# Commands building
# Make SSH bridge
@ -25,6 +25,7 @@ make_ssh_bridge+=(
# Open VNC session
open_vnc_session+=(
"$vncviewer"
"$@"
"${localhost}"
"${local_port}"
)

View file

@ -1,5 +1,5 @@
#!/bin/sh
exec /usr/bin/webcord \
--ozone-platform-hint=auto \
"$@"
"$@" \
--ozone-platform-hint=auto

View file

@ -16,6 +16,7 @@ height="${1:-1080}"; shift
# Command building
weston_com=(
"$weston"
"$@"
"--backend=${backend}"
"--rdp-tls-cert=${crt}"
"--rdp-tls-key=${key}"

View file

@ -1,8 +1,5 @@
#!/bin/bash
# Arguments
hostname="$1"; shift
# Variables
declare mac
declare -a wol_com options
@ -10,6 +7,9 @@ name="$(basename "$0")"
wolf_d="${HOME}/.wolf"
wolf_host="${wolf_d}/${hostname}"
# Arguments
hostname="$1"; shift
# Functions
# Throw an error
function error {

View file

@ -19,7 +19,8 @@ export \
MOZ_ENABLE_WAYLAND=1
# Execution
exec dbus-launch --exit-with-session \
exec \
dbus-launch --exit-with-session \
ssh-agent \
/usr/bin/sway
/usr/bin/sway "$@"