mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-13 17:02:57 +01:00
add launchmenu
This commit is contained in:
parent
2d76686186
commit
cc349776c4
5 changed files with 122 additions and 0 deletions
|
@ -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
|
||||
|
|
39
.local/share/i3-layouts/chat.json
Normal file
39
.local/share/i3-layouts/chat.json
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
38
.local/share/i3-layouts/double-fileman.json
Normal file
38
.local/share/i3-layouts/double-fileman.json
Normal 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
41
scripts/launchmenu.ros
Executable 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))))
|
|
@ -28,5 +28,6 @@
|
|||
(install-zig "scripts/vinput")
|
||||
(install-zig "scripts/withjava")
|
||||
|
||||
(install-roswell "scripts/launchmenu.ros")
|
||||
(install-roswell "scripts/playvid.ros")
|
||||
null)
|
||||
|
|
Loading…
Reference in a new issue