summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2018-05-30 08:28:37 -0700
committerBen Sima <ben@bsima.me>2018-05-30 08:28:37 -0700
commitd6ee0e228470a3f13dc17f465da770e940f6c4ea (patch)
treec69ae90af9273fb226d213a668213c039f337399
parent4e2881a9dea16ee2af4f618b66a7aeace2bba39f (diff)
Fix backlighting screen stuff on laptop
-rw-r--r--home.nix6
-rw-r--r--packages.nix1
-rw-r--r--xmonad.hs34
3 files changed, 30 insertions, 11 deletions
diff --git a/home.nix b/home.nix
index c021cd9..60d177d 100644
--- a/home.nix
+++ b/home.nix
@@ -50,6 +50,12 @@
enable = true;
};
+ services.redshift = {
+ enable = true;
+ latitude = "33.044444";
+ longitude = "-117.271667";
+ };
+
xsession = {
enable = true;
windowManager.xmonad = {
diff --git a/packages.nix b/packages.nix
index fe14408..162db32 100644
--- a/packages.nix
+++ b/packages.nix
@@ -41,6 +41,7 @@ pkgs.vlc
pkgs.vpnc
pkgs.w3m
pkgs.wakatime
+#pkgs.xorg.xbacklight
pkgs.xterm
pkgs.yank
pkgs.youtube-dl
diff --git a/xmonad.hs b/xmonad.hs
index 77dfa5f..9ac0ead 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -1,18 +1,30 @@
import XMonad.Config
import XMonad
+import XMonad.Util.CustomKeys (customKeys)
import XMonad.Hooks.EwmhDesktops (ewmh)
import XMonad.Hooks.ManageDocks
--import System.Taffybar.Support.PagerHints (pagerHints)
+delKeys conf@(XConfig {modMask = modMask}) =
+ [ (modMask, xK_p) ]
+
+insKeys :: XConfig l -> [((KeyMask, KeySym), X ())]
+insKeys conf@(XConfig {modMask = modMask}) =
+ [ ((0, xK_F5), spawn "xbacklight -dec 1")
+ , ((0, xK_F6), spawn "xbacklight -inc 1")
+ , ((modMask, xK_o), spawn "dmenu")
+ ]
+
main =
- xmonad $
- ewmh $
- docks $
- def
- { modMask = mod4Mask -- ^ super instead of alt
- , normalBorderColor = "#002b36" -- ^ solarized dark
- , focusedBorderColor = "#eee8d5" -- ^ solarized light
- , manageHook = manageDocks <+> manageHook defaultConfig
- , layoutHook = avoidStruts $ layoutHook defaultConfig
- , terminal = "/home/ben/.nix-profile/bin/xterm"
- }
+ xmonad $
+ ewmh $
+ docks $
+ def
+ { modMask = mod4Mask -- ^ super instead of alt
+ , normalBorderColor = "#002b36" -- ^ solarized dark
+ , focusedBorderColor = "#eee8d5" -- ^ solarized light
+ , manageHook = manageDocks <+> manageHook defaultConfig
+ , layoutHook = avoidStruts $ layoutHook defaultConfig
+ , terminal = "/home/ben/.nix-profile/bin/xterm"
+ , keys = customKeys delKeys insKeys
+ }