Switched to on demand workspace creation

This commit is contained in:
Jesper Fussing Moerk 2018-03-15 19:58:27 +01:00
parent 42840283a4
commit dbcdfa1deb
29 changed files with 91 additions and 497 deletions

View File

@ -94,6 +94,15 @@ bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
# WORKSPACE CREATION
bindsym $mod+Ctrl+1 exec --no-startup-id ~/.config/i3/workspaces/ws01.sh
bindsym $mod+Ctrl+2 exec --no-startup-id ~/.config/i3/workspaces/ws02.sh
bindsym $mod+Ctrl+3 exec --no-startup-id ~/.config/i3/workspaces/ws03.sh
bindsym $mod+Ctrl+4 exec --no-startup-id ~/.config/i3/workspaces/ws04.sh
bindsym $mod+Ctrl+5 exec --no-startup-id ~/.config/i3/workspaces/ws05.sh
bindsym $mod+Ctrl+6 exec --no-startup-id ~/.config/i3/workspaces/ws06.sh
bindsym $mod+Ctrl+7 exec --no-startup-id ~/.config/i3/workspaces/ws07.sh
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
@ -136,7 +145,7 @@ gaps inner 10
gaps outer 5
###Displaymode
set $displayMode "Set display mode [w]ork [l]aptop [h]ome"
set $displayMode "Set workspace setup [w]ork [l]aptop [h]ome"
mode $displayMode {
bindsym w exec "~/.config/i3/scripts/work-monitors.sh"; \
exec "~/.config/i3/scripts/work-layout.sh"; \
@ -171,7 +180,7 @@ bindsym $mod+Delete mode "$mode_system"
bindsym Print exec scrot '%Y-%m-%d-%s_screenshot_$wx$h.jpg' -e 'mv $f ~/Pictures/'
### Rofi
### Rofi234
bindsym $mod+d exec --no-startup-id rofi -show drun -config ~/.config/rofi/config
#Bars

6
i3/.config/i3/env Normal file
View File

@ -0,0 +1,6 @@
export LAPTOP="eDP-1"
export PRIMARY="eDP-1"
export SECONDARY="eDP-1"
export LDPI_PROFILE="laptop"
export HDPI_PROFILE="laptop"

View File

@ -1,27 +0,0 @@
{
"layout": "splitv",
"nodes": [
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 410,
"width": 654,
"x": 0,
"y": 0
},
"name": "WeeChat 1.9.1",
"percent": 0.5,
"swallows": [
{
"class": "^Gnome\\-terminal$",
"title": "^weechat$"
}
],
"type": "con"
}
],
"percent": 0.5,
"type": "con"
}

View File

@ -1,14 +0,0 @@
{
"border": "pixel",
"floating": "auto_off",
"layout": "stacked",
"percent": null,
"rect": {
"height": 480,
"width": 670,
"x": 944,
"y": 310
},
"type": "floating_con",
"nodes": []
}

View File

@ -1,75 +0,0 @@
{
"layout": "splith",
"nodes": [
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 1164,
"width": 1918,
"x": 1920,
"y": 0
},
"name": "Shell 1",
"percent": 0.6,
"swallows": [
{
"class": "^Sublime_text$"
}
],
"type": "con"
},
{
"border": "pixel",
"floating": "auto_off",
"layout": "splitv",
"nodes": [
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 410,
"width": 654,
"x": 0,
"y": 0
},
"name": "jfm@moerks: ~",
"percent": 0.5,
"swallows": [
{
"class": "^Gnome\\-terminal$",
"title": "^shell1$"
}
],
"type": "con"
},
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 410,
"width": 654,
"x": 0,
"y": 0
},
"name": "Shell 2",
"percent": 0.5,
"swallows": [
{
"class": "^Gnome\\-terminal$",
"title": "^shell2$"
}
],
"type": "con"
}
],
"percent": 0.4,
"type": "con"
}
],
"percent": 0.5,
"type": "con"
}

View File

@ -1,76 +0,0 @@
{
"layout": "splitv",
"nodes": [
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 410,
"width": 654,
"x": 0,
"y": 0
},
"name": "jfm@moerks: ~",
"percent": 0.5,
"swallows": [
{
"class": "^Gnome\\-terminal$",
"title": "^tasks$"
}
],
"type": "con"
},
{
"border": "pixel",
"floating": "auto_off",
"layout": "splith",
"nodes": [
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 410,
"width": 654,
"x": 0,
"y": 0
},
"name": "newsbeuter",
"percent": 0.5,
"swallows": [
{
"class": "^Gnome\\-terminal$",
"title": "^newsbeuter$"
}
],
"type": "con"
},
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 410,
"width": 654,
"x": 0,
"y": 0
},
"name": "ncmpcpp 0.8.1",
"percent": 0.5,
"swallows": [
{
"class": "^Gnome\\-terminal$",
"title": "^ncmpc$"
}
],
"type": "con"
}
],
"percent": 0.5,
"type": "con"
}
],
"percent": 0.5,
"type": "con"
}

View File

@ -1,22 +0,0 @@
// vim:ts=4:sw=4:et
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 1164,
"width": 1918,
"x": 1,
"y": 1
},
"name": "Google Chrome",
"percent": 1,
"swallows": [
{
"class": "^Google\\-chrome\\-beta$",
"instance": "^google\\-chrome\\-beta$"
}
],
"type": "con"
}

View File

@ -1,20 +0,0 @@
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 1164,
"width": 958,
"x": 1,
"y": 1
},
"name": "WeeChat",
"percent": 0.5,
"swallows": [
{
"class": "^Gnome\\-terminal$",
"title": "^weechat$"
}
],
"type": "con"
}

View File

@ -1,21 +0,0 @@
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 1164,
"width": 1918,
"x": 1,
"y": 1
},
"name": "Google Chrome",
"percent": 1,
"swallows": [
{
"class": "^Google\\-chrome\\-beta$",
"instance": "^google\\-chrome\\-beta$"
}
],
"type": "con"
}

View File

@ -1,14 +0,0 @@
{
"border": "pixel",
"floating": "auto_off",
"layout": "stacked",
"percent": null,
"rect": {
"height": 480,
"width": 670,
"x": 944,
"y": 310
},
"type": "floating_con",
"nodes": []
}

View File

@ -1,75 +0,0 @@
{
"layout": "splith",
"nodes": [
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 1164,
"width": 1918,
"x": 1920,
"y": 0
},
"name": "Shell 1",
"percent": 0.6,
"swallows": [
{
"class": "^Sublime_text$"
}
],
"type": "con"
},
{
"border": "pixel",
"floating": "auto_off",
"layout": "splitv",
"nodes": [
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 410,
"width": 654,
"x": 0,
"y": 0
},
"name": "jfm@moerks: ~",
"percent": 0.5,
"swallows": [
{
"class": "^Gnome\\-terminal$",
"title": "^shell1$"
}
],
"type": "con"
},
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 410,
"width": 654,
"x": 0,
"y": 0
},
"name": "Shell 2",
"percent": 0.5,
"swallows": [
{
"class": "^Gnome\\-terminal$",
"title": "^shell2$"
}
],
"type": "con"
}
],
"percent": 0.4,
"type": "con"
}
],
"percent": 0.5,
"type": "con"
}

View File

@ -1,76 +0,0 @@
{
"layout": "splitv",
"nodes": [
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 410,
"width": 654,
"x": 0,
"y": 0
},
"name": "jfm@moerks: ~",
"percent": 0.5,
"swallows": [
{
"class": "^Gnome\\-terminal$",
"title": "^tasks$"
}
],
"type": "con"
},
{
"border": "pixel",
"floating": "auto_off",
"layout": "splith",
"nodes": [
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 410,
"width": 654,
"x": 0,
"y": 0
},
"name": "newsbeuter",
"percent": 0.5,
"swallows": [
{
"class": "^Gnome\\-terminal$",
"title": "^newsbeuter$"
}
],
"type": "con"
},
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 410,
"width": 654,
"x": 0,
"y": 0
},
"name": "ncmpcpp 0.8.1",
"percent": 0.5,
"swallows": [
{
"class": "^Gnome\\-terminal$",
"title": "^ncmpc$"
}
],
"type": "con"
}
],
"percent": 0.5,
"type": "con"
}
],
"percent": 0.5,
"type": "con"
}

