Compare commits
2 Commits
c133e5637f
...
79d3ca7ec4
| Author | SHA1 | Date | |
|---|---|---|---|
| 79d3ca7ec4 | |||
| 457028533e |
@@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
# You can also split up your configuration and import pieces of it here:
|
# You can also split up your configuration and import pieces of it here:
|
||||||
./core.nix
|
./core.nix
|
||||||
../modules/home/hyprland
|
|
||||||
../modules/home/vscode
|
../modules/home/vscode
|
||||||
../modules/home/zsh
|
../modules/home/zsh
|
||||||
../modules/home/xdg.nix
|
../modules/home/xdg.nix
|
||||||
|
|||||||
@@ -79,15 +79,23 @@ bind = $mod, J, movefocus, d
|
|||||||
|
|
||||||
# Resize windows
|
# Resize windows
|
||||||
binde = $mod CONTROL, right, resizeactive, 10 0
|
binde = $mod CONTROL, right, resizeactive, 10 0
|
||||||
|
binde = $mod CONTROL, H, resizeactive, 10 0
|
||||||
binde = $mod CONTROL, left, resizeactive, -10 0
|
binde = $mod CONTROL, left, resizeactive, -10 0
|
||||||
|
binde = $mod CONTROL, L, resizeactive, -10 0
|
||||||
binde = $mod CONTROL, up, resizeactive, 0 -10
|
binde = $mod CONTROL, up, resizeactive, 0 -10
|
||||||
|
binde = $mod CONTROL, K, resizeactive, 0 -10
|
||||||
binde = $mod CONTROL, down, resizeactive, 0 10
|
binde = $mod CONTROL, down, resizeactive, 0 10
|
||||||
|
binde = $mod CONTROL, J, resizeactive, 0 10
|
||||||
|
|
||||||
# Move Window with mod + SHIFT + arrow keys
|
# Move Window with mod + SHIFT + arrow keys
|
||||||
bind = $mod SHIFT, left, movewindow, l
|
bind = $mod SHIFT, left, movewindow, l
|
||||||
|
bind = $mod SHIFT, H, movewindow, l
|
||||||
bind = $mod SHIFT, right, movewindow, r
|
bind = $mod SHIFT, right, movewindow, r
|
||||||
|
bind = $mod SHIFT, L, movewindow, r
|
||||||
bind = $mod SHIFT, up, movewindow, u
|
bind = $mod SHIFT, up, movewindow, u
|
||||||
|
bind = $mod SHIFT, K, movewindow, u
|
||||||
bind = $mod SHIFT, down, movewindow, d
|
bind = $mod SHIFT, down, movewindow, d
|
||||||
|
bind = $mod SHIFT, J, movewindow, d
|
||||||
|
|
||||||
# Move/resize windows with mod + LMB/RMB and dragging
|
# Move/resize windows with mod + LMB/RMB and dragging
|
||||||
bindm = $mod, mouse:272, movewindow
|
bindm = $mod, mouse:272, movewindow
|
||||||
@@ -139,7 +147,7 @@ bind = $mod CONTROL, S, togglespecialworkspace,
|
|||||||
|
|
||||||
# Scroll through existing workspaces with mod + scroll
|
# Scroll through existing workspaces with mod + scroll
|
||||||
bind = $mod CTRL, right, workspace, e+1
|
bind = $mod CTRL, right, workspace, e+1
|
||||||
bind = $mod, mouse_up, workspace, e+1
|
|
||||||
|
|
||||||
bind = $mod CTRL, left, workspace, e-1
|
bind = $mod CTRL, left, workspace, e-1
|
||||||
bind = $mod, mouse_down, workspace, e-1`
|
|
||||||
|
bind = $mod, TAB, exec, ~/.config/hypr/scripts/switch.sh
|
||||||
|
|||||||
34
modules/home/hyprland/conf/hypr/scripts/switch.sh
Executable file
34
modules/home/hyprland/conf/hypr/scripts/switch.sh
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# 获取窗口列表,格式为 "ADDRESS [Workspace] Class: Title"
|
||||||
|
# 使用 jq 解析 hyprctl clients -j 的 JSON 输出
|
||||||
|
# select(.workspace.id != -1) 过滤掉特殊工作区(如概览)的窗口
|
||||||
|
WINDOWS_LIST=$(hyprctl clients -j | jq -r '.[] | select(.workspace.id != -1) | "\(.address)\t[\(.workspace.name)] \(.class): \(.title)"')
|
||||||
|
|
||||||
|
# 如果没有窗口,显示提示并退出
|
||||||
|
if [ -z "$WINDOWS_LIST" ]; then
|
||||||
|
rofi -e "No open windows found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 使用 Rofi 显示窗口列表,允许用户选择
|
||||||
|
# -dmenu: dmenu 模式
|
||||||
|
# -i: 不区分大小写搜索
|
||||||
|
# -p: 提示符文本
|
||||||
|
# -markup-rows: (可选) 如果你想在列表中使用 Pango 标记
|
||||||
|
# -format 's': 输出选择的完整行
|
||||||
|
CHOSEN_WINDOW_LINE=$(echo -e "$WINDOWS_LIST" | rofi -dmenu -i -p " Switch Window" -format 's')
|
||||||
|
# 你可以使用其他图标,例如 或 Window:
|
||||||
|
|
||||||
|
# 如果用户取消了选择 (Rofi 返回空),则退出
|
||||||
|
if [ -z "$CHOSEN_WINDOW_LINE" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 从选择的行中提取窗口地址 (它是第一个字段,以制表符分隔)
|
||||||
|
CHOSEN_ADDRESS=$(echo "$CHOSEN_WINDOW_LINE" | awk -F'\t' '{print $1}')
|
||||||
|
|
||||||
|
# 使用 hyprctl 切换到选定的窗口
|
||||||
|
hyprctl dispatch focuswindow address:"$CHOSEN_ADDRESS"
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -37,4 +37,3 @@ windowrulev2 = opacity 0.80 0.70,class:^(blueman-manager)$
|
|||||||
|
|
||||||
windowrulev2 = opacity 1.00 1.00,class:^(code)$
|
windowrulev2 = opacity 1.00 1.00,class:^(code)$
|
||||||
windowrulev2 = opacity 0.80 0.80,class:^(code-url-handler)$
|
windowrulev2 = opacity 0.80 0.80,class:^(code-url-handler)$
|
||||||
windowrulev2 = opacity 0.50 0.50,class:^(kitty)$
|
|
||||||
|
|||||||
@@ -1,11 +1,27 @@
|
|||||||
# vim:ft=kitty
|
# 背景透明度
|
||||||
|
background_opacity 0.6
|
||||||
|
|
||||||
## name: Catppuccin Latte 🐑
|
# 开启抗锯齿
|
||||||
## author: Pocco81 (https://github.com/Pocco81)
|
enable_ligatures yes
|
||||||
## license: MIT
|
# 开启字体平滑
|
||||||
## upstream: https://github.com/catppuccin/kitty/blob/main/latte.conf
|
font_antialias true
|
||||||
## blurb: Soothing pastel theme for the high-spirited!
|
# 开启子像素渲染
|
||||||
|
font_hinting full
|
||||||
|
|
||||||
|
# 终端兼容性设置
|
||||||
|
term xterm-256color
|
||||||
|
shell_integration no-rc
|
||||||
|
|
||||||
|
# 修复 SSH 退格键问题
|
||||||
|
map ctrl+h send_text all \x08
|
||||||
|
backspace_sends_backspace yes
|
||||||
|
|
||||||
|
# 设置四周边距(单位:像素)
|
||||||
|
window_padding_width 8
|
||||||
|
|
||||||
|
map ctrl+shift+equal change_font_size all +1
|
||||||
|
map ctrl+shift+minus change_font_size all -1
|
||||||
|
map ctrl+shift+backspace change_font_size all 0
|
||||||
|
|
||||||
|
|
||||||
# The basic colors
|
# The basic colors
|
||||||
@@ -77,12 +93,4 @@ color14 #179299
|
|||||||
|
|
||||||
# white
|
# white
|
||||||
color7 #ACB0BE
|
color7 #ACB0BE
|
||||||
color15 #ACB0BE
|
color15 #ACB0BE
|
||||||
|
|
||||||
# 终端兼容性设置
|
|
||||||
term xterm-256color
|
|
||||||
shell_integration no-rc
|
|
||||||
|
|
||||||
# 修复 SSH 退格键问题
|
|
||||||
map ctrl+h send_text all \x08
|
|
||||||
backspace_sends_backspace yes
|
|
||||||
@@ -10,10 +10,10 @@
|
|||||||
"modules-left": [
|
"modules-left": [
|
||||||
"custom/lr",
|
"custom/lr",
|
||||||
"hyprland/workspaces",
|
"hyprland/workspaces",
|
||||||
"custom/rr",
|
|
||||||
"custom/lr",
|
|
||||||
"hyprland/window",
|
|
||||||
"custom/rr"
|
"custom/rr"
|
||||||
|
// "custom/lr",
|
||||||
|
// "hyprland/window",
|
||||||
|
// "custom/rr"
|
||||||
],
|
],
|
||||||
"modules-center": ["custom/lr", "clock", "custom/rr"],
|
"modules-center": ["custom/lr", "clock", "custom/rr"],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
"title<.*youtube.*>": "",
|
"title<.*youtube.*>": "",
|
||||||
"rofi": "",
|
"rofi": "",
|
||||||
"kitty": "",
|
"kitty": "",
|
||||||
"org.gnome.Nautilus": "",
|
"nemo": "",
|
||||||
"wechat": "",
|
"wechat": "",
|
||||||
"wps": "",
|
"wps": "",
|
||||||
"class<et>": "",
|
"class<et>": "",
|
||||||
|
|||||||
@@ -35,15 +35,6 @@ in
|
|||||||
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
bash = {
|
|
||||||
initExtra = ''
|
|
||||||
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ];
|
|
||||||
then
|
|
||||||
echo 'Welcome! '
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
swaylock.enable = true;
|
swaylock.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -8,22 +8,21 @@
|
|||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = (with pkgs;[
|
systemPackages = (with pkgs;[
|
||||||
gnome.gnome-tweaks
|
gnome-tweaks
|
||||||
|
gnome-shell-extensions
|
||||||
]) ++ (with pkgs.gnomeExtensions;[
|
]) ++ (with pkgs.gnomeExtensions;[
|
||||||
dash-to-dock
|
dash-to-dock
|
||||||
captivate # cap button indicator
|
|
||||||
appindicator # tray icon
|
appindicator # tray icon
|
||||||
]);
|
]);
|
||||||
|
|
||||||
gnome.excludePackages = (with pkgs; [
|
gnome.excludePackages = (with pkgs; [
|
||||||
|
atomix # puzzle game
|
||||||
|
cheese # webcam tool
|
||||||
gnome-photos
|
gnome-photos
|
||||||
gnome-tour
|
gnome-tour
|
||||||
gnome-text-editor
|
gnome-text-editor
|
||||||
]) ++ (with pkgs.gnome; [
|
|
||||||
atomix # puzzle game
|
|
||||||
cheese # webcam tool
|
|
||||||
epiphany # web browser
|
epiphany # web browser
|
||||||
# geary # email reader
|
geary # email reader
|
||||||
evince # document viewer
|
evince # document viewer
|
||||||
gedit # text editor
|
gedit # text editor
|
||||||
gnome-contacts
|
gnome-contacts
|
||||||
@@ -39,6 +38,14 @@
|
|||||||
tali # poker game
|
tali # poker game
|
||||||
yelp # help viewer
|
yelp # help viewer
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
variables = {
|
||||||
|
"GTK_IM_MODULE" = "fcitx";
|
||||||
|
"QT_IM_MODULE" = "fcitx";
|
||||||
|
"XMODIFIERS" = "@im=fcitx";
|
||||||
|
"SDL_IM_MODULE" = "fcitx";
|
||||||
|
"GLFW_IM_MODULE" = "ibus";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
userland-proxy = false;
|
userland-proxy = false;
|
||||||
experimental = true;
|
experimental = true;
|
||||||
ipv6 = true;
|
ipv6 = true;
|
||||||
|
ip6tables = true;
|
||||||
fixed-cidr-v6 = "fd00::/80";
|
fixed-cidr-v6 = "fd00::/80";
|
||||||
metrics-addr = "0.0.0.0:9323";
|
metrics-addr = "0.0.0.0:9323";
|
||||||
log-driver = "json-file";
|
log-driver = "json-file";
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
{ pkgs, ... }: {
|
{ self, pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./ssh
|
./ssh
|
||||||
./hyprland.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
kodi-wayland
|
kodi
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user