feat: screenshot script
parent
0a938c80d4
commit
be4d78b4f6
|
@ -27,19 +27,20 @@
|
|||
wl-clipboard
|
||||
wtype
|
||||
xdg-utils
|
||||
(pks.callPackage ./screenshot.nix { inherit config pkgs; })
|
||||
];
|
||||
|
||||
programs.zsh.loginExtra = ''
|
||||
programs. zsh. loginExtra = ''
|
||||
if [[ -z "''${DISPLAY}" ]] && [[ "''${XDG_VTNR}" -eq 1 ]]; then
|
||||
exec ${pkgs.river}/bin/river
|
||||
exec ${ pkgs. river}/bin/river
|
||||
fi
|
||||
'';
|
||||
|
||||
home.sessionVariables.XKB_DEFAULT_LAYOUT = "us";
|
||||
home.sessionVariables.XKB_DEFAULT_VARIANT = "altgr-intl";
|
||||
home.sessionVariables.XKB_DEFAULT_OPTIONS = "caps:escape";
|
||||
home. sessionVariables. XKB_DEFAULT_LAYOUT = "us";
|
||||
home. sessionVariables. XKB_DEFAULT_VARIANT = "altgr-intl";
|
||||
home. sessionVariables. XKB_DEFAULT_OPTIONS = "caps:escape";
|
||||
|
||||
systemd.user.targets.river-session = {
|
||||
systemd. user. targets. river-session = {
|
||||
Unit = {
|
||||
Description = "river window manager session";
|
||||
BindsTo = "graphical-session.target";
|
||||
|
@ -48,14 +49,14 @@
|
|||
};
|
||||
};
|
||||
|
||||
systemd.user.services.network-manager-applet = {
|
||||
systemd. user. services. network-manager-applet = {
|
||||
Unit = {
|
||||
Description = "nm-applet";
|
||||
BindsTo = [ "river-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator";
|
||||
ExecStart = "${ pkgs. networkmanagerapplet}/bin/nm-applet --indicator";
|
||||
};
|
||||
Install = { WantedBy = [ "river-session.target" ]; };
|
||||
};
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
grim = "${pkgs.grim}/bin/grim";
|
||||
slurp = "${pkgs.slurp}/bin/slurp";
|
||||
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
|
||||
in
|
||||
pkgs.writeScriptBin "screenshot" ''
|
||||
#!${shell}
|
||||
${grim} -g "$(${slurp} -d)" - | ${wl-copy} -t image/png
|
||||
''
|
Loading…
Reference in New Issue