adding waybar support
This commit is contained in:
parent
7ab653c47f
commit
c4b9b63a00
3 changed files with 236 additions and 40 deletions
|
|
@ -7,6 +7,7 @@
|
|||
./fuzzel.nix
|
||||
./kde.nix
|
||||
./mpv.nix
|
||||
./sway.nix
|
||||
./terminals.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
193
home/sway.nix
Normal file
193
home/sway.nix
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
height = 10;
|
||||
spacing = 0;
|
||||
modules-left = [ "sway/workspaces" "sway/mode" "wlr/workspaces" "custom/mycal" ];
|
||||
modules-center = [ ];
|
||||
modules-right = [ "idle_inhibitor" "custom/mytimew" "pulseaudio" "custom/mymusic" "bluetooth" "network" "backlight" "battery" "battery#bat2" "tray" "custom/mycal" "clock" ];
|
||||
|
||||
"custom/mytimew" = {
|
||||
exec = "~/bin/timebar";
|
||||
interval = 30;
|
||||
on-click = "alacritty -e ~/bin/ttmenu";
|
||||
};
|
||||
"custom/mycal" = {
|
||||
exec = "~/bin/show-next-event";
|
||||
interval = 300;
|
||||
on-click = "~/bin/mynewterm -e ikhal";
|
||||
};
|
||||
"custom/mymusic" = {
|
||||
exec = "~/bin/show-playing";
|
||||
interval = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
style =
|
||||
''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "JetBrains Mono", FontAwesome6Free, SymbolsNerdFont, Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 10px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: rgba(43, 48, 59, 0.5);
|
||||
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.0;
|
||||
}
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background: transparent;
|
||||
color: #ffffff;
|
||||
border-bottom: 3px solid transparent;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background: #64727D;
|
||||
border-bottom: 3px solid #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background: #64727D;
|
||||
border-bottom: 3px solid #ffffff;
|
||||
}
|
||||
|
||||
#clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-mymusic, #tray, #mode, #idle_inhibitor, #bluetooth {
|
||||
padding: 0 5px;
|
||||
margin: 0 0px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
background-color: #64727D;
|
||||
color: #f1fa8c;
|
||||
}
|
||||
|
||||
#battery {
|
||||
color: #000000;
|
||||
background-color: #50fa7b;
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
color: #000000;
|
||||
background-color: #ff79c6;
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
color: #ffffff;
|
||||
background-color: #ff5555;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: #44475a;
|
||||
background-color: #50fa7b;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background: #f53c3c;
|
||||
color: #ffffff;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
background: #2ecc71;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#memory {
|
||||
background: #9b59b6;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
color: #000000;
|
||||
background: #90b1b1;
|
||||
}
|
||||
|
||||
#bluetooth {
|
||||
background: #ffb86c;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#network {
|
||||
background: #bd93f9;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background: #ff5555;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
background: #ffb86c;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background: #90b1b1;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#custom-mytimew {
|
||||
background: #bd93f9;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#custom-mymusic {
|
||||
background: #8be9fd;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#custom-mycal {
|
||||
background: #cccc99;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
background: #f0932b;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background: #eb4d4b;
|
||||
}
|
||||
|
||||
#tray {
|
||||
background-color: #64727D;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
background-color: #2d3436;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #ecf0f1;
|
||||
color: #2d3436;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -5,50 +5,52 @@ let
|
|||
destination = "/bin/dbus-sway-environment";
|
||||
executable = true;
|
||||
text = ''
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
'';
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
'';
|
||||
};
|
||||
configure-gtk = pkgs.writeTextFile {
|
||||
name = "configure-gtk";
|
||||
destination = "/bin/configure-gtk";
|
||||
executable = true;
|
||||
text = let
|
||||
schema = pkgs.gsettings-desktop-schemas;
|
||||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||
in ''
|
||||
name = "configure-gtk";
|
||||
destination = "/bin/configure-gtk";
|
||||
executable = true;
|
||||
text = let
|
||||
schema = pkgs.gsettings-desktop-schemas;
|
||||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||
in ''
|
||||
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
|
||||
gnome_schema=org.gnome.desktop.interface
|
||||
gsettings set $gnome_schema gtk-theme 'Dracula'
|
||||
'';
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
alacritty
|
||||
bemenu
|
||||
configure-gtk
|
||||
dbus-sway-environment
|
||||
dracula-theme # gtk theme
|
||||
glib
|
||||
gnome.adwaita-icon-theme
|
||||
grim
|
||||
mako
|
||||
slurp
|
||||
sway
|
||||
swayidle
|
||||
swayimg
|
||||
swaylock-effects
|
||||
swaynotificationcenter
|
||||
waybar
|
||||
wayland
|
||||
wl-clipboard
|
||||
];
|
||||
services.dbus.enable = true;
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
services.greetd.package = "greetd.wlgreet";
|
||||
}
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
alacritty
|
||||
bemenu
|
||||
configure-gtk
|
||||
dbus-sway-environment
|
||||
dracula-theme # gtk theme
|
||||
glib
|
||||
gnome.adwaita-icon-theme
|
||||
grim
|
||||
mako
|
||||
slurp
|
||||
sway
|
||||
swayidle
|
||||
swayimg
|
||||
swaylock-effects
|
||||
swaynotificationcenter
|
||||
waybar
|
||||
wayland
|
||||
wl-clipboard
|
||||
];
|
||||
services.dbus.enable = true;
|
||||
programs = {
|
||||
sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
};
|
||||
services.greetd.package = "greetd.wlgreet";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue