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 export BROWSER=librewolf
# Execution # Execution
exec \
dbus-launch --exit-with-session \ dbus-launch --exit-with-session \
ssh-agent \ ssh-agent \
/usr/bin/Hyprland /usr/bin/Hyprland "$@"

View file

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

View file

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

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Variable # Variable
dest="/mnt/ahurac/phone" dest=/mnt/ahurac/phone
# Commands building # Commands building
# Create destination # 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 #!/bin/sh
exec printf \ exec printf \
"$@"
"screenshot-%s.${1:-png}" \ "screenshot-%s.${1:-png}" \
"$(date +"%Y_%m_%d-%N")" "$(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 # Run swaylock
exec /usr/bin/swaylock \ exec /usr/bin/swaylock \
"$@" \
--daemonize \ --daemonize \
--indicator \ --indicator \
--clock \ --clock \

View file

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

View file

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

View file

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

View file

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

View file

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