feat: perf hyprland switcher and new image viewer
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
{ pkgs, scripts, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hyprland/performance.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
@@ -27,6 +31,10 @@
|
||||
];
|
||||
|
||||
settings = {
|
||||
source = [
|
||||
"~/.config/koonos/current/performance/hyprland.conf"
|
||||
];
|
||||
|
||||
"$terminal" = "${pkgs.uwsm}/bin/uwsm-app -- ${pkgs.alacritty}/bin/alacritty";
|
||||
"$fileManager" = "${pkgs.uwsm}/bin/uwsm-app -- ${pkgs.pcmanfm}/bin/pcmanfm";
|
||||
"$browser" = "${pkgs.uwsm}/bin/uwsm-app -- zen-beta";
|
||||
@@ -76,7 +84,7 @@
|
||||
inactive_opacity = 1.0;
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
# enabled = false;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
@@ -84,7 +92,7 @@
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||
blur = {
|
||||
enabled = true;
|
||||
# enabled = false;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
|
||||
@@ -235,8 +243,8 @@
|
||||
"$mainMod SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
# "$mainMod, mouse_down, workspace, e+1"
|
||||
# "$mainMod, mouse_up, workspace, e-1"
|
||||
];
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
normal = {
|
||||
decoration = {
|
||||
blur.enabled = true;
|
||||
shadow.enabled = true;
|
||||
};
|
||||
misc.vfr = false;
|
||||
};
|
||||
battery-saver = {
|
||||
decoration = {
|
||||
blur.enabled = false;
|
||||
shadow.enabled = false;
|
||||
};
|
||||
misc.vfr = true;
|
||||
};
|
||||
|
||||
normal-file = pkgs.writeText "hyprland.conf.normal" (lib.hm.generators.toHyprconf { attrs = normal; });
|
||||
battery-saver-file = pkgs.writeText "hyprland.conf.battery" (lib.hm.generators.toHyprconf { attrs = battery-saver; });
|
||||
|
||||
switchScript = pkgs.writeShellScriptBin "switch-config" ''
|
||||
TARGET="$HOME/.config/koonos/current/performance/hyprland.conf"
|
||||
|
||||
if [ "$(readlink "$TARGET")" = "${normal-file}" ]; then
|
||||
ln -sf ${battery-saver-file} "$TARGET"
|
||||
echo "Switched to battery saver"
|
||||
else
|
||||
ln -sf ${normal-file} "$TARGET"
|
||||
echo "Switched to normal mode"
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.file.".config/koonos/current/performance/hyprland.conf".source = normal-file;
|
||||
|
||||
home.packages = [ switchScript ];
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
"modules-center": ["clock", "custom/update", "custom/screenrecording-indicator"],
|
||||
"modules-right": [
|
||||
"group/tray-expander",
|
||||
"custom/countdown",
|
||||
"bluetooth",
|
||||
"network",
|
||||
"pulseaudio",
|
||||
@@ -43,6 +44,11 @@
|
||||
"on-click-right": "xdg-terminal-exec",
|
||||
"tooltip-format": ""
|
||||
},
|
||||
"custom/countdown": {
|
||||
"exec": "echo $(( ($(date +%s) - $(date -d 'June 6, 2026' +%s)) / 86400 ))",
|
||||
"format": "{} ",
|
||||
"interval": 3600
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:L%A %I:%M}",
|
||||
"format-alt": "{:L%d %B W%V %Y}",
|
||||
|
||||
Reference in New Issue
Block a user