rofi call bug fixe, minor changes

This commit is contained in:
2022-11-08 14:58:23 +01:00
parent 0b0ae38add
commit 5253c7e9de
6 changed files with 10 additions and 35 deletions

View File

@@ -1,26 +0,0 @@
#! /bin/bash
. ~/.config/i3/env
usage() {
echo "usage: create_workspaces"
}
if [ $# -ne 0 ]; then
usage; exit 1
fi
if [ -n "${SECONDARY_OUTPUT}" ]; then
for i in $(seq 11 19); do
i3-msg -q workspace number $i
i3-msg -q move workspace to output ${SECONDARY_OUTPUT}
done
i3-msg -q workspace number 11
fi
if [ -n "${PRIMARY_OUTPUT}" ]; then
for i in $(seq 1 9); do
i3-msg -q workspace number $i
i3-msg -q move workspace to output ${SECONDARY_OUTPUT}
done
fi
i3-msg -q workspace number 1

View File

@@ -1,6 +1,6 @@
#! /bin/bash
NEW_NAME=$(rofi -p "Tag name" -lines 1 -dmenu)
NEW_NAME=$(rofi -p "Tag name" -lines 1 -dmenu -config ~/.config/rofi/config)
OLD_NAME=$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).name')
WORKSPACE_NUMBER=$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).num')

View File

@@ -1,3 +1,3 @@
#!/bin/bash
ROFI_INPUT=1 ~/.config/i3/bin/focus_workspace $(i3-msg -t get_workspaces | jq '.[]' | jq -r '.name' | sort -n | rofi -dmenu -p "Select workspace:" | sed 's/:.*//')
ROFI_INPUT=1 ~/.config/i3/bin/focus_workspace $(i3-msg -t get_workspaces | jq '.[]' | jq -r '.name' | sort -n | rofi -dmenu -p "Select workspace:" -config ~/.config/rofi/config | sed 's/:.*//')

View File

@@ -18,5 +18,7 @@ if [ $1 -gt 0 ] && [ $1 -lt 43 ]; then
else
usage; exit 1
fi
NEXT_WORKSPACE_NAME=$(i3-msg -t get_workspaces | jq -r ".[] | select(.num==${NEXT_WORKSPACE}).name")
if [ -z "${NEXT_WORKSPACE_NAME}" ]; then NEXT_WORKSPACE_NAME=${NEXT_WORKSPACE}; fi
i3-msg -q "move container to workspace ${NEXT_WORKSPACE}"
i3-msg -q "move container to workspace ${NEXT_WORKSPACE_NAME}"