This commit is contained in:
Tissevert 2023-09-03 21:25:38 +02:00
commit bc0ab5a476
3 changed files with 57 additions and 0 deletions

24
guIDE.json Normal file
View file

@ -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$" }
]
}
]
}
]
}

26
guide.scm Normal file
View file

@ -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)))

7
guide.sh Executable file
View file

@ -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'" &