修改配置方式,删除多余的wlogout配置

This commit is contained in:
2025-04-27 18:32:38 +08:00
parent 992fee7199
commit a07936cff7
26 changed files with 82 additions and 269 deletions

View File

@@ -6,7 +6,6 @@
username = "alex"; username = "alex";
useremail = "reizero@live.com"; useremail = "reizero@live.com";
hostname = "luna"; hostname = "luna";
sysversion = "24.11";
libs = import ./libs; libs = import ./libs;
in in
rec { rec {
@@ -21,7 +20,7 @@
(profile: { (profile: {
name = profile; name = profile;
value = import ./profiles/${profile} { value = import ./profiles/${profile} {
inherit self libs inputs outputs username useremail sysversion; inherit self libs inputs outputs username useremail;
}; };
}) })
(attrNames (readDir ./profiles)) (attrNames (readDir ./profiles))
@@ -34,8 +33,9 @@
"${username}" = home-manager-unstable.lib.homeManagerConfiguration { "${username}" = home-manager-unstable.lib.homeManagerConfiguration {
pkgs = nixpkgs-unstable.packages.x86_64-linux; # Home-manager requires 'pkgs' instance pkgs = nixpkgs-unstable.packages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs outputs username useremail sysversion; inherit inputs outputs username useremail;
hyprland = inputs.hyprland; hyprland = inputs.hyprland;
sysversion = "unstable";
}; };
modules = [ modules = [
# > Our main home-manager configuration file < # > Our main home-manager configuration file <

View File

@@ -20,7 +20,7 @@ $filemanager = dolphin
bind = $mainMod, Q, exec, ~/.config/hypr/scripts/dontkillsteam.sh # killactive, # kill the window on focus bind = $mainMod, Q, exec, ~/.config/hypr/scripts/dontkillsteam.sh # killactive, # kill the window on focus
bind = $mainMod CTRL, delete, exit, # kill hyperland session bind = $mainMod CTRL, delete, exit, # kill hyperland session
bind = $mainMod, F, togglefloating, # toggle the window on focus to float bind = $mainMod, F, togglefloating, # toggle the window on focus to float
bind = $mainMod, L, exec, swaylock # lock screen bind = $mainMod CTRL, L, exec, swaylock # lock screen
bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, S, togglesplit, # split screen bind = $mainMod, S, togglesplit, # split screen
bind = $mainMod, return, fullscreen, # toggle the window on focus to fullscreen bind = $mainMod, return, fullscreen, # toggle the window on focus to fullscreen

View File

@@ -47,7 +47,7 @@
"custom/power": { "custom/power": {
"format": "{}", "format": "{}",
"exec": "echo ; echo  logout", "exec": "echo ; echo  logout",
"on-click": "~/.config/hypr/scripts/logoutlaunch.sh 2", "on-click": "wlogout",
"interval": 86400, // once every day "interval": 86400, // once every day
"tooltip": true "tooltip": true
}, },
@@ -98,15 +98,34 @@
"clock": { "clock": {
"format": "{:%Y/%m/%d %H:%M}", "format": "{:%Y/%m/%d %H:%M}",
"format-alt": "{:%I:%M%p 周%u}", "format-alt": "{:L%A, %B %d %Y (%R)} ",
"tooltip-format": "<tt><big>{calendar}</big></tt>", "timezones": ["Asia/Shanghai"],
"locale": "zh_CN.UTF-8" "calendar": {
"mode": "year",
"mode-mon-col": 3,
"weeks-pos": "right",
"on-scroll": 1,
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"days": "<span color='#ecc6d9'><b>{}</b></span>",
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right": "mode",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
},
"tooltip-format": "<span size='9pt' font='WenQuanYi Zen Hei Mono'><tt>{calendar}</tt></span>",
"locale": "en_US.UTF-8"
}, },
"wlr/taskbar": { "wlr/taskbar": {
"format": "{icon}", "format": "{icon}",
"icon-size": 14, "icon-size": 14,
"icon-theme": "papirus-icon-theme", "icon-theme": "Papirus-Dark",
"spacing": 0, "spacing": 0,
"tooltip-format": "{title}", "tooltip-format": "{title}",
"on-click": "activate", "on-click": "activate",

View File

@@ -120,7 +120,7 @@ tooltip {
color: @main-color; color: @main-color;
background: @main-bg; background: @main-bg;
opacity: 1; opacity: 1;
margin: 4px 0px 4px 0px; margin: 2px 0px 2px 0px;
padding-left: 4px; padding-left: 4px;
padding-right: 4px; padding-right: 4px;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -4,38 +4,33 @@
"text" : "Lock", "text" : "Lock",
"keybind" : "l" "keybind" : "l"
} }
{
"label" : "logout",
"action" : "hyprctl dispatch exit 0",
"text" : "Logout",
"keybind" : "e"
}
{
"label" : "suspend",
"action" : "systemctl suspend",
"text" : "Suspend",
"keybind" : "u"
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "Shutdown",
"keybind" : "s"
}
{ {
"label" : "hibernate", "label" : "hibernate",
"action" : "systemctl hibernate", "action" : "systemctl hibernate",
"text" : "Hibernate", "text" : "Hibernate",
"keybind" : "h" "keybind" : "h"
} }
{
"label" : "logout",
"action" : "loginctl terminate-user $USER",
"text" : "Logout",
"keybind" : "e"
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "Shutdown",
"keybind" : "s"
}
{
"label" : "suspend",
"action" : "systemctl suspend",
"text" : "Suspend",
"keybind" : "u"
}
{ {
"label" : "reboot", "label" : "reboot",
"action" : "systemctl reboot", "action" : "systemctl reboot",
"text" : "Reboot", "text" : "Reboot",
"keybind" : "r" "keybind" : "r"
} }

View File

@@ -1,27 +0,0 @@
{
"label" : "lock",
"action" : "swaylock",
"text" : "Lock",
"keybind" : "l"
}
{
"label" : "logout",
"action" : "hyprctl dispatch exit 0",
"text" : "Logout",
"keybind" : "e"
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "Shutdown",
"keybind" : "s"
}
{
"label" : "reboot",
"action" : "systemctl reboot",
"text" : "Reboot",
"keybind" : "r"
}

View File

@@ -1,104 +0,0 @@
* {
background-image: none;
font-size: ${fntSize}px;
}
@import "${wbarTheme}";
window {
background-color: ${WindBg};
}
button {
color: ${BtnCol};
background-color: @main-${BtnBkg};
outline-style: none;
border: none;
border-width: 0px;
background-repeat: no-repeat;
background-position: center;
background-size: 20%;
border-radius: 0px;
box-shadow: none;
text-shadow: none;
animation: gradient_f 20s ease-in infinite;
}
button:focus {
background-color: @wb-act-bg;
background-size: 30%;
}
button:hover {
background-color: @wb-hvr-bg;
background-size: 40%;
border-radius: ${active_rad}px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
}
button:hover#lock {
border-radius: ${active_rad}px;
margin : ${hvr}px 0px ${hvr}px ${mgn}px;
}
button:hover#logout {
border-radius: ${active_rad}px;
margin : ${hvr}px 0px ${hvr}px 0px;
}
button:hover#suspend {
border-radius: ${active_rad}px;
margin : ${hvr}px 0px ${hvr}px 0px;
}
button:hover#shutdown {
border-radius: ${active_rad}px;
margin : ${hvr}px 0px ${hvr}px 0px;
}
button:hover#hibernate {
border-radius: ${active_rad}px;
margin : ${hvr}px 0px ${hvr}px 0px;
}
button:hover#reboot {
border-radius: ${active_rad}px;
margin : ${hvr}px ${mgn}px ${hvr}px 0px;
}
#lock {
background-image: image(url("$HOME/.config/wlogout/icons/lock_${csMode}.png"), url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png"));
border-radius: ${button_rad}px 0px 0px ${button_rad}px;
margin : ${mgn}px 0px ${mgn}px ${mgn}px;
}
#logout {
background-image: image(url("$HOME/.config/wlogout/icons/logout_${csMode}.png"), url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png"));
border-radius: 0px 0px 0px 0px;
margin : ${mgn}px 0px ${mgn}px 0px;
}
#suspend {
background-image: image(url("$HOME/.config/wlogout/icons/suspend_${csMode}.png"), url("/usr/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png"));
border-radius: 0px 0px 0px 0px;
margin : ${mgn}px 0px ${mgn}px 0px;
}
#shutdown {
background-image: image(url("$HOME/.config/wlogout/icons/shutdown_${csMode}.png"), url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png"));
border-radius: 0px 0px 0px 0px;
margin : ${mgn}px 0px ${mgn}px 0px;
}
#hibernate {
background-image: image(url("$HOME/.config/wlogout/icons/hibernate_${csMode}.png"), url("/usr/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png"));
border-radius: 0px 0px 0px 0px;
margin : ${mgn}px 0px ${mgn}px 0px;
}
#reboot {
background-image: image(url("$HOME/.config/wlogout/icons/reboot_${csMode}.png"), url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png"));
border-radius: 0px ${button_rad}px ${button_rad}px 0px;
margin : ${mgn}px ${mgn}px ${mgn}px 0px;
}

View File

@@ -1,82 +0,0 @@
* {
background-image: none;
font-size: ${fntSize}px;
}
@import "${wbarTheme}";
window {
background-color: ${WindBg};
}
button {
color: ${BtnCol};
background-color: @main-${BtnBkg};
outline-style: none;
border: none;
border-width: 0px;
background-repeat: no-repeat;
background-position: center;
background-size: 10%;
border-radius: 0px;
box-shadow: none;
text-shadow: none;
animation: gradient_f 20s ease-in infinite;
}
button:focus {
background-color: @wb-act-bg;
background-size: 20%;
}
button:hover {
background-color: @wb-hvr-bg;
background-size: 25%;
border-radius: ${active_rad}px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
}
button:hover#lock {
border-radius: ${active_rad}px ${active_rad}px 0px ${active_rad}px;
margin : ${hvr}px 0px 0px ${hvr2}px;
}
button:hover#logout {
border-radius: ${active_rad}px 0px ${active_rad}px ${active_rad}px;
margin : 0px 0px ${hvr}px ${hvr2}px;
}
button:hover#shutdown {
border-radius: ${active_rad}px ${active_rad}px ${active_rad}px 0px;
margin : ${hvr}px ${hvr2}px 0px 0px;
}
button:hover#reboot {
border-radius: 0px ${active_rad}px ${active_rad}px ${active_rad}px;
margin : 0px ${hvr2}px ${hvr}px 0px;
}
#lock {
background-image: image(url("$HOME/.config/wlogout/icons/lock_${csMode}.png"), url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png"));
border-radius: ${button_rad}px 0px 0px 0px;
margin : ${mgn}px 0px 0px ${mgn2}px;
}
#logout {
background-image: image(url("$HOME/.config/wlogout/icons/logout_${csMode}.png"), url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png"));
border-radius: 0px 0px 0px ${button_rad}px;
margin : 0px 0px ${mgn}px ${mgn2}px;
}
#shutdown {
background-image: image(url("$HOME/.config/wlogout/icons/shutdown_${csMode}.png"), url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png"));
border-radius: 0px ${button_rad}px 0px 0px;
margin : ${mgn}px ${mgn2}px 0px 0px;
}
#reboot {
background-image: image(url("$HOME/.config/wlogout/icons/reboot_${csMode}.png"), url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png"));
border-radius: 0px 0px ${button_rad}px 0px;
margin : 0px ${mgn2}px ${mgn}px 0px;
}

View File

@@ -12,7 +12,7 @@
}; };
# Configure firewall # Configure firewall
networking.firewall = lib.mkDefault { networking.firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 22 80 443 ]; # 根据需要调整 allowedTCPPorts = [ 22 80 443 ]; # 根据需要调整
allowedUDPPorts = [ 9 53 ]; # 9: wol, 53: dns allowedUDPPorts = [ 9 53 ]; # 9: wol, 53: dns

View File

@@ -18,9 +18,9 @@
# Noto 系列字体是 Google 主导的名字的含义是「没有豆腐」qno tofu因为缺字时显示的方框或者方框被叫作 tofu # Noto 系列字体是 Google 主导的名字的含义是「没有豆腐」qno tofu因为缺字时显示的方框或者方框被叫作 tofu
# Noto 系列字族名只支持英文,命名规则是 Noto + Sans 或 Serif + 文字名称。 # Noto 系列字族名只支持英文,命名规则是 Noto + Sans 或 Serif + 文字名称。
# 其中汉字部分叫 Noto Sans/Serif CJK SC/TC/HK/JP/KR最后一个词是地区变种。 # 其中汉字部分叫 Noto Sans/Serif CJK SC/TC/HK/JP/KR最后一个词是地区变种。
noto-fonts # 大部分文字的常见样式,不包含汉字 # noto-fonts # 大部分文字的常见样式,不包含汉字
noto-fonts-cjk-sans # 汉字部分 # noto-fonts-cjk-sans # 汉字部分
noto-fonts-color-emoji # 彩色的表情符号字体 # noto-fonts-color-emoji # 彩色的表情符号字体
# 思源系列字体是 Adobe 主导的。其中汉字部分被称为「思源黑体」和「思源宋体」,是由 Adobe + Google 共同开发的 # 思源系列字体是 Adobe 主导的。其中汉字部分被称为「思源黑体」和「思源宋体」,是由 Adobe + Google 共同开发的
source-sans # 无衬线字体,不含汉字。字族名叫 Source Sans 3 和 Source Sans Pro以及带字重的变体加上 Source Sans 3 VF source-sans # 无衬线字体,不含汉字。字族名叫 Source Sans 3 和 Source Sans Pro以及带字重的变体加上 Source Sans 3 VF
@@ -28,6 +28,8 @@
source-han-sans # 思源黑体 source-han-sans # 思源黑体
source-han-serif # 思源宋体 source-han-serif # 思源宋体
# wqy_zenhei # 文泉驿正黑
# nerdfonts # nerdfonts
nerd-fonts.jetbrains-mono nerd-fonts.jetbrains-mono
# (nerdfonts.override { # (nerdfonts.override {

View File

@@ -4,7 +4,8 @@ let
# nixpkgs = inputs.nixpkgs; # nixpkgs = inputs.nixpkgs;
nixpkgs = inputs.nixpkgs-unstable; # 如果需要使用unstable版本取消这行注释并注释上一行 nixpkgs = inputs.nixpkgs-unstable; # 如果需要使用unstable版本取消这行注释并注释上一行
home-manager = inputs.home-manager-unstable; home-manager = inputs.home-manager-unstable;
sysArgs = args // { inherit home-manager; }; sysversion = "25.05";
sysArgs = args // { inherit home-manager sysversion; };
in in
# 使用libs.mkNixosSystem创建nixosSystem # 使用libs.mkNixosSystem创建nixosSystem
libs.mkNixosSystem { libs.mkNixosSystem {

View File

@@ -3,7 +3,7 @@
hostId = "6fa8b74d"; hostId = "6fa8b74d";
hostName = "${hostname}"; hostName = "${hostname}";
wireless.enable = false; # Enables wireless support via wpa_supplicant. # wireless.enable = false; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary # Configure network proxy if necessary
# proxy.default = "http://user:password@proxy:port/"; # proxy.default = "http://user:password@proxy:port/";
@@ -15,14 +15,20 @@
enableIPv6 = true; enableIPv6 = true;
bridges = { # bridges = {
br0 = { interfaces = [ "eno1" ]; }; # br0 = { interfaces = [ "eno1" ]; };
}; # };
# Set up bridge network # Set up bridge network
interfaces = { interfaces = {
eno1 = { eno1 = {
useDHCP = false; useDHCP = false;
ipv4.addresses = [
{
address = "10.7.43.10";
prefixLength = 24;
}
];
wakeOnLan = { wakeOnLan = {
enable = true; enable = true;
policy = [ policy = [
@@ -31,20 +37,21 @@
}; };
}; };
br0 = { # br0 = {
useDHCP = false; # useDHCP = false;
ipv4.addresses = [ # ipv4.addresses = [
{ # {
address = "10.7.43.10"; # address = "10.7.43.10";
prefixLength = 24; # prefixLength = 24;
} # }
]; # ];
}; # };
}; };
defaultGateway = { defaultGateway = {
address = "10.7.43.30"; address = "10.7.43.1";
interface = "br0"; interface = "eno1";
# interface = "br0";
}; };
nameservers = [ "10.7.43.1" ]; nameservers = [ "10.7.43.1" ];
}; };

View File

@@ -4,7 +4,8 @@ let
# nixpkgs = inputs.nixpkgs; # nixpkgs = inputs.nixpkgs;
nixpkgs = inputs.nixpkgs-unstable; # 如果需要使用unstable版本取消这行注释并注释上一行 nixpkgs = inputs.nixpkgs-unstable; # 如果需要使用unstable版本取消这行注释并注释上一行
home-manager = inputs.home-manager-unstable; home-manager = inputs.home-manager-unstable;
sysArgs = args // { inherit home-manager; }; sysversion = "25.05";
sysArgs = args // { inherit home-manager sysversion; };
in in
# 使用libs.mkNixosSystem创建nixosSystem # 使用libs.mkNixosSystem创建nixosSystem
libs.mkNixosSystem { libs.mkNixosSystem {

View File

@@ -4,7 +4,8 @@ let
# nixpkgs = inputs.nixpkgs; # nixpkgs = inputs.nixpkgs;
nixpkgs = inputs.nixpkgs-unstable; # 如果需要使用unstable版本取消这行注释并注释上一行 nixpkgs = inputs.nixpkgs-unstable; # 如果需要使用unstable版本取消这行注释并注释上一行
home-manager = inputs.home-manager-unstable; home-manager = inputs.home-manager-unstable;
sysArgs = args // { inherit home-manager; }; sysversion = "25.05";
sysArgs = args // { inherit home-manager sysversion; };
in in
# 使用libs.mkNixosSystem创建nixosSystem # 使用libs.mkNixosSystem创建nixosSystem
libs.mkNixosSystem { libs.mkNixosSystem {