View File

@ -12,7 +12,7 @@
"y": 0
},
"name": "Shell 1",
"percent": 0.7,
"percent": 0.6,
"swallows": [
{
"class": "^Sublime_text$"
@ -66,7 +66,7 @@
"type": "con"
}
],
"percent": 0.3,
"percent": 0.4,
"type": "con"
}
],

View File

@ -1,26 +1,15 @@
#!/bin/sh
i3-msg 'workspace "1: Comms"; append_layout ~/.config/i3/layouts/home-workspace1-comms.json'
i3-msg 'workspace "1: Comms"; exec gnome-terminal --profile weechat -e weechat'
i3-msg 'workspace "1: Comms"; move workspace to output DP-2-2'
i3-msg 'workspace "2: Web"; append_layout ~/.config/i3/layouts/home-workspace2-web.json'
i3-msg 'workspace "2: Web"; exec google-chrome-beta'
i3-msg 'workspace "2: Web"; move workspace to output DP-2-2'
ENV_FILE="/home/jfm/.config/i3/env"
i3-msg 'workspace "3: IDE"; append_layout ~/.config/i3/layouts/home-workspace3-ide.json'
i3-msg 'workspace "3: IDE"; move workspace to output DP-2-1'
/bin/cat <<EOM >$ENV_FILE
export LAPTOP="eDP-1"
export PRIMARY="DP-2-1"
export SECONDARY="DP-2-2"
i3-msg 'workspace "4: Work"; append_layout ~/.config/i3/layouts/home-workspace4-work.json'
i3-msg 'workspace "4: Work"; exec subl'
i3-msg 'workspace "4: Work"; exec exec gnome-terminal --profile default --title=shell1'
i3-msg 'workspace "4: Work"; exec exec gnome-terminal --profile default --title=shell2'
i3-msg 'workspace "4: Work"; move workspace to output DP-2-1'
i3-msg 'workspace "5: Media"; append_layout ~/.config/i3/layouts/home-workspace5-media.json'
i3-msg 'workspace "5: Media"; exec exec gnome-terminal --profile default --title=tasks'
i3-msg 'workspace "5: Media"; exec exec gnome-terminal --profile default --title=newsbeuter -e newsbeuter'
i3-msg 'workspace "5: Media"; exec exec gnome-terminal --profile default --title=ncmpc -e ncmpc'
i3-msg 'workspace "5: Media"; move workspace to output DP-2-2'
export LDPI_PROFILE="default"
export HDPI_PROFILE="laptop"
EOM
feh --bg-scale --zoom fill ~/.config/i3/wallpaper/fedora_simple.jpg
~/.config/polybar/home-polybar.sh

View File

@ -1,26 +1,15 @@
#!/bin/sh
i3-msg 'workspace "1: Comms"; append_layout ~/.config/i3/layouts/laptop-workspace1-comms.json'
i3-msg 'workspace "1: Comms"; exec gnome-terminal --profile weechat -e weechat'
i3-msg 'workspace "1: Comms"; move workspace to output eDP-1'
i3-msg 'workspace "2: Web"; append_layout ~/.config/i3/layouts/laptop-workspace2-web.json'
i3-msg 'workspace "2: Web"; exec google-chrome-beta'
i3-msg 'workspace "2: Web"; move workspace to output eDP-1'
ENV_FILE="/home/jfm/.config/i3/env"
i3-msg 'workspace "3: IDE"; append_layout ~/.config/i3/layouts/laptop-workspace3-ide.json'
i3-msg 'workspace "3: IDE"; move workspace to output eDP-1'
/bin/cat <<EOM >$ENV_FILE
export LAPTOP="eDP-1"
export PRIMARY="eDP-1"
export SECONDARY="eDP-1"
i3-msg 'workspace "4: Work"; append_layout ~/.config/i3/layouts/laptop-workspace4-work.json'
i3-msg 'workspace "4: Work"; exec subl'
i3-msg 'workspace "4: Work"; exec gnome-terminal --profile laptop --title=shell1'
i3-msg 'workspace "4: Work"; exec gnome-terminal --profile laptop --title=shell2'
i3-msg 'workspace "4: Work"; move workspace to output eDP-1'
i3-msg 'workspace "5: Media"; append_layout ~/.config/i3/layouts/laptop-workspace5-media.json'
i3-msg 'workspace "5: Media"; exec gnome-terminal --profile laptop --title=tasks'
i3-msg 'workspace "5: Media"; exec gnome-terminal --profile laptop --title=newsbeuter -e newsbeuter'
i3-msg 'workspace "5: Media"; exec gnome-terminal --profile laptop --title=ncmpc -e ncmpc'
i3-msg 'workspace "5: Media"; move workspace to output eDP-1'
export LDPI_PROFILE="laptop"
export HDPI_PROFILE="laptop"
EOM
feh --bg-scale --zoom fill ~/.config/i3/wallpaper/fedora_simple.jpg
~/.config/polybar/laptop-polybar.sh

View File

@ -1,42 +1,15 @@
#!/bin/sh
i3-msg 'workspace "1: Comms"; append_layout ~/.config/i3/layouts/work-workspace1-comms.json'
i3-msg 'workspace "1: Comms"; exec gnome-terminal --profile weechat -e weechat'
i3-msg 'workspace "1: Comms"; move workspace to output DP-2-1'
sleep 2
i3-msg 'workspace "2: Web"; append_layout ~/.config/i3/layouts/work-workspace2-web.json'
i3-msg 'workspace "2: Web"; exec google-chrome-beta'
i3-msg 'workspace "2: Web"; move workspace to output DP-2-2'
sleep 2
ENV_FILE="/home/jfm/.config/i3/env"
i3-msg 'workspace "3: IDE"; append_layout ~/.config/i3/layouts/work-workspace3-ide.json'
i3-msg 'workspace "3: IDE"; move workspace to output DP-2-2'
sleep 2
/bin/cat <<EOM >$ENV_FILE
export LAPTOP="eDP-1"
export PRIMARY="DP-2-2"
export SECONDARY="DP-2-1"
i3-msg 'workspace "4: Work"; append_layout ~/.config/i3/layouts/work-workspace4-work.json'
i3-msg 'workspace "4: Work"; exec subl'
i3-msg 'workspace "4: Work"; exec gnome-terminal --profile default --title=shell1'
i3-msg 'workspace "4: Work"; exec gnome-terminal --profile default --title=shell2'
i3-msg 'workspace "4: Work"; move workspace to output DP-2-2'
sleep 2
i3-msg 'workspace "5: Media"; append_layout ~/.config/i3/layouts/work-workspace5-media.json'
i3-msg 'workspace "5: Media"; exec gnome-terminal --profile laptop --title=tasks'
i3-msg 'workspace "5: Media"; exec gnome-terminal --profile laptop --title=newsbeuter -e newsbeuter'
i3-msg 'workspace "5: Media"; exec gnome-terminal --profile laptop --title=ncmpc -e ncmpcpp'
i3-msg 'workspace "5: Media"; move workspace to output eDP-1'
sleep 2
i3-msg 'workspace "6: REST"; append_layout ~/.config/i3/layouts/work-workspace6-rest.json'
i3-msg 'workspace "6: REST"; exec gnome-terminal --profile default --title=http-prompt --working-directory=/home/jfm/Customers/TDC/ApiTest -e http-prompt'
i3-msg 'workspace "6: REST"; move workspace to output DP-2-1'
sleep 2
i3-msg 'workspace "5: Media"; append_layout ~/.config/i3/layouts/work-workspace7-oc.json'
i3-msg 'workspace "5: Media"; exec gnome-terminal --profile default --title=oc-shell1'
i3-msg 'workspace "5: Media"; exec gnome-terminal --profile default --title=oc-shell2'
i3-msg 'workspace "5: Media"; exec gnome-terminal --profile default --title=oc-shell3'
i3-msg 'workspace "7: OC"; move workspace to output DP-2-2'
export LDPI_PROFILE="default"
export HDPI_PROFILE="laptop"
EOM
feh --bg-scale --zoom fill ~/.config/i3/wallpaper/fedora_simple.jpg
~/.config/polybar/work-polybar.sh

