更新hyprland配置
This commit is contained in:
@@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user