feat: Add recorder plugin for noctalia
This commit is contained in:
parent
f7f3c4e012
commit
93dad25698
4 changed files with 44 additions and 4 deletions
|
|
@ -59,11 +59,29 @@ in {
|
|||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
stylix.targets.noctalia-shell.enable = false;
|
||||
home.packages = [pkgs.app2unit];
|
||||
home.packages = [pkgs.app2unit pkgs.gpu-screen-recorder];
|
||||
programs.noctalia-shell = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
plugins = builtins.fromJSON (builtins.readFile ./plugins.json);
|
||||
pluginSettings = let
|
||||
enabledPlugins = with lib;
|
||||
flip pipe [
|
||||
(filterAttrs (_name: settings: settings.enabled or false))
|
||||
builtins.attrNames
|
||||
]
|
||||
config.programs.noctalia-shell.plugins.states;
|
||||
staticSettings = lib.genAttrs enabledPlugins (name: let
|
||||
pluginSettingPath = ./plugin + "/${name}.json";
|
||||
in
|
||||
if lib.pathIsRegularFile pluginSettingPath
|
||||
then builtins.fromJSON (builtins.readFile pluginSettingPath)
|
||||
else {});
|
||||
in
|
||||
lib.recursiveUpdate
|
||||
staticSettings {
|
||||
screen-recorder.directory = "${config.xdg.userDirs.videos}/records";
|
||||
};
|
||||
settings =
|
||||
lib.recursiveUpdate
|
||||
(builtins.fromJSON (builtins.readFile ./settings.json))
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"hideInactive": false,
|
||||
"iconColor": "none",
|
||||
"filenamePattern": "recording_yyyy-MM-dd_HH:mm:ss",
|
||||
"frameRate": "165",
|
||||
"audioCodec": "opus",
|
||||
"videoCodec": "hevc",
|
||||
"quality": "ultra",
|
||||
"colorRange": "full",
|
||||
"showCursor": true,
|
||||
"copyToClipboard": false,
|
||||
"audioSource": "default_output",
|
||||
"videoSource": "portal",
|
||||
"resolution": "2560x1440"
|
||||
}
|
||||
|
|
@ -2,15 +2,19 @@
|
|||
"sources": [
|
||||
{
|
||||
"enabled": true,
|
||||
"name": "Official Noctalia Plugins",
|
||||
"name": "Noctalia Plugins",
|
||||
"url": "https://github.com/noctalia-dev/noctalia-plugins"
|
||||
}
|
||||
],
|
||||
"states": {
|
||||
"screen-recorder": {
|
||||
"enabled": true,
|
||||
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"
|
||||
},
|
||||
"timer": {
|
||||
"enabled": true,
|
||||
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
"version": 2
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,6 +95,9 @@
|
|||
},
|
||||
"id": "plugin:timer"
|
||||
},
|
||||
{
|
||||
"id": "plugin:screen-recorder"
|
||||
},
|
||||
{
|
||||
"displayMode": "onhover",
|
||||
"iconColor": "none",
|
||||
|
|
@ -490,7 +493,7 @@
|
|||
"visualizerType": "mirrored",
|
||||
"mprisBlacklist": [],
|
||||
"preferredPlayer": "spotify, mpv",
|
||||
"volumeFeedback": false
|
||||
"volumeFeedback": true
|
||||
},
|
||||
"brightness": {
|
||||
"brightnessStep": 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue