diff options
-rw-r--r-- | flake.lock | 42 | ||||
-rw-r--r-- | flake.nix | 4 | ||||
-rw-r--r-- | gui/apps/dev.nix | 11 | ||||
-rw-r--r-- | gui/conf/xmonad.hs | 122 | ||||
-rw-r--r-- | gui/emacs.nix | 2 | ||||
-rw-r--r-- | gui/gtk.nix | 2 | ||||
-rw-r--r-- | gui/xmonad.nix | 3 | ||||
-rw-r--r-- | host/idefix.nix | 2 |
8 files changed, 105 insertions, 83 deletions
@@ -6,11 +6,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1732352436, - "narHash": "sha256-DInAgNnQT0ArMfyZZ4GUIqq8B/wGS/9Y3DEntAbtan4=", + "lastModified": 1746494697, + "narHash": "sha256-n+7nWt/JKD6/2I9Hfb5H4D7R8lF1xn5OgGtQTlpqfrc=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "bb0acd64336552d7ed16bc7e2cd0ddfec65fdcbe", + "rev": "e682d607901aea7084c1834d6e19b81c555976b3", "type": "github" }, "original": { @@ -27,27 +27,27 @@ ] }, "locked": { - "lastModified": 1726989464, - "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", + "lastModified": 1746171682, + "narHash": "sha256-EyXUNSa+H+YvGVuQJP1nZskXAowxKYp79RNUsNdQTj4=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", + "rev": "50eee705bbdbac942074a8c120e8194185633675", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", + "ref": "release-24.11", "repo": "home-manager", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1732014248, - "narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=", + "lastModified": 1746328495, + "narHash": "sha256-uKCfuDs7ZM3QpCE/jnfubTg459CnKnJG/LwqEVEdEiw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "23e89b7da85c3640bbc2173fe04f4bd114342367", + "rev": "979daf34c8cacebcd917d540070b52a3c2b9b16e", "type": "github" }, "original": { @@ -59,16 +59,16 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1731797254, - "narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=", + "lastModified": 1746422338, + "narHash": "sha256-NTtKOTLQv6dPfRe00OGSywg37A1FYqldS6xiNmqBUYc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", + "rev": "5b35d248e9206c1f3baf8de6a7683fee126364aa", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } @@ -118,27 +118,27 @@ }, "stable": { "locked": { - "lastModified": 1731797254, - "narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=", + "lastModified": 1746422338, + "narHash": "sha256-NTtKOTLQv6dPfRe00OGSywg37A1FYqldS6xiNmqBUYc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", + "rev": "5b35d248e9206c1f3baf8de6a7683fee126364aa", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "unstable": { "locked": { - "lastModified": 1731890469, - "narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=", + "lastModified": 1746397377, + "narHash": "sha256-5oLdRa3vWSRbuqPIFFmQBGGUqaYZBxX+GGtN9f/n4lU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5083ec887760adfe12af64830a66807423a859a7", + "rev": "ed30f8aba41605e3ab46421e3dcb4510ec560ff8", "type": "github" }, "original": { @@ -2,11 +2,11 @@ description = "Computing environment of Adrian Kummerlaender"; inputs = { - stable.url = github:NixOS/nixpkgs/nixos-24.05; + stable.url = github:NixOS/nixpkgs/nixos-24.11; unstable.url = github:NixOS/nixpkgs/nixpkgs-unstable; personal.url = github:KnairdA/pkgs; home-manager = { - url = github:nix-community/home-manager/release-24.05; + url = github:nix-community/home-manager/release-24.11; inputs = { nixpkgs.follows = "stable"; }; }; emacs.url = github:nix-community/emacs-overlay/master; diff --git a/gui/apps/dev.nix b/gui/apps/dev.nix index 851d7d8..a3c8999 100644 --- a/gui/apps/dev.nix +++ b/gui/apps/dev.nix @@ -6,13 +6,20 @@ # UI dev utilities (language environments are maintained in project specific nix-shells) hotspot kcachegrind - paraview - blender meld + + # Visualization and CAD + paraview + (blender.override { cudaSupport=true; }) + freecad + meshlab + # language utilities artha + # calculator qalculate-gtk + # ctag to override the emacs provided ones (placeholder) universal-ctags fzf diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index 3b4b790..4f7e524 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -17,8 +17,6 @@ import XMonad.Layout.Grid import XMonad.Layout.Groups.Examples import XMonad.Layout.Groups.Helpers -import XMonad.Actions.PhysicalScreens - import XMonad.Layout.NoBorders import XMonad.Layout.Reflect import XMonad.Layout.MultiToggle @@ -34,21 +32,27 @@ import XMonad.Util.Themes import XMonad.Util.NamedScratchpad import XMonad.Util.Dmenu (menuMapArgs) +import XMonad.Actions.PhysicalScreens import XMonad.Actions.SpawnOn import XMonad.Actions.CycleWS import XMonad.Actions.WindowBringer import XMonad.Actions.GroupNavigation import XMonad.Actions.FloatKeys import XMonad.Actions.UpdatePointer +import XMonad.Actions.DynamicWorkspaces + +import XMonad.Prompt import Data.Maybe import Control.Monad (when) import Data.Map (Map, fromList, member) -import Data.List (unionBy) +import Data.List (unionBy, isInfixOf) import System.Exit import System.Posix.Unistd +import Graphics.X11.ExtraTypes + workspaces :: [WorkspaceId] workspaces = map show [1 .. 9 :: Int] @@ -62,9 +66,9 @@ customTabTheme host = (theme xmonadTheme) , activeBorderColor = "#909636" , inactiveBorderColor = "#161616" } -customLayoutHook host = id +customLayoutHook hud host = id . smartBorders - . ModifiedLayout (hudMonitor host) + . ModifiedLayout hud . mkToggle (single NBFULL) $ tiles ||| two ||| tabs ||| frame ||| bsp ||| grid ||| groups where @@ -109,8 +113,6 @@ sideBarRight = floatRectRight $ 1/3 scratchpads host = [ NS "terminal" "kitty --class=scratchterm" (className =? "scratchterm") (customFloating $ hideScreenBorder host dropDown) - , NS "browser" "env MOZ_USE_XINPUT2=1 firefox --no-remote -P scratchpad --class scratchfire" (className =? "scratchfire") - (customFloating $ hideScreenBorder host dropDownLarge) , NS "thesaurus" "artha" (className =? "Artha") (customFloating $ hideScreenBorder host sideBarLeft) , NS "calculator" "qalculate-gtk" (title =? "Qalculate!") @@ -125,18 +127,13 @@ hudMonitor host = monitor { prop = Title "hud" , XMonad.Layout.Monitor.name = "hud" , rect = Rectangle ((screenWidthOn host) - 530) ((screenHeightOn host) - 350) 480 300 - , opacity = 0.8 + , opacity = 0.6 , persistent = True } windowBringerDmenuConfig = def { menuCommand = "rofi" , menuArgs = [ "-p", "win", "-dmenu", "-i" ] } hostSpecificKeybindings host = case host of - "asterix" -> [ ("M-i b" , showNotification "Battery" - "`acpi | cut -c 10-`") - , ("M-i c" , showNotification "`acpi --thermal | awk '{print $4}'`°C" - "`cat /proc/acpi/ibm/fan | awk '/speed/{print $2}'` RPM") - , ("M-c n" , spawn "networkmanager_dmenu") ] "athena" -> [ ("M-i b" , showNotification "Battery" "`acpi | cut -c 10-`") , ("M-i c" , showNotification "`acpi --thermal | awk '{print $4}'`°C" @@ -146,11 +143,7 @@ hostSpecificKeybindings host = case host of , ("<XF86MonBrightnessDown>" , spawn "brightnessctl s 5%-") , ("<XF86AudioRaiseVolume>" , spawn "amixer sset Master 10%+") , ("<XF86AudioLowerVolume>" , spawn "amixer sset Master 10%-") - , ("<XF86AudioMute>" , spawn "amixer sset Master toggle") - , ("<Print>" , namedScratchpadAction (scratchpads host) "terminal") - , ("M-c p" , spawn "flameshot gui") ] - "obelix" -> [ ("M-i g" , showNotification "GPU" - "`nvidia-smi --query-gpu=name,temperature.gpu,utilization.gpu,utilization.memory --format=csv,noheader | awk -F',' '{print $1 \" running at\" $2 \"°C due to\" $3 \" load and\" $4 \" memory usage\"}'`") ] + , ("<XF86AudioMute>" , spawn "amixer sset Master toggle") ] "hephaestus" -> [ ("M-i g" , showNotification "GPU" "`nvidia-smi --query-gpu=name,temperature.gpu,utilization.gpu,utilization.memory --format=csv,noheader | awk -F',' '{print $1 \" running at\" $2 \"°C due to\" $3 \" load and\" $4 \" memory usage\"}'`") ] _ -> [ ] @@ -165,6 +158,8 @@ commonKeybindings host = , ("M-<Space>" , spawn "rofi -show combi") , ("M-<Return>" , spawn "kitty") , ("M-S-<Return>" , spawn "emacsclient --create-frame") + + , ("M-c p" , spawn "flameshot gui") , ("<Print>" , spawn "flameshot gui") -- password management @@ -181,6 +176,31 @@ commonKeybindings host = , ("M-S-j" , swapDown) , ("M-S-k" , swapUp) +-- workspace selection + ] ++ [ (p ++ [k] , windows $ f i) | (i, k) <- zip Main.workspaces ['1' .. '9'] + , (p, f) <- [ ("M-" , S.view) + , ("M-S-" , S.shift) ] ] ++ + [ ("C-<Backspace>" , toggleWS' ["NSP"]) + +-- workspace movement + , ("M-s j" , moveTo Next nonEmptyWS) + , ("M-s k" , moveTo Prev nonEmptyWS) + , ("M-S-s j" , shiftTo Next nonEmptyWS >> moveTo Next nonEmptyWS) + , ("M-S-s k" , shiftTo Prev nonEmptyWS >> moveTo Prev nonEmptyWS) + +-- physical screen change + , ("M-<Tab>" , nextScreen) + +-- workspace layout management + , ("M-v" , layoutMenu) + , ("M-s l" , sendMessage NextLayout) + , ("M-s +" , sendMessage $ IncMasterN 1) + , ("M-s -" , sendMessage $ IncMasterN (-1)) + , ("M-s y" , sendMessage $ Toggle REFLECTY) + , ("M-s x" , sendMessage $ Toggle REFLECTX) + , ("M-s f" , sendMessage $ Toggle NBFULL) + + -- group control , ("M-h" , bindOnLayout [ ("groups", focusGroupUp) , ("", sendMessage Shrink) ] ) @@ -200,36 +220,15 @@ commonKeybindings host = , ("M-S-a" , bringMenuConfig windowBringerDmenuConfig) -- scratchpads - , ("M-b" , namedScratchpadAction (scratchpads host) "browser") , ("M-t" , namedScratchpadAction (scratchpads host) "thesaurus") , ("M-z" , namedScratchpadAction (scratchpads host) "literature") , ("M-r" , namedScratchpadAction (scratchpads host) "calculator") , ("M-m" , namedScratchpadAction (scratchpads host) "messaging") - , ("M-n" , namedScratchpadAction (scratchpads host) "notes") ] ++ - --- workspace selection - [ (p ++ [k] , windows $ f i) | (i, k) <- zip Main.workspaces ['1' .. '9'] - , (p, f) <- [ ("M-" , S.view) - , ("M-S-" , S.shift) ] ] ++ - [ ("C-<Backspace>" , toggleWS' ["NSP"]) - --- workspace movement - , ("M-s j" , moveTo Next nonEmptyWS) - , ("M-s k" , moveTo Prev nonEmptyWS) - , ("M-S-s j" , shiftTo Next nonEmptyWS >> moveTo Next nonEmptyWS) - , ("M-S-s k" , shiftTo Prev nonEmptyWS >> moveTo Prev nonEmptyWS) + , ("M-n" , namedScratchpadAction (scratchpads host) "notes") --- physical screen change - , ("M-<Tab>" , nextScreen) - --- workspace layout management - , ("M-v" , layoutMenu) - , ("M-s l" , sendMessage NextLayout) - , ("M-s +" , sendMessage $ IncMasterN 1) - , ("M-s -" , sendMessage $ IncMasterN (-1)) - , ("M-s y" , sendMessage $ Toggle REFLECTY) - , ("M-s x" , sendMessage $ Toggle REFLECTX) - , ("M-s f" , sendMessage $ Toggle NBFULL) +-- allow selection of window to HUDify + , ("M-S-f" , spawn "xdotool selectwindow set_window --name hud") + , ("M-S-g" , broadcastMessage ToggleMonitor >> refresh) -- floating placement , ("M-w t" , withFocused $ windows . S.sink) @@ -263,7 +262,7 @@ customEventHook = do handleEventHook def fullscreenEventHook -customManageHook host = manageMonitor (hudMonitor host) <+> composeOne +customManageHook host = composeOne [ hasRole "GtkFileChooserDialog" -?> doRectFloat $ hideScreenBorder host dropDown , isTeamsGarbage -?> doHideIgnore , isParaviewDialog -?> doRectFloat $ hideScreenBorder host dropDown @@ -288,8 +287,22 @@ customStartupHook host = do checkKeymap def (customKeybindings host) setWMName "LG3D" +promptConfig = def + { position = Bottom + , promptBorderWidth = 0 + , defaultText = "" + , alwaysHighlight = True + , height = 32 + , font = "xft:Iosevka Medium-12" + , fgColor = "#909636" + , bgColor = "#161616" + , bgHLight = "#909636" + , fgHLight = "#161616" + , searchPredicate = isInfixOf } + main = do host <- fmap nodeName getSystemID + let hud = hudMonitor host xmonad $ ewmh $ docks $ def @@ -301,11 +314,18 @@ main = do , mouseBindings = customMousebindings , startupHook = customStartupHook host , handleEventHook = customEventHook - , manageHook = customManageHook host + , manageHook = (customManageHook host) <> manageMonitor hud , logHook = customLogHook - , layoutHook = customLayoutHook host } + , layoutHook = customLayoutHook hud host } + `additionalKeys` - [ ((noModMask, xK_Menu) , namedScratchpadAction (scratchpads host) "terminal") ] + [ ((noModMask, xK_Menu) , namedScratchpadAction (scratchpads host) "terminal") + + -- dynamic workspace management + , ((mod4Mask, xK_dead_circumflex) , selectWorkspace promptConfig) + , ((mod4Mask .|. shiftMask, xK_dead_circumflex) , renameWorkspace promptConfig) + , ((mod4Mask, xK_dead_acute) , removeWorkspace) + ] nonEmptyWS = WSIs $ return (\w -> nonNSP w && nonEmpty w) where nonNSP (S.Workspace tag _ _) = tag /= "NSP" @@ -370,26 +390,18 @@ hideScreenBorder host (S.RationalRect x0 y0 w h) = S.RationalRect (x0-(bw/sw)) ( screenWidthOn host = case host of "hephaestus" -> 1920 "atlas" -> 1920 - "obelix" -> 1280 - "asterix" -> 1366 "athena" -> 1920 screenHeightOn host = case host of "hephaestus" -> 1200 "atlas" -> 1080 - "obelix" -> 1024 - "asterix" -> 768 "athena" -> 1080 borderWidthOn host = case host of "hephaestus" -> 3 "atlas" -> 3 - "obelix" -> 3 - "asterix" -> 3 "athena" -> 3 decoHeightOn host = case host of "hephaestus" -> 20 "atlas" -> 20 - "obelix" -> 20 - "asterix" -> 20 "athena" -> 20 ------------------------------------------------------------------------------- diff --git a/gui/emacs.nix b/gui/emacs.nix index e8322fd..4aaab0b 100644 --- a/gui/emacs.nix +++ b/gui/emacs.nix @@ -51,7 +51,7 @@ org = prev.org.overrideAttrs(old: { patches = []; } ); }; - package = pkgs.emacs; + package = pkgs.emacs-unstable; config = ./conf/init.el; alwaysEnsure = false; diff --git a/gui/gtk.nix b/gui/gtk.nix index d593a55..31603a7 100644 --- a/gui/gtk.nix +++ b/gui/gtk.nix @@ -58,7 +58,7 @@ home.packages = [ # enable persistent settings in e.g. file chooser dialogs pkgs.dconf - pkgs.gnome3.dconf-editor + pkgs.dconf-editor ]; qt = { diff --git a/gui/xmonad.nix b/gui/xmonad.nix index d0bd1f9..5ead6e4 100644 --- a/gui/xmonad.nix +++ b/gui/xmonad.nix @@ -28,6 +28,7 @@ }; home.packages = with pkgs; [ + xdotool # lockscreen i3lock ]; @@ -37,6 +38,8 @@ lockCmd = "${pkgs.i3lock}/bin/i3lock -n -c 000000"; }; + services.picom.enable = true; + programs.fish.shellAliases = { mph = "mpv --title hud"; }; diff --git a/host/idefix.nix b/host/idefix.nix index 484f643..96d2f0b 100644 --- a/host/idefix.nix +++ b/host/idefix.nix @@ -6,6 +6,6 @@ ]; home.packages = with pkgs; [ - gnome3.gnome-tweaks + gnome.gnome-tweaks ]; } |