From 1505badeeb787f4c95cc98525d244e919ce18057 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sat, 9 Dec 2023 15:51:05 +0100 Subject: [PATCH] money printer --- modules/graphical/hyprland.nix | 35 +++++++++++++++++++++++++++++++++- systems/pc/configuration.nix | 4 ++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/modules/graphical/hyprland.nix b/modules/graphical/hyprland.nix index 1bc860b..e39cc50 100644 --- a/modules/graphical/hyprland.nix +++ b/modules/graphical/hyprland.nix @@ -176,9 +176,11 @@ in konsole = "${pkgs.konsole}/bin/konsole"; thunar = "${pkgs.xfce.thunar}/bin/thunar"; wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy"; + wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste"; grim = "${pkgs.grim}/bin/grim"; slurp = "${pkgs.slurp}/bin/slurp"; swww = "${pkgs.swww}/bin/swww"; + pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep"; in [ "$mainMod, Q, exec, ${konsole}" "$mainMod, C, killactive" @@ -186,10 +188,12 @@ in "$mainMod, E, exec, ${thunar}" "$mainMod, V, togglefloating" "$mainMod, I, exec, ${rofi} -show drun -show-icons" - "$mainMod, S, exec, cat ~/songs | shuf -n 1 | sed \"s/^/b\.p /g\" | ${wl-copy}" + "$mainMod, S, exec, cat ~/songs | shuf -n 0 | sed \"s/^/b\.p /g\" | ${wl-copy}" "$mainMod, R, exec, ${swww} img $(ls -d ~/Nextcloud/dinge/Bg/* | shuf -n 1)" " , Print, exec, ${grim} -g \"$(${slurp} -d)\" - | ${wl-copy}" "ALT, SPACE, exec, ${rofi} -show combi" + + #"$mainMod, G, exec, ${wl-paste} | grep -C 10 -f - ~/Nextcloud/old_gdrive/fh/risikomanagement/crisam.txt | sed 's/^[ \\t]*//' | sed 's/[ \\t]*$//' | ${wl-copy}" "$mainMod, P, pseudo" # dwindle "$mainMod, J, togglesplit" # dwindle # Move focus with mainMod + arrow keys @@ -263,6 +267,35 @@ in "${pkgs.dunst}/bin/dunst &" ]; }; + extraConfig = let + wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy"; + wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste"; + in '' + bind = $mainMod, A, submap, notes + + submap = notes + # below + bind = $mainMod, B, exec, ${wl-paste} | grep -B 15 -i -f - ~/Nextcloud/old_gdrive/fh/risikomanagement/crisam.txt | sed 's/[ \t]*$//' | ${wl-copy} + # above + bind = $mainMod, A, exec, ${wl-paste} | grep -A 15 -i -f - ~/Nextcloud/old_gdrive/fh/risikomanagement/crisam.txt | sed 's/[ \t]*$//' | ${wl-copy} + # context + bind = $mainMod, C, exec, ${wl-paste} | grep -C 15 -i -f - ~/Nextcloud/old_gdrive/fh/risikomanagement/crisam.txt | sed 's/[ \t]*$//' | ${wl-copy} + # trim + bind = $mainMod, T, exec, ${wl-paste} | sed 's/[ \t]*$//' | sed 's/^[ \t]*//' | ${wl-copy} + # notes + bind = $mainMod, 1, exec, cat ~/Nextcloud/old_gdrive/fh/risikomanagement/1.txt | ${wl-copy} + bind = $mainMod, 2, exec, cat ~/Nextcloud/old_gdrive/fh/risikomanagement/2.txt | ${wl-copy} + bind = $mainMod, 3, exec, cat ~/Nextcloud/old_gdrive/fh/risikomanagement/3.txt | ${wl-copy} + bind = $mainMod, 4, exec, cat ~/Nextcloud/old_gdrive/fh/risikomanagement/4.txt | ${wl-copy} + bind = $mainMod, 5, exec, cat ~/Nextcloud/old_gdrive/fh/risikomanagement/5.txt | ${wl-copy} + bind = $mainMod, 6, exec, cat ~/Nextcloud/old_gdrive/fh/risikomanagement/6.txt | ${wl-copy} + bind = $mainMod, 7, exec, cat ~/Nextcloud/old_gdrive/fh/risikomanagement/7.txt | ${wl-copy} + bind = $mainMod, 8, exec, cat ~/Nextcloud/old_gdrive/fh/risikomanagement/8.txt | ${wl-copy} + bind = $mainMod, 0, exec, cat ~/Nextcloud/old_gdrive/fh/risikomanagement/0.txt | ${wl-copy} + + bind = , escape, submap, reset + submap = reset + ''; }; programs.waybar = { enable = true; diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index e598c40..f89929b 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -81,8 +81,8 @@ # services.xserver.libinput.enable = true; # Enable automatic login for the user. - services.xserver.displayManager.autoLogin.enable = true; - services.xserver.displayManager.autoLogin.user = "kopatz"; + #services.xserver.displayManager.autoLogin.enable = true; + #services.xserver.displayManager.autoLogin.user = "kopatz"; # Allow unfree packages nixpkgs.config.allowUnfree = true;