diff --git a/doom.d/init.el b/doom.d/init.el index dd6156d..0706f24 100644 --- a/doom.d/init.el +++ b/doom.d/init.el @@ -111,7 +111,7 @@ :os (:if IS-MAC macos) ; improve compatibility with macOS tty ; improve the terminal Emacs experience - exwm + (exwm +status +xim) :lang ;;agda ; types of types of types of types... diff --git a/doom.d/modules/os/exwm/config.el b/doom.d/modules/os/exwm/config.el index d71cf79..0c7823f 100644 --- a/doom.d/modules/os/exwm/config.el +++ b/doom.d/modules/os/exwm/config.el @@ -20,7 +20,7 @@ (setq exwm-input-global-keys `(([?\s-r] . exwm-reset) ([?\s-w] . exwm-workspace-switch) - ([?\s-&] . (lambda (command) + ([?\s-d] . (lambda (command) (interactive (list (read-shell-command "$ "))) (start-process-shell-command command nil command))) ,@(mapcar (lambda (i) @@ -52,6 +52,20 @@ ;; of visible buffers. (advice-add #'exwm--update-utf8-title :around #'exwm--update-utf8-title-advice) + (defun exwm-rename-buffer () + (interactive) + (exwm-workspace-rename-buffer + (concat exwm-class-name " :: " + (if (<= (length exwm-title) 50) exwm-title + (concat (substring exwm-title 0 49) "..."))))) + + ;; Add these hooks in a suitable place (e.g., as done in exwm-config-default) + (add-hook 'exwm-update-class-hook 'exwm-rename-buffer) + (add-hook 'exwm-update-title-hook 'exwm-rename-buffer) + + (require 'exwm-systemtray) + (exwm-systemtray-enable) + ;; Enable the window manager. (exwm-enable)) diff --git a/flake.nix b/flake.nix index 8cf30b4..14b4c87 100644 --- a/flake.nix +++ b/flake.nix @@ -23,7 +23,7 @@ doomEmacs, } @ inputs: let utils = (import ./utils) inputs; - inherit (utils) lib mkConfigurations mkVmApps checkFormatting formatApp mkDevShell; + inherit (utils) lib mkConfigurations mkVmApps checkFormatting formatter formatApp mkDevShell; in { nixosConfigurations = mkConfigurations; @@ -32,5 +32,7 @@ checks = checkFormatting ./.; devShells = mkDevShell; + + inherit formatter; }; } diff --git a/hmModules/chrome/default.nix b/hmModules/chrome/default.nix new file mode 100644 index 0000000..f90f3ce --- /dev/null +++ b/hmModules/chrome/default.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + programs.chromium = { + enable = true; + package = pkgs.google-chrome; + }; +} diff --git a/hmModules/element/default.nix b/hmModules/element/default.nix new file mode 100644 index 0000000..35b8890 --- /dev/null +++ b/hmModules/element/default.nix @@ -0,0 +1,3 @@ +{pkgs, ...}: { + home.packages = [pkgs.element-desktop]; +} diff --git a/hmModules/qutebrowser/default.nix b/hmModules/qutebrowser/default.nix index ad87314..9653d9f 100644 --- a/hmModules/qutebrowser/default.nix +++ b/hmModules/qutebrowser/default.nix @@ -29,6 +29,7 @@ "-c" ]; content.pdfjs = true; + tabs.tabs_are_windows = true; }; }; home.packages = [ diff --git a/hmModules/slack/default.nix b/hmModules/slack/default.nix new file mode 100644 index 0000000..bb7e3b1 --- /dev/null +++ b/hmModules/slack/default.nix @@ -0,0 +1,3 @@ +{pkgs, ...}: { + home.packages = [pkgs.slack]; +} diff --git a/hmModules/udiskie/default.nix b/hmModules/udiskie/default.nix new file mode 100644 index 0000000..c6b20aa --- /dev/null +++ b/hmModules/udiskie/default.nix @@ -0,0 +1,7 @@ +{ + services.udiskie = { + enable = true; + automount = true; + tray = "never"; + }; +} diff --git a/hmModules/vscode/default.nix b/hmModules/vscode/default.nix new file mode 100644 index 0000000..e34d82c --- /dev/null +++ b/hmModules/vscode/default.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: { + programs.vscode = { + enable = true; + # For a few reasons sometimes I'm forced to use VSCode and I don't have time to nixifiy even its configuration. + # This is why I'm using the FHS version. Purity gods, forgive me! + package = pkgs.vscode-fhs; + }; +} diff --git a/modules/ccr/default.nix b/modules/ccr/default.nix index d150bc8..5f0a2c0 100644 --- a/modules/ccr/default.nix +++ b/modules/ccr/default.nix @@ -40,6 +40,11 @@ "git" "gpg" "password-store" + "slack" + "chrome" + "vscode" + "element" + "udiskie" ]; home.packages = with pkgs; [ ]; diff --git a/modules/common/default.nix b/modules/common/default.nix index 5547749..fe79dc3 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -13,4 +13,6 @@ users.mutableUsers = false; users.users.root.password = "password"; i18n.defaultLocale = "en_US.UTF-8"; + + nixpkgs.config.allowUnfree = true; } diff --git a/modules/exwm/default.nix b/modules/exwm/default.nix index 1ba2e73..4118f37 100644 --- a/modules/exwm/default.nix +++ b/modules/exwm/default.nix @@ -22,15 +22,15 @@ xset r rate 200 60 # Uncomment the following block to use the exwm-xim module. - #export XMODIFIERS=@im=exwm-xim - #export GTK_IM_MODULE=xim - #export QT_IM_MODULE=xim - #export CLUTTER_IM_MODULE=xim + export XMODIFIERS=@im=exwm-xim + export GTK_IM_MODULE=xim + export QT_IM_MODULE=xim + export CLUTTER_IM_MODULE=xim # Lockscreen - exec ${pkgs.xss-lock}/bin/xss-lock -- ${pkgs.i3lock-blur}/bin/i3lock-blur & + exec ${pkgs.xss-lock}/bin/xss-lock -- ${pkgs.i3lock-blur}/bin/i3lock-color & # Finally start Emacs - exec emacsclient --eval "(exwm-init)" --create-frame -F "((fullscreen . fullboth))" + exec dbus-launch emacsclient --eval "(exwm-init)" --create-frame -F "((fullscreen . fullboth))" ''; } diff --git a/utils/default.nix b/utils/default.nix index f630352..0896799 100644 --- a/utils/default.nix +++ b/utils/default.nix @@ -45,8 +45,8 @@ }; mkConfigurations = { - thinkpad = mkConfiguration { - name = "thinkpad"; + pc = mkConfiguration { + name = "pc"; system = supportedSystems.x86_64-linux; modules = []; }; @@ -69,6 +69,8 @@ mkVmApp system configurations.${configurationName} )); + formatter = lib.perSystem (system: pkgsFor.${system}.alejandra); + formatApp = lib.perSystem ( system: { format = { @@ -102,5 +104,5 @@ }; }); in { - inherit lib mkConfigurations mkVmApps supportedSystems formatApp mkDevShell checkFormatting; + inherit lib mkConfigurations mkVmApps supportedSystems formatApp formatter mkDevShell checkFormatting; }