Compare commits
No commits in common. "26ff5436291b54a89d9a7781828eae5ea8beb5f4" and "1767610c7ce98786427d8fa85ef82152db410f3a" have entirely different histories.
26ff543629
...
1767610c7c
|
@ -2,6 +2,7 @@
|
|||
{
|
||||
imports = [
|
||||
./gnome
|
||||
./sway
|
||||
./hyprland
|
||||
./syncthing.nix
|
||||
./obs.nix
|
||||
|
|
|
@ -4,11 +4,10 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
# ./dunst.nix
|
||||
./dunst.nix
|
||||
./hypridle.nix
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
./hyprshot.nix
|
||||
# hyprpaper seems to be broken with out of memory and failure to swap wallpapers correctly.
|
||||
# Use swww for now until the application is stable.
|
||||
# ./hyprpaper.nix
|
||||
|
@ -17,10 +16,8 @@ in
|
|||
./wallust.nix
|
||||
./waybar.nix
|
||||
./wlogout.nix
|
||||
# ./swappy.nix
|
||||
./swappy.nix
|
||||
./alacritty.nix
|
||||
./swayosd.nix
|
||||
./sway-notification-center.nix
|
||||
];
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
@ -8,9 +8,6 @@ in
|
|||
home.packages = [
|
||||
pkgs.dunst
|
||||
];
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"dunst"
|
||||
];
|
||||
home.file.".config/dunst/dunstrc".text = generators.toINI { } {
|
||||
global = {
|
||||
# Which monitor should the notifications be displayed on.
|
||||
|
|
|
@ -22,6 +22,7 @@ in
|
|||
profile.home.programs.foot.enable = lib.mkForce true;
|
||||
|
||||
home.packages = [
|
||||
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
|
||||
pkgs.wl-clipboard
|
||||
pkgs.kcalc
|
||||
];
|
||||
|
@ -137,6 +138,11 @@ in
|
|||
# Language Input
|
||||
"$mod, I, exec, fcitx5-remote -t"
|
||||
|
||||
"$mod, PRINT, exec, grimblast --notify copysave output"
|
||||
"$mod SHIFT, PRINT, exec, grimblast --notify save output - | swappy -f -"
|
||||
", PRINT, exec, grimblast --notify copysave area"
|
||||
"SHIFT, PRINT, exec, grimblast --notify save area - | swappy -f -"
|
||||
"ALT, PRINT, exec, grimblast --wait 1 --notify save area - | swappy -f -"
|
||||
];
|
||||
|
||||
binde = [
|
||||
|
@ -230,12 +236,15 @@ in
|
|||
|
||||
exec-once=${init-wallpaper.path} ${./wallpaper.jpeg}
|
||||
exec-once=wallust run ${config.home.homeDirectory}/.cache/wallpaper/current
|
||||
exec-once=swayosd-libinput-backend
|
||||
exec-once=swayosd-server
|
||||
exec-once=swww-daemon
|
||||
exec-once=bash -c "sleep 10; hypridle"
|
||||
exec-once=waybar
|
||||
exec-once=nm-applet
|
||||
exec-once=pasystray
|
||||
exec-once=pypr
|
||||
exec-once=dunst
|
||||
|
||||
source=${config.home.homeDirectory}/.cache/wallust/hyprland.conf
|
||||
exec-once=sleep 0.2 && swww img ${config.home.homeDirectory}/.cache/wallpaper/current
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.profile.hyprland;
|
||||
saveDir = "${config.home.homeDirectory}/Pictures/screenshots";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
hyprshot
|
||||
satty
|
||||
];
|
||||
|
||||
home.activation.sattyDirCreate = lib.hm.dag.entryAfter [ "writeBoundary" ] /*sh*/ ''
|
||||
mkdir -p "${saveDir}"
|
||||
chown ${config.home.username} "${saveDir}"
|
||||
'';
|
||||
|
||||
wayland.windowManager.hyprland.settings.bind =
|
||||
let
|
||||
saveFilename = "${saveDir}/$(date +%Y-%m-%d_%H%M%S).png";
|
||||
sattySaveCommand = ''satty --save-after-copy --filename - --fullscreen --output-filename ${saveFilename}'';
|
||||
in
|
||||
[
|
||||
"$mod, PRINT, exec, hyprshot -m window --filename ${saveFilename}"
|
||||
"$mod SHIFT, PRINT, exec, hyprshot -m window --raw | ${sattySaveCommand}"
|
||||
", PRINT, exec, hyprshot -m region --filename ${saveFilename}"
|
||||
"SHIFT, PRINT, exec, hyprshot -m region --raw | ${sattySaveCommand}"
|
||||
"ALT, PRINT, exec, hyprshot -m output --filename ${saveFilename}"
|
||||
"ALT SHIFT, PRINT, exec, hyprshot -m output --raw | ${sattySaveCommand}"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.profile.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
swaynotificationcenter
|
||||
libnotify
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"swaync"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.profile.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
# services.swayosd = {
|
||||
# enable = true;
|
||||
# display = config.profile.hyprland.swayosd.display;
|
||||
# };
|
||||
home.packages = with pkgs; [
|
||||
swayosd
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"swayosd-libinput-backend"
|
||||
"swayosd-server"
|
||||
];
|
||||
};
|
||||
}
|
10
home/modules/sway/default.nix
Normal file
10
home/modules/sway/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./mako.nix
|
||||
./sway.nix
|
||||
./swaylock.nix
|
||||
./swayosd.nix
|
||||
./waybar.nix
|
||||
];
|
||||
}
|
18
home/modules/sway/mako.nix
Normal file
18
home/modules/sway/mako.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.profile.sway;
|
||||
in
|
||||
{
|
||||
# Notification daemon for wayland
|
||||
config = mkIf (cfg.enable && cfg.mako.enable) {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
padding = "5";
|
||||
backgroundColor = "#050505";
|
||||
borderSize = 1;
|
||||
borderColor = "#454545";
|
||||
font = "JetBrainsMono Nerd Font 10";
|
||||
};
|
||||
};
|
||||
}
|
66
home/modules/sway/sway.nix
Normal file
66
home/modules/sway/sway.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.profile.sway;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
alacritty
|
||||
tofi
|
||||
findutils
|
||||
networkmanagerapplet
|
||||
];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.sway.extraConfigEarly = ''
|
||||
exec "nm-applet --indicator"
|
||||
'';
|
||||
wayland.windowManager.sway.config =
|
||||
let
|
||||
mod = "Mod4";
|
||||
in
|
||||
{
|
||||
modifier = mod;
|
||||
keybindings = lib.mkOptionDefault
|
||||
{
|
||||
"${mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty";
|
||||
"${mod}+Shift+q" = "kill";
|
||||
"${mod}+d" = "exec ${pkgs.tofi}/bin/tofi-drun | ${pkgs.findutils}/bin/xargs swaymsg exec --";
|
||||
"XF86AudioRaiseVolume" = "exec wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+";
|
||||
"XF86AudioLowerVolume" = "exec wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-";
|
||||
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"XF86MonBrightnessUp" = "exec light -A 5";
|
||||
"XF86MonBrightnessDown" = "exec light -U 5";
|
||||
};
|
||||
|
||||
fonts = {
|
||||
names = [ "JetBrainsMono Nerd Font" ];
|
||||
style = "Bold Semi-Condensed";
|
||||
size = 11.0;
|
||||
};
|
||||
bars = [ ];
|
||||
};
|
||||
wayland.windowManager.sway.extraConfig = ''
|
||||
default_border none
|
||||
|
||||
# class border backgr. text indicator child_border
|
||||
client.focused #373b41 #373b41 #373b41 #373b41 #373b41
|
||||
client.focused_inactive #282a2e #282a2e #282a2e #282a2e #282a2e
|
||||
client.urgent #f0c674 #f0c674 #f0c674 #f0c674 #f0c674
|
||||
client.placeholder #373b41 #373b41 #373b41 #373b41 #373b41
|
||||
|
||||
# swayfx config
|
||||
blur enable
|
||||
blur_xray enable
|
||||
blur_passes 3
|
||||
blur_radius 5
|
||||
layer_effects "waybar" shadows enable; blur enable;
|
||||
corner_radius 4
|
||||
# default_dim_inactive 0.2
|
||||
shadows enable
|
||||
'';
|
||||
};
|
||||
}
|
15
home/modules/sway/swaylock.nix
Normal file
15
home/modules/sway/swaylock.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.profile.sway;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
show-failed-attempts = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
12
home/modules/sway/swayosd.nix
Normal file
12
home/modules/sway/swayosd.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.profile.sway;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
services.swayosd = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
90
home/modules/sway/waybar.css
Normal file
90
home/modules/sway/waybar.css
Normal file
|
@ -0,0 +1,90 @@
|
|||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
font-family: Iosevka nerd font;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: rgba(29, 31, 33, 0.75);
|
||||
border-radius: 6px;
|
||||
border: 2px solid #303030;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
all: initial; /* Remove GTK theme values (waybar #1351) */
|
||||
min-width: 0; /* Fix weird spacing in materia (waybar #450) */
|
||||
box-shadow: inset 0 -3px transparent; /* Use box-shadow instead of border so the text isn't offset */
|
||||
padding: 6px 12px;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
#workspaces button.visible {
|
||||
color: #ede0d4;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
color: #ede0d4;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #ffcb70;
|
||||
}
|
||||
|
||||
#battery,
|
||||
#backlight,
|
||||
#network,
|
||||
#clock,
|
||||
#tray,
|
||||
#pulseaudio {
|
||||
margin: 8px;
|
||||
padding-right: 16px;
|
||||
background-color: transparent;
|
||||
color: #ede0d4;
|
||||
}
|
||||
|
||||
#custom-swww {
|
||||
padding-right: 16px;
|
||||
background-color: transparent;
|
||||
color: #ede0d4;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: #ede0d4;
|
||||
}
|
||||
#battery.warning,
|
||||
#battery.critical,
|
||||
#battery.urgent {
|
||||
color: #ede0d4;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
#battery.charging {
|
||||
background-color: #97a97c;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffcb70;
|
||||
color: #ede0d4;
|
||||
}
|
||||
}
|
||||
|
||||
tooltip {
|
||||
padding: 15px;
|
||||
background-color: #050505;
|
||||
border-radius: 6px;
|
||||
border: 2px solid #303030;
|
||||
}
|
103
home/modules/sway/waybar.nix
Normal file
103
home/modules/sway/waybar.nix
Normal file
|
@ -0,0 +1,103 @@
|
|||
{ config, lib, unstable, ... }:
|
||||
let
|
||||
cfg = config.profile.sway;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
style = ./waybar.css;
|
||||
systemd.enable = true;
|
||||
package = unstable.waybar;
|
||||
};
|
||||
|
||||
programs.waybar.settings = {
|
||||
main = {
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
spacing = 0;
|
||||
margin-bottom = 0;
|
||||
margin-left = 300;
|
||||
margin-right = 300;
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
];
|
||||
modules-center = [
|
||||
"clock"
|
||||
];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"network"
|
||||
"battery"
|
||||
"pulseaudio"
|
||||
];
|
||||
|
||||
"sway/taskbar" = {
|
||||
format = "{icon}";
|
||||
on-click = "activate";
|
||||
on-click-right = "fullscreen";
|
||||
icon-size = 25;
|
||||
tooltip-format = "{title}";
|
||||
};
|
||||
|
||||
"sway/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = true;
|
||||
format-icons = {
|
||||
"1" = "";
|
||||
"2" = "";
|
||||
"3" = "";
|
||||
"4" = "";
|
||||
"5" = "";
|
||||
};
|
||||
persistent-workspaces = {
|
||||
"1" = [ ];
|
||||
"2" = [ ];
|
||||
"3" = [ ];
|
||||
"4" = [ ];
|
||||
"5" = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
tray.spacing = 10;
|
||||
clock.format = "{:%I:%M %p - %a, %d %b %Y}";
|
||||
network = {
|
||||
format-wifi = "{icon}";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-ethernet = "";
|
||||
format-disconnected = "";
|
||||
interval = 5;
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
scroll-step = 5;
|
||||
max-volume = 150;
|
||||
format = "{icon} {volume}%";
|
||||
format-bluetooth = "";
|
||||
nospacing = 1;
|
||||
format-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
default = [ "" "" " " ];
|
||||
};
|
||||
on-click = "pamixer -t";
|
||||
};
|
||||
|
||||
battery = {
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = {
|
||||
charging = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
default = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
};
|
||||
format-full = "Charged ";
|
||||
interval = 5;
|
||||
states = {
|
||||
warning = 20;
|
||||
critical = 10;
|
||||
};
|
||||
tooltip = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -88,9 +88,6 @@
|
|||
flatpak = {
|
||||
enable = true;
|
||||
zen-browser.enable = true;
|
||||
redisinsight.enable = true;
|
||||
};
|
||||
|
||||
services.ntfy-sh.client.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue