Add zsh function to spawn graphical application in the background
This commit is contained in:
parent
40b8b1db30
commit
900185b2f3
1 changed files with 154 additions and 147 deletions
|
@ -190,162 +190,169 @@ in
|
||||||
pkgs.wf-recorder
|
pkgs.wf-recorder
|
||||||
pkgs.wl-clipboard
|
pkgs.wl-clipboard
|
||||||
];
|
];
|
||||||
programs.waybar = {
|
programs = {
|
||||||
enable = true;
|
waybar = {
|
||||||
settings = {
|
enable = true;
|
||||||
mainBar = {
|
settings = {
|
||||||
spacing = 2;
|
mainBar = {
|
||||||
modules-left = [ "river/tags" ];
|
spacing = 2;
|
||||||
modules-center = [ "river/window" ];
|
modules-left = [ "river/tags" ];
|
||||||
modules-right = [ "idle_inhibitor" "network" "battery" "backlight" "mpris" "pulseaudio" "custom/mail-status" "clock" "tray" ];
|
modules-center = [ "river/window" ];
|
||||||
backlight = {
|
modules-right = [ "idle_inhibitor" "network" "battery" "backlight" "mpris" "pulseaudio" "custom/mail-status" "clock" "tray" ];
|
||||||
format = "{percent}% {icon}";
|
backlight = {
|
||||||
format-icons = [ "🌑" "🌒" "🌓" "🌔" "🌕" ];
|
format = "{percent}% {icon}";
|
||||||
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl s -- +5%";
|
format-icons = [ "🌑" "🌒" "🌓" "🌔" "🌕" ];
|
||||||
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl s -- -5%";
|
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl s -- +5%";
|
||||||
};
|
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl s -- -5%";
|
||||||
battery = {
|
|
||||||
states = {
|
|
||||||
good = 90;
|
|
||||||
warning = 30;
|
|
||||||
critical = 15;
|
|
||||||
};
|
};
|
||||||
format = "{capacity}% {icon}";
|
battery = {
|
||||||
format-charging = "{capacity}% ";
|
states = {
|
||||||
format-plugged = "";
|
good = 90;
|
||||||
format-alt = "{time} {icon}";
|
warning = 30;
|
||||||
format-icons = [ "" "" "" "" "" ];
|
critical = 15;
|
||||||
};
|
};
|
||||||
clock.format = " {:%a %d/%m %H:%M}";
|
format = "{capacity}% {icon}";
|
||||||
"custom/mail-status" = {
|
format-charging = "{capacity}% ";
|
||||||
exec = "${mail-status}";
|
format-plugged = "";
|
||||||
return-type = "json";
|
format-alt = "{time} {icon}";
|
||||||
interval = 1;
|
format-icons = [ "" "" "" "" "" ];
|
||||||
on-click = "${pkgs.isync}/bin/mbsync -a && ${config.chvp.base.emacs.package}/bin/emacsclient --eval \"(mu4e-update-index)\"";
|
|
||||||
};
|
|
||||||
idle_inhibitor = {
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
activated = "";
|
|
||||||
deactivated = "";
|
|
||||||
};
|
};
|
||||||
};
|
clock.format = " {:%a %d/%m %H:%M}";
|
||||||
mpris = {
|
"custom/mail-status" = {
|
||||||
player = "firefox";
|
exec = "${mail-status}";
|
||||||
format = "{status_icon} {artist} - {title}";
|
return-type = "json";
|
||||||
status-icons = {
|
interval = 1;
|
||||||
playing = "▶";
|
on-click = "${pkgs.isync}/bin/mbsync -a && ${config.chvp.base.emacs.package}/bin/emacsclient --eval \"(mu4e-update-index)\"";
|
||||||
paused = "";
|
|
||||||
stopped = "";
|
|
||||||
};
|
};
|
||||||
};
|
idle_inhibitor = {
|
||||||
network = {
|
format = "{icon}";
|
||||||
format-wifi = "{essid} ";
|
format-icons = {
|
||||||
format-ethernet = "{ipaddr}/{cidr} ";
|
activated = "";
|
||||||
tooltip-format = "{ifname} via {gwaddr} ";
|
deactivated = "";
|
||||||
format-linked = "{ifname} (No IP) ";
|
};
|
||||||
format-disconnected = "Disconnected ⚠";
|
|
||||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
|
||||||
};
|
|
||||||
pulseaudio = {
|
|
||||||
format = "{volume}% {icon} {format_source}";
|
|
||||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
|
||||||
format-bluetooth-muted = " {icon} {format_source}";
|
|
||||||
format-muted = " {format_source}";
|
|
||||||
format-source = "{volume}% ";
|
|
||||||
format-source-muted = "";
|
|
||||||
format-icons = {
|
|
||||||
headphone = "";
|
|
||||||
hands-free = "";
|
|
||||||
headset = "";
|
|
||||||
phone = "";
|
|
||||||
portable = "";
|
|
||||||
car = "";
|
|
||||||
default = [ "" "" "" ];
|
|
||||||
};
|
};
|
||||||
on-click = "${pkgs.pamixer}/bin/pamixer -t";
|
mpris = {
|
||||||
on-click-right = "${pkgs.pamixer}/bin/pamixer --default-source -t";
|
player = "firefox";
|
||||||
on-click-middle = "${pkgs.pavucontrol}/bin/pavucontrol";
|
format = "{status_icon} {artist} - {title}";
|
||||||
|
status-icons = {
|
||||||
|
playing = "▶";
|
||||||
|
paused = "";
|
||||||
|
stopped = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
network = {
|
||||||
|
format-wifi = "{essid} ";
|
||||||
|
format-ethernet = "{ipaddr}/{cidr} ";
|
||||||
|
tooltip-format = "{ifname} via {gwaddr} ";
|
||||||
|
format-linked = "{ifname} (No IP) ";
|
||||||
|
format-disconnected = "Disconnected ⚠";
|
||||||
|
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||||
|
};
|
||||||
|
pulseaudio = {
|
||||||
|
format = "{volume}% {icon} {format_source}";
|
||||||
|
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||||
|
format-bluetooth-muted = " {icon} {format_source}";
|
||||||
|
format-muted = " {format_source}";
|
||||||
|
format-source = "{volume}% ";
|
||||||
|
format-source-muted = "";
|
||||||
|
format-icons = {
|
||||||
|
headphone = "";
|
||||||
|
hands-free = "";
|
||||||
|
headset = "";
|
||||||
|
phone = "";
|
||||||
|
portable = "";
|
||||||
|
car = "";
|
||||||
|
default = [ "" "" "" ];
|
||||||
|
};
|
||||||
|
on-click = "${pkgs.pamixer}/bin/pamixer -t";
|
||||||
|
on-click-right = "${pkgs.pamixer}/bin/pamixer --default-source -t";
|
||||||
|
on-click-middle = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||||
|
};
|
||||||
|
tray.spacing = 2;
|
||||||
};
|
};
|
||||||
tray.spacing = 2;
|
|
||||||
};
|
};
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: Hack, monospace;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window, #idle_inhibitor, #network, #battery, #backlight, #mpris, #pulseaudio, #custom-mail-status, #clock, #tray {
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
button:hover {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#backlight {
|
||||||
|
background-color: #6aaeff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
background-color: #5ada88;
|
||||||
|
}
|
||||||
|
#battery.good {
|
||||||
|
background-color: #6aaeff;
|
||||||
|
}
|
||||||
|
#battery.warning {
|
||||||
|
background-color: #f5df23;
|
||||||
|
}
|
||||||
|
#battery.critical {
|
||||||
|
background-color: #ff8892;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-mail-status.has-mail {
|
||||||
|
background-color: #6aaeff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibitor.activated {
|
||||||
|
background-color: #6aaeff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
background-color: #f5df23;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tags button {
|
||||||
|
box-shadow: inset 0 -3px transparent
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
#tags button.occupied {
|
||||||
|
background-color: #f2eff3;
|
||||||
|
}
|
||||||
|
#tags button.focused {
|
||||||
|
background-color: #6aaeff;
|
||||||
|
}
|
||||||
|
#tags button.urgent {
|
||||||
|
background-color: #ff8892;
|
||||||
|
}
|
||||||
|
#tags button:hover {
|
||||||
|
box-shadow: inset 0 -3px #000000;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
systemd.enable = true;
|
||||||
};
|
};
|
||||||
style = ''
|
zsh.initExtra = ''
|
||||||
* {
|
rs() {
|
||||||
font-family: Hack, monospace;
|
riverctl spawn "$*"
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window, #idle_inhibitor, #network, #battery, #backlight, #mpris, #pulseaudio, #custom-mail-status, #clock, #tray {
|
|
||||||
padding: 0 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
button:hover {
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar {
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#backlight {
|
|
||||||
background-color: #6aaeff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery {
|
|
||||||
background-color: #5ada88;
|
|
||||||
}
|
|
||||||
#battery.good {
|
|
||||||
background-color: #6aaeff;
|
|
||||||
}
|
|
||||||
#battery.warning {
|
|
||||||
background-color: #f5df23;
|
|
||||||
}
|
|
||||||
#battery.critical {
|
|
||||||
background-color: #ff8892;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
padding-right: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-mail-status.has-mail {
|
|
||||||
background-color: #6aaeff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibitor.activated {
|
|
||||||
background-color: #6aaeff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio {
|
|
||||||
background-color: #f5df23;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tags button {
|
|
||||||
box-shadow: inset 0 -3px transparent
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
#tags button.occupied {
|
|
||||||
background-color: #f2eff3;
|
|
||||||
}
|
|
||||||
#tags button.focused {
|
|
||||||
background-color: #6aaeff;
|
|
||||||
}
|
|
||||||
#tags button.urgent {
|
|
||||||
background-color: #ff8892;
|
|
||||||
}
|
|
||||||
#tags button:hover {
|
|
||||||
box-shadow: inset 0 -3px #000000;
|
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
systemd.enable = true;
|
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
kanshi = {
|
kanshi = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue