fixup! fixup! fixup! fixup! Install lucid

This commit is contained in:
Sweetbread committed 2026-11-02 23:15:26 +03:00
1 parent d37cfd92dd
commit 2608e1b547
4 files changed
+94 -5

No files matched your search

+6
View File
@@ -32,6 +32,7 @@ in {
ghostty ghostty
pamixer pamixer
clipse clipse
cliphist
wl-clipboard wl-clipboard
wl-clip-persist wl-clip-persist
xclip xclip
@@ -152,6 +153,11 @@ in {
bind = [ bind = [
(bind "SUPER + V" (exec "ghostty --title=clipse -e clipse")) (bind "SUPER + V" (exec "ghostty --title=clipse -e clipse"))
(bind "SUPER + SHIFT + V" (exec "qs ipc call launcher clipboard"))
(bind "Print" (exec "qs ipc call snap toggle"))
(bind "SUPER + Print" (exec "qs ipc call screenshot full"))
(bind "CTRL + Print" (exec "qs ipc call snap region"))
(bind "ALT + Print" (exec "qs ipc call snap window"))
(bind "SUPER + RETURN" (exec "ghostty")) (bind "SUPER + RETURN" (exec "ghostty"))
(bind "SUPER + Q" "hl.dsp.window.close()") (bind "SUPER + Q" "hl.dsp.window.close()")
(bind "SUPER + M" "hl.dsp.exit()") (bind "SUPER + M" "hl.dsp.exit()")
+85
View File
@@ -2,12 +2,97 @@ import "./luciddocks"
import "./lucidedit" import "./lucidedit"
import "./lucidosd" import "./lucidosd"
import "./lucidprefs" import "./lucidprefs"
import "./lucidshot"
import "./lucidwidgets" import "./lucidwidgets"
import QtQuick import QtQuick
import Quickshell import Quickshell
import qs import qs
ShellRoot { ShellRoot {
id: root
Component.onCompleted: {
void Clip.probed;
void Capture.state;
}
function announceShot(entry) {
if (Prefs.shotPreview === "preview") {
shotCards.show(entry);
return;
}
if (Prefs.shotPreview !== "notify")
return;
const where = String(entry.file).replace(Quickshell.env("HOME"), "~");
if (entry.kind === "video")
Quickshell.execDetached(["notify-send", "-a", "LucidShot", "-i", "media-record", "Recording saved", where]);
else
Quickshell.execDetached(["sh", "-c", "a=$(notify-send -a LucidShot -i \"$1\" -A 'edit=Mark up' -A 'open=Open' --wait \"$2\" \"$3\"); case \"$a\" in edit) qs ipc call snap edit \"$1\" ;; open) xdg-open \"$1\" ;; esac; true", "sh", entry.file, entry.temp ? "Screenshot copied" : "Screenshot saved", entry.temp ? "It is on the clipboard only" : where]);
}
ShotEngine {
id: shotEngine
cards: shotCards
onReady: (entry) => {
if (entry.owner === "overlay") {
shotCards.update(entry);
return;
}
if (entry.owner === "pin")
return;
root.announceShot(entry);
}
onFailed: (id, why) => toastMod.popup("warning", why, true)
onTextRead: (r) => {
if (!shotEngine.claim(r.id))
return;
if (r.status === "ok") {
if (Prefs.shotPreview === "preview")
shotCards.show({ "id": r.id, "kind": "text", "text": r.text, "codes": r.codes, "screen": Monitors.focusedScreen ? Monitors.focusedScreen.name : "" });
else
toastMod.popup("copy", "Text copied", false);
} else if (r.status === "notool") {
toastMod.popup("alert", "Install tesseract to copy text", true);
} else {
toastMod.popup("alert", "No text found", true);
}
}
}
ShotOverlay {
id: shotOverlay
engine: shotEngine
cards: shotCards
pins: shotPins
onNotify: (icon, text, warn) => toastMod.popup(icon, text, warn)
onSwatch: (hex, text) => toastMod.popupSwatch(hex, text)
onFreezeFailed: (why) => toastMod.popup("alert", "Couldn't capture the screen", true)
}
ShotCards {
id: shotCards
engine: shotEngine
pins: shotPins
overlay: shotOverlay
}
PinBoard {
id: shotPins
engine: shotEngine
}
RecordHud {}
Connections {
target: Capture
function onSaved(file, seconds) {
root.announceShot({ "id": "rec-" + Date.now(), "kind": "video", "file": file, "duration": seconds, "screen": Capture.output });
}
function onFailed(why) {
toastMod.popup("warning", why, true);
}
}
LucidBar { LucidBar {
id: barRoot id: barRoot
dock: dockRoot dock: dockRoot
-3
View File
@@ -199,9 +199,6 @@
]; ];
bind = [ bind = [
(hyprLua.bind "Print" (hyprLua.exec "${lib.getExe pkgs.hyprshot} -z -o ~/Screenshots -m active -m output"))
(hyprLua.bind "CTRL + Print" (hyprLua.exec "${lib.getExe pkgs.hyprshot} -z -o ~/Screenshots -m region"))
(hyprLua.bind "ALT + Print" (hyprLua.exec "${lib.getExe pkgs.hyprshot} -z -o ~/Screenshots -m active -m window"))
(hyprLua.bind "SUPER + W" (hyprLua.exec "qs ipc call launcher wallpaper")) (hyprLua.bind "SUPER + W" (hyprLua.exec "qs ipc call launcher wallpaper"))
(hyprLua.bind "SUPER + SHIFT + W" (hyprLua.exec "${lib.getExe wallpaper_changer}")) (hyprLua.bind "SUPER + SHIFT + W" (hyprLua.exec "${lib.getExe wallpaper_changer}"))
]; ];
+3 -2
View File
@@ -90,10 +90,11 @@ PY
exec "$HOME/.config/lucid/apply-theme-upstream.sh" --shell-only "$@" exec "$HOME/.config/lucid/apply-theme-upstream.sh" --shell-only "$@"
''; '';
qmlPackages = with pkgs.qt6; [ qt5compat qtmultimedia ]; qmlPackages = with pkgs.qt6; [ qt5compat qtmultimedia ];
tesseract = pkgs.tesseract4.override { enableLanguages = [ "eng" "rus" ]; };
lucid = pkgs.writeShellScript "lucid" '' lucid = pkgs.writeShellScript "lucid" ''
export NIXPKGS_QT6_QML_IMPORT_PATH="${lib.makeSearchPath "lib/qt-6/qml" qmlPackages}:''${NIXPKGS_QT6_QML_IMPORT_PATH:-}" export NIXPKGS_QT6_QML_IMPORT_PATH="${lib.makeSearchPath "lib/qt-6/qml" qmlPackages}:''${NIXPKGS_QT6_QML_IMPORT_PATH:-}"
export QT_PLUGIN_PATH="${lib.makeSearchPath "lib/qt-6/plugins" qmlPackages}:''${QT_PLUGIN_PATH:-}" export QT_PLUGIN_PATH="${lib.makeSearchPath "lib/qt-6/plugins" qmlPackages}:''${QT_PLUGIN_PATH:-}"
export PATH="${lib.makeBinPath (with pkgs; [ bash coreutils curl jq pulseaudio python3 xdg-utils ])}:$PATH" export PATH="${lib.makeBinPath (with pkgs; [ bash cliphist coreutils curl ffmpeg grim imagemagick jq libnotify pulseaudio python3 wf-recorder wl-clipboard xdg-utils ])}:${tesseract}/bin:$PATH"
exec ${pkgs.quickshell}/bin/qs --no-duplicate --path "${config.home.homeDirectory}/.config/quickshell" exec ${pkgs.quickshell}/bin/qs --no-duplicate --path "${config.home.homeDirectory}/.config/quickshell"
''; '';
startWallpaper = pkgs.writeShellScript "lucid-wallpaper-start" '' startWallpaper = pkgs.writeShellScript "lucid-wallpaper-start" ''
@@ -116,7 +117,7 @@ PY
in { in {
programs.waybar.enable = lib.mkForce false; programs.waybar.enable = lib.mkForce false;
services.mako.enable = lib.mkForce false; services.mako.enable = lib.mkForce false;
home.packages = with pkgs; [ ffmpeg imagemagick ]; home.packages = with pkgs; [ cliphist ffmpeg grim imagemagick libnotify wf-recorder tesseract ];
home.activation.installLucid = lib.hm.dag.entryAfter [ "writeBoundary" ] '' home.activation.installLucid = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
target="${config.home.homeDirectory}/.config/quickshell" target="${config.home.homeDirectory}/.config/quickshell"