nix/modules/home/desktop/gnome/dconf/default.nix
Ameya Shenoy 4998e822a7 feat: init
Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
2024-11-11 01:48:40 +05:30

228 lines
7.6 KiB
Nix

{ config, lib, inputs, ... }: {
options.snowflake.home.desktop.gnome.dconf.enable =
lib.mkEnableOption "manage gnome with dconf";
config = lib.mkIf config.snowflake.home.desktop.gnome.dconf.enable {
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
show-battery-percentage = true;
clock-show-weekday = true;
clock-show-seconds = true;
};
"org/gnome/desktop/peripherals/touchpad" = { tap-to-click = true; };
"org/gnome/desktop/input-sources" = {
xkb-options = [ "caps:swapescape" ];
};
"org/gnome/desktop/peripherals/touchpad" = { speed = 1.0; };
"org/gnome/desktop/session" = {
idle-delay = inputs.home-manager.lib.hm.gvariant.mkUint32 60;
};
"org/gnome/settings-daemon/plugins/power" = {
sleep-inactive-battery-type = "nothing";
sleep-inactive-ac-type = "nothing";
power-button-action = "nothing";
};
"org/gnome/desktop/wm/preferences" = { num-workspaces = 10; };
"org/gnome/desktop/notifications" = { show-in-lock-screen = false; };
"org/gnome/desktop/wm/keybindings" = {
close = [ "<Super>q" ];
# start window resize using mouse: defaults to "<Alt>F8"
begin-resize = [ "<Super>r" ];
# sticky windows across all workspaces ("Always on Visible Workspace")
toggle-on-all-workspaces = [ "<Super>s" ];
switch-to-workspace-1 = [ "<Super>1" ];
move-to-workspace-1 = [ "<Shift><Super>1" ];
switch-to-workspace-2 = [ "<Super>2" ];
move-to-workspace-2 = [ "<Shift><Super>2" ];
switch-to-workspace-3 = [ "<Super>3" ];
move-to-workspace-3 = [ "<Shift><Super>3" ];
switch-to-workspace-4 = [ "<Super>4" ];
move-to-workspace-4 = [ "<Shift><Super>4" ];
switch-to-workspace-5 = [ "<Super>5" ];
move-to-workspace-5 = [ "<Shift><Super>5" ];
switch-to-workspace-6 = [ "<Super>6" ];
move-to-workspace-6 = [ "<Shift><Super>6" ];
switch-to-workspace-7 = [ "<Super>7" ];
move-to-workspace-7 = [ "<Shift><Super>7" ];
switch-to-workspace-8 = [ "<Super>8" ];
move-to-workspace-8 = [ "<Shift><Super>8" ];
switch-to-workspace-9 = [ "<Super>9" ];
move-to-workspace-9 = [ "<Shift><Super>9" ];
switch-to-workspace-10 = [ "<Super>0" ];
move-to-workspace-10 = [ "<Shift><Super>0" ];
};
"org/gnome/shell/keybindings" = {
# NITE: this was bound to '<Super>n' for opening the nth application
# pinned in the bottom bar. Removing it to remap it to shwitch to the nth
# workspace
switch-to-application-1 = [ ];
switch-to-application-2 = [ ];
switch-to-application-3 = [ ];
switch-to-application-4 = [ ];
switch-to-application-5 = [ ];
switch-to-application-6 = [ ];
switch-to-application-7 = [ ];
switch-to-application-8 = [ ];
switch-to-application-9 = [ ];
switch-to-application-0 = [ ];
# removing keybinding for toggle-on-all-workspaces: defaults to "<Super>s"
toggle-quick-settings = [ ];
show-screenshot-ui = [ "<Super><Shift>s" ];
};
"org/gnome/desktop/media-handling" = {
automount = false;
automount-open = false;
autorun-never = false;
};
"org/gnome/desktop/wm/preferences" = { focus-mode = "sloppy"; };
"org/gnome/shell" = {
enabled-extensions = [
# tiling window manager
"forge@jmmaranan.com"
# to lock a window to an application on first start
"auto-move-windows@gnome-shell-extensions.gcampax.github.com"
# to move the clock to the right side on the top bar
"just-perfection-desktop@just-perfection"
# to launch a new instanc of an application rather than switching to
# the exising instance when invoking from GNOME shell
"launch-new-instance@gnome-shell-extensions.gcampax.github.com"
# GSConnect - KDE Connect reimplementation in GNOME
"gsconnect@andyholmes.github.io"
# blurtooth battery
"bluetooth-battery@michalw.github.com"
# netspeed
"netspeedsimplified@prateekmedia.extension"
# bedtime mode
"gnomebedtime@ionutbortis.gmail.com"
# caffeine
"caffeine@patapon.info"
];
};
"org/gnome/shell/extensions/just-perfection" = {
clock-menu-position = 1;
clock-menu-position-offset = 20;
};
"org/gnome/shell/extensions/forge" = { focus-border-toggle = false; };
"org/gnome/shell/extensions/forge/keybindings" = {
window-toggle-float = [ "<Super>f" ];
# this is bound to Super+l by default. Removing to bind this to lock screen
window-focus-right = [ "" ];
# this is bound to ``<Shift><Super>s`` by default. Removing to bind this to lock screen
con-stacked-layout-toggle = [ "" ];
# makes the window always float and enables "Always on Top" mode
window-toggle-always-float = [ "<Shift><Super>c" ];
};
"org/gnome/shell/extensions/auto-move-windows" = {
application-list = [
"kitty.desktop:2"
"org.wezfurlong.wezterm.desktop:2"
"firefox.desktop:4"
"org.telegram.desktop.desktop:7"
"spotify.desktop:9"
"mpv.desktop:10"
"audio-recorder.desktop:8"
];
};
"org/gnome/settings-daemon/plugins/color" = {
night-light-enabled = true;
night-light-temperature = 2000;
};
# NOTE: if keybinding not working search in `dconf dump /`
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/"
];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" =
{
name = "Bookmenu";
binding = "<Super>b";
command = "/home/cc/.scripts/popup.sh bookmenu.sh";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" =
{
name = "AURA Play Pause";
binding = "Launch3";
command = "playerctl play-pause";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" =
{
name = "Toggle Speech to Text";
binding = "<Super>m";
command = "sh /home/cc/.scripts/speech-to-text.sh";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3" =
{
name = "Lock Screen";
binding = "<Super>l";
command = "xdg-screensaver lock";
};
"org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ];
uris = [ "qemu:///system" ];
};
"org/gnome/desktop/background" = {
picture-uri =
"file:///run/current-system/sw/share/backgrounds/gnome/blobs-l.svg";
picture-uri-dark =
"file:///run/current-system/sw/share/backgrounds/gnome/blobs-d.svg";
primary-color = "#241f31";
};
"org/gnome/desktop/screensaver" = {
picture-uri =
"file:///run/current-system/sw/share/backgrounds/gnome/blobs-l.svg";
primary-color = "#241f31";
};
};
};
}