feat: add screenshot utility
This commit is contained in:
parent
68ff8cf403
commit
9e56739cc4
2 changed files with 31 additions and 12 deletions
|
|
@ -22,4 +22,8 @@ in lib.mkIf cfg.enable {
|
||||||
|
|
||||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.xfce.xfce4-screenshooter
|
||||||
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,31 @@
|
||||||
in {
|
in {
|
||||||
|
|
||||||
options.nixos95.keybinds = {
|
options.nixos95.keybinds = {
|
||||||
|
default_commands = lib.mkOption {
|
||||||
|
internal = true;
|
||||||
|
description = ''
|
||||||
|
INTERNAL: additional default keyboard shortcuts to add
|
||||||
|
'';
|
||||||
|
type = t.listOf t.attrs;
|
||||||
|
default = [
|
||||||
|
{
|
||||||
|
key = "XF86WWW";
|
||||||
|
exe = "exo-open --launch WebBrowser";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "XF86Mail";
|
||||||
|
exe = "exo-open --launch MailReder";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "Print";
|
||||||
|
exe = "xfce4-screenshooter";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<SUPER><Shift>s";
|
||||||
|
exe = "xfce4-screenshooter --fullscreen";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
commands = lib.mkOption {
|
commands = lib.mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Keyboard shortcuts that should be made available.
|
Keyboard shortcuts that should be made available.
|
||||||
|
|
@ -30,18 +55,6 @@ in {
|
||||||
key = "<Super>r";
|
key = "<Super>r";
|
||||||
exe = "xfce4-appfinder --collapsed";
|
exe = "xfce4-appfinder --collapsed";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
key = "XF86WWW";
|
|
||||||
exe = "exo-open --launch WebBrowser";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "XF86Mail";
|
|
||||||
exe = "exo-open --launch MailReder";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "Print";
|
|
||||||
exe = "xfce4-screenshooter";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
xfwm4 = lib.mkOption {
|
xfwm4 = lib.mkOption {
|
||||||
|
|
@ -76,6 +89,7 @@ in {
|
||||||
exe = lib.escapeXML (slib.getExe elm);
|
exe = lib.escapeXML (slib.getExe elm);
|
||||||
in '' <property name="${key}" type="string" value="${exe}"/> '')
|
in '' <property name="${key}" type="string" value="${exe}"/> '')
|
||||||
|> lib.concatStringsSep "\n";
|
|> lib.concatStringsSep "\n";
|
||||||
|
default_commands_xml = to_xml cfg.default_commands;
|
||||||
commands_xml = to_xml cfg.commands;
|
commands_xml = to_xml cfg.commands;
|
||||||
xfwm4_xml = to_xml cfg.xfwm4;
|
xfwm4_xml = to_xml cfg.xfwm4;
|
||||||
in {
|
in {
|
||||||
|
|
@ -88,6 +102,7 @@ in {
|
||||||
<property name="commands" type="empty">
|
<property name="commands" type="empty">
|
||||||
<property name="custom" type="empty">
|
<property name="custom" type="empty">
|
||||||
<property name="override" type="bool" value="true" />
|
<property name="override" type="bool" value="true" />
|
||||||
|
${default_commands_xml}
|
||||||
${commands_xml}
|
${commands_xml}
|
||||||
</property>
|
</property>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue