2020-02-17 17:00:59 +04:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
with import ../../../support.nix { inherit pkgs config lib; };
|
|
|
|
with lib;
|
|
|
|
let scripts = import ./scripts pkgs config;
|
|
|
|
in {
|
2020-05-12 21:59:15 +04:00
|
|
|
home-manager.users.balsoft.wayland.windowManager.sway.extraConfig = ''
|
2020-02-17 17:00:59 +04:00
|
|
|
bar {
|
|
|
|
id top
|
2020-06-12 18:34:18 +04:00
|
|
|
font pango:Material Icons 11, IBM Plex 11, Roboto Mono 11
|
2020-02-17 17:00:59 +04:00
|
|
|
mode dock
|
|
|
|
hidden_state hide
|
|
|
|
position top
|
|
|
|
status_command ${pkgs.i3blocks}/bin/i3blocks
|
|
|
|
workspace_buttons yes
|
|
|
|
strip_workspace_numbers no
|
|
|
|
tray_output none
|
|
|
|
colors {
|
|
|
|
background ${config.themes.colors.bg}
|
|
|
|
statusline ${config.themes.colors.fg}
|
|
|
|
separator ${config.themes.colors.alt}
|
2020-04-10 15:52:54 +04:00
|
|
|
focused_workspace ${config.themes.colors.bg} ${config.themes.colors.bg} ${config.themes.colors.blue}
|
|
|
|
active_workspace ${config.themes.colors.bg} ${config.themes.colors.bg} ${config.themes.colors.green}
|
|
|
|
inactive_workspace ${config.themes.colors.bg} ${config.themes.colors.bg} ${config.themes.colors.fg}
|
|
|
|
urgent_workspace ${config.themes.colors.bg} ${config.themes.colors.bg} ${config.themes.colors.orange}
|
|
|
|
binding_mode ${config.themes.colors.bg} ${config.themes.colors.bg} ${config.themes.colors.yellow}
|
2020-02-17 17:00:59 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
|
|
|
|
home-manager.users.balsoft.xdg.configFile."i3blocks/config".text = let
|
|
|
|
scr = x: {
|
|
|
|
name = x;
|
|
|
|
command = scripts.${x};
|
|
|
|
};
|
|
|
|
scrint = x: interval: (scr x) // { inherit interval; };
|
|
|
|
in ''
|
|
|
|
interval=60
|
|
|
|
markup=pango
|
2020-04-29 03:18:36 +04:00
|
|
|
'' + genIniOrdered (optional (!isNull config.secrets.mail) (scr "email")
|
|
|
|
++ [ (scrint "weather" 600) (scr "calendar") (scr "emacs") ]
|
|
|
|
++ optional (!isNull config.secrets.wage) (scrint "youtrack-wage" 3600)
|
|
|
|
++ [ (scrint "music" 10) (scrint "sound" 5) ] ++ [
|
|
|
|
(scrint "cpu" 5)
|
|
|
|
(scrint "freq" 10)
|
|
|
|
(scr "temperature")
|
|
|
|
(scrint "free" 10)
|
|
|
|
] ++ optionals config.deviceSpecific.isLaptop [
|
|
|
|
(scr "battery")
|
|
|
|
(scrint "brightness" 5)
|
|
|
|
]
|
|
|
|
++ optional (config.deviceSpecific.devInfo ? bigScreen) (scrint "network" 1)
|
2020-04-10 15:52:54 +04:00
|
|
|
++ [ (scrint "connections" 10) (scr "df") (scr "date") (scrint "time" 1) ]);
|
2020-02-17 17:00:59 +04:00
|
|
|
}
|