Compare commits

..

2 Commits

Author SHA1 Message Date
79d3ca7ec4 更新gnome/docker配置 2025-05-07 15:20:28 +08:00
457028533e 更新hyprland配置 2025-05-07 15:16:40 +08:00
10 changed files with 87 additions and 41 deletions

View File

@@ -13,7 +13,6 @@
# You can also split up your configuration and import pieces of it here:
./core.nix
../modules/home/hyprland
../modules/home/vscode
../modules/home/zsh
../modules/home/xdg.nix

View File

@@ -79,15 +79,23 @@ bind = $mod, J, movefocus, d
# Resize windows
binde = $mod CONTROL, right, resizeactive, 10 0
binde = $mod CONTROL, H, 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, K, resizeactive, 0 -10
binde = $mod CONTROL, down, resizeactive, 0 10
binde = $mod CONTROL, J, resizeactive, 0 10
# Move Window with mod + SHIFT + arrow keys
bind = $mod SHIFT, left, movewindow, l
bind = $mod SHIFT, H, movewindow, l
bind = $mod SHIFT, right, movewindow, r
bind = $mod SHIFT, L, movewindow, r
bind = $mod SHIFT, up, movewindow, u
bind = $mod SHIFT, K, movewindow, u
bind = $mod SHIFT, down, movewindow, d
bind = $mod SHIFT, J, movewindow, d
# Move/resize windows with mod + LMB/RMB and dragging
bindm = $mod, mouse:272, movewindow
@@ -139,7 +147,7 @@ bind = $mod CONTROL, S, togglespecialworkspace,
# Scroll through existing workspaces with mod + scroll
bind = $mod CTRL, right, workspace, e+1
bind = $mod, mouse_up, 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

View 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

View File

@@ -37,4 +37,3 @@ windowrulev2 = opacity 0.80 0.70,class:^(blueman-manager)$
windowrulev2 = opacity 1.00 1.00,class:^(code)$
windowrulev2 = opacity 0.80 0.80,class:^(code-url-handler)$
windowrulev2 = opacity 0.50 0.50,class:^(kitty)$

View File

@@ -1,11 +1,27 @@
# vim:ft=kitty
# 背景透明度
background_opacity 0.6
## name: Catppuccin Latte 🐑
## author: Pocco81 (https://github.com/Pocco81)
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/latte.conf
## blurb: Soothing pastel theme for the high-spirited!
# 开启抗锯齿
enable_ligatures yes
# 开启字体平滑
font_antialias true
# 开启子像素渲染
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
@@ -77,12 +93,4 @@ color14 #179299
# white
color7 #ACB0BE
color15 #ACB0BE
# 终端兼容性设置
term xterm-256color
shell_integration no-rc
# 修复 SSH 退格键问题
map ctrl+h send_text all \x08
backspace_sends_backspace yes
color15 #ACB0BE

View File

@@ -10,10 +10,10 @@
"modules-left": [
"custom/lr",
"hyprland/workspaces",
"custom/rr",
"custom/lr",
"hyprland/window",
"custom/rr"
// "custom/lr",
// "hyprland/window",
// "custom/rr"
],
"modules-center": ["custom/lr", "clock", "custom/rr"],
"modules-right": [
@@ -76,7 +76,7 @@
"title<.*youtube.*>": "",
"rofi": "󱓞",
"kitty": "",
"org.gnome.Nautilus": "󰪶",
"nemo": "󰪶",
"wechat": "",
"wps": "󰈬",
"class<et>": "󰈛",

View File

@@ -35,15 +35,6 @@ in
programs = {
bash = {
initExtra = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ];
then
echo 'Welcome! '
fi
'';
};
swaylock.enable = true;
};

View File

@@ -8,22 +8,21 @@
environment = {
systemPackages = (with pkgs;[
gnome.gnome-tweaks
gnome-tweaks
gnome-shell-extensions
]) ++ (with pkgs.gnomeExtensions;[
dash-to-dock
captivate # cap button indicator
appindicator # tray icon
]);
gnome.excludePackages = (with pkgs; [
atomix # puzzle game
cheese # webcam tool
gnome-photos
gnome-tour
gnome-text-editor
]) ++ (with pkgs.gnome; [
atomix # puzzle game
cheese # webcam tool
epiphany # web browser
# geary # email reader
geary # email reader
evince # document viewer
gedit # text editor
gnome-contacts
@@ -39,6 +38,14 @@
tali # poker game
yelp # help viewer
]);
variables = {
"GTK_IM_MODULE" = "fcitx";
"QT_IM_MODULE" = "fcitx";
"XMODIFIERS" = "@im=fcitx";
"SDL_IM_MODULE" = "fcitx";
"GLFW_IM_MODULE" = "ibus";
};
};
}

View File

@@ -8,6 +8,7 @@
userland-proxy = false;
experimental = true;
ipv6 = true;
ip6tables = true;
fixed-cidr-v6 = "fd00::/80";
metrics-addr = "0.0.0.0:9323";
log-driver = "json-file";

View File

@@ -1,11 +1,10 @@
{ pkgs, ... }: {
{ self, pkgs, ... }: {
imports = [
./ssh
./hyprland.nix
];
home.packages = with pkgs; [
nextcloud-client
kodi-wayland
kodi
];
}