Compare commits

...

3 commits

15 changed files with 79 additions and 326 deletions

View file

@ -2,7 +2,6 @@
{ {
imports = [ imports = [
./gnome ./gnome
./sway
./hyprland ./hyprland
./syncthing.nix ./syncthing.nix
./obs.nix ./obs.nix

View file

@ -4,10 +4,11 @@ let
in in
{ {
imports = [ imports = [
./dunst.nix # ./dunst.nix
./hypridle.nix ./hypridle.nix
./hyprland.nix ./hyprland.nix
./hyprlock.nix ./hyprlock.nix
./hyprshot.nix
# hyprpaper seems to be broken with out of memory and failure to swap wallpapers correctly. # hyprpaper seems to be broken with out of memory and failure to swap wallpapers correctly.
# Use swww for now until the application is stable. # Use swww for now until the application is stable.
# ./hyprpaper.nix # ./hyprpaper.nix
@ -16,8 +17,10 @@ in
./wallust.nix ./wallust.nix
./waybar.nix ./waybar.nix
./wlogout.nix ./wlogout.nix
./swappy.nix # ./swappy.nix
./alacritty.nix ./alacritty.nix
./swayosd.nix
./sway-notification-center.nix
]; ];
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -8,6 +8,9 @@ in
home.packages = [ home.packages = [
pkgs.dunst pkgs.dunst
]; ];
wayland.windowManager.hyprland.settings.exec-once = [
"dunst"
];
home.file.".config/dunst/dunstrc".text = generators.toINI { } { home.file.".config/dunst/dunstrc".text = generators.toINI { } {
global = { global = {
# Which monitor should the notifications be displayed on. # Which monitor should the notifications be displayed on.

View file

@ -22,7 +22,6 @@ in
profile.home.programs.foot.enable = lib.mkForce true; profile.home.programs.foot.enable = lib.mkForce true;
home.packages = [ home.packages = [
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
pkgs.wl-clipboard pkgs.wl-clipboard
pkgs.kcalc pkgs.kcalc
]; ];
@ -138,11 +137,6 @@ in
# Language Input # Language Input
"$mod, I, exec, fcitx5-remote -t" "$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 = [ binde = [
@ -236,15 +230,12 @@ in
exec-once=${init-wallpaper.path} ${./wallpaper.jpeg} exec-once=${init-wallpaper.path} ${./wallpaper.jpeg}
exec-once=wallust run ${config.home.homeDirectory}/.cache/wallpaper/current 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=swww-daemon
exec-once=bash -c "sleep 10; hypridle" exec-once=bash -c "sleep 10; hypridle"
exec-once=waybar exec-once=waybar
exec-once=nm-applet exec-once=nm-applet
exec-once=pasystray exec-once=pasystray
exec-once=pypr exec-once=pypr
exec-once=dunst
source=${config.home.homeDirectory}/.cache/wallust/hyprland.conf source=${config.home.homeDirectory}/.cache/wallust/hyprland.conf
exec-once=sleep 0.2 && swww img ${config.home.homeDirectory}/.cache/wallpaper/current exec-once=sleep 0.2 && swww img ${config.home.homeDirectory}/.cache/wallpaper/current

View file

@ -0,0 +1,32 @@
{ 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}"
];
};
}

View file

@ -0,0 +1,16 @@
{ 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"
];
};
}

View file

@ -0,0 +1,20 @@
{ 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"
];
};
}

View file

@ -1,10 +0,0 @@
{ ... }:
{
imports = [
./mako.nix
./sway.nix
./swaylock.nix
./swayosd.nix
./waybar.nix
];
}

View file

@ -1,18 +0,0 @@
{ 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";
};
};
}

View file

@ -1,66 +0,0 @@
{ 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
'';
};
}

View file

@ -1,15 +0,0 @@
{ config, lib, ... }:
with lib;
let
cfg = config.profile.sway;
in
{
config = mkIf cfg.enable {
programs.swaylock = {
enable = true;
settings = {
show-failed-attempts = true;
};
};
};
}

View file

@ -1,12 +0,0 @@
{ config, lib, ... }:
with lib;
let
cfg = config.profile.sway;
in
{
config = mkIf cfg.enable {
services.swayosd = {
enable = true;
};
};
}

View file

@ -1,90 +0,0 @@
* {
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;
}

View file

@ -1,103 +0,0 @@
{ 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;
};
};
};
};
}

View file

@ -88,6 +88,9 @@
flatpak = { flatpak = {
enable = true; enable = true;
zen-browser.enable = true; zen-browser.enable = true;
redisinsight.enable = true;
}; };
services.ntfy-sh.client.enable = true;
}; };
} }