summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/haskell/xmonad-tv/src/main.hs5
-rw-r--r--pkgs/haskell/xoutinfo.nix6
-rw-r--r--pkgs/simple/alacritty-tv.nix5
3 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/haskell/xmonad-tv/src/main.hs b/pkgs/haskell/xmonad-tv/src/main.hs
index e3090a3..711f9eb 100644
--- a/pkgs/haskell/xmonad-tv/src/main.hs
+++ b/pkgs/haskell/xmonad-tv/src/main.hs
@@ -73,7 +73,8 @@ mainNoArgs = do
myMasterDelta <- readEnv' (1 / 20) "XMONAD_MASTER_DELTA" :: IO Rational
myMasterWidth <- readEnv' (1 / 2) "XMONAD_MASTER_WIDTH" :: IO Rational
myScreenGaps <- readEnv' [] "XMONAD_SCREEN_GAPS" :: IO [Int]
- myScreenWidth <- readEnv "XMONAD_SCREEN_WIDTH" :: IO Dimension
+ myScreenWidth <-
+ bracket (getEnv "DISPLAY" >>= openDisplay) closeDisplay (return . widthOfScreen . defaultScreenOfDisplay)
handleShutdownEvent <- newShutdownEventHandler
config <-
ewmhExtra
@@ -151,7 +152,9 @@ myKeys conf = Map.fromList $
, ((_4S , xK_c ), kill)
, ((_4 , xK_o ), forkFile {-pkg:fzmenu-}"otpmenu" [] Nothing)
+ , ((_4C , xK_o ), forkFile {-pkg:fzmenu-}"otpmenu" ["--phase2-method=copy"] Nothing)
, ((_4 , xK_p ), forkFile {-pkg:fzmenu-}"passmenu" [] Nothing)
+ , ((_4C , xK_p ), forkFile {-pkg:fzmenu-}"passmenu" ["--phase2-method=copy"] Nothing)
, ((_4 , xK_x ), forkFile {-pkg:alacritty-tv-}"alacritty" ["--singleton"] Nothing)
, ((_4C , xK_x ), spawnRootTerm)
diff --git a/pkgs/haskell/xoutinfo.nix b/pkgs/haskell/xoutinfo.nix
index 64b6f87..fc983d6 100644
--- a/pkgs/haskell/xoutinfo.nix
+++ b/pkgs/haskell/xoutinfo.nix
@@ -1,11 +1,11 @@
{ mkDerivation, aeson, base, bytestring, fetchgit, lib, X11 }:
mkDerivation {
pname = "xoutinfo";
- version = "0.1.0.0";
+ version = "0.1.1.0";
src = fetchgit {
url = "https://cgit.ni.krebsco.de/xoutinfo";
- sha256 = "1g3s9vyy7bpsl2zjiq6kk16c8hhf3n2yz4lv3ic0qy0n6wn6qqi8";
- rev = "cf7377886a55e36701bd0d5ce7c723aa6d7bd9bd";
+ hash = "sha256-QSyCal5E7O1JBlZ7OV3aM8j68YozKyKgYhL2HYFTsvg=";
+ rev = "0.1.1.0";
fetchSubmodules = true;
};
isLibrary = false;
diff --git a/pkgs/simple/alacritty-tv.nix b/pkgs/simple/alacritty-tv.nix
index bea5776..0d2fe59 100644
--- a/pkgs/simple/alacritty-tv.nix
+++ b/pkgs/simple/alacritty-tv.nix
@@ -26,6 +26,11 @@ pkgs.symlinkJoin {
config=/etc/alacritty/default.toml
fi
+ export WINIT_X11_SCALE_FACTOR=$(
+ ${pkgs.haskellPackages.xoutinfo}/bin/xoutinfo |
+ ${pkgs.jq}/bin/jq .device_scale_factor
+ )
+
case ''${1-} in
--singleton)
shift