Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce GNOME and pop-shell for tilling windows manager #688

Merged
merged 26 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e9f48b9
Replace KDE with GNOME for gnome-shell-extension-pop-shell
kachick Jul 16, 2024
1f27935
Fix vscode scale on GNOME
kachick Jul 16, 2024
7dffdfb
Exclude some GNOME default apps
kachick Jul 16, 2024
e67bec0
Install some GNOME extensions especially for pop-shell
kachick Jul 16, 2024
cabd58c
Manage dconf setting by home-manager
kachick Jul 16, 2024
5ae540d
Enable the installed extension
kachick Jul 16, 2024
fb94d98
Clarify to use dconf in NixOS
kachick Jul 16, 2024
fb97f9a
Clarify enabling dconf by home-manager
kachick Jul 16, 2024
5f7cf25
Intoduce clipboard-history extension in GNOME
kachick Jul 17, 2024
296efc8
Custom to run clip hist
kachick Jul 17, 2024
056064d
Avoid to override LANG for GNOME UI
kachick Jul 17, 2024
92de141
Add some note about GNOME
kachick Jul 17, 2024
67579f1
Exclude GNOME default browser and calendar
kachick Jul 17, 2024
9c446c7
Uninstall waybar since disbaled hyprland by default
kachick Jul 17, 2024
5fd7e82
Custom pinned apps
kachick Jul 17, 2024
f2b388b
Install input method panel GNOME extension
kachick Jul 17, 2024
4d05072
Don't recommend chrome for Linux wayland desktop from the unstable be…
kachick Jul 17, 2024
da53619
Pin stable zed editor rather than vscode
kachick Jul 17, 2024
d96bbcc
Split NixOS configurations with the purpose
kachick Jul 17, 2024
ba333d7
Add note about GNOME troubles
kachick Jul 17, 2024
2315542
Apply same DPI fixes as vscode for Signal
kachick Jul 17, 2024
2090ca3
Set some keybinds
kachick Jul 17, 2024
96ccabf
Register btm in a shortcut
kachick Jul 17, 2024
15c2a01
Add note about trouble shoot for GNOME settings
kachick Jul 17, 2024
5684625
Separate gnome(dconf) module to fix GitHub actions CI
kachick Jul 17, 2024
db6e448
Make it possible to use 150% DPI scaling in GNOME
kachick Jul 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ Some tools are not yet fully automated, read each docs.
1. Apply dotfiles for each use

```bash
nix run 'github:kachick/dotfiles#home-manager' -- switch -b backup --flake 'github:kachick/dotfiles#user@linux'
nix run 'github:kachick/dotfiles#home-manager' -- switch -b backup --flake 'github:kachick/dotfiles#user@linux-cui'
```

Candidates
- `user@linux` # Used in container
- `kachick@linux`
- `user@linux-cui` # Used in container
- `kachick@linux-gui`

### Podman on Ubuntu

Expand Down Expand Up @@ -156,7 +156,7 @@ Check [traps](./windows/Multi-booting.md)
If you are developing this repository, the simple reactivation is as follows.

```bash
makers apply user@linux
makers apply user@linux-cui
```

If you encounter any errors in the above steps, Check and update CI and [wiki](https://github.com/kachick/dotfiles/wiki).
2 changes: 1 addition & 1 deletion config/hyprland/hyprland.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $menu = wofi --show drun
# exec-once = $terminal
# exec-once = nm-applet &
exec-once = fcitx5
exec-once = waybar & hyprpaper
# exec-once = waybar & hyprpaper

#############################
### ENVIRONMENT VARIABLES ###
Expand Down
2 changes: 1 addition & 1 deletion containers/needs_systemd.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
set -euxo pipefail

nix-shell --packages git --command 'git config --global --add safe.directory /provisioner/dotfiles'
nix run '/provisioner/dotfiles#home-manager' -- switch -b backup --flake '/provisioner/dotfiles/#user@linux'
nix run '/provisioner/dotfiles#home-manager' -- switch -b backup --flake '/provisioner/dotfiles/#user@linux-cui'
# Also we can call gc without sudo!
nix store gc
10 changes: 6 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
);

apps = forAllSystems (system: {
# example: `nix run .#home-manager -- switch -n -b backup --flake .#user@linux`
# example: `nix run .#home-manager -- switch -n -b backup --flake .#user@linux-cui`
# https://github.com/NixOS/nix/issues/6448#issuecomment-1132855605
home-manager = mkApp home-manager.defaultPackage.${system};
bump_completions = mkApp homemade-packages.${system}.bump_completions;
Expand All @@ -125,6 +125,7 @@
nixosConfigurations =
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
edge-pkgs = import edge-nixpkgs {
inherit system;
config = {
Expand All @@ -142,8 +143,8 @@
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
# FIXME: Apply gnome.nix in #680
users.kachick = import ./home-manager/kachick.nix;

extraSpecialArgs = {
inherit homemade-pkgs edge-pkgs;
};
Expand Down Expand Up @@ -195,12 +196,13 @@
};
in
{
"kachick@linux" = home-manager.lib.homeManagerConfiguration (
"kachick@linux-gui" = home-manager.lib.homeManagerConfiguration (
x86-Linux
// {
modules = [
./home-manager/kachick.nix
./home-manager/systemd.nix
./home-manager/gnome.nix
];
}
);
Expand Down Expand Up @@ -244,7 +246,7 @@
}
);

"user@linux" = home-manager.lib.homeManagerConfiguration (
"user@linux-cui" = home-manager.lib.homeManagerConfiguration (
x86-Linux
// {
modules = [
Expand Down
7 changes: 2 additions & 5 deletions home-manager/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@

# - You can check the candidates in `locale -a`
# - pkgs.glibc installs many candidates, but it does not support darwin
LANG = "en_US.UTF-8";
# This value may overrides NixOS config for GNOME
# LANG = "en_US.UTF-8";

# NOTE: Original comments in zsh
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
Expand All @@ -75,10 +76,6 @@
};
};

# https://github.com/nix-community/home-manager/issues/605
# https://github.com/nix-community/home-manager/blob/release-24.05/modules/misc/fontconfig.nix
fonts.fontconfig.enable = true;

# This also changes xdg? Official manual sed this config is better for non NixOS Linux
# https://github.com/nix-community/home-manager/blob/559856748982588a9eda6bfb668450ebcf006ccd/modules/targets/generic-linux.nix#L16
targets.genericLinux.enable = pkgs.stdenv.isLinux;
Expand Down
66 changes: 66 additions & 0 deletions home-manager/gnome.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{ lib, pkgs, ... }:

{
# https://github.com/nix-community/home-manager/blob/release-24.05/modules/misc/dconf.nix
dconf = {
enable = true;
settings = {
"org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = with pkgs.gnomeExtensions; [
appindicator.extensionUuid
blur-my-shell.extensionUuid
pop-shell.extensionUuid
clipboard-history.extensionUuid
kimpanel.extensionUuid
];

favorite-apps = [
"Alacritty.desktop"
"dev.zed.Zed.desktop"
"org.gnome.Nautilus.desktop"
"firefox.desktop"
];
};

"org/gnome/desktop/wm/keybindings" = {
toggle-message-tray = [ "<Shift><Super>m" ]; # default: ['<Super>v', '<Super>m'], `"disable"` restore default. So added annoy modifier to prevent trigger
};

"org/gnome/settings-daemon/plugins/media-keys" = {
control-center = [ "<Super>comma" ];
www = [ "<Super>w" ];
search = [ "<Super>f" ];
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/custom0" = {
name = "Terminal";
binding = "<Super>t";
command = lib.getExe pkgs.alacritty;
};

"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
name = "Resource Monitor - TUI";
binding = "<Super>b"; # I don't know why, <Super>m don't work even if removed other shortcuts :<
command = "${lib.getExe pkgs.alacritty} --command=${lib.getExe pkgs.bottom} --title='Resource Monitor(btm)'";
};

"org/gnome/shell/extensions/pop-shell" = {
tile-by-default = true;
};

"org/gnome/shell/extensions/clipboard-history" = {
history-size = 100;
toggle-menu = [ "<Super>v" ]; # default: ['<Super><Shift>v']
};

"org/gnome/mutter" = {
experimental-features = [ "scale-monitor-framebuffer" ];
};
};
};
}
27 changes: 27 additions & 0 deletions nixos/GUI.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@ Started from KDE for the battery-included and stable behaviors.\
However I need tilling window manager for several reasons, especially unstable wezterm and zelliji cannot define multiple modifier.\
So I started to using Hyprland. This maybe the note.

=> And switched to GNOME

## GNOME

Q: How to reload GNOME on wayland settings without reboot?\
A: [`SUPER+L`](https://superuser.com/a/1740160)

Q: How to check current settings?\
A: Use `gsettings`

```bash
gsettings get org.gnome.desktop.lockdown disable-lock-screen
gsettings list-recursively org.gnome.shell.keybindings | fzf
```

Q: How to persist this config from settings menu?\
A: `dconf watch /`

Q: Why default-apps changes will not be appeared in dconf watch?\
A: `xdg-settings get default-web-browser`

Q: [Broken cursor as white square](https://github.com/NixOS/nixpkgs/issues/140505#issuecomment-1637341617)\
A: `dconf reset /org/gnome/desktop/interface/cursor-theme`

Q: IME cannot be toggled in GNOME launcher with xremap shortcuts\
A: Since enabling recommended [kimpanel](https://extensions.gnome.org/extension/261/kimpanel/). Execute terminal and toggle once, it triggers to enable switchers. (I don't know why...)

## KDE

The shortcut of Meta+Q conflicts to Hyprland exec terminal. Disable from system settings.\
Expand Down
Loading