diff --git a/bin/coless b/bin/coless deleted file mode 100755 index be763b9..0000000 --- a/bin/coless +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -export \ - LESSOPEN='| /usr/bin/src-hilite-lesspipe.sh %s' \ - LESS="${LESS} -R" -exec less "$@" - diff --git a/bin/docker-browse_volume b/bin/docker-browse_volume deleted file mode 100755 index 9ca3bc6..0000000 --- a/bin/docker-browse_volume +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -mount_point="/mnt/${1}" -docker run --rm -it -v "${1}:${mount_point}" -w "$mount_point" busybox sh - diff --git a/bin/hyprkill b/bin/hyprkill deleted file mode 100755 index c6b92d2..0000000 --- a/bin/hyprkill +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env sh -set -- killall -u "$(whoami)" -9 Hyprland - -set -x -exec "$@" diff --git a/bin/mcserv b/bin/mcserv deleted file mode 100755 index 84209e1..0000000 --- a/bin/mcserv +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/bash - -exec_as() { - local user="$1" - shift - if [ "$(whoami)" != "$user" ]; then - exec sudo -u "$user" "$0" "$@" - else - cd - fi -} - -exec_as minecraft "$@" || exit -bin=bin -PATH="${bin}:${PATH}" -EDITOR="${EDITOR:-nvim}" -alias ls='ls --color=auto' -shopt -s expand_aliases - -print_error() { - >&2 printf '\033[31;1mERROR:\033[0m \033[1m%s\033[0m\n' "$*" -} - -public_usage() { - local name - name="$(basename "$0")" - cat << EOF -${name}: utilisation - ${name} start|status|stop|watch|restart|edit - ${name} list|active|usage|shell -EOF -} - -error_usage() { - print_error "Utilisation invalide." - >&2 public_usage - return 1 -} - -public_start() { - if [ -n "$1" ]; then - exec screen -S "$1" \ - "$1" - else - error_usage - fi -} - -public_status() { - if [ -n "$1" ]; then - printf '\033[1m%s\033[0m : ' "$1" - if screen -ls "$1" > /dev/null 2>&1; then - echo "en cours d'exécution" - else - echo "non en cours d'exécution" - fi - else - error_usage - fi -} - -public_stop() { - if [ -n "$1" ]; then - exec screen -S "$1" -X stuff '^E^Ustop^M' - else - error_usage - fi -} - -public_watch() { - exec screen -dr "$1" -} - -public_active() { - exec screen -ls -} - -public_list() { - echo "Serveurs disponibles :" - exec ls "$bin" -} - -public_restart() { - set -e - stop "$@" - start "$@" - set +e -} - -public_edit() { - exec "$EDITOR" "${bin}/${1}" -} - -public_shell() { - exec bash -i -} - -verb="$1" -shift - -if [ -z "$verb" ]; then - public_active -elif declare -F | cut -d \ -f 3 | grep '^public_' | sed 's/^public_//' | grep -q "^${verb}$"; then - "public_${verb}" "$@" -else - error_usage -fi diff --git a/bin/waybar b/bin/waybar deleted file mode 100755 index d78365a..0000000 --- a/bin/waybar +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -x -# Waybar wrapper to reload it anytime the -# configuration is edited - -# Variable -waybar_config_d="${HOME}/.config/waybar" -monitored_events=( - modify - create - delete -) - -# Execution -while :; do - /usr/bin/waybar "$@" & - inotifywait "${monitored_events[@]/#/-e}" "${waybar_config_d}" - jobs -p | xargs kill -done - diff --git a/bin/waylectron b/bin/waylectron deleted file mode 100755 index 3d166ac..0000000 --- a/bin/waylectron +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -name=$(basename "$0") -path=$(dirname "$0") -mapfile wayland_args < ~/.config/electron-flags.conf - -PATH=$(echo "$PATH" | sed "s|$path||g" | sed 's/^://' | sed 's/::/:/g' | sed 's/:$//') - -exec "$name" "${wayland_args[@]}"