Skip to content

Commit

Permalink
moving scripts to scripts folder
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintRyoh committed Mar 27, 2023
1 parent 5f4c83f commit 061ad2a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions hook.sh → scripts/hook.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
#!/usr/bin/env bash
#!/usr/scripts/env bash

export LAST_AWESOME_ADDRESS=""

start() {
stop
./awmtt.sh start -W -C ./rc.lua -S 1280x800
./scripts/awmtt.sh start -W -C ./rc.lua -S 1280x800
}

alias restart='./awmtt.sh restart'
alias restart='./scripts/awmtt.sh restart'

stop() {
export LAST_AWESOME_ADDRESS=""
./awmtt.sh stop
./scripts/awmtt.sh stop
}

run() {
./awmtt.sh run $1
./scripts/awmtt.sh run $1
}

find-awesome-dbus-addresses() {
DBUS_ADDRESSES=($(dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep -o ':[0-9].[0-9]*'))
for ADDRESS in "${DBUS_ADDRESSES[@]}"; do
./awesome-client-wrapped --dest $ADDRESS 'return 1 + 1' &>/dev/null
./scripts/awesome-client-wrapped --dest $ADDRESS 'return 1 + 1' &>/dev/null
if [[ $? -eq 0 ]]; then
printf "%s\n" $ADDRESS
fi
Expand All @@ -37,7 +37,7 @@ send() {
else
STDIN=$(cat -)
fi
./awesome-client-wrapped --dest $LAST_AWESOME_ADDRESS "$STDIN"
./scripts/awesome-client-wrapped --dest $LAST_AWESOME_ADDRESS "$STDIN"
}

alert() {
Expand Down
4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ in

shellHook = ''
BASE_DIRECTORY=$(pwd)
if [[ -f ./hook.sh ]]; then
source ./hook.sh
if [[ -f ./scripts/hook.sh ]]; then
source ./scripts/hook.sh
fi
'';
}

0 comments on commit 061ad2a

Please sign in to comment.