add notification service
This commit is contained in:
parent
ccedf58489
commit
41aefd9ea1
4 changed files with 84 additions and 3 deletions
|
|
@ -29,6 +29,7 @@
|
|||
home.packages = with pkgs; [
|
||||
xclip
|
||||
wl-clipboard
|
||||
libnotify
|
||||
];
|
||||
|
||||
gtk = {
|
||||
|
|
|
|||
|
|
@ -33,12 +33,61 @@ in
|
|||
services.swayosd = {
|
||||
enable = true;
|
||||
};
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
};
|
||||
services.swayidle =
|
||||
let
|
||||
swaylock = lib.getExe' config.programs.swaylock.package "swaylock";
|
||||
notify = lib.getExe' pkgs.libnotify "notify-send";
|
||||
swaymsg = lib.getExe' config.wayland.windowManager.sway.package "swaymsg";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 295;
|
||||
command = "${notify} 'Locking in 5 seconds' -t 5000";
|
||||
}
|
||||
{
|
||||
timeout = 300;
|
||||
command = swaylock;
|
||||
}
|
||||
{
|
||||
timeout = 360;
|
||||
command = "${swaymsg} 'output * dpms off'";
|
||||
resumeCommand = "${swaymsg} 'output * dpms on'";
|
||||
}
|
||||
];
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = swaylock;
|
||||
}
|
||||
];
|
||||
};
|
||||
services.mako = {
|
||||
enable = true;
|
||||
defaultTimeout = 4500;
|
||||
ignoreTimeout = true;
|
||||
};
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
extraConfig = commonOptions.extraConfig;
|
||||
config = lib.mkMerge [
|
||||
commonOptions.config
|
||||
{
|
||||
input = {
|
||||
"type:touchpad" = {
|
||||
natural_scroll = "enabled";
|
||||
dwt = "enabled";
|
||||
dwtp = "disabled";
|
||||
middle_emulation = "enabled";
|
||||
accel_profile = "flat";
|
||||
tap = "enabled";
|
||||
tap_button_map = "lmr";
|
||||
};
|
||||
};
|
||||
keybindings = {
|
||||
"${commonOptions.modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'";
|
||||
"XF86AudioRaiseVolume" = "exec --no-startup-id '${swayosd} --output-volume=raise'";
|
||||
|
|
@ -53,5 +102,7 @@ in
|
|||
];
|
||||
};
|
||||
stylix.targets.sway.enable = true;
|
||||
stylix.targets.swaylock.enable = true;
|
||||
stylix.targets.mako.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
{ config, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
# dpi = 192;
|
||||
displayManager = {
|
||||
gdm.enable = true;
|
||||
# lightdm.enable = true;
|
||||
# sessionCommands = ''
|
||||
# ${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF
|
||||
# Xft.dpi: 192
|
||||
# EOF
|
||||
# '';
|
||||
session = [
|
||||
{
|
||||
manage = "desktop";
|
||||
|
|
@ -31,4 +37,22 @@
|
|||
"/var/lib/AccountsService/users"
|
||||
];
|
||||
};
|
||||
|
||||
# environment.variables = {
|
||||
# GDK_SCALE = "2";
|
||||
# GDK_DPI_SCALE = "0.5";
|
||||
# _JAVA_OPTIONS = "-Dsun.java2d.uiScale=2";
|
||||
# QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
# QT_DEVICE_PIXEL_RATIO = "2";
|
||||
# XCURSOR_SIZE = "64";
|
||||
# };
|
||||
|
||||
# environment.etc = {
|
||||
# "xdg/xsettingsd/xsettingsd.conf".text = ''
|
||||
# Xft/DPI ${builtins.toString (96 * 2 * 1024)}
|
||||
|
||||
# Gdk/WindowScalingFactor 2
|
||||
# Gdk/UnscaledDPI ${builtins.toString (96 * 1024)}
|
||||
# '';
|
||||
# };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,12 @@
|
|||
};
|
||||
|
||||
config = lib.mkIf config.custom.touchpad.enable {
|
||||
services.libinput.enable = true;
|
||||
services.libinput.touchpad.disableWhileTyping = true;
|
||||
services.libinput = {
|
||||
enable = true;
|
||||
touchpad = {
|
||||
disableWhileTyping = true;
|
||||
naturalScrolling = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue