diff --git a/.config/i3/config.cgt b/.config/i3/config.cgt index ef77290..3a868c4 100644 --- a/.config/i3/config.cgt +++ b/.config/i3/config.cgt @@ -56,6 +56,9 @@ bindsym $mod+Ctrl+e exec <% opt.commands.file_manager %> # open browser bindsym $mod+Ctrl+b exec <% opt.commands.browser %> +# launch menu +bindsym $mod+Ctrl+m exec launchmenu + # vinput bindsym $mod+Ctrl+v exec vinput md for_window [class="vinput-editor"] floating enable diff --git a/.local/share/i3-layouts/chat.json b/.local/share/i3-layouts/chat.json new file mode 100644 index 0000000..066fe06 --- /dev/null +++ b/.local/share/i3-layouts/chat.json @@ -0,0 +1,39 @@ +{ + "border": "normal", + "floating": "auto_off", + "layout": "splith", + "marks": [], + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "normal", + "current_border_width": 2, + "floating": "auto_off", + "marks": [], + "name": "nheko", + "percent": 0.5, + "swallows": [ + { + "class": "^nheko$" + } + ], + "type": "con" + }, + { + "border": "normal", + "current_border_width": 2, + "floating": "auto_off", + "marks": [], + "name": "Discord", + "percent": 0.5, + "swallows": [ + { + "title": "^.*- Discord$", + "class": "^discord$" + } + ], + "type": "con" + } + ] +} diff --git a/.local/share/i3-layouts/double-fileman.json b/.local/share/i3-layouts/double-fileman.json new file mode 100644 index 0000000..cd02ec1 --- /dev/null +++ b/.local/share/i3-layouts/double-fileman.json @@ -0,0 +1,38 @@ +{ + "border": "normal", + "floating": "auto_off", + "layout": "splith", + "marks": [], + "percent": 1, + "type": "con", + "nodes": [ + { + "border": "normal", + "current_border_width": 2, + "floating": "auto_off", + "marks": [], + "name": "Thunar", + "percent": 0.5, + "swallows": [ + { + "class": "^Thunar$" + } + ], + "type": "con" + }, + { + "border": "normal", + "current_border_width": 2, + "floating": "auto_off", + "marks": [], + "name": "Thunar", + "percent": 0.5, + "swallows": [ + { + "class": "^Thunar$" + } + ], + "type": "con" + } + ] +} diff --git a/scripts/launchmenu.ros b/scripts/launchmenu.ros new file mode 100755 index 0000000..1a0c9f3 --- /dev/null +++ b/scripts/launchmenu.ros @@ -0,0 +1,41 @@ +#!/usr/bin/env -S ros -Q -- +#|-*- mode:lisp -*-|# +#| +exec ros -Q -- $0 "$@" +|# +(progn ;;init forms + (ros:ensure-asdf) + #+quicklisp(ql:quickload '(uiop) :silent t)) + +(defpackage :launchmenu + (:use :cl)) +(in-package :launchmenu) + +(defun write-app (stream icon layout programs) + (format stream "IMG:~a~C~s~%" icon #\Tab (cons layout programs))) + +(defun write-commands (stream) + (write-app stream "scalable/www-browser.svg" nil '(("openbrowser"))) + (write-app stream "scalable/irc-chat.svg" "chat" '(("nheko") ("discord"))) + (write-app stream "scalable/system-file-manager.svg" "double-fileman" '(("thunar") ("thunar")))) + +(defun main (&rest argv) + (declare (ignorable argv)) + (destructuring-bind (layout . programs) (uiop:run-program '("pmenu") + :output #'read + :error-output :interactive + :input #'write-commands) + (when layout + (uiop:run-program (list "i3-msg" (format + nil + "append_layout ~a/.local/share/i3-layouts/~a.json" + (user-homedir-pathname) + layout)) + :output :interactive + :error-output :interactive + :input :interactive)) + (dolist (program programs) + (uiop:launch-program program + :output :interactive + :error-output :interactive + :input :interactive)))) diff --git a/setup/commands/install-scripts.rkt b/setup/commands/install-scripts.rkt index a2c72c1..45dce74 100644 --- a/setup/commands/install-scripts.rkt +++ b/setup/commands/install-scripts.rkt @@ -28,5 +28,6 @@ (install-zig "scripts/vinput") (install-zig "scripts/withjava") + (install-roswell "scripts/launchmenu.ros") (install-roswell "scripts/playvid.ros") null)