hyprland: moved from grimblast to hyprshot and sway-notification-center

This commit is contained in:
Tigor Hutasuhut 2024-10-16 09:54:46 +07:00
parent 1b8dd28cde
commit 26ff543629
7 changed files with 76 additions and 12 deletions

View file

@ -2,7 +2,6 @@
{
imports = [
./gnome
./sway
./hyprland
./syncthing.nix
./obs.nix

View file

@ -4,10 +4,11 @@ let
in
{
imports = [
./dunst.nix
# ./dunst.nix
./hypridle.nix
./hyprland.nix
./hyprlock.nix
./hyprshot.nix
# hyprpaper seems to be broken with out of memory and failure to swap wallpapers correctly.
# Use swww for now until the application is stable.
# ./hyprpaper.nix
@ -16,8 +17,10 @@ in
./wallust.nix
./waybar.nix
./wlogout.nix
./swappy.nix
# ./swappy.nix
./alacritty.nix
./swayosd.nix
./sway-notification-center.nix
];
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [

View file

@ -8,6 +8,9 @@ in
home.packages = [
pkgs.dunst
];
wayland.windowManager.hyprland.settings.exec-once = [
"dunst"
];
home.file.".config/dunst/dunstrc".text = generators.toINI { } {
global = {
# Which monitor should the notifications be displayed on.

View file

@ -22,7 +22,6 @@ in
profile.home.programs.foot.enable = lib.mkForce true;
home.packages = [
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
pkgs.wl-clipboard
pkgs.kcalc
];
@ -138,11 +137,6 @@ in
# Language Input
"$mod, I, exec, fcitx5-remote -t"
"$mod, PRINT, exec, grimblast --notify copysave output"
"$mod SHIFT, PRINT, exec, grimblast --notify save output - | swappy -f -"
", PRINT, exec, grimblast --notify copysave area"
"SHIFT, PRINT, exec, grimblast --notify save area - | swappy -f -"
"ALT, PRINT, exec, grimblast --wait 1 --notify save area - | swappy -f -"
];
binde = [
@ -236,15 +230,12 @@ in
exec-once=${init-wallpaper.path} ${./wallpaper.jpeg}
exec-once=wallust run ${config.home.homeDirectory}/.cache/wallpaper/current
exec-once=swayosd-libinput-backend
exec-once=swayosd-server
exec-once=swww-daemon
exec-once=bash -c "sleep 10; hypridle"
exec-once=waybar
exec-once=nm-applet
exec-once=pasystray
exec-once=pypr
exec-once=dunst
source=${config.home.homeDirectory}/.cache/wallust/hyprland.conf
exec-once=sleep 0.2 && swww img ${config.home.homeDirectory}/.cache/wallpaper/current

View file

@ -0,0 +1,32 @@
{ config, lib, pkgs, ... }:
let
cfg = config.profile.hyprland;
saveDir = "${config.home.homeDirectory}/Pictures/screenshots";
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
hyprshot
satty
];
home.activation.sattyDirCreate = lib.hm.dag.entryAfter [ "writeBoundary" ] /*sh*/ ''
mkdir -p "${saveDir}"
chown ${config.home.username} "${saveDir}"
'';
wayland.windowManager.hyprland.settings.bind =
let
saveFilename = "${saveDir}/$(date +%Y-%m-%d_%H%M%S).png";
sattySaveCommand = ''satty --save-after-copy --filename - --fullscreen --output-filename ${saveFilename}'';
in
[
"$mod, PRINT, exec, hyprshot -m window --filename ${saveFilename}"
"$mod SHIFT, PRINT, exec, hyprshot -m window --raw | ${sattySaveCommand}"
", PRINT, exec, hyprshot -m region --filename ${saveFilename}"
"SHIFT, PRINT, exec, hyprshot -m region --raw | ${sattySaveCommand}"
"ALT, PRINT, exec, hyprshot -m output --filename ${saveFilename}"
"ALT SHIFT, PRINT, exec, hyprshot -m output --raw | ${sattySaveCommand}"
];
};
}

View file

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
let
cfg = config.profile.hyprland;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
swaynotificationcenter
libnotify
];
wayland.windowManager.hyprland.settings.exec-once = [
"swaync"
];
};
}

View file

@ -0,0 +1,20 @@
{ config, lib, pkgs, ... }:
let
cfg = config.profile.hyprland;
in
{
config = lib.mkIf cfg.enable {
# services.swayosd = {
# enable = true;
# display = config.profile.hyprland.swayosd.display;
# };
home.packages = with pkgs; [
swayosd
];
wayland.windowManager.hyprland.settings.exec-once = [
"swayosd-libinput-backend"
"swayosd-server"
];
};
}