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 {
|
config = lib.mkIf cfg.enable {
|
||||||
stylix.targets.noctalia-shell.enable = false;
|
stylix.targets.noctalia-shell.enable = false;
|
||||||
home.packages = [pkgs.app2unit];
|
home.packages = [pkgs.app2unit pkgs.gpu-screen-recorder];
|
||||||
programs.noctalia-shell = {
|
programs.noctalia-shell = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
plugins = builtins.fromJSON (builtins.readFile ./plugins.json);
|
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 =
|
settings =
|
||||||
lib.recursiveUpdate
|
lib.recursiveUpdate
|
||||||
(builtins.fromJSON (builtins.readFile ./settings.json))
|
(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": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"name": "Official Noctalia Plugins",
|
"name": "Noctalia Plugins",
|
||||||
"url": "https://github.com/noctalia-dev/noctalia-plugins"
|
"url": "https://github.com/noctalia-dev/noctalia-plugins"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"states": {
|
"states": {
|
||||||
|
"screen-recorder": {
|
||||||
|
"enabled": true,
|
||||||
|
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"
|
||||||
|
},
|
||||||
"timer": {
|
"timer": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"
|
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": 1
|
"version": 2
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,9 @@
|
||||||
},
|
},
|
||||||
"id": "plugin:timer"
|
"id": "plugin:timer"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "plugin:screen-recorder"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"displayMode": "onhover",
|
"displayMode": "onhover",
|
||||||
"iconColor": "none",
|
"iconColor": "none",
|
||||||
|
|
@ -490,7 +493,7 @@
|
||||||
"visualizerType": "mirrored",
|
"visualizerType": "mirrored",
|
||||||
"mprisBlacklist": [],
|
"mprisBlacklist": [],
|
||||||
"preferredPlayer": "spotify, mpv",
|
"preferredPlayer": "spotify, mpv",
|
||||||
"volumeFeedback": false
|
"volumeFeedback": true
|
||||||
},
|
},
|
||||||
"brightness": {
|
"brightness": {
|
||||||
"brightnessStep": 1,
|
"brightnessStep": 1,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue