trim some options and make tiling optional in de2

This commit is contained in:
notgne2 2022-01-29 19:40:54 -07:00
parent 487a076825
commit e1bcc9e797
No known key found for this signature in database
GPG Key ID: BB661E172B42A7F8
2 changed files with 51 additions and 58 deletions

View File

@ -6,6 +6,12 @@ in
{ {
options.de2u = { options.de2u = {
enable = mkEnableOption "Enable de2 user stuff"; enable = mkEnableOption "Enable de2 user stuff";
tiling = mkOption {
type = types.bool;
default = true;
description = "Enable tiling stuff";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -51,7 +57,7 @@ in
systemd.user.sessionVariables = { systemd.user.sessionVariables = {
QT_QPA_PLATFORM = "wayland-egl;xcb"; QT_QPA_PLATFORM = "wayland-egl;xcb";
MOZ_ENABLE_WAYLAND = "1"; MOZ_ENABLE_WAYLAND = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; QT_WAYLAND_DISABLE_WINDOWDECORATION = lib.mkIf cfg.tiling "1";
}; };
xdg.mimeApps = { xdg.mimeApps = {
@ -73,12 +79,12 @@ in
dconf.settings = with lib.hm.gvariant; { dconf.settings = with lib.hm.gvariant; {
"org/gnome/desktop/interface" = { "org/gnome/desktop/interface" = {
enable-hot-corners = false; enable-hot-corners = !cfg.tiling;
show-battery-percentage = true; show-battery-percentage = true;
}; };
"org/gnome/shell/extensions/pop-shell" = { "org/gnome/shell/extensions/pop-shell" = {
tile-by-default = true; tile-by-default = cfg.tiling;
show-title = false; show-title = !cfg.tiling;
active-hint = false; active-hint = false;
}; };
"org/gnome/shell/extensions/improved-workspace-indicator" = { "org/gnome/shell/extensions/improved-workspace-indicator" = {
@ -87,7 +93,7 @@ in
"org/gnome/shell/extensions/vitals" = { "org/gnome/shell/extensions/vitals" = {
hide-zeros = true; hide-zeros = true;
show-battery = true; show-battery = true;
update-time = 8; update-time = 10;
}; };
"org/gnome/shell/extensions/appindicator" = { "org/gnome/shell/extensions/appindicator" = {
icon-opacity = 255; icon-opacity = 255;
@ -97,26 +103,17 @@ in
name = if config.colors.enable then "Generated" else "Default"; name = if config.colors.enable then "Generated" else "Default";
}; };
"org/gnome/shell/extensions/just-perfection" = { "org/gnome/shell/extensions/just-perfection" = {
activities-button = false; activities-button = !cfg.tiling;
startup-status = 0;
workspace-popup = false;
window-picker-icon = false;
animation = 3; animation = 3;
app-menu = true;
app-menu-icon = true;
background-menu = true;
dash = false; dash = false;
double-super-to-appgrid = true; double-super-to-appgrid = true;
gesture = true;
hot-corner = false;
show-apps-button = false;
startup-status = 0;
window-picker-icon = false;
window-preview-caption = true;
workspace = true;
workspace-popup = false;
workspace-switcher-should-show = false;
workspaces-in-app-grid = true;
}; };
"org/gnome/shell" = { "org/gnome/shell" = {
disable-user-extensions = false; disable-user-extensions = false;
disabled-extensions = [ "" ];
enabled-extensions = [ enabled-extensions = [
"pop-shell@system76.com" "pop-shell@system76.com"
"rrc@ogarcia.me" "rrc@ogarcia.me"
@ -127,20 +124,21 @@ in
"clipboard-indicator@tudmotu.com" "clipboard-indicator@tudmotu.com"
"just-perfection-desktop@just-perfection" "just-perfection-desktop@just-perfection"
"appindicatorsupport@rgcjonas.gmail.com" "appindicatorsupport@rgcjonas.gmail.com"
"launch-new-instance@gnome-shell-extensions.gcampax.github.com"
]; ];
}; };
"org/gnome/desktop/peripherals/touchpad" = { "org/gnome/desktop/peripherals/touchpad" = {
natural-scroll = false; natural-scroll = false;
}; };
"org/gnome/mutter" = { "org/gnome/mutter" = {
edge-tiling = false; edge-tiling = !cfg.tiling;
dynamic-workspaces = false; dynamic-workspaces = !cfg.tiling;
}; };
"org/gnome/shell/extensions/blur-me" = { "org/gnome/shell/extensions/blur-me" = {
toggle-app-blur = false; toggle-app-blur = false;
}; };
"org/gnome/desktop/wm/preferences" = { "org/gnome/desktop/wm/preferences" = {
focus-mode = "sloppy"; focus-mode = if cfg.tiling then "sloppy" else "click";
resize-with-right-button = true; resize-with-right-button = true;
num-workspaces = 9; num-workspaces = 9;
}; };
@ -152,43 +150,33 @@ in
enabled = true; enabled = true;
}; };
"org/gnome/desktop/wm/keybindings" = { "org/gnome/desktop/wm/keybindings" =
move-to-workspace-1 = [ "<Shift><Super>exclam" ]; let
move-to-workspace-2 = [ "<Shift><Super>at" ]; workspaceAttrsList = lib.flatten (map
move-to-workspace-3 = [ "<Shift><Super>numbersign" ]; (n: [
move-to-workspace-4 = [ "<Shift><Super>dollar" ]; (lib.nameValuePair "move-to-workspace-${n}" [ "<Shift><Super>${n}" ])
move-to-workspace-5 = [ "<Shift><Super>percent" ]; (lib.nameValuePair "switch-to-workspace-${n}" [ "<Super>${n}" ])
move-to-workspace-6 = [ "<Shift><Super>asciicircum" ]; ])
move-to-workspace-7 = [ "<Shift><Super>ampersand" ]; (map (n: toString n) (lib.range 0 9)));
move-to-workspace-8 = [ "<Shift><Super>asterisk" ]; in
move-to-workspace-9 = [ "<Shift><Super>parenleft" ]; lib.listToAttrs workspaceAttrsList // {
switch-to-workspace-1 = [ "<Super>1" ]; minimize = [ "<Super>comma" ];
switch-to-workspace-2 = [ "<Super>2" ]; switch-to-workspace-left = [ "" ];
switch-to-workspace-3 = [ "<Super>3" ]; switch-to-workspace-right = [ "" ];
switch-to-workspace-4 = [ "<Super>4" ]; maximize = [ "" ];
switch-to-workspace-5 = [ "<Super>5" ]; unmaximize = [ "" ];
switch-to-workspace-6 = [ "<Super>6" ]; move-to-monitor-up = [ "" ];
switch-to-workspace-7 = [ "<Super>7" ]; move-to-monitor-down = [ "" ];
switch-to-workspace-8 = [ "<Super>8" ]; move-to-monitor-left = [ "" ];
switch-to-workspace-9 = [ "<Super>9" ]; move-to-monitor-right = [ "" ];
move-to-workspace-down = [ "" ];
move-to-workspace-up = [ "" ];
switch-to-workspace-down = [ "<Primary><Super>Down" "<Primary><Super>j" ];
switch-to-workspace-up = [ "<Primary><Super>Up" "<Primary><Super>k" ];
toggle-maximized = [ "<Super>m" ];
close = [ "<Super>q" "<Alt>F4" ];
minimize = [ "<Super>comma" ]; };
switch-to-workspace-left = [ "" ];
switch-to-workspace-right = [ "" ];
maximize = [ "" ];
unmaximize = [ "" ];
move-to-monitor-up = [ "" ];
move-to-monitor-down = [ "" ];
move-to-monitor-left = [ "" ];
move-to-monitor-right = [ "" ];
move-to-workspace-down = [ "" ];
move-to-workspace-up = [ "" ];
switch-to-workspace-down = [ "<Primary><Super>Down" "<Primary><Super>j" ];
switch-to-workspace-up = [ "<Primary><Super>Up" "<Primary><Super>k" ];
toggle-maximized = [ "<Super>m" ];
close = [ "<Super>q" "<Alt>F4" ];
};
"org/gnome/mutter/keybindings" = { "org/gnome/mutter/keybindings" = {
toggle-tiled-left = [ "" ]; toggle-tiled-left = [ "" ];
toggle-tiled-right = [ "" ]; toggle-tiled-right = [ "" ];

View File

@ -7,6 +7,11 @@ in
options.de2.enable = mkEnableOption "Enable de2 system stuff"; options.de2.enable = mkEnableOption "Enable de2 system stuff";
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.gnome.excludePackages = with pkgs; [
gnome.epiphany
gnome.gnome-software
];
services.xserver = { services.xserver = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
displayManager.gdm.enable = lib.mkDefault true; displayManager.gdm.enable = lib.mkDefault true;