1

Compare commits

...

5 Commits

6 changed files with 90 additions and 47 deletions

View File

@ -90,6 +90,11 @@ rec {
", XF86AudioPlay" = ["exec, playerctl play-pause"]; ", XF86AudioPlay" = ["exec, playerctl play-pause"];
", XF86AudioPrev" = ["exec, playerctl previous"]; ", XF86AudioPrev" = ["exec, playerctl previous"];
", XF86AudioNext" = ["exec, playerctl next"]; ", XF86AudioNext" = ["exec, playerctl next"];
", XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset gamma -10"];
", XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset gamma +10"];
"$mainMod, XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset temperature 6000"];
"$mainMod, XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset identity"];
}; };
}; };
@ -102,16 +107,22 @@ rec {
"kitty" "kitty"
"nextcloud --background" "nextcloud --background"
"keepassxc" "keepassxc"
"ferdium"
]; ];
}; };
windowrules = [ windowrules = [
# Prevent unity from activating when its reloading the editor
# TODO: Doesn't work, use focus_on_activate for now # TODO: Doesn't work, use focus_on_activate for now
# "suppressevent activate, class:^(Unity)$" # "suppressevent activate, class:^(Unity)$"
# "suppressevent activatefocus, class:^(Unity)$" # "suppressevent activatefocus, class:^(Unity)$"
]; ];
workspacerules = { workspacerules = {
"special" = [
"Ferdium"
];
"2" = [ "2" = [
"Zotero" "Zotero"
@ -306,6 +317,7 @@ rec {
sd # sed alternative sd # sed alternative
fclones # duplicate file finder fclones # duplicate file finder
tealdeer # very fast tldr (so readable man) tealdeer # very fast tldr (so readable man)
killall
atool # Archive preview atool # Archive preview
ffmpegthumbnailer # Video thumbnails ffmpegthumbnailer # Video thumbnails
mediainfo # Media meta information mediainfo # Media meta information
@ -364,8 +376,8 @@ rec {
sshfs # Mount remote directories via SSH sshfs # Mount remote directories via SSH
protonvpn-gui protonvpn-gui
protonvpn-cli_2
protonmail-bridge-gui protonmail-bridge-gui
protonvpn-cli_2 # TODO: Not compatible with systemd-networkd?
protonmail-bridge # TODO: Enable on startup, email module protonmail-bridge # TODO: Enable on startup, email module
# GUI apps # GUI apps
@ -384,6 +396,7 @@ rec {
helvum helvum
vlc vlc
audacity audacity
ferdium
# Office # Office
wacomtablet # For xournalpp/krita wacomtablet # For xournalpp/krita

View File

@ -142,6 +142,7 @@ in {
ssh = "kitty +kitten ssh"; ssh = "kitty +kitten ssh";
nd = "nix develop"; nd = "nix develop";
nb = "nix build -L"; nb = "nix build -L";
nps = "nps -e";
} }
# Abbrs only available if package is installed # Abbrs only available if package is installed

View File

@ -1,5 +1,6 @@
# TODO: The keys to reset the workspaces need to depend on actual workspace config # TODO: The keys to reset the workspaces need to depend on actual workspace config
{ {
inputs,
config, config,
lib, lib,
mylib, mylib,
@ -67,6 +68,9 @@
"$mainMod CTRL, k" = ["movewindow, u"]; "$mainMod CTRL, k" = ["movewindow, u"];
"$mainMod CTRL, d" = ["movewindow, d"]; "$mainMod CTRL, d" = ["movewindow, d"];
# Special workspace
"$mainMod, x" = ["togglespecialworkspace"];
# TODO: Somehow write this more compact? Try to use workspace 0 instead of 10... # TODO: Somehow write this more compact? Try to use workspace 0 instead of 10...
"$mainMod, 1" = ["workspace, 1"]; "$mainMod, 1" = ["workspace, 1"];
"$mainMod, 2" = ["workspace, 2"]; "$mainMod, 2" = ["workspace, 2"];
@ -90,18 +94,17 @@
"$mainMod SHIFT, 9" = ["movetoworkspace, 9"]; "$mainMod SHIFT, 9" = ["movetoworkspace, 9"];
"$mainMod SHIFT, 0" = ["movetoworkspace, 10"]; "$mainMod SHIFT, 0" = ["movetoworkspace, 10"];
"CTRL ALT, R" = [ # Reset workspaces to the defined configuration in hyprland.workspaces:
"moveworkspacetomonitor, 1 HDMI-A-1" # [
"moveworkspacetomonitor, 2 HDMI-A-1" # "moveworkspacetomonitor, 1 HDMI-A-1"
"moveworkspacetomonitor, 3 HDMI-A-1" # "moveworkspacetomonitor, 2 HDMI-A-1"
"moveworkspacetomonitor, 4 HDMI-A-1" # ...
"moveworkspacetomonitor, 5 HDMI-A-1" # ]
"moveworkspacetomonitor, 6 HDMI-A-1" "CTRL ALT, R" = let
"moveworkspacetomonitor, 7 HDMI-A-1" mkWorkspaceBinding = monitor: workspace: "moveworkspacetomonitor, ${builtins.toString workspace} ${builtins.toString monitor}";
"moveworkspacetomonitor, 8 HDMI-A-1" mkWorkspacesBindings = monitor: workspaces: builtins.map (mkWorkspaceBinding monitor) workspaces;
"moveworkspacetomonitor, 9 HDMI-A-1" in
"moveworkspacetomonitor, 10 DP-1" builtins.concatLists (builtins.attrValues (builtins.mapAttrs mkWorkspacesBindings hyprland.workspaces));
];
}; };
always-bindm = { always-bindm = {
@ -110,10 +113,11 @@
}; };
always-exec = [ always-exec = [
"dunst" # Notifications # "dunst" # Notifications
"wl-paste -t text --watch clipman store --no-persist" "wl-paste -t text --watch clipman store --no-persist"
"wl-paste -p -t text --watch clipman store -P --histpath=\"~/.local/share/clipman-primary.json\"" "wl-paste -p -t text --watch clipman store -P --histpath=\"~/.local/share/clipman-primary.json\""
"hyprctl setcursor Bibata-Modern-Classic 16" "hyprctl setcursor Bibata-Modern-Classic 16"
"hyprsunset --identity"
# HACK: Hyprland doesn't set the xwayland/x11 keymap correctly # HACK: Hyprland doesn't set the xwayland/x11 keymap correctly
"setxkbmap -layout ${hyprland.kb-layout} -variant ${hyprland.kb-variant} -model pc104" "setxkbmap -layout ${hyprland.kb-layout} -variant ${hyprland.kb-variant} -model pc104"
@ -124,6 +128,7 @@
# Provide a polkit authentication UI. # Provide a polkit authentication UI.
# This is used for example when running systemd commands without root. # This is used for example when running systemd commands without root.
"${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1" "${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1"
# "systemctl --user start hyprpolkitagent.service"
]; ];
in { in {
options.modules.hyprland = import ./options.nix {inherit lib mylib;}; options.modules.hyprland = import ./options.nix {inherit lib mylib;};
@ -160,6 +165,9 @@ in {
packages = with pkgs; [ packages = with pkgs; [
hyprpaper # Wallpaper setter hyprpaper # Wallpaper setter
hyprpicker # Color picker hyprpicker # Color picker
# hyprpolkitagent # Ugly polkit authentication GUI
hyprland-qt-support
hyprsunset # Blue light filter
wl-clipboard wl-clipboard
clipman # Clipboard manager (wl-paste) clipman # Clipboard manager (wl-paste)
@ -171,18 +179,20 @@ in {
grim # Grab images from compositor grim # Grab images from compositor
# Deps for Qt5 and Qt6 apps (e.g., Nextcloud) # Deps for Qt5 and Qt6 apps (e.g., Nextcloud)
libsForQt5.qtwayland qt5.qtwayland
kdePackages.qtwayland qt6.qtwayland
]; ];
file = { file = {
".config/hypr/keybindings.info".text = lib.pipe (hyprland.keybindings.bindings ".config/hypr/keybindings.info".text =
// always-bind) [ lib.pipe
(builtins.mapAttrs mkBindsHelp) (hyprland.keybindings.bindings // always-bind)
builtins.attrValues [
builtins.concatLists (builtins.mapAttrs mkBindsHelp)
(builtins.concatStringsSep "\n") builtins.attrValues
]; builtins.concatLists
(builtins.concatStringsSep "\n")
];
}; };
}; };
@ -354,6 +364,14 @@ in {
systemd.variables = ["--all"]; # Import PATH into systemd systemd.variables = ["--all"]; # Import PATH into systemd
xwayland.enable = true; xwayland.enable = true;
plugins = [
# TODO: Takes ages (compiles all hyprland dependencies locally...)
# Probably have to use hyprland flake to follow...
# inputs.hypr-dynamic-cursors.packages.${pkgs.system}.hypr-dynamic-cursors
# inputs.hyprland-plugins.packages.${pkgs.system}.hyprbars
];
settings = { settings = {
"$mainMod" = "${hyprland.keybindings.main-mod}"; "$mainMod" = "${hyprland.keybindings.main-mod}";

View File

@ -109,6 +109,7 @@ in {
"bar.workspaces.applicationIconEmptyWorkspace" = ""; "bar.workspaces.applicationIconEmptyWorkspace" = "";
"bar.workspaces.applicationIconFallback" = "󰣆"; "bar.workspaces.applicationIconFallback" = "󰣆";
"bar.workspaces.applicationIconOncePerWorkspace" = true; "bar.workspaces.applicationIconOncePerWorkspace" = true;
"bar.workspaces.ignored" = "-99"; # Special workspace
"bar.workspaces.monitorSpecific" = true; "bar.workspaces.monitorSpecific" = true;
"bar.workspaces.numbered_active_indicator" = "highlight"; "bar.workspaces.numbered_active_indicator" = "highlight";
"bar.workspaces.reverse_scroll" = true; "bar.workspaces.reverse_scroll" = true;

View File

@ -240,7 +240,7 @@ _: let
options.desc = "Copy"; options.desc = "Copy";
} }
{ {
mode = "n"; mode = ["n" "i"];
key = "<C-p>"; key = "<C-p>";
action = "<cmd>YankyRingHistory<cr>"; action = "<cmd>YankyRingHistory<cr>";
options.desc = "Paste (Yanky)"; options.desc = "Paste (Yanky)";
@ -278,17 +278,17 @@ _: let
options.desc = "Find in Buffer"; options.desc = "Find in Buffer";
} }
{ {
mode = "n"; mode = ["n" "v"];
key = ";"; key = ";";
action = "%"; action = "%";
options.desc = "Matching ()[]<>"; options.desc = "Matching ()[]<>";
} }
{ # {
mode = "v"; # mode = "v";
key = ";"; # key = ";";
action = "<Esc>"; # action = "<Esc>";
options.desc = "Exit Visual Mode"; # options.desc = "Exit Visual Mode";
} # }
]; ];
leader = [ leader = [
@ -346,18 +346,18 @@ _: let
action = "<cmd>lua Snacks.picker.commands()<cr>"; action = "<cmd>lua Snacks.picker.commands()<cr>";
options.desc = "Commands Picker"; options.desc = "Commands Picker";
} }
# { {
# mode = "n"; mode = "n";
# key = "<leader>M"; key = "<leader>m";
# action = "<cmd>lua Snacks.picker.marks()<cr>"; action = "<cmd>lua Snacks.picker.marks()<cr>";
# options.desc = "Marks Picker"; options.desc = "Marks Picker";
# } }
# { {
# mode = "n"; mode = "n";
# key = "<leader>J"; key = "<leader>j";
# action = "<cmd>lua Snacks.picker.jumps()<cr>"; action = "<cmd>lua Snacks.picker.jumps()<cr>";
# options.desc = "Jumps Picker"; options.desc = "Jumps Picker";
# } }
{ {
mode = "n"; mode = "n";
key = "<leader>d"; key = "<leader>d";
@ -436,7 +436,13 @@ _: let
mode = "n"; mode = "n";
key = "<leader>fc"; key = "<leader>fc";
action = "<cmd>edit ~/.config/nvim/init.lua<cr>"; action = "<cmd>edit ~/.config/nvim/init.lua<cr>";
options.desc = "Open Config"; options.desc = "Open NeoVim Config";
}
{
mode = "n";
key = "<leader>fh";
action = "<cmd>edit ~/.config/hypr/hyprland.conf<cr>";
options.desc = "Open Hyprland Config";
} }
{ {
mode = "n"; mode = "n";

View File

@ -132,10 +132,14 @@
addons = with pkgs; [ addons = with pkgs; [
fcitx5-gtk fcitx5-gtk
libsForQt5.fcitx5-qt # QT5
kdePackages.fcitx5-qt # QT6
fcitx5-chinese-addons
fcitx5-configtool # TODO: Remove this and set config through HomeManager fcitx5-configtool # TODO: Remove this and set config through HomeManager
catppuccin-fcitx5
libsForQt5.fcitx5-qt # QT5
libsForQt5.fcitx5-chinese-addons
qt6Packages.fcitx5-qt # QT6
qt6Packages.fcitx5-chinese-addons
]; ];
}; };
}; };