Merge branch 'avoid-digga' of github.com:aciceri/fleet into avoid-digga

This commit is contained in:
Andrea Ciceri 2022-07-30 11:40:37 +02:00
commit 55ead06206
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
13 changed files with 65 additions and 12 deletions

View file

@ -111,7 +111,7 @@
:os :os
(:if IS-MAC macos) ; improve compatibility with macOS (:if IS-MAC macos) ; improve compatibility with macOS
tty ; improve the terminal Emacs experience tty ; improve the terminal Emacs experience
exwm (exwm +status +xim)
:lang :lang
;;agda ; types of types of types of types... ;;agda ; types of types of types of types...

View file

@ -20,7 +20,7 @@
(setq exwm-input-global-keys (setq exwm-input-global-keys
`(([?\s-r] . exwm-reset) `(([?\s-r] . exwm-reset)
([?\s-w] . exwm-workspace-switch) ([?\s-w] . exwm-workspace-switch)
([?\s-&] . (lambda (command) ([?\s-d] . (lambda (command)
(interactive (list (read-shell-command "$ "))) (interactive (list (read-shell-command "$ ")))
(start-process-shell-command command nil command))) (start-process-shell-command command nil command)))
,@(mapcar (lambda (i) ,@(mapcar (lambda (i)
@ -52,6 +52,20 @@
;; of visible buffers. ;; of visible buffers.
(advice-add #'exwm--update-utf8-title :around #'exwm--update-utf8-title-advice) (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. ;; Enable the window manager.
(exwm-enable)) (exwm-enable))

View file

@ -23,7 +23,7 @@
doomEmacs, doomEmacs,
} @ inputs: let } @ inputs: let
utils = (import ./utils) inputs; utils = (import ./utils) inputs;
inherit (utils) lib mkConfigurations mkVmApps checkFormatting formatApp mkDevShell; inherit (utils) lib mkConfigurations mkVmApps checkFormatting formatter formatApp mkDevShell;
in { in {
nixosConfigurations = mkConfigurations; nixosConfigurations = mkConfigurations;
@ -32,5 +32,7 @@
checks = checkFormatting ./.; checks = checkFormatting ./.;
devShells = mkDevShell; devShells = mkDevShell;
inherit formatter;
}; };
} }

View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
programs.chromium = {
enable = true;
package = pkgs.google-chrome;
};
}

View file

@ -0,0 +1,3 @@
{pkgs, ...}: {
home.packages = [pkgs.element-desktop];
}

View file

@ -29,6 +29,7 @@
"-c" "-c"
]; ];
content.pdfjs = true; content.pdfjs = true;
tabs.tabs_are_windows = true;
}; };
}; };
home.packages = [ home.packages = [

View file

@ -0,0 +1,3 @@
{pkgs, ...}: {
home.packages = [pkgs.slack];
}

View file

@ -0,0 +1,7 @@
{
services.udiskie = {
enable = true;
automount = true;
tray = "never";
};
}

View file

@ -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;
};
}

View file

@ -40,6 +40,11 @@
"git" "git"
"gpg" "gpg"
"password-store" "password-store"
"slack"
"chrome"
"vscode"
"element"
"udiskie"
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
]; ];

View file

@ -13,4 +13,6 @@
users.mutableUsers = false; users.mutableUsers = false;
users.users.root.password = "password"; users.users.root.password = "password";
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
nixpkgs.config.allowUnfree = true;
} }

View file

@ -22,15 +22,15 @@
xset r rate 200 60 xset r rate 200 60
# Uncomment the following block to use the exwm-xim module. # Uncomment the following block to use the exwm-xim module.
#export XMODIFIERS=@im=exwm-xim export XMODIFIERS=@im=exwm-xim
#export GTK_IM_MODULE=xim export GTK_IM_MODULE=xim
#export QT_IM_MODULE=xim export QT_IM_MODULE=xim
#export CLUTTER_IM_MODULE=xim export CLUTTER_IM_MODULE=xim
# Lockscreen # 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 # 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))"
''; '';
} }

View file

@ -45,8 +45,8 @@
}; };
mkConfigurations = { mkConfigurations = {
thinkpad = mkConfiguration { pc = mkConfiguration {
name = "thinkpad"; name = "pc";
system = supportedSystems.x86_64-linux; system = supportedSystems.x86_64-linux;
modules = []; modules = [];
}; };
@ -69,6 +69,8 @@
mkVmApp system configurations.${configurationName} mkVmApp system configurations.${configurationName}
)); ));
formatter = lib.perSystem (system: pkgsFor.${system}.alejandra);
formatApp = lib.perSystem ( formatApp = lib.perSystem (
system: { system: {
format = { format = {
@ -102,5 +104,5 @@
}; };
}); });
in { in {
inherit lib mkConfigurations mkVmApps supportedSystems formatApp mkDevShell checkFormatting; inherit lib mkConfigurations mkVmApps supportedSystems formatApp formatter mkDevShell checkFormatting;
} }