commit bc0ab5a47675693a6f6e515e38e7445b3ec493d7 Author: Tissevert Date: Sun Sep 3 21:25:38 2023 +0200 A draft diff --git a/guIDE.json b/guIDE.json new file mode 100644 index 0000000..214462a --- /dev/null +++ b/guIDE.json @@ -0,0 +1,24 @@ +{ "layout": "tabbed", + "type": "con", + "nodes": [ + { "type": "con", + "swallows": [{ "class": "^Xfce4-terminal$", "title": "^shell$" }] + }, + { "layout": "splitv", + "type": "con", + "nodes": [ + { "percent": 0.7, + "swallows": [ + { "class": "^Gvim$" } + ] + }, + { "percent": 0.3, + "swallows": [ + { "class": "^Xfce4-terminal$", + "title": "^repl$" } + ] + } + ] + } + ] +} diff --git a/guide.scm b/guide.scm new file mode 100644 index 0000000..9ea55d9 --- /dev/null +++ b/guide.scm @@ -0,0 +1,26 @@ +(use-modules ((gnu packages vim) #:select (vim-full)) + ((gnu packages wm) #:select (i3-wm)) + ((gnu packages web) #:select (jq)) + ((guix build-system copy) #:select (copy-build-system)) + ((guix gexp) #:select (local-file)) + ((guix licenses) #:select (bsd-3)) + ((guix packages) #:select (package))) + +(let + ((%source-dir (dirname (current-filename)))) + (package + (name "guide") + (version "0.1.0") + (source + (local-file %source-dir + #:recursive? #t + #:select? (lambda (x . _) (not (string=? (basename x) ".git"))))) + (build-system copy-build-system) + (inputs (list i3-wm vim-full)) + (arguments + '(#:install-plan + '(("guide.sh" "bin/")))) + (home-page "https://git.marvid.fr/Tissevert/guide") + (synopsis "A shortcut to open ") + (description "Not in the mood") + (license bsd-3))) diff --git a/guide.sh b/guide.sh new file mode 100755 index 0000000..e5f492b --- /dev/null +++ b/guide.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +WORKDIRECTORY="${1}" +i3-msg 'layout tabbed; append_layout ~/.config/i3/guIDE.json; resize shrink width 20 px or 20 ppt' +xfce4-terminal --working-directory "${WORKDIRECTORY}" --title shell & +gvim "${WORKDIRECTORY}" & +xfce4-terminal --working-directory "${WORKDIRECTORY}" --title repl --hide-menubar --command="bash -c '[ -f ${WORKDIRECTORY}/guix.scm ] && guix shell'" &