View File

@ -0,0 +1,6 @@
#!/bin/bash
. ~/.config/i3/env
i3-msg "workspace 1: Comms; append_layout ~/.config/i3/layouts/workspace1-comms.json"
i3-msg "workspace 1: Comms; exec gnome-terminal --profile $LDPI_PROFILE --title=weechat -e weechat"
i3-msg "workspace 1: Comms; move workspace to output $SECONDARY"

View File

@ -0,0 +1,7 @@
#!/bin/bash
. ~/.config/i3/env
i3-msg "workspace 2: Web; append_layout ~/.config/i3/layouts/workspace2-web.json"
i3-msg "workspace 2: Web; exec google-chrome-beta"
i3-msg "workspace 2: Web; move workspace to output $PRIMARY"

View File

@ -0,0 +1,6 @@
#!/bin/bash
. ~/.config/i3/env
i3-msg "workspace 3: IDE; append_layout ~/.config/i3/layouts/workspace3-ide.json"
i3-msg "workspace 3: IDE; move workspace to output $PRIMARY"

View File

@ -0,0 +1,8 @@
#!/bin/bash
. ~/.config/i3/env
i3-msg "workspace 4: Work; append_layout ~/.config/i3/layouts/workspace4-work.json"
i3-msg "workspace 4: Work; exec subl"
i3-msg "workspace 4: Work; exec gnome-terminal --profile $LDPI_PROFILE --title=shell1"
i3-msg "workspace 4: Work; exec gnome-terminal --profile $LDPI_PROFILE --title=shell2"
i3-msg "workspace 4: Work; move workspace to output $PRIMARY"

View File

@ -0,0 +1,7 @@
#!/bin/bash
. ~/.config/i3/env
i3-msg "workspace 5: Media; append_layout ~/.config/i3/layouts/workspace5-media.json"
i3-msg "workspace 5: Media; exec gnome-terminal --profile $HDPI_PROFILE --title=tasks"
i3-msg "workspace 5: Media; exec gnome-terminal --profile $HDPI_PROFILE --title=newsbeuter -e newsbeuter"
i3-msg "workspace 5: Media; exec gnome-terminal --profile $HDPI_PROFILE --title=ncmpc -e ncmpcpp"
i3-msg "workspace 5: Media; move workspace to output $LAPTOP"

View File

@ -0,0 +1,6 @@
#!/bin/bash
. ~/.config/i3/env
i3-msg "workspace 6: REST; append_layout ~/.config/i3/layouts/workspace6-rest.json"
i3-msg "workspace 6: REST; exec gnome-terminal --profile $LDPI_PROFILE --title=http-prompt --working-directory=/home/jfm/Customers/TDC/ApiTest -e http-prompt"
i3-msg "workspace 6: REST; move workspace to output $SECONDARY"

View File

@ -0,0 +1,8 @@
#!/bin/bash
. ~/.config/i3/env
i3-msg "workspace 7: OC; append_layout ~/.config/i3/layouts/workspace7-oc.json"
i3-msg "workspace 7: OC; exec gnome-terminal --profile $LDPI_PROFILE --title=oc-shell1"
i3-msg "workspace 7: OC; exec gnome-terminal --profile $LDPI_PROFILE --title=oc-shell2"
i3-msg "workspace 7: OC; exec gnome-terminal --profile $LDPI_PROFILE --title=oc-shell3"
i3-msg "workspace 7: OC; move workspace to output $PRIMARY"