From f0122bd423489a61f794bb1c766ed62fca005c23 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 6 Oct 2016 17:47:05 +0200 Subject: Wrap chrome instead of chromium --- users/gkleen@hel.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/users/gkleen@hel.nix b/users/gkleen@hel.nix index 28548a84..bd96a9fd 100644 --- a/users/gkleen@hel.nix +++ b/users/gkleen@hel.nix @@ -1,7 +1,7 @@ { packageOverrides = pkgs: rec { chromium-wrapper = pkgs.symlinkJoin { - name = "chromium-wrapper"; + name = ''${pkgs.chromium.name}-wrapped''; paths = [ pkgs.chromium ]; buildInputs = [ pkgs.makeWrapper ]; postBuild = '' @@ -9,6 +9,19 @@ --add-flags --force-device-scale-factor=1.6 ''; }; + chrome-wrapper = pkgs.symlinkJoin { + name = ''${pkgs.google-chrome.name}-wrapped''; + paths = [ pkgs.google-chrome ]; + buildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/google-chrome-stable \ + --add-flags --force-device-scale-factor=1.6 + ln -s $out/bin/google-chrome-stable $out/bin/chrome + + rm $out/share/applications/google-chrome.desktop + substitute ${pkgs.google-chrome}/share/applications/google-chrome.desktop $out/share/applications/google-chrome.desktop --replace "${pkgs.google-chrome}" "$out" + ''; + }; gnupg = pkgs.lib.overrideDerivation pkgs.gnupg (oldAttrs: { postInstall = '' ln -s $out/bin/gpg2 $out/bin/gpg -- cgit v1.2.3 From 31eaea9034a2bb459afcd9714fb01ed04206739c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 6 Oct 2016 17:47:12 +0200 Subject: dunst-suspend --- users/gkleen@hel.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/users/gkleen@hel.nix b/users/gkleen@hel.nix index bd96a9fd..aff24e15 100644 --- a/users/gkleen@hel.nix +++ b/users/gkleen@hel.nix @@ -27,6 +27,15 @@ ln -s $out/bin/gpg2 $out/bin/gpg ''; }); + dunst-suspend = pkgs.writeScriptBin "dunst-suspend" '' + #!${pkgs.stdenv.shell} + + export PATH=${pkgs.psmisc}/bin:$PATH + + killall -s USR1 -u "$(whoami)" -- dunst + $@ + killall -s USR2 -u "$(whoami)" -- dunst + ''; } // (import ../utils/nix/default.nix) {}; allowUnfree = true; -- cgit v1.2.3