Compare commits
11 Commits
b5dc8bc95a
...
6b2c04e4b9
Author | SHA1 | Date |
---|---|---|
Nathan McCarty | 6b2c04e4b9 | |
Nathan McCarty | 7bc668b087 | |
Nathan McCarty | f8733d3498 | |
Nathan McCarty | f078caccaa | |
Nathan McCarty | 00c2ca236a | |
Nathan McCarty | 2dc5e60d16 | |
Nathan McCarty | bc315d4785 | |
Nathan McCarty | a737f7e3d7 | |
Nathan McCarty | 63e7c14a8e | |
Nathan McCarty | f435df434e | |
Nathan McCarty | 20e783ded1 |
|
@ -40,6 +40,33 @@ with nLib; {
|
||||||
# TODO: Get this working on darwin
|
# TODO: Get this working on darwin
|
||||||
email = { enable = mkEnableOption "Email"; };
|
email = { enable = mkEnableOption "Email"; };
|
||||||
};
|
};
|
||||||
|
# Configuration for linux specific options
|
||||||
|
config = {
|
||||||
|
# Generic desktop components
|
||||||
|
desktop = {
|
||||||
|
fuzzel-command = mkOption {
|
||||||
|
description = "Fuzzel command";
|
||||||
|
default = ''
|
||||||
|
fuzzel -f "Iosevka Sans Quasi:size=16" -b "181818cc" -S "b9b9b9ff" -s "252525cc" -t "777777ff" -B 5 -r 5 -C "70b433cc" --width=80 --lines=25'';
|
||||||
|
};
|
||||||
|
targets = mkOption {
|
||||||
|
description = "Targets to install desktop services to";
|
||||||
|
default = [ "hyprland-session.target" ];
|
||||||
|
};
|
||||||
|
swaylock = {
|
||||||
|
package = mkOption {
|
||||||
|
description = "Swaylock package to use";
|
||||||
|
default =
|
||||||
|
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.swaylock-effects;
|
||||||
|
};
|
||||||
|
command = mkOption {
|
||||||
|
description = "Swaylock package to use";
|
||||||
|
default = ''
|
||||||
|
--screenshots --grace 30 --indicator --clock --timestr "%-I:%M:%S %p" --datestr "%A %Y-%M-%d" --effect-blur 20x3'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
# Linux specific programs
|
# Linux specific programs
|
||||||
programs = {
|
programs = {
|
||||||
util = {
|
util = {
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
let
|
||||||
|
fuzzel-command = config.nathan.config.desktop.fuzzel-command;
|
||||||
|
hyprland = config.nathan.programs.hyprland.enable;
|
||||||
|
targets = config.nathan.config.desktop.targets;
|
||||||
|
shortcuts = inputs.self.packages.${pkgs.system}.shortcuts;
|
||||||
|
in lib.mkMerge [
|
||||||
|
(lib.mkIf hyprland {
|
||||||
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
|
bind = SUPER, R, exec, ${fuzzel-command} --prompt='❯ '
|
||||||
|
# Clipboard history management
|
||||||
|
exec-once=wl-paste --watch cliphist store
|
||||||
|
bind = SUPER, X, exec, cliphist list | ${fuzzel-command} --prompt=' ❯ ' --dmenu | cliphist decode | wl-copy
|
||||||
|
# Shortcut dispatcher
|
||||||
|
bind = SUPER, W, exec, ${shortcuts}/bin/shortcuts ~/.config/shortcuts/shortcuts.toml
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
# General configuration
|
||||||
|
(lib.mkIf hyprland {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
fuzzel
|
||||||
|
# Clipboard
|
||||||
|
wl-clipboard
|
||||||
|
cliphist
|
||||||
|
];
|
||||||
|
|
||||||
|
# Shortcut dispatcher
|
||||||
|
xdg.configFile."shortcuts/shortcuts.toml" = {
|
||||||
|
text = ''
|
||||||
|
directories = ["~/.config/shortcuts/shortcuts", "${shortcuts}/shortcuts"]
|
||||||
|
picker_command = "${
|
||||||
|
builtins.replaceStrings [ ''"'' ] [ ''\"'' ]
|
||||||
|
(fuzzel-command + " --prompt=' ❯ ' ")
|
||||||
|
} --dmenu"
|
||||||
|
'';
|
||||||
|
onChange = ''
|
||||||
|
mkdir -p ~/.config/shortcuts/shortcuts
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
})
|
||||||
|
]
|
|
@ -0,0 +1,82 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
let
|
||||||
|
fuzzel-command = config.nathan.config.desktop.fuzzel-command;
|
||||||
|
hyprland = config.nathan.programs.hyprland.enable;
|
||||||
|
targets = config.nathan.config.desktop.targets;
|
||||||
|
shortcuts = inputs.self.packages.${pkgs.system}.shortcuts;
|
||||||
|
in lib.mkMerge [
|
||||||
|
# Hyprland specific configuration
|
||||||
|
(lib.mkIf hyprland {
|
||||||
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
|
env = QT_QPA_PLATFORMTHEME,qtct
|
||||||
|
env = QT_STYLE_OVERRIDE,kvantum
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
# General configuration
|
||||||
|
(lib.mkIf hyprland {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# General
|
||||||
|
killall
|
||||||
|
# Display management
|
||||||
|
wdisplays
|
||||||
|
# glib for sound stuff
|
||||||
|
glib
|
||||||
|
# For private browsing
|
||||||
|
tor-browser-bundle-bin
|
||||||
|
# For non-emacs pdf reading
|
||||||
|
evince
|
||||||
|
# Productivity
|
||||||
|
libreoffice-fresh
|
||||||
|
font-awesome
|
||||||
|
# for image viewing
|
||||||
|
inputs.self.packages.${pkgs.system}.swayimg
|
||||||
|
# For fancy x11 scaling
|
||||||
|
sommelier
|
||||||
|
# Themes
|
||||||
|
gtk-engine-murrine
|
||||||
|
libsForQt5.qtstyleplugin-kvantum
|
||||||
|
pkgs.libsForQt5.qt5ct
|
||||||
|
materia-theme
|
||||||
|
materia-kde-theme
|
||||||
|
];
|
||||||
|
|
||||||
|
# Bluetooth applet
|
||||||
|
services.blueman-applet.enable = true;
|
||||||
|
#########################
|
||||||
|
## EasyEffects
|
||||||
|
#########################
|
||||||
|
services.easyeffects.enable = true;
|
||||||
|
#########################
|
||||||
|
## Default applications
|
||||||
|
#########################
|
||||||
|
xdg.mimeApps.defaultApplications = {
|
||||||
|
# Make all supported images open in swayimg
|
||||||
|
"image/jpeg" = [ "swayimg.desktop" ];
|
||||||
|
"image/png" = [ "swayimg.desktop" ];
|
||||||
|
"image/gif" = [ "swayimg.desktop" ];
|
||||||
|
"image/svg+xml" = [ "swayimg.desktop" ];
|
||||||
|
"image/webp" = [ "swayimg.desktop" ];
|
||||||
|
"image/avif" = [ "swayimg.desktop" ];
|
||||||
|
"image/tiff" = [ "swayimg.desktop" ];
|
||||||
|
"image/bmp" = [ "swayimg.desktop" ];
|
||||||
|
"application/pdf" = [ "org.gnome.Evince.desktop" ];
|
||||||
|
"text/html" = [ "firefox.desktop" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Theme gtk
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
font.name = "Iosevka Sans Quasi";
|
||||||
|
theme = {
|
||||||
|
name = "Materia-dark";
|
||||||
|
package = pkgs.materia-theme;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# theme qt
|
||||||
|
home.sessionVariables = {
|
||||||
|
QT_QPA_PLATFORMTHEME = "qtct";
|
||||||
|
QT_STYLE_OVERRIDE = "kvantum";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]
|
|
@ -0,0 +1,38 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
swaylock-package = config.nathan.config.desktop.swaylock.package;
|
||||||
|
swaylock-command = config.nathan.config.desktop.swaylock.command;
|
||||||
|
targets = config.nathan.config.desktop.targets;
|
||||||
|
hyprland = config.nathan.programs.hyprland.enable;
|
||||||
|
in lib.mkMerge [
|
||||||
|
# Hyprland specific
|
||||||
|
(lib.mkIf hyprland {
|
||||||
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
|
bind = SUPER, Z, exec, ${swaylock-package}/bin/swaylock ${swaylock-command}
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
# General
|
||||||
|
(lib.mkIf hyprland {
|
||||||
|
home.packages = with pkgs; [ swaylock-package swayidle ];
|
||||||
|
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
timeouts = [
|
||||||
|
# Lock the screen after 5 minutes of inactivity
|
||||||
|
{
|
||||||
|
timeout = 300;
|
||||||
|
command = "${swaylock-package}/bin/swaylock ${
|
||||||
|
builtins.replaceStrings [ "%" ] [ "%%" ] swaylock-command
|
||||||
|
}";
|
||||||
|
}
|
||||||
|
# Turn off the displays after 10 minutes of inactivity
|
||||||
|
{
|
||||||
|
timeout = 600;
|
||||||
|
command = "hyprctl dispatch dpms off";
|
||||||
|
resumeCommand = "hyprctl dispatch dpms on";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
systemd.user.services.swayidle = { Install = { WantedBy = targets; }; };
|
||||||
|
})
|
||||||
|
]
|
|
@ -0,0 +1,48 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
let
|
||||||
|
fuzzel-command = config.nathan.config.desktop.fuzzel-command;
|
||||||
|
hyprland = config.nathan.programs.hyprland.enable;
|
||||||
|
targets = config.nathan.config.desktop.targets;
|
||||||
|
shortcuts = inputs.self.packages.${pkgs.system}.shortcuts;
|
||||||
|
notif-package =
|
||||||
|
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.swaynotificationcenter;
|
||||||
|
in lib.mkMerge [
|
||||||
|
# Hyprland specific
|
||||||
|
(lib.mkIf hyprland {
|
||||||
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
|
# Notif bind
|
||||||
|
bind = SUPER, T, exec, swaync-client -t -sw
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
# General configuration
|
||||||
|
(lib.mkIf hyprland {
|
||||||
|
home.packages = with pkgs; [ swayosd notif-package ];
|
||||||
|
|
||||||
|
# Setup swayosd as a service
|
||||||
|
systemd.user.services.swayosd = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Swayosd";
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.swayosd}/bin/swayosd";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
Install = { WantedBy = [ "hyprland-session.target" ]; };
|
||||||
|
};
|
||||||
|
# Then sway notification center
|
||||||
|
systemd.user.services.swaync = {
|
||||||
|
Unit = {
|
||||||
|
Description = "SwayNotificationCenter";
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${notif-package}/bin/swaync";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
Install = { WantedBy = [ "hyprland-session.target" ]; };
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
hyprland = config.nathan.programs.hyprland.enable;
|
||||||
|
targets = config.nathan.config.desktop.targets;
|
||||||
|
in lib.mkif hyprland {
|
||||||
|
home.packages = with pkgs; [ libsForQt5.polkit-kde-agent ];
|
||||||
|
# Setup polkit as a service
|
||||||
|
systemd.user.services.polkit-kde = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Polkit kde authentication agent";
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart =
|
||||||
|
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
Install = { WantedBy = targets; };
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,481 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
let
|
||||||
|
fuzzel-command = config.nathan.config.desktop.fuzzel-command;
|
||||||
|
targets = config.nathan.config.desktop.targets;
|
||||||
|
hyprland = config.nathan.programs.hyprland.enable;
|
||||||
|
in lib.mkIf hyprland {
|
||||||
|
#########################
|
||||||
|
## Waybar
|
||||||
|
#########################
|
||||||
|
# https://github.com/DN-debug/waybar-examples/tree/main/waybar-examples/sway
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
package =
|
||||||
|
(inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".waybar.override {
|
||||||
|
withMediaPlayer = true;
|
||||||
|
}).overrideAttrs
|
||||||
|
(old: { mesonFlags = old.mesonFlags ++ [ "-Dexperimental=true" ]; });
|
||||||
|
systemd = { enable = false; };
|
||||||
|
settings = {
|
||||||
|
mainBar = {
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
height = 30;
|
||||||
|
spacing = 0;
|
||||||
|
margin-top = 5;
|
||||||
|
margin-bottom = 0;
|
||||||
|
# modules-left = [ "wlr/workspaces" "hyprland/submap" ];
|
||||||
|
# modules-center = [ "hyprland/window" ];
|
||||||
|
# modules-right = [ "mpd" "clock" "tray" ];
|
||||||
|
modules-center = [
|
||||||
|
"custom/launcher"
|
||||||
|
"wlr/workspaces"
|
||||||
|
"custom/media"
|
||||||
|
# "hyprland/window"
|
||||||
|
"idle_inhibitor"
|
||||||
|
"pulseaudio"
|
||||||
|
"network"
|
||||||
|
"cpu"
|
||||||
|
"memory"
|
||||||
|
# "temperature"
|
||||||
|
"tray"
|
||||||
|
"custom/notification"
|
||||||
|
"clock"
|
||||||
|
# "custom/power"
|
||||||
|
];
|
||||||
|
"custom/launcher" = {
|
||||||
|
format = "";
|
||||||
|
on-click = fuzzel-command + " --prompt='❯ ' ";
|
||||||
|
on-click-right = "killall fuzzel";
|
||||||
|
};
|
||||||
|
"idle_inhibitor" = {
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
activated = "";
|
||||||
|
deactivated = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
pulseaudio = {
|
||||||
|
scroll-step = 1;
|
||||||
|
format = "{volume}% {icon}";
|
||||||
|
format-bluetooth = "{volume}% {icon}";
|
||||||
|
format-bluetooth-muted = "{icon} {format_source}";
|
||||||
|
format-muted = "{format_source}";
|
||||||
|
format-source = "";
|
||||||
|
format-source-muted = "";
|
||||||
|
format-icons = {
|
||||||
|
headphone = "";
|
||||||
|
hands-free = "";
|
||||||
|
headset = "";
|
||||||
|
phone = "";
|
||||||
|
portable = "";
|
||||||
|
car = "";
|
||||||
|
default = [ "" "" "" ];
|
||||||
|
};
|
||||||
|
on-click = "pavucontrol";
|
||||||
|
ignored-sinks = [ "Easy Effects Sink" ];
|
||||||
|
};
|
||||||
|
network = {
|
||||||
|
# // "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||||
|
format-wifi = "{essid} ({signalStrength}%) ";
|
||||||
|
format-ethernet = "Connected ";
|
||||||
|
tooltip-format = "{ifname} via {gwaddr} ";
|
||||||
|
format-linked = "{ifname} (No IP) ";
|
||||||
|
format-disconnected = "Disconnected ⚠";
|
||||||
|
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||||
|
on-click-right = "bash ~/.config/rofi/wifi_menu/rofi_wifi_menu";
|
||||||
|
};
|
||||||
|
cpu = {
|
||||||
|
format = "{usage}% ";
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
memory = { format = "{}% ({used}GB/{total}GB) "; };
|
||||||
|
"tray" = {
|
||||||
|
icon-size = 20;
|
||||||
|
spacing = 10;
|
||||||
|
};
|
||||||
|
"clock" = { format = "{:%I:%M%p %Y-%m-%d}"; };
|
||||||
|
"custom/media" = {
|
||||||
|
format = "{icon} {}";
|
||||||
|
return-type = "json";
|
||||||
|
max-length = 50;
|
||||||
|
format-icons = {
|
||||||
|
spotify = " ";
|
||||||
|
firefox = " ";
|
||||||
|
mopidy = " ";
|
||||||
|
default = " ";
|
||||||
|
};
|
||||||
|
escape = true;
|
||||||
|
exec = "waybar-mediaplayer.py 2> /dev/null";
|
||||||
|
on-click = "playerctl play-pause";
|
||||||
|
};
|
||||||
|
"custom/notification" = {
|
||||||
|
tooltip = false;
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
notification = " <span foreground='red'><sup></sup></span> ";
|
||||||
|
none = " ";
|
||||||
|
dnd-notification = " <span foreground='red'><sup></sup></span> ";
|
||||||
|
dnd-none = "";
|
||||||
|
inhibited-notification =
|
||||||
|
" <span foreground='red'><sup></sup></span> ";
|
||||||
|
inhibited-none = " ";
|
||||||
|
dnd-inhibited-notification =
|
||||||
|
" <span foreground='red'><sup></sup></span> ";
|
||||||
|
dnd-inhibited-none = " ";
|
||||||
|
};
|
||||||
|
return-type = "json";
|
||||||
|
exec-if = "which swaync-client";
|
||||||
|
exec = "swaync-client -swb";
|
||||||
|
on-click = "swaync-client -t -sw";
|
||||||
|
on-click-right = "swaync-client -d -sw";
|
||||||
|
escape = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0px;
|
||||||
|
font-family: Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: transparent;
|
||||||
|
color: #ffffff;
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-duration: .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.hidden {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
background: #1f1f1f;
|
||||||
|
color: #ffffff;
|
||||||
|
border-radius: 20px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: lightblue;
|
||||||
|
color: black;
|
||||||
|
border-bottom: 3px solid #ffffff;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
background: #3f3f3f;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active:hover {
|
||||||
|
background: lightblue;
|
||||||
|
color: black;
|
||||||
|
border-bottom: 3px solid #ffffff;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background-color: #64727D;
|
||||||
|
border-bottom: 3px solid #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#disk,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#custom-media,
|
||||||
|
#custom-launcher,
|
||||||
|
#custom-power,
|
||||||
|
#tray,
|
||||||
|
#mode,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#mpd {
|
||||||
|
padding: 0 10px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
#mpd {
|
||||||
|
background-color: #8EC5FC;
|
||||||
|
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
|
||||||
|
color: black;
|
||||||
|
border-radius: 20px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window,
|
||||||
|
#workspaces {
|
||||||
|
margin: 0px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the leftmost module, omit left margin */
|
||||||
|
.modules-left > widget:first-child > #workspaces {
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the rightmost module, omit right margin */
|
||||||
|
.modules-right > widget:last-child > #workspaces {
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
border-radius: 0px 20px 20px 0px;
|
||||||
|
margin-right: 4px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging, #battery.plugged {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #26A65B;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink {
|
||||||
|
to {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
background-color: #f53c3c;
|
||||||
|
color: #ffffff;
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
label:focus {
|
||||||
|
background-color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-notification {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#disk {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#backlight {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network.disconnected {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-media {
|
||||||
|
background-color: #8EC5FC;
|
||||||
|
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
|
||||||
|
color: black;
|
||||||
|
border-radius: 20px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#custom-media {
|
||||||
|
background-color: #8EC5FC;
|
||||||
|
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
|
||||||
|
color: black;
|
||||||
|
border-radius: 20px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-media.custom-spotify {
|
||||||
|
background-color: #8EC5FC;
|
||||||
|
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
|
||||||
|
color: black;
|
||||||
|
border-radius: 20px;
|
||||||
|
margin-right: 5px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-media.custom-vlc {
|
||||||
|
background-color: #8EC5FC;
|
||||||
|
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
|
||||||
|
color: black;
|
||||||
|
border-radius: 20px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-power{
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 19px;
|
||||||
|
|
||||||
|
}
|
||||||
|
#custom-launcher{
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
font-size: 18px;
|
||||||
|
border-radius: 20px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-updater {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#temperature {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#temperature.critical {
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(-45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .passive {
|
||||||
|
-gtk-icon-effect: dim;
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .needs-attention {
|
||||||
|
-gtk-icon-effect: highlight;
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibitor {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
border-radius: 20px 0px 0px 20px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibitor.activated {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
border-radius: 20px 0px 0px 20px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#language {
|
||||||
|
background-color: #FA8BFF;
|
||||||
|
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
||||||
|
color: black;
|
||||||
|
min-width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keyboard-state {
|
||||||
|
background: #97e1ad;
|
||||||
|
color: #000000;
|
||||||
|
min-width: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keyboard-state > label {
|
||||||
|
padding: 0px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keyboard-state > label.locked {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
# Override the service to run during graphical-session-pre.target
|
||||||
|
systemd.user.services.waybar = {
|
||||||
|
Unit = {
|
||||||
|
Description =
|
||||||
|
"Highly customizable Wayland bar for Sway and Wlroots based compositors.";
|
||||||
|
Documentation = "https://github.com/Alexays/Waybar/wiki";
|
||||||
|
Before = [ "tray.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${config.programs.waybar.package}/bin/waybar";
|
||||||
|
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
|
||||||
|
ExecStartPost = "${pkgs.coreutils}/bin/sleep 1";
|
||||||
|
Restart = "on-failure";
|
||||||
|
KillMode = "mixed";
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = { WantedBy = targets; };
|
||||||
|
};
|
||||||
|
#########################
|
||||||
|
## Create tray target to fix some things
|
||||||
|
#########################
|
||||||
|
systemd.user.targets.tray = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Home Manager System Tray";
|
||||||
|
Requires = [ "graphical-session-pre.target" "waybar.service" ];
|
||||||
|
After = [ "waybar.service" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -1,67 +1,22 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }@args:
|
||||||
let nathan = config.nathan;
|
let nathan = config.nathan;
|
||||||
in with lib; {
|
in with lib; {
|
||||||
config = mkIf nathan.programs.hyprland.enable (let
|
imports = [
|
||||||
swaylock-package =
|
./desktop/waybar.nix
|
||||||
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.swaylock-effects;
|
./desktop/locking.nix
|
||||||
swaylock-command = ''
|
./desktop/fuzzel.nix
|
||||||
${swaylock-package}/bin/swaylock --screenshots --grace 30 --indicator --clock --timestr "%-I:%M:%S %p" --datestr "%A %Y-%M-%d" --effect-blur 20x3'';
|
./desktop/notifs.nix
|
||||||
fuzzel-command = ''
|
./desktop/general.nix
|
||||||
fuzzel -f "Iosevka Sans Quasi:size=16" -b "181818cc" -S "b9b9b9ff" -s "252525cc" -t "777777ff" -B 5 -r 5 -C "70b433cc" --width=80 --lines=25'';
|
];
|
||||||
notif-package =
|
config = mkIf nathan.programs.hyprland.enable ({
|
||||||
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.swaynotificationcenter;
|
|
||||||
shortcuts = inputs.self.packages.${pkgs.system}.shortcuts;
|
|
||||||
in {
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# General
|
|
||||||
killall
|
|
||||||
# Locking and display management
|
|
||||||
wdisplays
|
|
||||||
swaylock-package
|
|
||||||
swayidle
|
|
||||||
# Clipboard
|
|
||||||
wl-clipboard
|
|
||||||
cliphist
|
|
||||||
# Notifications
|
|
||||||
notif-package
|
|
||||||
# Terminal
|
|
||||||
alacritty
|
|
||||||
# glib for sound stuff
|
|
||||||
glib
|
|
||||||
# Glpaper for the background
|
|
||||||
(glpaper.overrideAttrs (old: {
|
|
||||||
src = fetchFromSourcehut {
|
|
||||||
owner = "~scoopta";
|
|
||||||
repo = "glpaper";
|
|
||||||
vc = "hg";
|
|
||||||
rev = "14c158c495451bd9dbdc31a8dfc97388db5e7279";
|
|
||||||
hash = "sha256-jYOUmyXwTffzwUmYEY1SQx2ClZiRiMZLanveE9zWOLI=";
|
|
||||||
};
|
|
||||||
}))
|
|
||||||
# Screenshots
|
# Screenshots
|
||||||
(inputs.hyprland-contrib.packages.${pkgs.system}.grimblast.override {
|
(inputs.hyprland-contrib.packages.${pkgs.system}.grimblast.override {
|
||||||
hyprland = config.wayland.windowManager.hyprland.package;
|
hyprland = config.wayland.windowManager.hyprland.package;
|
||||||
})
|
})
|
||||||
# fuzzel for launcher
|
|
||||||
fuzzel
|
|
||||||
# for image viewing
|
|
||||||
inputs.self.packages.${pkgs.system}.swayimg
|
|
||||||
# For private browsing
|
|
||||||
tor-browser-bundle-bin
|
|
||||||
# For non-emacs pdf reading
|
|
||||||
evince
|
|
||||||
# Productivity
|
|
||||||
libreoffice-fresh
|
|
||||||
## Hyprland addons
|
## Hyprland addons
|
||||||
font-awesome
|
|
||||||
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.hyprpaper
|
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.hyprpaper
|
||||||
swayosd
|
|
||||||
inputs.self.packages.${pkgs.system}.pyprland
|
inputs.self.packages.${pkgs.system}.pyprland
|
||||||
# For fancy x11 scaling
|
|
||||||
sommelier
|
|
||||||
# Polkit
|
|
||||||
libsForQt5.polkit-kde-agent
|
|
||||||
polkit_gnome
|
|
||||||
# Auto workspace renaming
|
# Auto workspace renaming
|
||||||
inputs.self.packages.${pkgs.system}.hyprland-autoname-workspaces
|
inputs.self.packages.${pkgs.system}.hyprland-autoname-workspaces
|
||||||
];
|
];
|
||||||
|
@ -142,10 +97,8 @@ in with lib; {
|
||||||
# bind = $mainMod, M, exit,
|
# bind = $mainMod, M, exit,
|
||||||
bind = $mainMod, E, exec, dolphin
|
bind = $mainMod, E, exec, dolphin
|
||||||
bind = $mainMod, V, togglefloating,
|
bind = $mainMod, V, togglefloating,
|
||||||
bind = $mainMod, R, exec, ${fuzzel-command} --prompt='❯ '
|
|
||||||
bind = $mainMod, P, pseudo, # dwindle
|
bind = $mainMod, P, pseudo, # dwindle
|
||||||
bind = $mainMod, B, togglesplit, # dwindle
|
bind = $mainMod, B, togglesplit, # dwindle
|
||||||
bind = $mainMod, Z, exec, ${swaylock-command}
|
|
||||||
|
|
||||||
# Move focus with mainMod + arrow keys
|
# Move focus with mainMod + arrow keys
|
||||||
bind = $mainMod, H, movefocus, l
|
bind = $mainMod, H, movefocus, l
|
||||||
|
@ -204,15 +157,9 @@ in with lib; {
|
||||||
# systemd integration
|
# systemd integration
|
||||||
exec-once=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP && sleep 2 && systemctl --user start hyprland-session.target
|
exec-once=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP && sleep 2 && systemctl --user start hyprland-session.target
|
||||||
|
|
||||||
# Notif bind
|
|
||||||
bind = $mainMod, T, exec, swaync-client -t -sw
|
|
||||||
|
|
||||||
# Shortcut dispatcher
|
|
||||||
bind = $mainMod, W, exec, ${shortcuts}/bin/shortcuts ~/.config/shortcuts/shortcuts.toml
|
|
||||||
|
|
||||||
## Window rules
|
## Window rules
|
||||||
|
|
||||||
|
|
||||||
# Gamescope - vmware
|
# Gamescope - vmware
|
||||||
windowrulev2 = float,class:^(.gamescope-wrapped)$,title:VMware Workstation
|
windowrulev2 = float,class:^(.gamescope-wrapped)$,title:VMware Workstation
|
||||||
windowrulev2 = noborder,class:^(.gamescope-wrapped)$,title:VMware Workstation
|
windowrulev2 = noborder,class:^(.gamescope-wrapped)$,title:VMware Workstation
|
||||||
|
@ -256,9 +203,6 @@ in with lib; {
|
||||||
windowrulev2 = workspace special silent,$dropspotify
|
windowrulev2 = workspace special silent,$dropspotify
|
||||||
windowrulev2 = center,$dropspotify
|
windowrulev2 = center,$dropspotify
|
||||||
|
|
||||||
# Clipboard history management
|
|
||||||
exec-once=wl-paste --watch cliphist store
|
|
||||||
bind = $mainMod, X, exec, cliphist list | ${fuzzel-command} --prompt=' ❯ ' --dmenu | cliphist decode | wl-copy
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -276,46 +220,6 @@ in with lib; {
|
||||||
#########################
|
#########################
|
||||||
## Hyprland Addons
|
## Hyprland Addons
|
||||||
#########################
|
#########################
|
||||||
# Setup polkit as a service
|
|
||||||
systemd.user.services.polkit-gnome = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Polkit gnome authentication agent";
|
|
||||||
After = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart =
|
|
||||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
Install = { WantedBy = [ "hyprland-session.target" ]; };
|
|
||||||
};
|
|
||||||
# Setup swayosd as a service
|
|
||||||
systemd.user.services.swayosd = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Swayosd";
|
|
||||||
After = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "${pkgs.swayosd}/bin/swayosd";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
Install = { WantedBy = [ "hyprland-session.target" ]; };
|
|
||||||
};
|
|
||||||
# Shortcut dispatcher
|
|
||||||
xdg.configFile."shortcuts/shortcuts.toml" = {
|
|
||||||
text = ''
|
|
||||||
directories = ["~/.config/shortcuts/shortcuts", "${shortcuts}/shortcuts"]
|
|
||||||
picker_command = "${
|
|
||||||
builtins.replaceStrings [ ''"'' ] [ ''\"'' ]
|
|
||||||
(fuzzel-command + " --prompt=' ❯ ' ")
|
|
||||||
} --dmenu"
|
|
||||||
'';
|
|
||||||
onChange = ''
|
|
||||||
mkdir -p ~/.config/shortcuts/shortcuts
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
# Setup pyprland
|
# Setup pyprland
|
||||||
systemd.user.services.pypr = {
|
systemd.user.services.pypr = {
|
||||||
Unit = {
|
Unit = {
|
||||||
|
@ -369,538 +273,6 @@ in with lib; {
|
||||||
'';
|
'';
|
||||||
onChange = "systemctl --user restart pypr";
|
onChange = "systemctl --user restart pypr";
|
||||||
};
|
};
|
||||||
# Bluetooth applet
|
|
||||||
services.blueman-applet.enable = true;
|
|
||||||
#########################
|
|
||||||
## SwayNotificationCenter (notifications)
|
|
||||||
#########################
|
|
||||||
systemd.user.services.swaync = {
|
|
||||||
Unit = {
|
|
||||||
Description = "SwayNotificationCenter";
|
|
||||||
After = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "${notif-package}/bin/swaync";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
Install = { WantedBy = [ "hyprland-session.target" ]; };
|
|
||||||
};
|
|
||||||
#########################
|
|
||||||
## Swayidle
|
|
||||||
#########################
|
|
||||||
services.swayidle = {
|
|
||||||
enable = true;
|
|
||||||
timeouts = [
|
|
||||||
# Lock the screen after 5 minutes of inactivity
|
|
||||||
{
|
|
||||||
timeout = 300;
|
|
||||||
command = builtins.replaceStrings [ "%" ] [ "%%" ] swaylock-command;
|
|
||||||
}
|
|
||||||
# Turn off the displays after 10 minutes of inactivity
|
|
||||||
{
|
|
||||||
timeout = 600;
|
|
||||||
command = "hyprctl dispatch dpms off";
|
|
||||||
resumeCommand = "hyprctl dispatch dpms on";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
systemd.user.services.swayidle = {
|
|
||||||
Install = { WantedBy = [ "hyprland-session.target" ]; };
|
|
||||||
};
|
|
||||||
#########################
|
|
||||||
## Waybar
|
|
||||||
#########################
|
|
||||||
# https://github.com/DN-debug/waybar-examples/tree/main/waybar-examples/sway
|
|
||||||
programs.waybar = {
|
|
||||||
enable = true;
|
|
||||||
package =
|
|
||||||
(inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".waybar.override {
|
|
||||||
withMediaPlayer = true;
|
|
||||||
}).overrideAttrs
|
|
||||||
(old: { mesonFlags = old.mesonFlags ++ [ "-Dexperimental=true" ]; });
|
|
||||||
systemd = { enable = false; };
|
|
||||||
settings = {
|
|
||||||
mainBar = {
|
|
||||||
layer = "top";
|
|
||||||
position = "top";
|
|
||||||
height = 30;
|
|
||||||
spacing = 0;
|
|
||||||
margin-top = 5;
|
|
||||||
margin-bottom = 0;
|
|
||||||
# modules-left = [ "wlr/workspaces" "hyprland/submap" ];
|
|
||||||
# modules-center = [ "hyprland/window" ];
|
|
||||||
# modules-right = [ "mpd" "clock" "tray" ];
|
|
||||||
modules-center = [
|
|
||||||
"custom/launcher"
|
|
||||||
"wlr/workspaces"
|
|
||||||
"custom/media"
|
|
||||||
# "hyprland/window"
|
|
||||||
"idle_inhibitor"
|
|
||||||
"pulseaudio"
|
|
||||||
"network"
|
|
||||||
"cpu"
|
|
||||||
"memory"
|
|
||||||
# "temperature"
|
|
||||||
"tray"
|
|
||||||
"custom/notification"
|
|
||||||
"clock"
|
|
||||||
# "custom/power"
|
|
||||||
];
|
|
||||||
"custom/launcher" = {
|
|
||||||
format = "";
|
|
||||||
on-click = fuzzel-command + " --prompt='❯ ' ";
|
|
||||||
on-click-right = "killall fuzzel";
|
|
||||||
};
|
|
||||||
"idle_inhibitor" = {
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
activated = "";
|
|
||||||
deactivated = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
pulseaudio = {
|
|
||||||
scroll-step = 1;
|
|
||||||
format = "{volume}% {icon}";
|
|
||||||
format-bluetooth = "{volume}% {icon}";
|
|
||||||
format-bluetooth-muted = "{icon} {format_source}";
|
|
||||||
format-muted = "{format_source}";
|
|
||||||
format-source = "";
|
|
||||||
format-source-muted = "";
|
|
||||||
format-icons = {
|
|
||||||
headphone = "";
|
|
||||||
hands-free = "";
|
|
||||||
headset = "";
|
|
||||||
phone = "";
|
|
||||||
portable = "";
|
|
||||||
car = "";
|
|
||||||
default = [ "" "" "" ];
|
|
||||||
};
|
|
||||||
on-click = "pavucontrol";
|
|
||||||
ignored-sinks = [ "Easy Effects Sink" ];
|
|
||||||
};
|
|
||||||
network = {
|
|
||||||
# // "interface": "wlp2*", // (Optional) To force the use of this interface
|
|
||||||
format-wifi = "{essid} ({signalStrength}%) ";
|
|
||||||
format-ethernet = "Connected ";
|
|
||||||
tooltip-format = "{ifname} via {gwaddr} ";
|
|
||||||
format-linked = "{ifname} (No IP) ";
|
|
||||||
format-disconnected = "Disconnected ⚠";
|
|
||||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
|
||||||
on-click-right = "bash ~/.config/rofi/wifi_menu/rofi_wifi_menu";
|
|
||||||
};
|
|
||||||
cpu = {
|
|
||||||
format = "{usage}% ";
|
|
||||||
tooltip = false;
|
|
||||||
};
|
|
||||||
memory = { format = "{}% ({used}GB/{total}GB) "; };
|
|
||||||
"tray" = {
|
|
||||||
icon-size = 20;
|
|
||||||
spacing = 10;
|
|
||||||
};
|
|
||||||
"clock" = { format = "{:%I:%M%p %Y-%m-%d}"; };
|
|
||||||
"custom/media" = {
|
|
||||||
format = "{icon} {}";
|
|
||||||
return-type = "json";
|
|
||||||
max-length = 50;
|
|
||||||
format-icons = {
|
|
||||||
spotify = " ";
|
|
||||||
firefox = " ";
|
|
||||||
mopidy = " ";
|
|
||||||
default = " ";
|
|
||||||
};
|
|
||||||
escape = true;
|
|
||||||
exec = "waybar-mediaplayer.py 2> /dev/null";
|
|
||||||
on-click = "playerctl play-pause";
|
|
||||||
};
|
|
||||||
"custom/notification" = {
|
|
||||||
tooltip = false;
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
notification = " <span foreground='red'><sup></sup></span> ";
|
|
||||||
none = " ";
|
|
||||||
dnd-notification =
|
|
||||||
" <span foreground='red'><sup></sup></span> ";
|
|
||||||
dnd-none = "";
|
|
||||||
inhibited-notification =
|
|
||||||
" <span foreground='red'><sup></sup></span> ";
|
|
||||||
inhibited-none = " ";
|
|
||||||
dnd-inhibited-notification =
|
|
||||||
" <span foreground='red'><sup></sup></span> ";
|
|
||||||
dnd-inhibited-none = " ";
|
|
||||||
};
|
|
||||||
return-type = "json";
|
|
||||||
exec-if = "which swaync-client";
|
|
||||||
exec = "swaync-client -swb";
|
|
||||||
on-click = "swaync-client -t -sw";
|
|
||||||
on-click-right = "swaync-client -d -sw";
|
|
||||||
escape = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
style = ''
|
|
||||||
* {
|
|
||||||
border: none;
|
|
||||||
border-radius: 0px;
|
|
||||||
font-family: Roboto, Helvetica, Arial, sans-serif;
|
|
||||||
font-size: 12px;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar {
|
|
||||||
background-color: transparent;
|
|
||||||
color: #ffffff;
|
|
||||||
transition-property: background-color;
|
|
||||||
transition-duration: .5s;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar.hidden {
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#workspaces button {
|
|
||||||
background: #1f1f1f;
|
|
||||||
color: #ffffff;
|
|
||||||
border-radius: 20px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
|
||||||
#workspaces button:hover {
|
|
||||||
background: lightblue;
|
|
||||||
color: black;
|
|
||||||
border-bottom: 3px solid #ffffff;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.active {
|
|
||||||
background: #3f3f3f;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.active:hover {
|
|
||||||
background: lightblue;
|
|
||||||
color: black;
|
|
||||||
border-bottom: 3px solid #ffffff;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.urgent {
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mode {
|
|
||||||
background-color: #64727D;
|
|
||||||
border-bottom: 3px solid #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock,
|
|
||||||
#battery,
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#disk,
|
|
||||||
#temperature,
|
|
||||||
#backlight,
|
|
||||||
#network,
|
|
||||||
#pulseaudio,
|
|
||||||
#custom-media,
|
|
||||||
#custom-launcher,
|
|
||||||
#custom-power,
|
|
||||||
#tray,
|
|
||||||
#mode,
|
|
||||||
#idle_inhibitor,
|
|
||||||
#mpd {
|
|
||||||
padding: 0 10px;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
#mpd {
|
|
||||||
background-color: #8EC5FC;
|
|
||||||
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
|
|
||||||
color: black;
|
|
||||||
border-radius: 20px;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window,
|
|
||||||
#workspaces {
|
|
||||||
margin: 0px 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If workspaces is the leftmost module, omit left margin */
|
|
||||||
.modules-left > widget:first-child > #workspaces {
|
|
||||||
margin-left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If workspaces is the rightmost module, omit right margin */
|
|
||||||
.modules-right > widget:last-child > #workspaces {
|
|
||||||
margin-right: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
border-radius: 0px 20px 20px 0px;
|
|
||||||
margin-right: 4px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery {
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.charging, #battery.plugged {
|
|
||||||
color: #ffffff;
|
|
||||||
background-color: #26A65B;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes blink {
|
|
||||||
to {
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical:not(.charging) {
|
|
||||||
background-color: #f53c3c;
|
|
||||||
color: #ffffff;
|
|
||||||
animation-name: blink;
|
|
||||||
animation-duration: 0.5s;
|
|
||||||
animation-timing-function: linear;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-direction: alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
label:focus {
|
|
||||||
background-color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-notification {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#memory {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#disk {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#backlight {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#network {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#network.disconnected {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio.muted {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-media {
|
|
||||||
background-color: #8EC5FC;
|
|
||||||
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
|
|
||||||
color: black;
|
|
||||||
border-radius: 20px;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#custom-media {
|
|
||||||
background-color: #8EC5FC;
|
|
||||||
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
|
|
||||||
color: black;
|
|
||||||
border-radius: 20px;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-media.custom-spotify {
|
|
||||||
background-color: #8EC5FC;
|
|
||||||
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
|
|
||||||
color: black;
|
|
||||||
border-radius: 20px;
|
|
||||||
margin-right: 5px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-media.custom-vlc {
|
|
||||||
background-color: #8EC5FC;
|
|
||||||
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
|
|
||||||
color: black;
|
|
||||||
border-radius: 20px;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-power{
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
font-size: 16px;
|
|
||||||
border-radius: 19px;
|
|
||||||
|
|
||||||
}
|
|
||||||
#custom-launcher{
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
font-size: 18px;
|
|
||||||
border-radius: 20px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-updater {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#temperature {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#temperature.critical {
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(-45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray > .passive {
|
|
||||||
-gtk-icon-effect: dim;
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray > .needs-attention {
|
|
||||||
-gtk-icon-effect: highlight;
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibitor {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
border-radius: 20px 0px 0px 20px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibitor.activated {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
border-radius: 20px 0px 0px 20px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#language {
|
|
||||||
background-color: #FA8BFF;
|
|
||||||
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
|
|
||||||
color: black;
|
|
||||||
min-width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state {
|
|
||||||
background: #97e1ad;
|
|
||||||
color: #000000;
|
|
||||||
min-width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state > label {
|
|
||||||
padding: 0px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#keyboard-state > label.locked {
|
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
# Override the service to run during graphical-session-pre.target
|
|
||||||
systemd.user.services.waybar = {
|
|
||||||
Unit = {
|
|
||||||
Description =
|
|
||||||
"Highly customizable Wayland bar for Sway and Wlroots based compositors.";
|
|
||||||
Documentation = "https://github.com/Alexays/Waybar/wiki";
|
|
||||||
Before = [ "tray.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
Service = {
|
|
||||||
ExecStart = "${config.programs.waybar.package}/bin/waybar";
|
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
|
|
||||||
ExecStartPost = "${pkgs.coreutils}/bin/sleep 1";
|
|
||||||
Restart = "on-failure";
|
|
||||||
KillMode = "mixed";
|
|
||||||
};
|
|
||||||
|
|
||||||
Install = { WantedBy = lib.mkForce [ "hyprland-session-pre.target" ]; };
|
|
||||||
};
|
|
||||||
#########################
|
|
||||||
## EasyEffects
|
|
||||||
#########################
|
|
||||||
services.easyeffects.enable = true;
|
|
||||||
#########################
|
|
||||||
## Create tray target to fix some things
|
|
||||||
#########################
|
|
||||||
systemd.user.targets.tray = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Home Manager System Tray";
|
|
||||||
Requires = [ "graphical-session-pre.target" "waybar.service" ];
|
|
||||||
After = [ "waybar.service" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
#########################
|
|
||||||
## Default applications
|
|
||||||
#########################
|
|
||||||
xdg.mimeApps.defaultApplications = {
|
|
||||||
# Make all supported images open in swayimg
|
|
||||||
"image/jpeg" = [ "swayimg.desktop" ];
|
|
||||||
"image/png" = [ "swayimg.desktop" ];
|
|
||||||
"image/gif" = [ "swayimg.desktop" ];
|
|
||||||
"image/svg+xml" = [ "swayimg.desktop" ];
|
|
||||||
"image/webp" = [ "swayimg.desktop" ];
|
|
||||||
"image/avif" = [ "swayimg.desktop" ];
|
|
||||||
"image/tiff" = [ "swayimg.desktop" ];
|
|
||||||
"image/bmp" = [ "swayimg.desktop" ];
|
|
||||||
"application/pdf" = [ "org.gnome.Evince.desktop" ];
|
|
||||||
"text/html" = [ "firefox.desktop" ];
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,9 +83,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Mako output configuration
|
# KDE connect
|
||||||
services.mako = {
|
services.kdeconnect = {
|
||||||
# Lock mako notifs to main display
|
enable = true;
|
||||||
output = "DP-1";
|
indicator = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue