Compare commits

..

3 Commits

8 changed files with 166 additions and 24 deletions

View File

@@ -12,7 +12,7 @@
yarn
steam-run
jetbrains.idea-community
# jetbrains.idea-community # use prebuild binary
];
sessionVariables = {

View File

@@ -24,6 +24,7 @@ bind = $mainMod CTRL, L, exec, swaylock # lock screen
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, S, togglesplit, # split screen
bind = $mainMod, return, fullscreen, # toggle the window on focus to fullscreen
bind = $mainMod, F1, exec, ~/.config/hypr/scripts/keybinds.sh
# Application shortcuts
bind = $mainMod, grave, exec, $terminal # ~ open terminal
@@ -53,8 +54,8 @@ bind = , XF86AudioNext, exec, playerctl next
bind = , XF86AudioPrev, exec, playerctl previous
# Screenshot/screencapture
bind = , PRINT, exec, hyprshot -m window
bind = ALT, PRINT, exec, hyprshot -m region
bind = , PRINT, exec, hyprshot -zm window
bind = ALT, PRINT, exec, hyprshot -zm region
################################################

View File

@@ -0,0 +1,12 @@
#!/usr/bin/env sh
# 简单示例:从 hyprland.conf 提取非注释的 bind= 行
# 注意:这可能需要根据你的配置复杂性进行调整(例如处理逗号后的空格、多行绑定等)
grep '^bind =' ~/.config/hypr/keybindings.conf | \
sed 's/^bind = //; s/, /\t/' | \
# 可以进一步处理,比如移除 exec 后面的命令细节,只留动作描述
# sed -E 's/,(.+)/ : \1/' | # 简单替换
column -t -s $'\t' | \
rofi -dmenu -i -p "Hyprland Keybinds" -markup-rows -config ~/.config/rofi/config-keybinds.rasi
# 或者使用 wofi:
# wofi --dmenu --prompt "Hyprland Keybinds" --insensitive

View File

@@ -10,8 +10,8 @@
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# Float rules for system dialogs and popups
windowrulev2 = float,class:^(.*)$,title:^(Open [Ff]ile)
windowrulev2 = center,class:^(.*)$,title:^(Open [Ff]ile)
windowrulev2 = float,class:^(.*)$,title:^(Open [Ff]iles?)
windowrulev2 = center,class:^(.*)$,title:^(Open [Ff]iles?)
windowrulev2 = float,class:^(.*)$,title:^(Open [Ff]older)
windowrulev2 = center,class:^(.*)$,title:^(Open [Ff]older)
@@ -35,6 +35,6 @@ windowrulev2 = float,class:^(blueman-manager)$
windowrulev2 = opacity 0.80 0.70,class:^(blueman-manager)$
windowrulev2 = opacity 0.50 0.50,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:^(kitty)$
windowrulev2 = opacity 0.50 0.50,class:^(kitty)$

View File

@@ -33,8 +33,8 @@ configuration {
window {
background-color: @bg0;
location: center;
width: 560px;
height: 450px;
width: 720px;
height: 500px;
border-radius: 8px;
border: 1px;
border-color: @bg1;

View File

@@ -79,7 +79,8 @@
"org.gnome.Nautilus": "󰪶",
"wechat": "",
"wps": "󰈬",
"class<et>": "󰈛"
"class<et>": "󰈛",
"vlc": "󰕼"
}
},

View File

@@ -1,14 +1,14 @@
{ lib, ... }:
{ lib, pkgs, ... }:
{
imports = [
./boot.nix
./system.nix
./nixld.nix
];
programs = {
git.enable = true;
dconf.enable = true;
nix-ld.enable = true;
};
# Configure firewall
@@ -19,19 +19,22 @@
};
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "zh_CN.UTF-8";
LC_IDENTIFICATION = "zh_CN.UTF-8";
LC_MEASUREMENT = "zh_CN.UTF-8";
LC_MONETARY = "zh_CN.UTF-8";
LC_NAME = "zh_CN.UTF-8";
LC_NUMERIC = "zh_CN.UTF-8";
LC_PAPER = "zh_CN.UTF-8";
LC_TELEPHONE = "zh_CN.UTF-8";
LC_TIME = "zh_CN.UTF-8";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "zh_CN.UTF-8";
LC_IDENTIFICATION = "zh_CN.UTF-8";
LC_MEASUREMENT = "zh_CN.UTF-8";
LC_MONETARY = "zh_CN.UTF-8";
LC_NAME = "zh_CN.UTF-8";
LC_NUMERIC = "zh_CN.UTF-8";
LC_PAPER = "zh_CN.UTF-8";
LC_TELEPHONE = "zh_CN.UTF-8";
LC_TIME = "zh_CN.UTF-8";
};
};
time.timeZone = "Asia/Shanghai";
systemd.coredump.enable = true;
}

View File

@@ -0,0 +1,125 @@
{ pkgs, ... }:
{
programs = {
# Allow to run prebuild binary app
nix-ld = {
enable = true;
libraries = with pkgs; [
SDL # 简单直接媒体层,用于图形、音频、输入等的跨平台库
SDL2 # SDL的第二个主要版本提供更多功能
SDL2_image # SDL2的图像加载库支持多种图像格式
SDL2_mixer # SDL2的音频混合库用于播放多种音频格式
SDL2_ttf # SDL2的TrueType字体渲染库
SDL_image # SDL1的图像加载库
SDL_mixer # SDL1的音频混合库
SDL_ttf # SDL1的TrueType字体渲染库
alsa-lib # 高级Linux声音架构库提供音频功能
at-spi2-atk # 辅助技术服务提供者接口连接ATK和AT-SPI
at-spi2-core # 辅助技术服务提供者接口核心组件
atk # 辅助技术工具包,提供辅助功能支持
bzip2 # 高质量的数据压缩库
cairo # 2D图形渲染库支持多种输出设备
cups # 通用Unix打印系统提供打印功能
curlWithGnuTls # 使用GnuTLS的URL传输库用于网络请求
dbus # 进程间通信系统,用于应用程序之间的通信
dbus-glib # D-Bus的GLib绑定
desktop-file-utils # 用于处理桌面条目文件的工具
e2fsprogs # ext2/3/4文件系统工具
expat # XML解析库
flac # 无损音频编解码器
fontconfig # 字体配置和自定义库
freeglut # OpenGL实用工具包用于创建OpenGL上下文
freetype # 字体渲染引擎
fribidi # Unicode双向文本算法实现
fuse # 用户空间文件系统接口
fuse3 # FUSE的第3版用户空间文件系统接口
gdk-pixbuf # 图像加载库GNOME的一部分
glew110 # OpenGL扩展加载库1.10版本
glib # 通用工具库,提供数据结构处理、移植等功能
gmp # GNU多精度算术库
gst_all_1.gst-plugins-base # GStreamer基础插件集
gst_all_1.gst-plugins-ugly # GStreamer非自由插件集
gst_all_1.gstreamer # 多媒体框架
gtk2 # 图形用户界面工具包第2版
gtk3 # 图形用户界面工具包第2版
harfbuzz # 文本整形引擎
icu # 国际化组件提供Unicode和全球化支持
keyutils.lib # Linux密钥管理工具库
libGL # OpenGL库
libGLU # OpenGL实用工具库
libappindicator-gtk2 # 应用程序指示器库,用于系统托盘图标
libcaca # 彩色ASCII艺术库
libcanberra # 声音主题规范的实现
libcap # POSIX能力库
libclang.lib # Clang编译器库
libdbusmenu # D-Bus菜单库
libdrm # 直接渲染管理器库
libgbm # Open source 3D graphics library
libgcrypt # GNU加密库
libgpg-error # GnuPG错误报告库
libidn # 国际化域名库
libjack2 # JACK音频连接套件第2版
libjpeg # JPEG图像编解码库
libmikmod # 模块音乐库
libogg # Ogg多媒体容器格式库
libpng12 # PNG图像编解码库1.2版本
librsvg # SVG渲染库
libsamplerate # 音频采样率转换库
libthai # 泰语支持库
libtheora # Theora视频编解码库
libtiff # TIFF图像编解码库
libudev0-shim # 旧版udev库兼容层
libusb1 # USB设备访问库
libuuid # UUID生成和解析库
libvdpau # 视频解码和呈现API
libvorbis # Vorbis音频编解码库
libvpx # VP8/VP9视频编解码库
libxcrypt-legacy # 旧版密码哈希库
libxkbcommon # 键盘处理库
libxml2 # XML解析和生成库
mesa # 开源OpenGL实现
nspr # Netscape可移植运行时
nss # 网络安全服务
openssl # 安全套接字层库
p11-kit # PKCS#11模块加载库
pango # 文本布局和渲染库
pixman # 像素操作库
python3 # Python编程语言解释器
speex # 语音压缩格式
stdenv.cc.cc # 标准C编译器
tbb # 英特尔线程构建块库
udev # 设备管理器
vulkan-loader # Vulkan图形API加载器
wayland # 显示服务器协议
xorg.libICE # X11 Inter-Client Exchange库
xorg.libSM # X11会话管理库
xorg.libX11 # X11客户端库
xorg.libXScrnSaver # X11屏幕保护扩展库
xorg.libXcomposite # X11合成扩展库
xorg.libXcursor # X11光标管理库
xorg.libXdamage # X11损坏扩展库
xorg.libXext # X11通用扩展库
xorg.libXfixes # X11修复扩展库
xorg.libXft # X11 FreeType接口库
xorg.libXi # X11输入扩展库
xorg.libXinerama # X11多显示器扩展库
xorg.libXmu # X11杂项实用工具库
xorg.libXrandr # X11调整大小和旋转扩展库
xorg.libXrender # X11渲染扩展库
xorg.libXt # X11工具包内省库
xorg.libXtst # X11测试扩展库
xorg.libXxf86vm # X11 XFree86视频模式扩展库
xorg.libpciaccess # X11 PCI访问库
xorg.libxcb # X11 C绑定库
xorg.xcbutil # XCB实用工具库
xorg.xcbutilimage # XCB图像实用工具库
xorg.xcbutilkeysyms # XCB键符号实用工具库
xorg.xcbutilrenderutil # XCB渲染实用工具库
xorg.xcbutilwm # XCB窗口管理实用工具库
xorg.xkeyboardconfig # X11键盘配置数据库
xz # LZMA压缩工具
zlib # 通用数据压缩库
];
};
};
}