summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2024-05-19 19:22:52 +0200
committerTom Barrett <tom@tombarrett.xyz>2024-05-19 19:22:52 +0200
commitc8ffbad343cb9e58ed359cf74a6d231528b6aa5e (patch)
treed8c2e29a124769f3ab5e3245aab89eba8d15eb80
parentb8af3372d789d93c39e2a571ac25609f426b80b8 (diff)
more familiar multiscreen, no more firefox control, set TERM
-rw-r--r--home.nix66
-rw-r--r--xmonad.hs41
2 files changed, 31 insertions, 76 deletions
diff --git a/home.nix b/home.nix
index f1b3eb4..36a08b2 100644
--- a/home.nix
+++ b/home.nix
@@ -23,6 +23,7 @@ in {
binutils
feh
file
+ firefox
ghc
gimp
haskellPackages.fourmolu
@@ -40,6 +41,7 @@ in {
// {
LESS = "-R -F";
EDITOR = "vim";
+ TERM = "xterm-256color";
};
file.".xinitrc".text = ''
@@ -80,68 +82,6 @@ in {
];
};
};
- firefox = {
- enable = true;
- profiles.tom = {
- search = {
- default = "DuckDuckGo";
- force = true;
- };
- bookmarks = [
- {
- toolbar = true;
- bookmarks = [
- {
- name = "home-manager";
- url = "https://nix-community.github.io/home-manager/options.xhtml";
- }
- {
- name = "nixpkgs";
- url = "https://search.nixos.org/packages";
- }
- ];
- }
- ];
- settings = {
- "browser.startup.homepage" = "https://duckduckgo.com";
- "browser.newtabpage.enabled" = false;
- "browser.toolbars.bookmarks.visibility" = "always";
- "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
- "general.autoScroll" = true;
- "browser.bookmarks.addedImportButton" = true;
- "browser.uiCustomization.state" = {
- "placements" = {
- "widget-overflow-fixed-list" = [];
- "unified-extensions-area" = [];
- "nav-bar" = [
- "back-button"
- "forward-button"
- "stop-reload-button"
- "urlbar-container"
- "downloads-button"
- "unified-extensions-button"
- ];
- "toolbar-menubar" = ["menubar-items"];
- "TabsToolbar" = ["tabbrowser-tabs" "new-tab-button" "alltabs-button"];
- "PersonalToolbar" = ["personal-bookmarks"];
- };
- "seen" = ["save-to-pocket-button" "developer-button"];
- "dirtyAreaCache" = ["nav-bar" "PersonalToolbar" "toolbar-menubar" "TabsToolbar"];
- "currentVersion" = 20;
- "newElementCount" = 3;
- };
- "privacy.sanitize.sanitizeOnShutdown" = true;
- "privacy.clearOnShutdown.cookies" = true;
- "privacy.clearOnShutdown.cache" = true;
- "privacy.clearOnShutdown.downloads" = true;
- "privacy.clearOnShutdown.history" = true;
- "privacy.clearOnShutdown.formData" = true;
- "privacy.clearOnShutdown.offlineApps" = true;
- "privacy.clearOnShutdown.sessions" = true;
- "privacy.clearOnShutdown.siteSettings" = true;
- };
- };
- };
git = {
enable = true;
userName = "tom barrett";
@@ -174,7 +114,7 @@ in {
enableSshSupport = true;
pinentryPackage = pkgs.pinentry-bemenu;
# from gpg --list-secret-keys --with-keygrip ([A] keygrip)
- sshKeys = [];
+ sshKeys = [""];
};
};
xdg.userDirs = {
diff --git a/xmonad.hs b/xmonad.hs
index 483744b..e566f37 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -4,6 +4,7 @@ import XMonad.Actions.CycleWS
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.StatusBar
import XMonad.Hooks.StatusBar.PP
+import XMonad.Layout.IndependentScreens
import XMonad.Layout.Renamed
import XMonad.Layout.Spacing
import XMonad.Prompt
@@ -20,7 +21,8 @@ grey2 = "#b8b8b8"
grey3 = "#f8f8f8"
main :: IO ()
-main =
+main = do
+ nScreens <- countScreens
xmonad
. ewmhFullscreen
. ewmh
@@ -28,15 +30,18 @@ main =
( statusBarProp
"xmobar"
( pure
- def
- { ppSep = ""
- , ppWsSep = ""
- , ppHiddenNoWindows = xmobarColor grey2 grey0 . pad
- , ppCurrent = xmobarColor grey3 primary . pad
- , ppHidden = xmobarBorder "Top" primary 2 . xmobarColor grey2 grey0 . pad
- , ppTitle = const ""
- , ppLayout = xmobarColor grey2 grey0 . pad
- }
+ ( marshallPP
+ (S 0)
+ def
+ { ppSep = ""
+ , ppWsSep = ""
+ , ppHiddenNoWindows = xmobarColor grey2 grey0 . pad
+ , ppCurrent = xmobarColor grey3 primary . pad
+ , ppHidden = xmobarBorder "Top" primary 2 . xmobarColor grey2 grey0 . pad
+ , ppTitle = const ""
+ , ppLayout = xmobarColor grey2 grey0 . pad
+ }
+ )
)
)
defToggleStrutsKey
@@ -55,6 +60,7 @@ main =
}
in def
{ borderWidth = 2
+ , workspaces = [marshall s vw | vw <- (map show [1 .. 9]), s <- [0 .. nScreens]]
, layoutHook =
renamed
[Replace "[]="]
@@ -80,14 +86,23 @@ main =
, ("M-l", sendMessage Expand)
, ("M-m", sendMessage $ JumpToLayout "[M]")
, ("M-t", sendMessage $ JumpToLayout "[]=")
- , ("M-<Tab>", toggleWS)
+ ,
+ ( "M-<Tab>"
+ , gets (W.screen . W.current . windowset)
+ >>= \currentScreen ->
+ toggleWS'
+ [ marshall s vw
+ | vw <- (map show [1 .. 9])
+ , s <- [x | x <- [0 .. nScreens], x /= currentScreen]
+ ]
+ )
, ("M-S-<Return>", windows W.swapMaster)
, ("M-S-<Space>", withFocused $ windows . W.sink)
]
++ concatMap
( \n ->
- [ ("M-" ++ n, windows $ W.greedyView n)
- , ("M-S-" ++ n, windows $ W.shift n)
+ [ ("M-" ++ n, windows $ onCurrentScreen W.greedyView n)
+ , ("M-S-" ++ n, windows $ onCurrentScreen W.shift n)
]
)
(map show [1 .. 9])