Sway support removed. Moved I38 specific scripts out of the branch covered by dex.
This commit is contained in:
1 parent
45eb3ae4fc
commit
3a9c2ab6f1
13 files changed
+147
-449
No files matched your search
+8
-17
@@ -39,28 +39,19 @@ if ! command -v sha512sum &> /dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wmMsg="i3-msg"
|
||||
if [[ -n "${SWAYSOCK:-}" ]] && command -v swaymsg &> /dev/null; then
|
||||
wmMsg="swaymsg"
|
||||
elif [[ -n "${I3SOCK:-}" ]] && command -v i3-msg &> /dev/null; then
|
||||
wmMsg="i3-msg"
|
||||
elif command -v swaymsg &> /dev/null; then
|
||||
wmMsg="swaymsg"
|
||||
elif command -v i3-msg &> /dev/null; then
|
||||
wmMsg="i3-msg"
|
||||
else
|
||||
yad --title "I38" --text "No i3 or sway command interface was found for screen lock." --button "Close:0"
|
||||
if ! command -v i3-msg &> /dev/null; then
|
||||
yad --title "I38" --text "No i3 command interface was found for screen lock." --button "Close:0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
currentWorkspace="$($wmMsg -t get_workspaces | jq -r '.[] | select(.focused==true) | .name')"
|
||||
currentWorkspace="$(i3-msg -t get_workspaces | jq -r '.[] | select(.focused==true) | .name')"
|
||||
lockWorkspace="i38-lock"
|
||||
if $wmMsg -t get_workspaces | jq -e --arg name "$lockWorkspace" '.[] | select(.name==$name)' &> /dev/null; then
|
||||
if i3-msg -t get_workspaces | jq -e --arg name "$lockWorkspace" '.[] | select(.name==$name)' &> /dev/null; then
|
||||
lockWorkspace="i38-lock-$$"
|
||||
fi
|
||||
|
||||
$wmMsg -t command "workspace --no-auto-back-and-forth \"$lockWorkspace\"" &> /dev/null
|
||||
$wmMsg -t command "mode screenlock" &> /dev/null
|
||||
i3-msg -t command "workspace --no-auto-back-and-forth \"$lockWorkspace\"" &> /dev/null
|
||||
i3-msg -t command "mode screenlock" &> /dev/null
|
||||
|
||||
attemptCount=0
|
||||
while : ; do
|
||||
@@ -92,9 +83,9 @@ while : ; do
|
||||
attemptCount=$((attemptCount + 1))
|
||||
done
|
||||
|
||||
$wmMsg -t command "mode default" &> /dev/null
|
||||
i3-msg -t command "mode default" &> /dev/null
|
||||
if [[ -n "$currentWorkspace" ]]; then
|
||||
$wmMsg -t command "workspace \"$currentWorkspace\"" &> /dev/null
|
||||
i3-msg -t command "workspace \"$currentWorkspace\"" &> /dev/null
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user