emacs: tweak config
[julm/julm-nix.git] / home-manager / profiles / graphical.nix
index b127ddb812018b4d7915b5d1e9c1195a9bf72f5c..84cca4ff103e1c4d0218c27f501224b298ea4c11 100644 (file)
@@ -1,4 +1,4 @@
-{ pkgs, lib, ... }:
+{ pkgs, lib, config, nixosConfig, ... }:
 {
   imports = [
     ./redshift.nix
@@ -6,40 +6,52 @@
   gtk.enable = true;
   home.packages = [
     pkgs.arandr
-    pkgs.dmenu
     pkgs.glib.bin
     pkgs.glxinfo
     pkgs.gnome.dconf-editor
     pkgs.hicolor-icon-theme
     pkgs.pavucontrol
+    pkgs.qpwgraph
     pkgs.x2goclient
     pkgs.xclip
     pkgs.xorg.xkill
-    pkgs.xsecurelock
-    pkgs.xss-lock
   ];
+  #services.gnome.at-spi2-core.enable = true;
+  home.sessionVariables = lib.mkIf (!nixosConfig.services.gnome.at-spi2-core.enable) {
+    NO_AT_BRIDGE = "1";
+  };
   services.redshift.enable = lib.mkDefault true;
-  services.screen-locker = {
-    enable = true;
-    lockCmd = toString (pkgs.writeShellScript "xsecurelock" ''
-      export PATH=${with pkgs; lib.makeBinPath [coreutils gnugrep xsecurelock xorg.xset]}
-      XSECURELOCK_BLANK_DPMS_STATE=off \
-      XSECURELOCK_BLANK_TIMEOUT=1 \
-      XSECURELOCK_DIM_TIME_MS=2000 \
-      XSECURELOCK_DISCARD_FIRST_KEYPRESS=0 \
-      XSECURELOCK_SAVER=saver_blank \
-      XSECURELOCK_SHOW_DATETIME=1 \
-      XSECURELOCK_SHOW_HOSTNAME=1 \
-      XSECURELOCK_SHOW_USERNAME=1 \
-      XSECURELOCK_WAIT_TIME_MS=2000 \
-      ${pkgs.xsecurelock}/bin/xsecurelock
-    '');
-    #XSECURELOCK_SWITCH_USER_COMMAND="${pkgs.lightdm}/bin/dm-tool switch-to-greeter" \
-    inactiveInterval = lib.mkDefault 3; # minutes
-    xautolock.detectSleep = true;
-    xss-lock.extraOptions = [
-      "--transfer-sleep-lock"
-      #"-n" "${pkgs.xss-lock}/share/doc/xss-lock/dim-screen.sh"
-    ];
+  # keycode <num> = <x> <Shift+x> _ _ <AltGr+x> <AltGr+Shift+x> _ _"
+  home.file.".Xmodmap".text = ''
+    ! — (tiret insécable) with AltGr+Shift+-
+    keycode 15 = minus                6            bar       fiveeighths bar         U2011
+    ! — (tiret cadratin) with AltGr+Shift+_
+    keycode 17 = underscore           8            bar       fiveeighths backslash   emdash
+    ! œ with AltGr+o
+    ! Œ with AltGr+Shift+o
+    keycode 32 = o                    O            o         O           oe          OE
+    ! … (ellipsis) with AltGr+;
+    keycode 59 = semicolon period comma less ellipsis multiply ccedilla Ccedilla
+    !   (nbsp) with AltGr+space and   (narrow nbsp) with AltGr+Shift+space
+    keycode 65 = space space NoSymbol NoSymbol nobreakspace U202F
+  '';
+  systemd.user.services.setxkbmap.Service.ExecStartPost =
+    "${pkgs.xorg.xmodmap}/bin/xmodmap ${config.home.homeDirectory}/.Xmodmap";
+  programs.bash.shellAliases = {
+    gtk-light = "dconf write /org/gnome/desktop/interface/color-scheme '\"prefer-light\"'";
+    gtk-dark = "dconf write /org/gnome/desktop/interface/color-scheme '\"prefer-dark\"'";
+  };
+  dconf.settings = {
+    "org/gnome/desktop/interface" = {
+      color-scheme = "prefer-dark";
+    };
+  };
+  gtk = {
+    theme.name = "Adwaita";
+    gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
+    gtk3 = {
+      bookmarks = lib.mkDefault [
+      ];
+    };
   };
 }