add launchmenu

This commit is contained in:
LordMZTE 2023-07-18 14:33:49 +02:00
parent 2d76686186
commit cc349776c4
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
5 changed files with 122 additions and 0 deletions

View File

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

View File

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

View File

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

41
scripts/launchmenu.ros Executable file
View File

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

View File

@ -28,5 +28,6 @@
(install-zig "scripts/vinput")
(install-zig "scripts/withjava")
(install-roswell "scripts/launchmenu.ros")
(install-roswell "scripts/playvid.ros")
null)