moby: lift background into sway config
This commit is contained in:
parent
c3e37f7864
commit
409baf0321
|
@ -9,13 +9,6 @@
|
||||||
# - <https://itsfoss.com/content/images/2023/04/nixos-tutorials.png>
|
# - <https://itsfoss.com/content/images/2023/04/nixos-tutorials.png>
|
||||||
|
|
||||||
{ lib, pkgs, sane-lib, ... }:
|
{ lib, pkgs, sane-lib, ... }:
|
||||||
let
|
|
||||||
# TODO: generate this from the .svg
|
|
||||||
# bg = ./nixos-bg-02.png;
|
|
||||||
bg = pkgs.runCommand "nixos-bg.png" { nativeBuildInputs = [ pkgs.inkscape ]; } ''
|
|
||||||
inkscape ${./nixos-bg-02.svg} -o $out
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
sane.programs.firefox.config = {
|
sane.programs.firefox.config = {
|
||||||
# compromise impermanence for the sake of usability
|
# compromise impermanence for the sake of usability
|
||||||
|
@ -134,7 +127,6 @@ in
|
||||||
# - close is 16th entry
|
# - close is 16th entry
|
||||||
SXMO_BEMENU_LANDSCAPE_LINES = "11"; # default 8
|
SXMO_BEMENU_LANDSCAPE_LINES = "11"; # default 8
|
||||||
SXMO_BEMENU_PORTRAIT_LINES = "16"; # default 16
|
SXMO_BEMENU_PORTRAIT_LINES = "16"; # default 16
|
||||||
SXMO_BG_IMG = "${bg}";
|
|
||||||
SXMO_LOCK_IDLE_TIME = "15"; # how long between screenoff -> lock -> back to screenoff (default: 8)
|
SXMO_LOCK_IDLE_TIME = "15"; # how long between screenoff -> lock -> back to screenoff (default: 8)
|
||||||
# gravity: how far to tilt the device before the screen rotates
|
# gravity: how far to tilt the device before the screen rotates
|
||||||
# for a given setting, normal <-> invert requires more movement then left <-> right
|
# for a given setting, normal <-> invert requires more movement then left <-> right
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
./phosh.nix
|
./phosh.nix
|
||||||
./sway
|
./sway
|
||||||
./sxmo
|
./sxmo
|
||||||
|
./theme
|
||||||
];
|
];
|
||||||
|
|
||||||
sane.programs.guiApps = {
|
sane.programs.guiApps = {
|
||||||
|
|
|
@ -46,6 +46,9 @@ in
|
||||||
default font (for e.g. window titles)
|
default font (for e.g. window titles)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
background = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
};
|
||||||
mod = mkOption {
|
mod = mkOption {
|
||||||
type = types.string;
|
type = types.string;
|
||||||
default = "Mod4";
|
default = "Mod4";
|
||||||
|
|
|
@ -32,6 +32,8 @@ client.focused_inactive #1f5e54 #5f676a #ffffff
|
||||||
client.unfocused #1f5e54 #1f554c #b4b4b4
|
client.unfocused #1f5e54 #1f554c #b4b4b4
|
||||||
client.urgent #ff8080 #ff8080 #ffffff
|
client.urgent #ff8080 #ff8080 #ffffff
|
||||||
|
|
||||||
|
output '*' bg "@background@" fill
|
||||||
|
|
||||||
### pixel boundary between windows
|
### pixel boundary between windows
|
||||||
hide_edge_borders smart
|
hide_edge_borders smart
|
||||||
default_border pixel 1
|
default_border pixel 1
|
||||||
|
|
|
@ -36,6 +36,7 @@ in pkgs.substituteAll {
|
||||||
xwayland
|
xwayland
|
||||||
;
|
;
|
||||||
inherit (config)
|
inherit (config)
|
||||||
|
background
|
||||||
brightness_down_cmd
|
brightness_down_cmd
|
||||||
brightness_up_cmd
|
brightness_up_cmd
|
||||||
extra_lines
|
extra_lines
|
||||||
|
|
28
hosts/modules/gui/theme/default.nix
Normal file
28
hosts/modules/gui/theme/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.sane.gui.theme.background;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = with lib; {
|
||||||
|
sane.gui.theme.background = {
|
||||||
|
svg = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
default = ./nixos-bg-02.svg;
|
||||||
|
};
|
||||||
|
png = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
default = pkgs.runCommand
|
||||||
|
"nixos-bg.png"
|
||||||
|
{ nativeBuildInputs = [ pkgs.inkscape ]; }
|
||||||
|
''
|
||||||
|
inkscape ${cfg.svg} -o $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
sane.gui.sway.config.background = lib.mkDefault cfg.png;
|
||||||
|
sane.gui.sxmo.settings.SXMO_BG_IMG = lib.mkDefault (builtins.toString cfg.png);
|
||||||
|
};
|
||||||
|
}
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
Loading…
Reference in New Issue
Block a user