Update dot_config/i3/executable_on_i3_start.sh
This commit is contained in:
parent
5611752f37
commit
424fe10453
1 changed files with 19 additions and 14 deletions
|
@ -5,6 +5,7 @@ source $GENERATED_MONITOR_CONF
|
||||||
|
|
||||||
$MONITOR_CONF # Apply configured layout
|
$MONITOR_CONF # Apply configured layout
|
||||||
|
|
||||||
|
|
||||||
function process_workspace () {
|
function process_workspace () {
|
||||||
WORKSPACE_NUMBER=$(echo $1 | cut -d ',' -f1)
|
WORKSPACE_NUMBER=$(echo $1 | cut -d ',' -f1)
|
||||||
OUTPUT_NAME=$(echo $1 | cut -d ',' -f2)
|
OUTPUT_NAME=$(echo $1 | cut -d ',' -f2)
|
||||||
|
@ -18,19 +19,23 @@ function process_workspace () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create new workspace for multiple screen at first index of relative index
|
function reconfigure_workspaces () {
|
||||||
# Ex: SCREEN 2 => WORKSPACE NUMBER => 20
|
# Create new workspace for multiple screen at first index of relative index
|
||||||
for i in $(seq 2 $SCREEN_NUMBER); do
|
# Ex: SCREEN 2 => WORKSPACE NUMBER => 20
|
||||||
|
for i in $(seq 2 $SCREEN_NUMBER); do
|
||||||
INDEX=$(($i - 1))
|
INDEX=$(($i - 1))
|
||||||
SCREEN=${SCREENS[$INDEX]}
|
SCREEN=${SCREENS[$INDEX]}
|
||||||
echo workspace number $(($INDEX * 10)) to output $SCREEN
|
echo workspace number $(($INDEX * 10)) to output $SCREEN
|
||||||
$MSG_COMMAND workspace number \"$(($INDEX * 10))\" to output $SCREEN
|
$MSG_COMMAND workspace number \"$(($INDEX * 10))\" to output $SCREEN
|
||||||
done
|
done
|
||||||
|
|
||||||
$MSG_COMMAND -t get_workspaces \
|
$MSG_COMMAND -t get_workspaces \
|
||||||
| jq -c '.[] | [.num, .output] | @csv' \
|
| jq -c '.[] | [.num, .output] | @csv' \
|
||||||
| sed 's/"//g' | sed 's/\\//g' |
|
| sed 's/"//g' | sed 's/\\//g' |
|
||||||
while IFS=$'\n' read -r c; do
|
while IFS=$'\n' read -r c; do
|
||||||
process_workspace $c
|
process_workspace $c
|
||||||
done
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# reconfigure_workspaces
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue