mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
use hypr under nvidia
This commit is contained in:
parent
59328ad384
commit
64d100c252
19 changed files with 125 additions and 67 deletions
|
|
@ -15,7 +15,7 @@
|
|||
# #######################################################################################
|
||||
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
$terminal = kitty
|
||||
$terminal = ghostty
|
||||
$fileManager = dolphin
|
||||
$menu = rofi
|
||||
$iconTheme = Papirus
|
||||
|
|
@ -85,8 +85,6 @@ exec-once = fcitx5 &
|
|||
# Clipboard history (called by wofi)
|
||||
exec-once = wl-paste --watch cliphist store
|
||||
# exec-once = QT_SCALE_FACTOR=1 albert &
|
||||
# Bluetooth Manager
|
||||
exec-once = blueman-applet &
|
||||
|
||||
|
||||
|
||||
|
|
@ -236,10 +234,10 @@ input {
|
|||
|
||||
# gesture = 4, horizontal, workspace
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#gestures
|
||||
gestures {
|
||||
workspace_swipe = true
|
||||
workspace_swipe_fingers = 4
|
||||
}
|
||||
# gestures {
|
||||
# workspace_swipe = true
|
||||
# workspace_swipe_fingers = 4
|
||||
# }
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
## Open Applications
|
||||
bind = $mainMod, R, exec, $terminal
|
||||
bind = $mainMod, return, exec, $terminal
|
||||
bind = $mainMod, Q, killactive,
|
||||
# bind = $mainMod, M, exit
|
||||
bind = $mainMod SHIFT, F, exec, hyprctl --batch "dispatch togglefloating ; dispatch resizeactive exact 1440 810 ; dispatch centerwindow 1;"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
// "~/.config/waybar/modules/niri.jsonc"
|
||||
],
|
||||
// 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-right": ["tray", "pulseaudio", "cpu", "memory", "network", "battery", "clock"],
|
||||
// "modules-right": ["cpu", "memory", "battery", "network", "tray"],
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ case "$(uname)" in
|
|||
# ;;
|
||||
esac
|
||||
|
||||
for file in $DOTFILES/tools/zsh/mod/*.zsh; do
|
||||
for file in $DOTFILES/home/dot_config/zsh/mod/*.zsh; do
|
||||
source $file
|
||||
done
|
||||
|
||||
|
|
|
|||
20
home/dot_config/zsh/mod/completion.zsh
Normal file
20
home/dot_config/zsh/mod/completion.zsh
Normal 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
|
||||
|
||||
|
|
@ -9,8 +9,15 @@ HIST_STAMPS="yyyy-mm-dd"
|
|||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
|
||||
export LANG=zh_CN.UTF-8
|
||||
export LC_ALL=zh_CN.UTF-8
|
||||
setopt INTERACTIVE_COMMENTS # Allow comments in interactive mode
|
||||
|
||||
# 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 手动管理插件
|
||||
# Load zsh-syntax-highlighting before zsh-history-substring-search
|
||||
|
|
|
|||
|
|
@ -3,49 +3,25 @@
|
|||
# Author: js0ny
|
||||
# Sourced by user's zshrc 在用户的 zshrc 中被引用
|
||||
|
||||
# read key: `fish_key_reader`
|
||||
# read key: `read`
|
||||
# get current bindings: `bindkey`
|
||||
|
||||
bindkey -v # Vi Keybindings
|
||||
# bindkey -v # Vi Keybindings
|
||||
|
||||
# Colemak hnei
|
||||
# ^
|
||||
# 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
|
||||
bindkey '^H' backward-kill-word # Ctrl-Backspace
|
||||
bindkey '^[^?' backward-kill-line # Alt-Backspace
|
||||
|
||||
# Emacs Hybrid
|
||||
bindkey '^A' beginning-of-line
|
||||
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 '^[[1;5D' backward-word # Ctrl-Left
|
||||
bindkey '^[[1;5C' forward-word # Ctrl-Right
|
||||
|
||||
bindkey -M viins '^?' backward-delete-char
|
||||
# LEADER CONVENTION
|
||||
# ^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
|
||||
# SPC defines as a prefix key in nvim
|
||||
bindkey '^[[1;3D' beginning-of-line # Alt-Left
|
||||
bindkey '^[[1;3C' end-of-line # Alt-Right
|
||||
|
||||
|
||||
bindkey '^[[H' beginning-of-line # Home
|
||||
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
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
# desktop environment and display manager
|
||||
../../modules/nixos/desktop/dm/sddm.nix
|
||||
../../modules/nixos/desktop/de/kde.nix
|
||||
../../modules/nixos/desktop/de/sway.nix
|
||||
../../modules/nixos/desktop/de/hyprland.nix
|
||||
|
||||
# desktop programs
|
||||
../../modules/nixos/programs/zsh.nix
|
||||
|
|
@ -51,6 +51,13 @@
|
|||
# Use unfree software
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
memoryPercent = 10;
|
||||
algorithm = "lz4";
|
||||
priority = 100;
|
||||
};
|
||||
|
||||
# Disable modem
|
||||
networking.modemmanager.enable = false;
|
||||
services.flatpak.enable = true;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,18 @@
|
|||
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 {
|
||||
type = lib.types.str;
|
||||
default = "Breeze";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./wayland-wm.nix
|
||||
];
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = false;
|
||||
|
|
@ -6,13 +9,10 @@
|
|||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
caelestia-shell
|
||||
mako
|
||||
rofi
|
||||
xdg-desktop-portal-wlr
|
||||
# caelestia-shell
|
||||
xdg-desktop-portal-hyprland
|
||||
hyprpolkitagent
|
||||
cliphist
|
||||
grimblast
|
||||
xdg-desktop-portal-wlr
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./wayland-wm.nix
|
||||
];
|
||||
programs.sway.enable = true;
|
||||
programs.sway.xwayland.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
swaybg
|
||||
swayidle
|
||||
dunst
|
||||
rofi
|
||||
rofimoji
|
||||
rofi-power-menu
|
||||
swaylock-effects
|
||||
sway-contrib.grimshot
|
||||
waybar
|
||||
xdg-desktop-portal-wlr
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,5 +4,7 @@
|
|||
defaultTerminal = "ghostty";
|
||||
defaultTerminalRunner = "alacritty";
|
||||
iconTheme = "Papirus";
|
||||
defaultExplorer = "dolphin";
|
||||
defaultTerminalExplorer = "yazi";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
grimblast
|
||||
];
|
||||
imports = [
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
14
nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix
Normal file
14
nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix
Normal 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
|
||||
];
|
||||
}
|
||||
|
|
@ -36,8 +36,10 @@ in {
|
|||
home.packages = with pkgs; [
|
||||
grim
|
||||
slurp
|
||||
grim
|
||||
dunst
|
||||
sway-contrib.grimshot
|
||||
];
|
||||
|
||||
imports = [
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
waybar
|
||||
pavucontrol
|
||||
];
|
||||
}
|
||||
7
nixcfgs/users/js0ny/programs/rofi.nix
Normal file
7
nixcfgs/users/js0ny/programs/rofi.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
rofi
|
||||
rofimoji
|
||||
rofi-power-menu
|
||||
];
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
# Desktop Linux
|
||||
./programs/desktop/plasma.nix
|
||||
./programs/desktop/sway.nix
|
||||
./programs/desktop/wayland-wm/hyprland.nix
|
||||
|
||||
# General Program config
|
||||
../../modules/home/programs/eza.nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue