From d1443586e94b89ee21b4609f6aa4d4077e5a4cbf Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 22 Mar 2019 16:32:24 -0700 Subject: Trying to get rofi to work, still doesn't work with xmonad I can launch rofi from the terminal but the xmonad keys don't work, and I have no idea why. --- common.nix | 8 ++++++-- linux.nix | 5 +++++ packages.nix | 2 ++ xmonad.hs | 15 +++++++++------ 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/common.nix b/common.nix index e872492..beb0b57 100644 --- a/common.nix +++ b/common.nix @@ -2,17 +2,21 @@ let homedir = builtins.getEnv "HOME"; + locale = "en_US.UTF-8"; in { home = { packages = import ./packages.nix { inherit pkgs; }; sessionVariables = { EDITOR = "emacsclient"; - LANG = "en_US.UTF-8"; + LANG = locale; + LANGUAGE = locale; + #LC_ALL = locale; PATH = "${homedir}/bin:${homedir}/.cabal/bin:${homedir}/.local/bin:$PATH"; PAGER = "less"; LEDGER_FILE = "${homedir}/.hledger.journal"; - XTERM_LOCALE = "en_US.UTF-8"; + XTERM_LOCALE = locale; + LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive"; }; keyboard.options = [ "caps:ctrl_modifier" ]; file = { diff --git a/linux.nix b/linux.nix index cee253f..7301016 100644 --- a/linux.nix +++ b/linux.nix @@ -120,8 +120,13 @@ in }; programs = { + firefox = { enable = true; }; + + rofi = { + enable = true; + }; }; } diff --git a/packages.nix b/packages.nix index 6804a72..014e3fe 100644 --- a/packages.nix +++ b/packages.nix @@ -6,12 +6,14 @@ with pkgs; ag cloc dict +dmenu entr exercism expect fasd feh file +glibcLocales # rofi locale fix -- https://github.com/rycee/home-manager/issues/354#issuecomment-415914278 gnumake hledger hledger-ui diff --git a/xmonad.hs b/xmonad.hs index 55f6a69..4e872b6 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -22,15 +22,18 @@ import XMonad.Actions.CopyWindow import XMonad.Util.EZConfig (additionalKeys) import Graphics.X11.ExtraTypes.XF86 -delKeys conf@(XConfig {modMask = modMask}) = [(modMask, xK_p)] +delKeys conf@(XConfig {modMask = modMask}) = [] + +nixBin = "/home/ben/.nix-profile/bin/" insKeys :: XConfig l -> [((KeyMask, KeySym), X ())] insKeys conf@(XConfig {modMask = modMask}) = - [ -- run dmenu with M-o - ((modMask, xK_o), spawn "dmenu_run") - -- passmenu doesn't work :( - , ((modMask, xK_p), spawn "${SHELL:-\"/bin/sh\"} -c passmenu &") - , ((modMask, xK_y), spawn "passmenu &") + [ ((modMask, xK_y), spawn $ nixBin <> "passmenu") + -- neither of these work: + , ((modMask, xK_u), spawn $ nixBin <> "rofi -sidebar-mode -show window") + , ((modMask, xK_i), spawn $ "rofi -sidebar-mode -show run") + + , ((modMask, xK_o), spawn $ nixBin <> "dmenu_run") -- sticky windows , ((modMask, xK_a ), windows copyToAll) -- @@ Make focused window always visible , ((modMask .|. shiftMask, xK_a ), killAllOtherCopies) -- @@ Toggle window state back -- cgit v1.2.3