From 0d89f00badaf37ac3c94bcc624b70f3e07c45350 Mon Sep 17 00:00:00 2001 From: Tristaan Date: Fri, 16 Feb 2018 15:17:34 +0100 Subject: [PATCH] Added layout restoration with a terminal runner --- .i3/config | 32 +++------- .i3/layouts/workspace-3.json | 112 +++++++++++++++++++++++++++++++++++ .i3/scripts/term_runner.sh | 7 +++ .oh-my-zsh | 2 +- 4 files changed, 128 insertions(+), 25 deletions(-) create mode 100644 .i3/layouts/workspace-3.json create mode 100755 .i3/scripts/term_runner.sh diff --git a/.i3/config b/.i3/config index b1668ff..a9cd411 100644 --- a/.i3/config +++ b/.i3/config @@ -40,8 +40,8 @@ client.urgent #2f343a #900000 #ffffff #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 client.background #ffffff -new_window pixel 2 -new_float normal 3 +new_window pixel 4 +new_float normal 5 hide_edge_borders smart #//APPEARANCE//# @@ -198,6 +198,7 @@ gaps inner 5 gaps outer 2 workspace $ws2 gaps outer 0 workspace $ws2 gaps inner 0 + #Multiple screens bindsym $mod+Left move container to output left bindsym $mod+Right move container to output right @@ -209,6 +210,11 @@ bindsym $mod+Shift+Up move workspace to output up bindsym $mod+Shift+Down move workspace to output down #//WORKSPACES//# +#--LAYOUTS--# +bindsym $alt+Shift+l exec i3-msg "append_layout $HOME/.i3/layouts/workspace-3.json" && bash $HOME/.i3/scripts/term_runner.sh -d $HOME/build/doc24_backend -d $HOME/build/doc24_backend -d $HOME/build/doc24_backend -d $HOME + +#//LAYOUTS//# + # resize window (you can also use the mouse for that) mode "resize" { bindsym h resize shrink width 10 px or 10 ppt @@ -230,27 +236,5 @@ mode "ignore" { bindsym $alt+Shift+i mode "default" } - bindsym $alt+i mode "ignore" - -#--BAR CONFIGURATION--# -#bar { -# tray_output primary -# #status_command i3blocks -c ~/.i3/i3blocks.conf -# status_command i3blocks -c ~/.i3/i3blocks-netbook.conf -# -# mode dock -# hidden_state show -# position top -# # T-i3 -# colors { -# background #15325A -# statusline #FFFFFF -# separator #666666 -# focused_workspace #225396 #184791 #ffffff -# active_workspace #333333 #5f676a #ffffff -# inactive_workspace #333333 #222222 #888888 -# urgent_workspace #aa0000 #990000 #ffffff -# } -#} # vim:filetype=i3 diff --git a/.i3/layouts/workspace-3.json b/.i3/layouts/workspace-3.json new file mode 100644 index 0000000..1d6edfb --- /dev/null +++ b/.i3/layouts/workspace-3.json @@ -0,0 +1,112 @@ +{ + // stacked split container with 1 children + "border": "pixel", + "floating": "auto_off", + "layout": "stacked", + "percent": 0.6, + "type": "con", + "nodes": [ + { + "border": "pixel", + "current_border_width": 2, + "floating": "auto_off", + "geometry": { + "height": 768, + "width": 1024, + "x": 0, + "y": 0 + }, + "name": "tristan@T-i3: ~/build", + "percent": 1, + "swallows": [ + { + "class": "^Alacritty$", + "instance": "^Alacritty$" + } + ], + "type": "con" + } + ] +} + +{ + // splitv split container with 2 children + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 0.4, + "type": "con", + "nodes": [ + { + // tabbed split container with 2 children + "border": "pixel", + "floating": "auto_off", + "layout": "tabbed", + "percent": 0.5, + "type": "con", + "nodes": [ + { + "border": "pixel", + "current_border_width": 2, + "floating": "auto_off", + "geometry": { + "height": 768, + "width": 1024, + "x": 0, + "y": 0 + }, + "name": "tristan@T-i3: ~/build", + "percent": 0.5, + "swallows": [ + { + "class": "^Alacritty$", + "instance": "^Alacritty$" + } + ], + "type": "con" + }, + { + "border": "pixel", + "current_border_width": 4, + "floating": "auto_off", + "geometry": { + "height": 768, + "width": 1024, + "x": 0, + "y": 0 + }, + "name": "tristan@T-i3: ~/build/doc24_backend", + "percent": 0.5, + "swallows": [ + { + "class": "^Alacritty$", + "instance": "^Alacritty$" + } + ], + "type": "con" + } + ] + }, + { + "border": "pixel", + "current_border_width": 2, + "floating": "auto_off", + "geometry": { + "height": 768, + "width": 1024, + "x": 0, + "y": 0 + }, + "name": "nvim .i3/config", + "percent": 0.5, + "swallows": [ + { + "class": "^Alacritty$", + "instance": "^Alacritty$" + } + ], + "type": "con" + } + ] +} +// vim:ts=4:sw=4:et diff --git a/.i3/scripts/term_runner.sh b/.i3/scripts/term_runner.sh new file mode 100755 index 0000000..79943ad --- /dev/null +++ b/.i3/scripts/term_runner.sh @@ -0,0 +1,7 @@ +#!/bin/bash +while getopts "d:" option; do + case "${option}" in + d) + alacritty --working-directory ${OPTARG} & ;; + esac +done diff --git a/.oh-my-zsh b/.oh-my-zsh index 37c2d0d..e273cf0 160000 --- a/.oh-my-zsh +++ b/.oh-my-zsh @@ -1 +1 @@ -Subproject commit 37c2d0ddd751e15d0c87a51e2d9f9849093571dc +Subproject commit e273cf004e1ff0510aee61416885f3003bcd15d9