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

View File

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

View File

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

View File

@ -240,7 +240,7 @@ _: let
options.desc = "Copy";
}
{
mode = "n";
mode = ["n" "i"];
key = "<C-p>";
action = "<cmd>YankyRingHistory<cr>";
options.desc = "Paste (Yanky)";
@ -278,17 +278,17 @@ _: let
options.desc = "Find in Buffer";
}
{
mode = "n";
mode = ["n" "v"];
key = ";";
action = "%";
options.desc = "Matching ()[]<>";
}
{
mode = "v";
key = ";";
action = "<Esc>";
options.desc = "Exit Visual Mode";
}
# {
# mode = "v";
# key = ";";
# action = "<Esc>";
# options.desc = "Exit Visual Mode";
# }
];
leader = [
@ -346,18 +346,18 @@ _: let
action = "<cmd>lua Snacks.picker.commands()<cr>";
options.desc = "Commands Picker";
}
# {
# mode = "n";
# key = "<leader>M";
# action = "<cmd>lua Snacks.picker.marks()<cr>";
# options.desc = "Marks Picker";
# }
# {
# mode = "n";
# key = "<leader>J";
# action = "<cmd>lua Snacks.picker.jumps()<cr>";
# options.desc = "Jumps Picker";
# }
{
mode = "n";
key = "<leader>m";
action = "<cmd>lua Snacks.picker.marks()<cr>";
options.desc = "Marks Picker";
}
{
mode = "n";
key = "<leader>j";
action = "<cmd>lua Snacks.picker.jumps()<cr>";
options.desc = "Jumps Picker";
}
{
mode = "n";
key = "<leader>d";
@ -436,7 +436,13 @@ _: let
mode = "n";
key = "<leader>fc";
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";

View File

@ -132,10 +132,14 @@
addons = with pkgs; [
fcitx5-gtk
libsForQt5.fcitx5-qt # QT5
kdePackages.fcitx5-qt # QT6
fcitx5-chinese-addons
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
];
};
};