use hypr under nvidia

This commit is contained in:
js0ny 2025-11-07 09:15:09 +00:00
parent 59328ad384
commit 64d100c252
19 changed files with 125 additions and 67 deletions

View file

@ -15,7 +15,7 @@
# ####################################################################################### # #######################################################################################
$mainMod = SUPER # Sets "Windows" key as main modifier $mainMod = SUPER # Sets "Windows" key as main modifier
$terminal = kitty $terminal = ghostty
$fileManager = dolphin $fileManager = dolphin
$menu = rofi $menu = rofi
$iconTheme = Papirus $iconTheme = Papirus
@ -85,8 +85,6 @@ exec-once = fcitx5 &
# Clipboard history (called by wofi) # Clipboard history (called by wofi)
exec-once = wl-paste --watch cliphist store exec-once = wl-paste --watch cliphist store
# exec-once = QT_SCALE_FACTOR=1 albert & # exec-once = QT_SCALE_FACTOR=1 albert &
# Bluetooth Manager
exec-once = blueman-applet &
@ -236,10 +234,10 @@ input {
# gesture = 4, horizontal, workspace # gesture = 4, horizontal, workspace
# https://wiki.hyprland.org/Configuring/Variables/#gestures # https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures { # gestures {
workspace_swipe = true # workspace_swipe = true
workspace_swipe_fingers = 4 # workspace_swipe_fingers = 4
} # }
# Example per-device config # Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more

View file

@ -1,5 +1,6 @@
## Open Applications ## Open Applications
bind = $mainMod, R, exec, $terminal bind = $mainMod, R, exec, $terminal
bind = $mainMod, return, exec, $terminal
bind = $mainMod, Q, killactive, bind = $mainMod, Q, killactive,
# bind = $mainMod, M, exit # bind = $mainMod, M, exit
bind = $mainMod SHIFT, F, exec, hyprctl --batch "dispatch togglefloating ; dispatch resizeactive exact 1440 810 ; dispatch centerwindow 1;" bind = $mainMod SHIFT, F, exec, hyprctl --batch "dispatch togglefloating ; dispatch resizeactive exact 1440 810 ; dispatch centerwindow 1;"

View file

@ -16,7 +16,7 @@
// "~/.config/waybar/modules/niri.jsonc" // "~/.config/waybar/modules/niri.jsonc"
], ],
// Choose the order of the modules // Choose the order of the modules
"modules-left": ["custom/osicon", "sway/workspaces", "wlr/taskbar"], "modules-left": ["custom/osicon", "sway/workspaces", "hyprland/workspaces", "wlr/taskbar"],
// "modules-center": ["clock"], // "modules-center": ["clock"],
"modules-right": ["tray", "pulseaudio", "cpu", "memory", "network", "battery", "clock"], "modules-right": ["tray", "pulseaudio", "cpu", "memory", "network", "battery", "clock"],
// "modules-right": ["cpu", "memory", "battery", "network", "tray"], // "modules-right": ["cpu", "memory", "battery", "network", "tray"],

View file

@ -37,7 +37,7 @@ case "$(uname)" in
# ;; # ;;
esac esac
for file in $DOTFILES/tools/zsh/mod/*.zsh; do for file in $DOTFILES/home/dot_config/zsh/mod/*.zsh; do
source $file source $file
done done

View file

@ -0,0 +1,20 @@
### completion
### =================
# use tab to select
zstyle ':completion:*' menu select
# substring matching
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
# use cache
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache"
# Colours in completion
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
# Complete . and .. special directories
zstyle ':completion:*' special-dirs true

View file

@ -9,8 +9,15 @@ HIST_STAMPS="yyyy-mm-dd"
HISTSIZE=10000 HISTSIZE=10000
SAVEHIST=10000 SAVEHIST=10000
export LANG=zh_CN.UTF-8 setopt INTERACTIVE_COMMENTS # Allow comments in interactive mode
export LC_ALL=zh_CN.UTF-8
# Globbing
setopt EXTENDED_GLOB # Extended globbing
setopt GLOB_DOTS # Include dotfiles in globbing
# Error correction
setopt CORRECT # Suggest corrections for commands
setopt CORRECT_ALL # Suggest corrections for arguments
# Manually manage plugins 手动管理插件 # Manually manage plugins 手动管理插件
# Load zsh-syntax-highlighting before zsh-history-substring-search # Load zsh-syntax-highlighting before zsh-history-substring-search

View file

@ -3,49 +3,25 @@
# Author: js0ny # Author: js0ny
# Sourced by user's zshrc 在用户的 zshrc 中被引用 # Sourced by user's zshrc 在用户的 zshrc 中被引用
# read key: `fish_key_reader` # read key: `read`
# get current bindings: `bindkey` # get current bindings: `bindkey`
bindkey -v # Vi Keybindings # bindkey -v # Vi Keybindings
# Colemak hnei bindkey '^H' backward-kill-word # Ctrl-Backspace
# ^ bindkey '^[^?' backward-kill-line # Alt-Backspace
# n
# < h i >
# e
# v
# bindkey -M vicmd 'h' vi-backward-char # No change
# bindkey -M vicmd 'n' down-line-or-history
# bindkey -M vicmd 'e' up-line-or-history
# bindkey -M vicmd 'i' vi-forward-char
#
# # Similar position to [i] in QWERTY
# bindkey -M vicmd 'l' vi-insert
# bindkey -M vicmd 'L' vi-insert-bol
# # Ne{[k]s}t
# bindkey -M vicmd 'k' vi-repeat-search
# bindkey -M vicmd 'K' vi-rev-repeat-search
# # [J]ump
# bindkey -M vicmd 'j' vi-forward-word-end
# bindkey -M vicmd 'J' vi-forward-blank-word-end
# # Use N to Join
# bindkey -M vicmd 'N' vi-join
# Emacs Hybrid bindkey '^[[1;5D' backward-word # Ctrl-Left
bindkey '^A' beginning-of-line bindkey '^[[1;5C' forward-word # Ctrl-Right
bindkey '^E' end-of-line
bindkey '^F' forward-char
bindkey '^B' backward-char
bindkey '^P' up-line-or-history
bindkey '^N' down-line-or-history
bindkey '^R' history-incremental-search-backward
bindkey '^K' kill-line
# Zsh will parse <C-Backspace> to C-h
bindkey '^H' backward-kill-word
bindkey -M viins '^?' backward-delete-char bindkey '^[[1;3D' beginning-of-line # Alt-Left
# LEADER CONVENTION bindkey '^[[1;3C' end-of-line # Alt-Right
# ^X defines as a prefix key in shell
# ^A defines as a prefix key in tmux
# ^B defines as a prefix key in Terminal Emulators bindkey '^[[H' beginning-of-line # Home
# SPC defines as a prefix key in nvim bindkey '^[[F' end-of-line # End
bindkey '^[[3~' delete-char # Delete
bindkey '^[[3;5~' kill-word # Ctrl-Delete
bindkey '^[[3;3~' kill-line # Alt-Delete

View file

@ -22,7 +22,7 @@
# desktop environment and display manager # desktop environment and display manager
../../modules/nixos/desktop/dm/sddm.nix ../../modules/nixos/desktop/dm/sddm.nix
../../modules/nixos/desktop/de/kde.nix ../../modules/nixos/desktop/de/kde.nix
../../modules/nixos/desktop/de/sway.nix ../../modules/nixos/desktop/de/hyprland.nix
# desktop programs # desktop programs
../../modules/nixos/programs/zsh.nix ../../modules/nixos/programs/zsh.nix
@ -51,6 +51,13 @@
# Use unfree software # Use unfree software
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
zramSwap = {
enable = true;
memoryPercent = 10;
algorithm = "lz4";
priority = 100;
};
# Disable modem # Disable modem
networking.modemmanager.enable = false; networking.modemmanager.enable = false;
services.flatpak.enable = true; services.flatpak.enable = true;

View file

@ -22,6 +22,18 @@
description = "The default terminal emulator to run CLI softwares directly"; description = "The default terminal emulator to run CLI softwares directly";
}; };
defaultExplorer = lib.mkOption {
type = lib.types.str;
default = "thunar";
description = "The default file explorer";
};
defaultTerminalExplorer = lib.mkOption {
type = lib.types.str;
default = "yazi";
description = "The default file explorer with TUI";
};
iconTheme = lib.mkOption { iconTheme = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = "Breeze"; default = "Breeze";

View file

@ -1,4 +1,7 @@
{pkgs, ...}: { {pkgs, ...}: {
imports = [
./wayland-wm.nix
];
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
withUWSM = false; withUWSM = false;
@ -6,13 +9,10 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
caelestia-shell # caelestia-shell
mako
rofi
xdg-desktop-portal-wlr
xdg-desktop-portal-hyprland xdg-desktop-portal-hyprland
hyprpolkitagent hyprpolkitagent
cliphist
grimblast grimblast
xdg-desktop-portal-wlr
]; ];
} }

View file

@ -1,15 +1,13 @@
{pkgs, ...}: { {pkgs, ...}: {
imports = [
./wayland-wm.nix
];
programs.sway.enable = true; programs.sway.enable = true;
programs.sway.xwayland.enable = true; programs.sway.xwayland.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
swaybg swaybg
swayidle
dunst
rofi
rofimoji
rofi-power-menu
swaylock-effects
sway-contrib.grimshot sway-contrib.grimshot
waybar waybar
xdg-desktop-portal-wlr
]; ];
} }

View file

@ -4,5 +4,7 @@
defaultTerminal = "ghostty"; defaultTerminal = "ghostty";
defaultTerminalRunner = "alacritty"; defaultTerminalRunner = "alacritty";
iconTheme = "Papirus"; iconTheme = "Papirus";
defaultExplorer = "dolphin";
defaultTerminalExplorer = "yazi";
}; };
} }

View file

@ -0,0 +1,8 @@
{pkgs, ...}: {
home.packages = with pkgs; [
grimblast
];
imports = [
./packages.nix
];
}

View file

@ -0,0 +1,14 @@
{pkgs, ...}: {
imports = [
../../rofi.nix
./waybar.nix
];
home.packages = with pkgs; [
swayidle # Screensaver
dunst # Notification daemon
swaylock-effects # Screensaver
cliphist # Clipboard daemon
swww # Wallpaper daemon
pavucontrol
];
}

View file

@ -36,8 +36,10 @@ in {
home.packages = with pkgs; [ home.packages = with pkgs; [
grim grim
slurp slurp
grim
dunst
sway-contrib.grimshot sway-contrib.grimshot
]; ];
imports = [
./packages.nix
];
} }

View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
home.packages = with pkgs; [
waybar
pavucontrol
];
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
home.packages = with pkgs; [
rofi
rofimoji
rofi-power-menu
];
}

View file

@ -40,7 +40,7 @@
# Desktop Linux # Desktop Linux
./programs/desktop/plasma.nix ./programs/desktop/plasma.nix
./programs/desktop/sway.nix ./programs/desktop/wayland-wm/hyprland.nix
# General Program config # General Program config
../../modules/home/programs/eza.nix ../../modules/home/programs/eza.nix