sway: specify dependent packages more idiomatically, and fix bug where phosh wasn't actually shipping its dependents
This commit is contained in:
parent
f2e8be3bd1
commit
7ce0c34f43
|
@ -32,6 +32,16 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
sane.programs = {
|
||||||
|
inherit (pkgs // {
|
||||||
|
"gnome.gnome-bluetooth" = pkgs.gnome.gnome-bluetooth;
|
||||||
|
})
|
||||||
|
phosh-mobile-settings
|
||||||
|
# "gnome.gnome-bluetooth"
|
||||||
|
;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
(mkIf cfg.enable {
|
(mkIf cfg.enable {
|
||||||
sane.gui.enable = true;
|
sane.gui.enable = true;
|
||||||
|
|
|
@ -120,524 +120,543 @@ in
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkMerge [
|
||||||
sane.gui.enable = true;
|
{
|
||||||
|
sane.programs.swayApps = {
|
||||||
# swap in these lines to use SDDM instead of `services.greetd`.
|
package = null;
|
||||||
# services.xserver.displayManager.sddm.enable = true;
|
suggestedPrograms = [
|
||||||
# services.xserver.enable = true;
|
"swaylock"
|
||||||
services.greetd = {
|
"swayidle"
|
||||||
# greetd source/docs:
|
"wl-clipboard"
|
||||||
# - <https://git.sr.ht/~kennylevinsen/greetd>
|
"mako" # notification daemon
|
||||||
enable = true;
|
# # "pavucontrol"
|
||||||
settings = {
|
"gnome.gnome-bluetooth"
|
||||||
default_session = if cfg.useGreeter then greeter-session else greeterless-session;
|
"gnome.gnome-control-center"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
# we need the greeter's command to be on our PATH
|
{
|
||||||
users.users.colin.packages = [ sway-launcher ];
|
sane.programs = {
|
||||||
|
inherit (pkgs // {
|
||||||
|
"gnome.gnome-bluetooth" = pkgs.gnome.gnome-bluetooth;
|
||||||
|
"gnome.gnome-control-center" = pkgs.gnome.gnome-control-center;
|
||||||
|
})
|
||||||
|
swaylock
|
||||||
|
swayidle
|
||||||
|
wl-clipboard
|
||||||
|
mako
|
||||||
|
"gnome.gnome-bluetooth"
|
||||||
|
"gnome.gnome-control-center"
|
||||||
|
;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
# some programs (e.g. fractal) **require** a "Secret Service Provider"
|
(mkIf cfg.enable {
|
||||||
services.gnome.gnome-keyring.enable = true;
|
sane.gui.enable = true;
|
||||||
|
sane.programs.swayApps.enableFor.user.colin = true;
|
||||||
|
|
||||||
# unlike other DEs, sway configures no audio stack
|
# swap in these lines to use SDDM instead of `services.greetd`.
|
||||||
# administer with pw-cli, pw-mon, pw-top commands
|
# services.xserver.displayManager.sddm.enable = true;
|
||||||
services.pipewire = {
|
# services.xserver.enable = true;
|
||||||
enable = true;
|
services.greetd = {
|
||||||
alsa.enable = true;
|
# greetd source/docs:
|
||||||
alsa.support32Bit = true; # ??
|
# - <https://git.sr.ht/~kennylevinsen/greetd>
|
||||||
pulse.enable = true;
|
enable = true;
|
||||||
};
|
settings = {
|
||||||
|
default_session = if cfg.useGreeter then greeter-session else greeterless-session;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# we need the greeter's command to be on our PATH
|
||||||
|
users.users.colin.packages = [ sway-launcher ];
|
||||||
|
|
||||||
networking.useDHCP = false;
|
# some programs (e.g. fractal) **require** a "Secret Service Provider"
|
||||||
networking.networkmanager.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
networking.wireless.enable = lib.mkForce false;
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
# unlike other DEs, sway configures no audio stack
|
||||||
services.blueman.enable = true;
|
# administer with pw-cli, pw-mon, pw-top commands
|
||||||
# gsd provides Rfkill, which is required for the bluetooth pane in gnome-control-center to work
|
services.pipewire = {
|
||||||
services.gnome.gnome-settings-daemon.enable = true;
|
enable = true;
|
||||||
# start the components of gsd we need at login
|
alsa.enable = true;
|
||||||
systemd.user.targets."org.gnome.SettingsDaemon.Rfkill".wantedBy = [ "graphical-session.target" ];
|
alsa.support32Bit = true; # ??
|
||||||
# go ahead and `systemctl --user cat gnome-session-initialized.target`. i dare you.
|
pulse.enable = true;
|
||||||
# the only way i can figure out how to get Rfkill to actually load is to just disable all the shit it depends on.
|
};
|
||||||
# it doesn't actually seem to need ANY of them in the first place T_T
|
|
||||||
systemd.user.targets."gnome-session-initialized".enable = false;
|
|
||||||
# bluez can't connect to audio devices unless pipewire is running.
|
|
||||||
# a system service can't depend on a user service, so just launch it at graphical-session
|
|
||||||
systemd.user.services."pipewire".wantedBy = [ "graphical-session.target" ];
|
|
||||||
|
|
||||||
programs.sway = {
|
networking.useDHCP = false;
|
||||||
enable = true;
|
networking.networkmanager.enable = true;
|
||||||
wrapperFeatures.gtk = true;
|
networking.wireless.enable = lib.mkForce false;
|
||||||
};
|
|
||||||
sane.user.fs.".config/sway/config" =
|
|
||||||
let
|
|
||||||
fuzzel = "${pkgs.fuzzel}/bin/fuzzel";
|
|
||||||
sed = "${pkgs.gnused}/bin/sed";
|
|
||||||
wtype = "${pkgs.wtype}/bin/wtype";
|
|
||||||
kitty = "${pkgs.kitty}/bin/kitty";
|
|
||||||
launcher-cmd = fuzzel;
|
|
||||||
terminal-cmd = kitty;
|
|
||||||
lock-cmd = "${pkgs.swaylock}/bin/swaylock --indicator-idle-visible --indicator-radius 100 --indicator-thickness 30";
|
|
||||||
vol-up-cmd = "${pkgs.pulsemixer}/bin/pulsemixer --change-volume +5";
|
|
||||||
vol-down-cmd = "${pkgs.pulsemixer}/bin/pulsemixer --change-volume -5";
|
|
||||||
mute-cmd = "${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute";
|
|
||||||
brightness-up-cmd = "${pkgs.brightnessctl}/bin/brightnessctl set +2%";
|
|
||||||
brightness-down-cmd = "${pkgs.brightnessctl}/bin/brightnessctl set 2%-";
|
|
||||||
screenshot-cmd = "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
|
|
||||||
# "bookmarking"/snippets inspired by Luke Smith:
|
|
||||||
# - <https://www.youtube.com/watch?v=d_11QaTlf1I>
|
|
||||||
snip-file = ./snippets.txt;
|
|
||||||
# TODO: querying sops here breaks encapsulation
|
|
||||||
list-snips = "cat ${snip-file} ${config.sops.secrets.snippets.path}";
|
|
||||||
strip-comments = "${sed} 's/ #.*$//'";
|
|
||||||
snip-cmd = "${wtype} $(${list-snips} | ${fuzzel} -d -i -w 60 | ${strip-comments})";
|
|
||||||
# TODO: next splatmoji release should allow `-s none` to disable skin tones
|
|
||||||
emoji-cmd = "${pkgs.splatmoji}/bin/splatmoji -s medium-light type";
|
|
||||||
in sane-lib.fs.wantedText ''
|
|
||||||
### default font
|
|
||||||
font pango:monospace 8
|
|
||||||
|
|
||||||
### pixel boundary between windows
|
hardware.bluetooth.enable = true;
|
||||||
default_border pixel 3
|
services.blueman.enable = true;
|
||||||
default_floating_border pixel 2
|
# gsd provides Rfkill, which is required for the bluetooth pane in gnome-control-center to work
|
||||||
hide_edge_borders smart
|
services.gnome.gnome-settings-daemon.enable = true;
|
||||||
|
# start the components of gsd we need at login
|
||||||
|
systemd.user.targets."org.gnome.SettingsDaemon.Rfkill".wantedBy = [ "graphical-session.target" ];
|
||||||
|
# go ahead and `systemctl --user cat gnome-session-initialized.target`. i dare you.
|
||||||
|
# the only way i can figure out how to get Rfkill to actually load is to just disable all the shit it depends on.
|
||||||
|
# it doesn't actually seem to need ANY of them in the first place T_T
|
||||||
|
systemd.user.targets."gnome-session-initialized".enable = false;
|
||||||
|
# bluez can't connect to audio devices unless pipewire is running.
|
||||||
|
# a system service can't depend on a user service, so just launch it at graphical-session
|
||||||
|
systemd.user.services."pipewire".wantedBy = [ "graphical-session.target" ];
|
||||||
|
|
||||||
### defaults
|
programs.sway = {
|
||||||
focus_wrapping no
|
enable = true;
|
||||||
focus_follows_mouse yes
|
wrapperFeatures.gtk = true;
|
||||||
focus_on_window_activation smart
|
};
|
||||||
mouse_warping output
|
sane.user.fs.".config/sway/config" =
|
||||||
workspace_layout default
|
let
|
||||||
workspace_auto_back_and_forth no
|
fuzzel = "${pkgs.fuzzel}/bin/fuzzel";
|
||||||
|
sed = "${pkgs.gnused}/bin/sed";
|
||||||
|
wtype = "${pkgs.wtype}/bin/wtype";
|
||||||
|
kitty = "${pkgs.kitty}/bin/kitty";
|
||||||
|
launcher-cmd = fuzzel;
|
||||||
|
terminal-cmd = kitty;
|
||||||
|
lock-cmd = "${pkgs.swaylock}/bin/swaylock --indicator-idle-visible --indicator-radius 100 --indicator-thickness 30";
|
||||||
|
vol-up-cmd = "${pkgs.pulsemixer}/bin/pulsemixer --change-volume +5";
|
||||||
|
vol-down-cmd = "${pkgs.pulsemixer}/bin/pulsemixer --change-volume -5";
|
||||||
|
mute-cmd = "${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute";
|
||||||
|
brightness-up-cmd = "${pkgs.brightnessctl}/bin/brightnessctl set +2%";
|
||||||
|
brightness-down-cmd = "${pkgs.brightnessctl}/bin/brightnessctl set 2%-";
|
||||||
|
screenshot-cmd = "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
|
||||||
|
# "bookmarking"/snippets inspired by Luke Smith:
|
||||||
|
# - <https://www.youtube.com/watch?v=d_11QaTlf1I>
|
||||||
|
snip-file = ./snippets.txt;
|
||||||
|
# TODO: querying sops here breaks encapsulation
|
||||||
|
list-snips = "cat ${snip-file} ${config.sops.secrets.snippets.path}";
|
||||||
|
strip-comments = "${sed} 's/ #.*$//'";
|
||||||
|
snip-cmd = "${wtype} $(${list-snips} | ${fuzzel} -d -i -w 60 | ${strip-comments})";
|
||||||
|
# TODO: next splatmoji release should allow `-s none` to disable skin tones
|
||||||
|
emoji-cmd = "${pkgs.splatmoji}/bin/splatmoji -s medium-light type";
|
||||||
|
in sane-lib.fs.wantedText ''
|
||||||
|
### default font
|
||||||
|
font pango:monospace 8
|
||||||
|
|
||||||
### default colors (#border #background #text #indicator #childBorder)
|
### pixel boundary between windows
|
||||||
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
|
default_border pixel 3
|
||||||
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
|
default_floating_border pixel 2
|
||||||
client.unfocused #333333 #222222 #888888 #292d2e #222222
|
hide_edge_borders smart
|
||||||
client.urgent #2f343a #900000 #ffffff #900000 #900000
|
|
||||||
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
|
|
||||||
client.background #ffffff
|
|
||||||
|
|
||||||
### key bindings
|
### defaults
|
||||||
floating_modifier Mod1
|
focus_wrapping no
|
||||||
## media keys
|
focus_follows_mouse yes
|
||||||
bindsym XF86AudioRaiseVolume exec ${vol-up-cmd}
|
focus_on_window_activation smart
|
||||||
bindsym XF86AudioLowerVolume exec ${vol-down-cmd}
|
mouse_warping output
|
||||||
bindsym Mod1+Page_Up exec ${vol-up-cmd}
|
workspace_layout default
|
||||||
bindsym Mod1+Page_Down exec ${vol-down-cmd}
|
workspace_auto_back_and_forth no
|
||||||
bindsym XF86AudioMute exec ${mute-cmd}
|
|
||||||
bindsym XF86MonBrightnessUp exec ${brightness-up-cmd}
|
|
||||||
bindsym XF86MonBrightnessDown exec ${brightness-down-cmd}
|
|
||||||
## special functions
|
|
||||||
bindsym Mod1+Print exec ${screenshot-cmd}
|
|
||||||
bindsym Mod1+l exec ${lock-cmd}
|
|
||||||
bindsym Mod1+s exec ${snip-cmd}
|
|
||||||
bindsym Mod1+slash exec ${emoji-cmd}
|
|
||||||
bindsym Mod1+d exec ${launcher-cmd}
|
|
||||||
bindsym Mod1+Return exec ${terminal-cmd}
|
|
||||||
bindsym Mod1+Shift+q kill
|
|
||||||
bindsym Mod1+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
|
||||||
bindsym Mod1+Shift+c reload
|
|
||||||
## layout
|
|
||||||
bindsym Mod1+b splith
|
|
||||||
bindsym Mod1+v splitv
|
|
||||||
bindsym Mod1+f fullscreen toggle
|
|
||||||
bindsym Mod1+a focus parent
|
|
||||||
bindsym Mod1+w layout tabbed
|
|
||||||
bindsym Mod1+e layout toggle split
|
|
||||||
bindsym Mod1+Shift+space floating toggle
|
|
||||||
bindsym Mod1+space focus mode_toggle
|
|
||||||
bindsym Mod1+r mode resize
|
|
||||||
## movement
|
|
||||||
bindsym Mod1+Up focus up
|
|
||||||
bindsym Mod1+Down focus down
|
|
||||||
bindsym Mod1+Left focus left
|
|
||||||
bindsym Mod1+Right focus right
|
|
||||||
bindsym Mod1+Shift+Up move up
|
|
||||||
bindsym Mod1+Shift+Down move down
|
|
||||||
bindsym Mod1+Shift+Left move left
|
|
||||||
bindsym Mod1+Shift+Right move right
|
|
||||||
## workspaces
|
|
||||||
bindsym Mod1+1 workspace number 1
|
|
||||||
bindsym Mod1+2 workspace number 2
|
|
||||||
bindsym Mod1+3 workspace number 3
|
|
||||||
bindsym Mod1+4 workspace number 4
|
|
||||||
bindsym Mod1+5 workspace number 5
|
|
||||||
bindsym Mod1+6 workspace number 6
|
|
||||||
bindsym Mod1+7 workspace number 7
|
|
||||||
bindsym Mod1+8 workspace number 8
|
|
||||||
bindsym Mod1+9 workspace number 9
|
|
||||||
bindsym Mod1+Shift+1 move container to workspace number 1
|
|
||||||
bindsym Mod1+Shift+2 move container to workspace number 2
|
|
||||||
bindsym Mod1+Shift+3 move container to workspace number 3
|
|
||||||
bindsym Mod1+Shift+4 move container to workspace number 4
|
|
||||||
bindsym Mod1+Shift+5 move container to workspace number 5
|
|
||||||
bindsym Mod1+Shift+6 move container to workspace number 6
|
|
||||||
bindsym Mod1+Shift+7 move container to workspace number 7
|
|
||||||
bindsym Mod1+Shift+8 move container to workspace number 8
|
|
||||||
bindsym Mod1+Shift+9 move container to workspace number 9
|
|
||||||
## "scratchpad" = ??
|
|
||||||
bindsym Mod1+Shift+minus move scratchpad
|
|
||||||
bindsym Mod1+minus scratchpad show
|
|
||||||
|
|
||||||
### defaults
|
### default colors (#border #background #text #indicator #childBorder)
|
||||||
mode "resize" {
|
client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577
|
||||||
bindsym Down resize grow height 10 px
|
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
|
||||||
bindsym Escape mode default
|
client.unfocused #333333 #222222 #888888 #292d2e #222222
|
||||||
bindsym Left resize shrink width 10 px
|
client.urgent #2f343a #900000 #ffffff #900000 #900000
|
||||||
bindsym Return mode default
|
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
|
||||||
bindsym Right resize grow width 10 px
|
client.background #ffffff
|
||||||
bindsym Up resize shrink height 10 px
|
|
||||||
bindsym h resize shrink width 10 px
|
### key bindings
|
||||||
bindsym j resize grow height 10 px
|
floating_modifier Mod1
|
||||||
bindsym k resize shrink height 10 px
|
## media keys
|
||||||
bindsym l resize grow width 10 px
|
bindsym XF86AudioRaiseVolume exec ${vol-up-cmd}
|
||||||
|
bindsym XF86AudioLowerVolume exec ${vol-down-cmd}
|
||||||
|
bindsym Mod1+Page_Up exec ${vol-up-cmd}
|
||||||
|
bindsym Mod1+Page_Down exec ${vol-down-cmd}
|
||||||
|
bindsym XF86AudioMute exec ${mute-cmd}
|
||||||
|
bindsym XF86MonBrightnessUp exec ${brightness-up-cmd}
|
||||||
|
bindsym XF86MonBrightnessDown exec ${brightness-down-cmd}
|
||||||
|
## special functions
|
||||||
|
bindsym Mod1+Print exec ${screenshot-cmd}
|
||||||
|
bindsym Mod1+l exec ${lock-cmd}
|
||||||
|
bindsym Mod1+s exec ${snip-cmd}
|
||||||
|
bindsym Mod1+slash exec ${emoji-cmd}
|
||||||
|
bindsym Mod1+d exec ${launcher-cmd}
|
||||||
|
bindsym Mod1+Return exec ${terminal-cmd}
|
||||||
|
bindsym Mod1+Shift+q kill
|
||||||
|
bindsym Mod1+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
||||||
|
bindsym Mod1+Shift+c reload
|
||||||
|
## layout
|
||||||
|
bindsym Mod1+b splith
|
||||||
|
bindsym Mod1+v splitv
|
||||||
|
bindsym Mod1+f fullscreen toggle
|
||||||
|
bindsym Mod1+a focus parent
|
||||||
|
bindsym Mod1+w layout tabbed
|
||||||
|
bindsym Mod1+e layout toggle split
|
||||||
|
bindsym Mod1+Shift+space floating toggle
|
||||||
|
bindsym Mod1+space focus mode_toggle
|
||||||
|
bindsym Mod1+r mode resize
|
||||||
|
## movement
|
||||||
|
bindsym Mod1+Up focus up
|
||||||
|
bindsym Mod1+Down focus down
|
||||||
|
bindsym Mod1+Left focus left
|
||||||
|
bindsym Mod1+Right focus right
|
||||||
|
bindsym Mod1+Shift+Up move up
|
||||||
|
bindsym Mod1+Shift+Down move down
|
||||||
|
bindsym Mod1+Shift+Left move left
|
||||||
|
bindsym Mod1+Shift+Right move right
|
||||||
|
## workspaces
|
||||||
|
bindsym Mod1+1 workspace number 1
|
||||||
|
bindsym Mod1+2 workspace number 2
|
||||||
|
bindsym Mod1+3 workspace number 3
|
||||||
|
bindsym Mod1+4 workspace number 4
|
||||||
|
bindsym Mod1+5 workspace number 5
|
||||||
|
bindsym Mod1+6 workspace number 6
|
||||||
|
bindsym Mod1+7 workspace number 7
|
||||||
|
bindsym Mod1+8 workspace number 8
|
||||||
|
bindsym Mod1+9 workspace number 9
|
||||||
|
bindsym Mod1+Shift+1 move container to workspace number 1
|
||||||
|
bindsym Mod1+Shift+2 move container to workspace number 2
|
||||||
|
bindsym Mod1+Shift+3 move container to workspace number 3
|
||||||
|
bindsym Mod1+Shift+4 move container to workspace number 4
|
||||||
|
bindsym Mod1+Shift+5 move container to workspace number 5
|
||||||
|
bindsym Mod1+Shift+6 move container to workspace number 6
|
||||||
|
bindsym Mod1+Shift+7 move container to workspace number 7
|
||||||
|
bindsym Mod1+Shift+8 move container to workspace number 8
|
||||||
|
bindsym Mod1+Shift+9 move container to workspace number 9
|
||||||
|
## "scratchpad" = ??
|
||||||
|
bindsym Mod1+Shift+minus move scratchpad
|
||||||
|
bindsym Mod1+minus scratchpad show
|
||||||
|
|
||||||
|
### defaults
|
||||||
|
mode "resize" {
|
||||||
|
bindsym Down resize grow height 10 px
|
||||||
|
bindsym Escape mode default
|
||||||
|
bindsym Left resize shrink width 10 px
|
||||||
|
bindsym Return mode default
|
||||||
|
bindsym Right resize grow width 10 px
|
||||||
|
bindsym Up resize shrink height 10 px
|
||||||
|
bindsym h resize shrink width 10 px
|
||||||
|
bindsym j resize grow height 10 px
|
||||||
|
bindsym k resize shrink height 10 px
|
||||||
|
bindsym l resize grow width 10 px
|
||||||
|
}
|
||||||
|
|
||||||
|
### lightly modified bars
|
||||||
|
bar {
|
||||||
|
# TODO: fonts was:
|
||||||
|
# config.fonts.fontconfig.defaultFonts; (monospace ++ emoji)
|
||||||
|
font pango:Hack, Font Awesome 6 Free, Twitter Color Emoji 24.000000
|
||||||
|
mode dock
|
||||||
|
hidden_state hide
|
||||||
|
position top
|
||||||
|
status_command ${pkgs.i3status}/bin/i3status
|
||||||
|
swaybar_command ${pkgs.waybar}/bin/waybar
|
||||||
|
workspace_buttons yes
|
||||||
|
strip_workspace_numbers no
|
||||||
|
tray_output primary
|
||||||
|
colors {
|
||||||
|
background #000000
|
||||||
|
statusline #ffffff
|
||||||
|
separator #666666
|
||||||
|
# #border #background #text
|
||||||
|
focused_workspace #4c7899 #285577 #ffffff
|
||||||
|
active_workspace #333333 #5f676a #ffffff
|
||||||
|
inactive_workspace #333333 #222222 #888888
|
||||||
|
urgent_workspace #2f343a #900000 #ffffff
|
||||||
|
binding_mode #2f343a #900000 #ffffff
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
### displays
|
||||||
|
## DESKTOP
|
||||||
|
output "Samsung Electric Company S22C300 0x00007F35" {
|
||||||
|
pos 0,0
|
||||||
|
res 1920x1080
|
||||||
|
}
|
||||||
|
output "Goldstar Company Ltd LG ULTRAWIDE 0x00004E94" {
|
||||||
|
pos 1920,0
|
||||||
|
res 3440x1440
|
||||||
|
}
|
||||||
|
|
||||||
|
## LAPTOP
|
||||||
|
# sh/en TV
|
||||||
|
output "Pioneer Electronic Corporation VSX-524 0x00000101" {
|
||||||
|
pos 0,0
|
||||||
|
res 1920x1080
|
||||||
|
}
|
||||||
|
# internal display
|
||||||
|
output "Unknown 0x0637 0x00000000" {
|
||||||
|
pos 1920,0
|
||||||
|
res 1920x1080
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
sane.user.fs.".config/waybar/config" = sane-lib.fs.wantedSymlinkTo waybar-config-text;
|
||||||
|
|
||||||
|
# style docs: https://github.com/Alexays/Waybar/wiki/Styling
|
||||||
|
sane.user.fs.".config/waybar/style.css" = sane-lib.fs.wantedText ''
|
||||||
|
* {
|
||||||
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
### lightly modified bars
|
/* defaults below: https://github.com/Alexays/Waybar/blob/master/resources/style.css */
|
||||||
bar {
|
window#waybar {
|
||||||
# TODO: fonts was:
|
background-color: rgba(43, 48, 59, 0.5);
|
||||||
# config.fonts.fontconfig.defaultFonts; (monospace ++ emoji)
|
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
||||||
font pango:Hack, Font Awesome 6 Free, Twitter Color Emoji 24.000000
|
color: #ffffff;
|
||||||
mode dock
|
transition-property: background-color;
|
||||||
hidden_state hide
|
transition-duration: .5s;
|
||||||
position top
|
|
||||||
status_command ${pkgs.i3status}/bin/i3status
|
|
||||||
swaybar_command ${pkgs.waybar}/bin/waybar
|
|
||||||
workspace_buttons yes
|
|
||||||
strip_workspace_numbers no
|
|
||||||
tray_output primary
|
|
||||||
colors {
|
|
||||||
background #000000
|
|
||||||
statusline #ffffff
|
|
||||||
separator #666666
|
|
||||||
# #border #background #text
|
|
||||||
focused_workspace #4c7899 #285577 #ffffff
|
|
||||||
active_workspace #333333 #5f676a #ffffff
|
|
||||||
inactive_workspace #333333 #222222 #888888
|
|
||||||
urgent_workspace #2f343a #900000 #ffffff
|
|
||||||
binding_mode #2f343a #900000 #ffffff
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
### displays
|
window#waybar.hidden {
|
||||||
## DESKTOP
|
opacity: 0.2;
|
||||||
output "Samsung Electric Company S22C300 0x00007F35" {
|
|
||||||
pos 0,0
|
|
||||||
res 1920x1080
|
|
||||||
}
|
|
||||||
output "Goldstar Company Ltd LG ULTRAWIDE 0x00004E94" {
|
|
||||||
pos 1920,0
|
|
||||||
res 3440x1440
|
|
||||||
}
|
}
|
||||||
|
|
||||||
## LAPTOP
|
/*
|
||||||
# sh/en TV
|
window#waybar.empty {
|
||||||
output "Pioneer Electronic Corporation VSX-524 0x00000101" {
|
background-color: transparent;
|
||||||
pos 0,0
|
|
||||||
res 1920x1080
|
|
||||||
}
|
}
|
||||||
# internal display
|
window#waybar.solo {
|
||||||
output "Unknown 0x0637 0x00000000" {
|
background-color: #FFFFFF;
|
||||||
pos 1920,0
|
|
||||||
res 1920x1080
|
|
||||||
}
|
}
|
||||||
'';
|
*/
|
||||||
|
|
||||||
sane.user.fs.".config/waybar/config" = sane-lib.fs.wantedSymlinkTo waybar-config-text;
|
window#waybar.termite {
|
||||||
|
background-color: #3F3F3F;
|
||||||
|
}
|
||||||
|
|
||||||
# style docs: https://github.com/Alexays/Waybar/wiki/Styling
|
window#waybar.chromium {
|
||||||
sane.user.fs.".config/waybar/style.css" = sane-lib.fs.wantedText ''
|
background-color: #000000;
|
||||||
* {
|
border: none;
|
||||||
font-family: monospace;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* defaults below: https://github.com/Alexays/Waybar/blob/master/resources/style.css */
|
#workspaces button {
|
||||||
window#waybar {
|
padding: 0 5px;
|
||||||
background-color: rgba(43, 48, 59, 0.5);
|
background-color: transparent;
|
||||||
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
color: #ffffff;
|
||||||
color: #ffffff;
|
/* Use box-shadow instead of border so the text isn't offset */
|
||||||
transition-property: background-color;
|
box-shadow: inset 0 -3px transparent;
|
||||||
transition-duration: .5s;
|
/* Avoid rounded borders under each workspace name */
|
||||||
}
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
window#waybar.hidden {
|
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||||
opacity: 0.2;
|
#workspaces button:hover {
|
||||||
}
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
box-shadow: inset 0 -3px #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
#workspaces button.focused {
|
||||||
window#waybar.empty {
|
background-color: #64727D;
|
||||||
background-color: transparent;
|
box-shadow: inset 0 -3px #ffffff;
|
||||||
}
|
}
|
||||||
window#waybar.solo {
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
window#waybar.termite {
|
#workspaces button.urgent {
|
||||||
background-color: #3F3F3F;
|
background-color: #eb4d4b;
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar.chromium {
|
#mode {
|
||||||
background-color: #000000;
|
background-color: #64727D;
|
||||||
border: none;
|
border-bottom: 3px solid #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button {
|
#clock,
|
||||||
padding: 0 5px;
|
#battery,
|
||||||
background-color: transparent;
|
#cpu,
|
||||||
color: #ffffff;
|
#memory,
|
||||||
/* Use box-shadow instead of border so the text isn't offset */
|
#disk,
|
||||||
box-shadow: inset 0 -3px transparent;
|
#temperature,
|
||||||
/* Avoid rounded borders under each workspace name */
|
#backlight,
|
||||||
border: none;
|
#network,
|
||||||
border-radius: 0;
|
#pulseaudio,
|
||||||
}
|
#custom-media,
|
||||||
|
#tray,
|
||||||
|
#mode,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#mpd {
|
||||||
|
padding: 0 10px;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
#window,
|
||||||
#workspaces button:hover {
|
#workspaces {
|
||||||
background: rgba(0, 0, 0, 0.2);
|
margin: 0 4px;
|
||||||
box-shadow: inset 0 -3px #ffffff;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.focused {
|
/* If workspaces is the leftmost module, omit left margin */
|
||||||
background-color: #64727D;
|
.modules-left > widget:first-child > #workspaces {
|
||||||
box-shadow: inset 0 -3px #ffffff;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.urgent {
|
/* If workspaces is the rightmost module, omit right margin */
|
||||||
background-color: #eb4d4b;
|
.modules-right > widget:last-child > #workspaces {
|
||||||
}
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
#mode {
|
#clock {
|
||||||
background-color: #64727D;
|
background-color: #64727D;
|
||||||
border-bottom: 3px solid #ffffff;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#clock,
|
#battery {
|
||||||
#battery,
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#disk,
|
|
||||||
#temperature,
|
|
||||||
#backlight,
|
|
||||||
#network,
|
|
||||||
#pulseaudio,
|
|
||||||
#custom-media,
|
|
||||||
#tray,
|
|
||||||
#mode,
|
|
||||||
#idle_inhibitor,
|
|
||||||
#mpd {
|
|
||||||
padding: 0 10px;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window,
|
|
||||||
#workspaces {
|
|
||||||
margin: 0 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If workspaces is the leftmost module, omit left margin */
|
|
||||||
.modules-left > widget:first-child > #workspaces {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If workspaces is the rightmost module, omit right margin */
|
|
||||||
.modules-right > widget:last-child > #workspaces {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
background-color: #64727D;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery {
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.charging, #battery.plugged {
|
|
||||||
color: #ffffff;
|
|
||||||
background-color: #26A65B;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes blink {
|
|
||||||
to {
|
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical:not(.charging) {
|
#battery.charging, #battery.plugged {
|
||||||
background-color: #f53c3c;
|
color: #ffffff;
|
||||||
color: #ffffff;
|
background-color: #26A65B;
|
||||||
animation-name: blink;
|
}
|
||||||
animation-duration: 0.5s;
|
|
||||||
animation-timing-function: linear;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-direction: alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
label:focus {
|
@keyframes blink {
|
||||||
background-color: #000000;
|
to {
|
||||||
}
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#cpu {
|
#battery.critical:not(.charging) {
|
||||||
background-color: #2ecc71;
|
background-color: #f53c3c;
|
||||||
color: #000000;
|
color: #ffffff;
|
||||||
}
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
#memory {
|
label:focus {
|
||||||
background-color: #9b59b6;
|
background-color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#disk {
|
#cpu {
|
||||||
background-color: #964B00;
|
background-color: #2ecc71;
|
||||||
}
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
#backlight {
|
#memory {
|
||||||
background-color: #90b1b1;
|
background-color: #9b59b6;
|
||||||
}
|
}
|
||||||
|
|
||||||
#network {
|
#disk {
|
||||||
background-color: #2980b9;
|
background-color: #964B00;
|
||||||
}
|
}
|
||||||
|
|
||||||
#network.disconnected {
|
#backlight {
|
||||||
background-color: #f53c3c;
|
background-color: #90b1b1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pulseaudio {
|
#network {
|
||||||
background-color: #f1c40f;
|
background-color: #2980b9;
|
||||||
color: #000000;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio.muted {
|
#network.disconnected {
|
||||||
background-color: #90b1b1;
|
background-color: #f53c3c;
|
||||||
color: #2a5c45;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#custom-media {
|
#pulseaudio {
|
||||||
background-color: #66cc99;
|
background-color: #f1c40f;
|
||||||
color: #2a5c45;
|
color: #000000;
|
||||||
min-width: 100px;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#custom-media.custom-spotify {
|
#pulseaudio.muted {
|
||||||
background-color: #66cc99;
|
background-color: #90b1b1;
|
||||||
}
|
color: #2a5c45;
|
||||||
|
}
|
||||||
|
|
||||||
#custom-media.custom-vlc {
|
#custom-media {
|
||||||
background-color: #ffa000;
|
background-color: #66cc99;
|
||||||
}
|
color: #2a5c45;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
#temperature {
|
#custom-media.custom-spotify {
|
||||||
background-color: #f0932b;
|
background-color: #66cc99;
|
||||||
}
|
}
|
||||||
|
|
||||||
#temperature.critical {
|
#custom-media.custom-vlc {
|
||||||
background-color: #eb4d4b;
|
background-color: #ffa000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tray {
|
#temperature {
|
||||||
background-color: #2980b9;
|
background-color: #f0932b;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tray > .passive {
|
#temperature.critical {
|
||||||
-gtk-icon-effect: dim;
|
background-color: #eb4d4b;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tray > .needs-attention {
|
#tray {
|
||||||
-gtk-icon-effect: highlight;
|
background-color: #2980b9;
|
||||||
background-color: #eb4d4b;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibitor {
|
#tray > .passive {
|
||||||
background-color: #2d3436;
|
-gtk-icon-effect: dim;
|
||||||
}
|
}
|
||||||
|
|
||||||
#idle_inhibitor.activated {
|
#tray > .needs-attention {
|
||||||
background-color: #ecf0f1;
|
-gtk-icon-effect: highlight;
|
||||||
color: #2d3436;
|
background-color: #eb4d4b;
|
||||||
}
|
}
|
||||||
|
|
||||||
#mpd {
|
#idle_inhibitor {
|
||||||
background-color: #66cc99;
|
background-color: #2d3436;
|
||||||
color: #2a5c45;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#mpd.disconnected {
|
#idle_inhibitor.activated {
|
||||||
background-color: #f53c3c;
|
background-color: #ecf0f1;
|
||||||
}
|
color: #2d3436;
|
||||||
|
}
|
||||||
|
|
||||||
#mpd.stopped {
|
#mpd {
|
||||||
background-color: #90b1b1;
|
background-color: #66cc99;
|
||||||
}
|
color: #2a5c45;
|
||||||
|
}
|
||||||
|
|
||||||
#mpd.paused {
|
#mpd.disconnected {
|
||||||
background-color: #51a37a;
|
background-color: #f53c3c;
|
||||||
}
|
}
|
||||||
|
|
||||||
#language {
|
#mpd.stopped {
|
||||||
background: #00b093;
|
background-color: #90b1b1;
|
||||||
color: #740864;
|
}
|
||||||
padding: 0 5px;
|
|
||||||
margin: 0 5px;
|
|
||||||
min-width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state {
|
#mpd.paused {
|
||||||
background: #97e1ad;
|
background-color: #51a37a;
|
||||||
color: #000000;
|
}
|
||||||
padding: 0 0px;
|
|
||||||
margin: 0 5px;
|
|
||||||
min-width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state > label {
|
#language {
|
||||||
padding: 0 5px;
|
background: #00b093;
|
||||||
}
|
color: #740864;
|
||||||
|
padding: 0 5px;
|
||||||
|
margin: 0 5px;
|
||||||
|
min-width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
#keyboard-state > label.locked {
|
#keyboard-state {
|
||||||
background: rgba(0, 0, 0, 0.2);
|
background: #97e1ad;
|
||||||
}
|
color: #000000;
|
||||||
'';
|
padding: 0 0px;
|
||||||
# style = ''
|
margin: 0 5px;
|
||||||
# * {
|
min-width: 16px;
|
||||||
# border: none;
|
}
|
||||||
# border-radius: 0;
|
|
||||||
# font-family: Source Code Pro;
|
|
||||||
# }
|
|
||||||
# window#waybar {
|
|
||||||
# background: #16191C;
|
|
||||||
# color: #AAB2BF;
|
|
||||||
# }
|
|
||||||
# #workspaces button {
|
|
||||||
# padding: 0 5px;
|
|
||||||
# }
|
|
||||||
# .custom-spotify {
|
|
||||||
# padding: 0 10px;
|
|
||||||
# margin: 0 4px;
|
|
||||||
# background-color: #1DB954;
|
|
||||||
# color: black;
|
|
||||||
# }
|
|
||||||
# '';
|
|
||||||
|
|
||||||
# TODO: refactor
|
#keyboard-state > label {
|
||||||
sane.programs = {
|
padding: 0 5px;
|
||||||
swaylock.enableFor.user.colin = true;
|
}
|
||||||
swayidle.enableFor.user.colin = true; # (unused)
|
|
||||||
wl-clipboard.enableFor.user.colin = true;
|
#keyboard-state > label.locked {
|
||||||
mako.enableFor.user.colin = true; # notification daemon
|
background: rgba(0, 0, 0, 0.2);
|
||||||
xdg-utils.enableFor.user.colin = true; # for xdg-open
|
}
|
||||||
# user stuff
|
'';
|
||||||
# pavucontrol
|
# style = ''
|
||||||
"sway-contrib.grimshot".enableFor.user.colin = true;
|
# * {
|
||||||
"gnome.gnome-bluetooth".enableFor.user.colin = true;
|
# border: none;
|
||||||
"gnome.gnome-control-center".enableFor.user.colin = true;
|
# border-radius: 0;
|
||||||
};
|
# font-family: Source Code Pro;
|
||||||
};
|
# }
|
||||||
|
# window#waybar {
|
||||||
|
# background: #16191C;
|
||||||
|
# color: #AAB2BF;
|
||||||
|
# }
|
||||||
|
# #workspaces button {
|
||||||
|
# padding: 0 5px;
|
||||||
|
# }
|
||||||
|
# .custom-spotify {
|
||||||
|
# padding: 0 10px;
|
||||||
|
# margin: 0 4px;
|
||||||
|
# background-color: #1DB954;
|
||||||
|
# color: black;
|
||||||
|
# }
|
||||||
|
# '';
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,12 @@ let
|
||||||
});
|
});
|
||||||
toPkgSpec = types.coercedTo types.package (p: { package = p; }) pkgSpec;
|
toPkgSpec = types.coercedTo types.package (p: { package = p; }) pkgSpec;
|
||||||
|
|
||||||
configs = mapAttrsToList (_name: p: {
|
configs = mapAttrsToList (name: p: {
|
||||||
|
assertions = map (sug: {
|
||||||
|
assertion = cfg ? "${sug}";
|
||||||
|
message = ''program "${sug}" referenced by "${name}", but not defined'';
|
||||||
|
}) p.suggestedPrograms;
|
||||||
|
|
||||||
# conditionally add to system PATH
|
# conditionally add to system PATH
|
||||||
environment.systemPackages = optional
|
environment.systemPackages = optional
|
||||||
(p.package != null && p.enableFor.system)
|
(p.package != null && p.enableFor.system)
|
||||||
|
@ -112,6 +117,7 @@ in
|
||||||
config =
|
config =
|
||||||
let
|
let
|
||||||
take = f: {
|
take = f: {
|
||||||
|
assertions = f.assertions;
|
||||||
environment.systemPackages = f.environment.systemPackages;
|
environment.systemPackages = f.environment.systemPackages;
|
||||||
users.users = f.users.users;
|
users.users = f.users.users;
|
||||||
sane.users = f.sane.users;
|
sane.users = f.sane.users;
|
||||||
|
|
Loading…
Reference in New Issue