diff options
-rw-r--r-- | flake.lock | 146 | ||||
-rw-r--r-- | flake.nix | 20 | ||||
-rw-r--r-- | gui/apps/dev.nix | 13 | ||||
-rw-r--r-- | gui/apps/web.nix | 4 | ||||
-rw-r--r-- | gui/conf/email.el | 6 | ||||
-rw-r--r-- | gui/conf/init.el | 57 | ||||
-rw-r--r-- | gui/conf/xmonad.hs | 124 | ||||
-rw-r--r-- | gui/default.nix | 7 | ||||
-rw-r--r-- | gui/emacs.nix | 16 | ||||
-rw-r--r-- | gui/gtk.nix | 4 | ||||
-rw-r--r-- | gui/xmonad.nix | 3 | ||||
-rw-r--r-- | host/idefix.nix | 2 | ||||
-rw-r--r-- | module/tasker.nix | 22 | ||||
-rw-r--r-- | tasks/default.nix | 22 |
14 files changed, 125 insertions, 321 deletions
@@ -2,16 +2,15 @@ "nodes": { "emacs": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1702028397, - "narHash": "sha256-FNlJm0IJ0mjMYVKL7qiTFIdmF0yEyBUJeeCxDjg72gE=", + "lastModified": 1752460302, + "narHash": "sha256-/mdSXzHxi6ceep2mrH0UlUUO2enfPLQqRojbM+ZlPA4=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "ea9cd7c22194345e4db85e334b8ff40cc384c536", + "rev": "1741446afec9d812af576df394a2304f90e22257", "type": "github" }, "original": { @@ -21,39 +20,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "locked": { - "lastModified": 1623660459, - "narHash": "sha256-OTmOsh43po7r5F9s9H6lVCBQ2b0FikWbmiwLbMAGRdw=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "98c8d36b1828009b20f12544214683c7489935a1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -61,47 +27,27 @@ ] }, "locked": { - "lastModified": 1700814205, - "narHash": "sha256-lWqDPKHRbQfi+zNIivf031BUeyciVOtwCwTjyrhDB5g=", + "lastModified": 1752391422, + "narHash": "sha256-ReX0NG6nIAEtQQjLqeu1vUU2jjZuMlpymNtb4VQYeus=", "owner": "nix-community", "repo": "home-manager", - "rev": "aeb2232d7a32530d3448318790534d196bf9427a", + "rev": "c26266790678863cce8e7460fdbf0d80991b1906", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-23.11", + "ref": "release-25.05", "repo": "home-manager", "type": "github" } }, - "jupyter": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1628121465, - "narHash": "sha256-eQzY+yymJzIVRYx58Kim21AfS1v8eTTkiLj3ZtPW4Nc=", - "owner": "GTrunSec", - "repo": "jupyterWith", - "rev": "efbbc51cf4551cb3625ed47761368f02dcccf39b", - "type": "github" - }, - "original": { - "owner": "GTrunSec", - "ref": "flakes", - "repo": "jupyterWith", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1701718080, - "narHash": "sha256-6ovz0pG76dE0P170pmmZex1wWcQoeiomUZGggfH9XPs=", + "lastModified": 1751984180, + "narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2c7f3c0fb7c08a0814627611d9d7d45ab6d75335", + "rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0", "type": "github" }, "original": { @@ -113,37 +59,22 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1701615100, - "narHash": "sha256-7VI84NGBvlCTduw2aHLVB62NvCiZUlALLqBe5v684Aw=", + "lastModified": 1751274312, + "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e9f06adb793d1cca5384907b3b8a4071d5d7cb19", + "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1623393771, - "narHash": "sha256-UMqgWzS0IEqsosffjL0P621dixn5ncE9unNylpUB9Zs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a5d03577f0161c8a6e713b928ca44d9b3feb2c37", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "rev": "a5d03577f0161c8a6e713b928ca44d9b3feb2c37", - "type": "indirect" - } - }, - "nixpkgs_3": { - "locked": { "lastModified": 1629271619, "narHash": "sha256-by9D3OkEKk4rOzJIMbC0uP2wP3Bt81auP5xmbmPg2a8=", "owner": "NixOS", @@ -158,25 +89,9 @@ "type": "github" } }, - "oldstable": { - "locked": { - "lastModified": 1688392541, - "narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, "personal": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1629652608, @@ -196,8 +111,6 @@ "inputs": { "emacs": "emacs", "home-manager": "home-manager", - "jupyter": "jupyter", - "oldstable": "oldstable", "personal": "personal", "stable": "stable", "unstable": "unstable" @@ -205,42 +118,27 @@ }, "stable": { "locked": { - "lastModified": 1701952659, - "narHash": "sha256-TJv2srXt6fYPUjxgLAL0cy4nuf1OZD4KuA1TrCiQqg0=", + "lastModified": 1752308619, + "narHash": "sha256-pzrVLKRQNPrii06Rm09Q0i0dq3wt2t2pciT/GNq5EZQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b4372c4924d9182034066c823df76d6eaf1f4ec4", + "rev": "650e572363c091045cdbc5b36b0f4c1f614d3058", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "unstable": { "locked": { - "lastModified": 1701693815, - "narHash": "sha256-7BkrXykVWfkn6+c1EhFA3ko4MLi3gVG0p9G96PNnKTM=", + "lastModified": 1752077645, + "narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "09ec6a0881e1a36c29d67497693a67a16f4da573", + "rev": "be9e214982e20b8310878ac2baa063a961c1bdf6", "type": "github" }, "original": { @@ -2,31 +2,25 @@ description = "Computing environment of Adrian Kummerlaender"; inputs = { - stable.url = github:NixOS/nixpkgs/nixos-23.11; + stable.url = github:NixOS/nixpkgs/nixos-25.05; unstable.url = github:NixOS/nixpkgs/nixpkgs-unstable; - oldstable.url = github:NixOS/nixpkgs/nixos-22.11; personal.url = github:KnairdA/pkgs; home-manager = { - url = github:nix-community/home-manager/release-23.11; + url = github:nix-community/home-manager/release-25.05; inputs = { nixpkgs.follows = "stable"; }; }; emacs.url = github:nix-community/emacs-overlay/master; - jupyter.url = github:GTrunSec/jupyterWith/flakes; }; outputs = { - self, stable, unstable, oldstable, personal, emacs, home-manager, jupyter, ... + self, stable, unstable, personal, emacs, home-manager, ... }: let system = "x86_64-linux"; - jupyter-overlay = (final: prev: { - jupyterWith = jupyter.defaultPackage."${final.system}"; - }); - pkgs = import stable { inherit system; config = { allowUnfree = true; }; - overlays = [ jupyter-overlay emacs.overlay ]; + overlays = [ emacs.overlay ]; }; pkgs-unstable = import unstable { @@ -34,11 +28,6 @@ config = { allowUnfree = true; }; }; - pkgs-oldstable = import oldstable { - inherit system; - config = { allowUnfree = true; }; - }; - pkgs-personal = personal; config = hostname: home-manager.lib.homeManagerConfiguration { @@ -46,7 +35,6 @@ extraSpecialArgs = { inherit pkgs-unstable; - inherit pkgs-oldstable; inherit pkgs-personal; inherit hostname; }; diff --git a/gui/apps/dev.nix b/gui/apps/dev.nix index 0937cde..81f5735 100644 --- a/gui/apps/dev.nix +++ b/gui/apps/dev.nix @@ -5,13 +5,22 @@ packages = with pkgs; [ # UI dev utilities (language environments are maintained in project specific nix-shells) hotspot - kcachegrind - paraview + kdePackages.kcachegrind meld + + # Visualization and CAD + paraview + #(blender.override { cudaSupport=true; }) + blender + freecad + meshlab + # language utilities artha + # calculator qalculate-gtk + # ctag to override the emacs provided ones (placeholder) universal-ctags fzf diff --git a/gui/apps/web.nix b/gui/apps/web.nix index fa09685..3fcb931 100644 --- a/gui/apps/web.nix +++ b/gui/apps/web.nix @@ -3,10 +3,10 @@ { home = { packages = [ - pkgs-unstable.tdesktop - pkgs-unstable.zotero + pkgs.tdesktop pkgs.tigervnc pkgs.remmina + pkgs.zotero ]; }; diff --git a/gui/conf/email.el b/gui/conf/email.el index f0fd448..2af5977 100644 --- a/gui/conf/email.el +++ b/gui/conf/email.el @@ -20,14 +20,12 @@ (:from . 22) (:subject))) (mu4e-hide-index-messages t) - (mu4e-completing-read-function 'helm-comp-read) + (mu4e-completing-read-function 'completing-read) (shr-color-visible-luminance-min 80) (doom-modeline-mu4e t) (doom-modeline-gnus nil) :config - (require 'org-mu4e) - (evil-collection-init 'mu4e) (add-hook 'mu4e-compose-mode-hook #'(lambda () (auto-save-mode -1)))) (use-package mu4e-alert @@ -61,8 +59,8 @@ (mu4e-compose-signature-auto-include . nil) (mu4e-compose-signature . (concat "\n" "Karlsruhe Institute of Technology (KIT)\n" - "Institute for Mechanical Process Engineering and Mechanics (MVM)\n" "Institute for Applied and Numerical Mathematics (IANM)\n" + "Institute for Mechanical Process Engineering and Mechanics (MVM)\n" "Lattice Boltzmann Research Group (LBRG)\n\n" "M.Sc. Adrian Kummerländer\n" "Research Associate\n\n" diff --git a/gui/conf/init.el b/gui/conf/init.el index c94b4f0..628cfae 100644 --- a/gui/conf/init.el +++ b/gui/conf/init.el @@ -1,9 +1,6 @@ (setq inhibit-startup-message t) (setq initial-scratch-message nil) -(setq load-path (seq-filter (lambda (x) (not (string-match-p "org-202109" x))) - load-path)) - (require 'package) (package-initialize) @@ -120,7 +117,7 @@ :after evil :ensure t :config - (setq evil-collection-mode-list '(dired eshell eww pdf magit ediff pdf)) + (setq evil-collection-mode-list '(dired eshell eww pdf magit ediff pdf mu4e)) (evil-collection-init)) (use-package which-key @@ -354,25 +351,6 @@ :config (evil-leader/set-key "s" 'helm-swoop-without-pre-input)) -(use-package org-ref - :ensure t - :custom - (reftex-default-bibliography '("~/university/bib/lit.bib")) - (org-ref-bibliography-notes "~/org/literature.org") - (org-ref-default-bibliography '("~/university/bib/lit.bib")) - (org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename-helm-bibtex)) - -(use-package helm-bibtex - :ensure t - :config - (setq bibtex-completion-bibliography '("~/university/bib/lit.bib")) - (setq bibtex-completion-pdf-field "file")) - -(use-package zotxt - :ensure t - :config - (add-hook 'org-mode-hook 'org-zotxt-mode)) - (evil-define-key 'normal 'global "J" 'evil-forward-paragraph "K" 'evil-backward-paragraph) @@ -567,39 +545,6 @@ ad-do-it (message "org-tangle took %f sec" (float-time (time-subtract (current-time) time))))) -(use-package gptel - :ensure t - :config - (defvar gptel--atlas - (gptel-make-openai "atlas" - :stream t - :protocol "http" - :host "10.100.0.3:8081") - "GPTel remote backend on atlas") - (setq-default gptel-backend gptel--atlas) - (setq-default gptel-max-tokens 4096) - (defvar gptel-quick--history nil) - (defun gptel-quick (&optional prompt) - (interactive) - (unless prompt - (if (use-region-p) - (setq prompt (buffer-substring-no-properties (region-beginning) (region-end))) - (setq prompt (read-string "AI: ")))) - (when (string= prompt "") (user-error "Text selection or prompt is required.")) - (gptel-request - prompt - :callback - (lambda (response info) - (if (not response) - (message "gptel-quick failed with message: %s" (plist-get info :status)) - (with-current-buffer (get-buffer-create "*gptel-quick*") - (let ((inhibit-read-only t)) - (erase-buffer) - (insert response)) - (special-mode) - (switch-to-buffer "*gptel-quick*")))))) - (evil-leader/set-key "g" 'gptel-quick)) - (let ((mu4e-config "~/.emacs.d/email.el")) (when (file-exists-p mu4e-config) (load-file mu4e-config))) diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index fa1b2d7..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,12 +113,8 @@ 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 "literature" "zotero" (className =? "Zotero") - (customFloating $ hideScreenBorder host dropDownLarge) , NS "calculator" "qalculate-gtk" (title =? "Qalculate!") (customFloating $ hideScreenBorder host sideBarLeft) , NS "messaging" "telegram-desktop" ((className =? "TelegramDesktop") <&&> (title /=? "Media viewer")) @@ -127,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" @@ -148,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\"}'`") ] _ -> [ ] @@ -167,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 @@ -183,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) ] ) @@ -202,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") ] ++ + , ("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) - --- 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) @@ -265,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 @@ -290,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 @@ -303,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" @@ -372,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/default.nix b/gui/default.nix index 7289e1d..2cebeaf 100644 --- a/gui/default.nix +++ b/gui/default.nix @@ -22,13 +22,6 @@ iosevka ]; - qt = { - enable = true; - platformTheme = "gtk"; - }; - - services.gpg-agent.pinentryFlavor = "gtk2"; - home.sessionVariables = { QT_AUTO_SCREEN_SCALE_FACTOR = 0; }; diff --git a/gui/emacs.nix b/gui/emacs.nix index 7197e85..4aaab0b 100644 --- a/gui/emacs.nix +++ b/gui/emacs.nix @@ -1,4 +1,4 @@ -{ config, pkgs, pkgs-oldstable, pkgs-unstable, ... }: +{ config, pkgs, ... }: { programs.emacs = let @@ -47,7 +47,11 @@ enable = true; package = pkgs.emacsWithPackagesFromUsePackage { - package = pkgs.emacs29; + override = final: prev: { + org = prev.org.overrideAttrs(old: { patches = []; } ); + }; + + package = pkgs.emacs-unstable; config = ./conf/init.el; alwaysEnsure = false; @@ -60,9 +64,9 @@ ]) ++ (with epkgs.nongnuPackages; [ org-contrib ])++ [ + epkgs.mu4e akr-color-theme custom-runtime-env - pkgs-oldstable.mu ]; }; }; @@ -87,9 +91,9 @@ in with pkgs; [ symbola - (iosevka-bin.override { variant = "aile"; }) - (iosevka-bin.override { variant = "etoile"; }) - pkgs-oldstable.mu + (iosevka-bin.override { variant = "Aile"; }) + (iosevka-bin.override { variant = "Etoile"; }) + mu org-protocol-shortcut ]; diff --git a/gui/gtk.nix b/gui/gtk.nix index 150fab0..31603a7 100644 --- a/gui/gtk.nix +++ b/gui/gtk.nix @@ -58,12 +58,12 @@ home.packages = [ # enable persistent settings in e.g. file chooser dialogs pkgs.dconf - pkgs.gnome3.dconf-editor + pkgs.dconf-editor ]; qt = { enable = true; - platformTheme = "gtk"; + platformTheme.name = "gtk"; }; home.sessionVariables = { 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 ]; } diff --git a/module/tasker.nix b/module/tasker.nix index 112da88..4f2e0fe 100644 --- a/module/tasker.nix +++ b/module/tasker.nix @@ -11,22 +11,6 @@ let #!/bin/sh exec ${pkgs.kitty}/bin/kitty -d ${dir} ${cmd} ''; - launchJupyterInDirectory = dir: jupyter: '' - #!/usr/bin/env fish - - for port in (seq 9000 9100) - if not ss --listening --oneline --tcp --no-header | awk '{ split($4, port, ":"); print port[2]+0 }' | grep -q $port - set free_port $port - break - end - end - - set token (head /dev/urandom | tr -dc A-Za-z0-9 | head -c 40) - ${jupyter}/bin/jupyter-lab --no-browser --port=$free_port --NotebookApp.token=$token & - sleep 2 - ${pkgs.chromium}/bin/chromium --app="http://localhost:$free_port/?token=$token" - kill (jobs -lp) - ''; taskivations = pkgs.lib.mapAttrsToList (name: conf: let command = pkgs.writeTextFile { @@ -43,12 +27,6 @@ let environment = launchTerminalInDirectory conf.directory '' nix-shell ${builtins.unsafeDiscardStringContext conf.environment.drvPath} --command fish ''; - - python-console = launchCommandInDirectory "~/" '' - nix-shell ${builtins.unsafeDiscardStringContext conf.environment.drvPath} --command jupyter-qtconsole - ''; - - jupyter-lab = launchJupyterInDirectory conf.directory conf.environment; }; }; diff --git a/tasks/default.nix b/tasks/default.nix index 9e641c3..04013c2 100644 --- a/tasks/default.nix +++ b/tasks/default.nix @@ -12,7 +12,6 @@ let mkPythonShellDerivation = n: ps: init: pkgs.stdenvNoCC.mkDerivation rec { name = n; buildInputs = [(pkgs.python3.withPackages (python-packages: with python-packages; ps ++ [ - jupyterlab qtconsole ]))]; shellHook = let @@ -27,10 +26,6 @@ let ''; }; - mkJupyterEnv = kernel: pkgs.jupyterWith.jupyterlabWith { - kernels = [ kernel ]; - }; - in { custom.tasks = { cpp_shell = { @@ -64,22 +59,5 @@ in { biber ]); }; - - pymath_jupyter = { - description = "Python for mathematics @ Jupyter Lab"; - directory = "~/"; - type = "jupyter-lab"; - environment = mkJupyterEnv ( - pkgs.jupyterWith.kernels.iPythonWith { - name = "python"; - packages = p: with p; [ - numpy - sympy - scipy - matplotlib - ]; - } - ); - }; }; } |