tidied
This commit is contained in:
parent
6c180bbb00
commit
38928b05ea
40 changed files with 94 additions and 249 deletions
190
home/programs/desktop/default.nix
Executable file
190
home/programs/desktop/default.nix
Executable file
|
|
@ -0,0 +1,190 @@
|
|||
{ config, pkgs, lib, flakePath, homeDir, ... }:
|
||||
|
||||
## Base desktop theme
|
||||
let
|
||||
|
||||
#serenityos-base = import ./serenityos-base.nix { inherit pkgs; };
|
||||
#line-icons = import ./line-icons.nix { inherit pkgs; };
|
||||
|
||||
in {
|
||||
|
||||
imports = [
|
||||
|
||||
## Import common desktop configs
|
||||
./xdg-mime.nix # file associations
|
||||
./hyprcursor.nix # mouse cursor
|
||||
./hyprlock.nix # screen locker
|
||||
./wlogout.nix # logout prompt
|
||||
./waybar.nix # statusbar
|
||||
./dunst.nix # notifier
|
||||
./wofi.nix # app menu
|
||||
./sway.nix # desktop
|
||||
../scripts # scripts
|
||||
|
||||
];
|
||||
|
||||
xdg = {
|
||||
portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = false;
|
||||
config = {
|
||||
common."org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
|
||||
common.default = [ "gtk" "wlr" "gnome" ];
|
||||
sway.default = [ "gtk" "wlr" "gnome" ];
|
||||
};
|
||||
configPackages = with pkgs; [
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gnome
|
||||
];
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gnome
|
||||
];
|
||||
};
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
extraConfig = {
|
||||
XDG_FLAKE_DIR = "${flakePath}";
|
||||
XDG_SYNC_DIR = "${homeDir}/Sync";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fonts = { fontconfig = { enable = true; }; };
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "Colloid-dark";
|
||||
style = {
|
||||
name = "Colloid-dark";
|
||||
package = pkgs.colloid-kde;
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = lib.mkForce {
|
||||
name = "Colloid-Dark";
|
||||
package = pkgs.colloid-gtk-theme;
|
||||
#name = "serenityos-base";
|
||||
#package = pkgs.serenityos-base;
|
||||
};
|
||||
font = {
|
||||
name = "${config.theme.font}";
|
||||
size = 10;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Flat-Remix-Grey-Darkest";
|
||||
package = pkgs.flat-remix-icon-theme;
|
||||
#name = "line-icons";
|
||||
#package = pkgs.line-icons;
|
||||
};
|
||||
gtk3.extraConfig = { gtk-application-prefer-dark-theme = 1; };
|
||||
gtk4.extraConfig = { gtk-application-prefer-dark-theme = 1; };
|
||||
};
|
||||
|
||||
home = {
|
||||
|
||||
file = {
|
||||
".icons/bibata".source =
|
||||
"${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic";
|
||||
};
|
||||
|
||||
pointerCursor = {
|
||||
gtk.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 12;
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
GTK_THEME = "Colloid-Teal-Dark-Dracula"; # i haev no idea what im doing
|
||||
BROWSER = "firefox";
|
||||
TERMINAL = "kitty";
|
||||
NIXPKGS_ALLOW_UNFREE = 1;
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
## Auth/Security
|
||||
polkit-kde-agent # KDE native polkit agent
|
||||
hyprpolkitagent # Hyprland native polkit agent
|
||||
gnome-keyring # Keyring for login prompts
|
||||
gnome-secrets # GTK password manager
|
||||
seahorse # GTK secrets managment
|
||||
soteria # GTK/rust desktop-agnostic polkit agent
|
||||
|
||||
## Desktop
|
||||
brightnessctl # Display brightness control
|
||||
wlr-randr # Display modesetting
|
||||
wlsunset # Bluelight filter
|
||||
hyprlock # Screen lock
|
||||
wl-clipboard # Clipboard service
|
||||
hyprpicker # Colour picker
|
||||
hyprcursor # Cursor, duh
|
||||
ydotool # Click/Keypress emulator
|
||||
swww # Wallpaper daemon
|
||||
networkmanagerapplet # Tray applet for networkmanager
|
||||
networkmanager # Network manager ...
|
||||
blueman # GTK bluetooth manager
|
||||
easyeffects # Graphical volume control
|
||||
pavucontrol # Graphical volume control
|
||||
helvum # GTK patchbay
|
||||
|
||||
## Desktop App Suite
|
||||
gnome-calculator # GTK calculator
|
||||
appimage-run # Runs appimages
|
||||
file-roller # Archive manager
|
||||
virtualbox # Virtual machine
|
||||
nautilus # GTK File manager
|
||||
obsidian # Note taking
|
||||
swayimg # Terminal based image viewer
|
||||
zathura # PDF viewer
|
||||
gparted # GUI partition editor
|
||||
|
||||
## Misc./lib/compat
|
||||
wayland-protocols
|
||||
wayland-utils
|
||||
xwayland
|
||||
wlroots
|
||||
libsForQt5.qt5ct
|
||||
libnotify
|
||||
libva
|
||||
meson
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
||||
## CLI fuzzy find
|
||||
fzf = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
services = {
|
||||
## Daemon for easyeffects
|
||||
easyeffects.enable = true;
|
||||
## GTK keyring for password prompts
|
||||
gnome-keyring.enable = true;
|
||||
## Another method to enable nm-applet
|
||||
network-manager-applet.enable = true;
|
||||
## Mobile <-> desktop interaction
|
||||
kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
frequency = "daily";
|
||||
options = "--delete-older-than 1d";
|
||||
};
|
||||
|
||||
}
|
||||
81
home/programs/desktop/dunst.nix
Executable file
81
home/programs/desktop/dunst.nix
Executable file
|
|
@ -0,0 +1,81 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Adwaita-Dark";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
};
|
||||
settings = {
|
||||
global = {
|
||||
rounded = "yes";
|
||||
origin = "top-center";
|
||||
monitor = "0";
|
||||
alignment = "center";
|
||||
vertical_alignment = "center";
|
||||
width = "400";
|
||||
height = "400";
|
||||
scale = 0;
|
||||
gap_size = 0;
|
||||
progress_bar = true;
|
||||
transparency = 0;
|
||||
text_icon_padding = 0;
|
||||
separator_color = "frame";
|
||||
sort = "yes";
|
||||
idle_threshold = 120;
|
||||
line_height = 0;
|
||||
markup = "full";
|
||||
show_age_threshold = 60;
|
||||
ellipsize = "middle";
|
||||
ignore_newline = "no";
|
||||
stack_duplicates = true;
|
||||
sticky_history = "yes";
|
||||
history_length = 20;
|
||||
always_run_script = true;
|
||||
corner_radius = config.theme.rounding;
|
||||
follow = "mouse";
|
||||
font = config.theme.font;
|
||||
format = "<b>%s</b>\\n%b";
|
||||
progress_bar_corner_radius = config.theme.rounding - 10;
|
||||
#format = ''
|
||||
# <span foreground='#${config.theme.colors.primary-bg}'><b>%s %p</b></span>
|
||||
# %b'';
|
||||
frame_color = "#" + config.theme.colors.bg;
|
||||
highlight = "#" + config.theme.colors.primary-bg;
|
||||
foreground = "#" + config.theme.colors.fg;
|
||||
frame_width = 1;
|
||||
offset = "0x10";
|
||||
horizontal_padding = 10;
|
||||
icon_position = "left";
|
||||
indicate_hidden = "yes";
|
||||
min_icon_size = 0;
|
||||
max_icon_size = 64;
|
||||
mouse_left_click = "do_action, close_current";
|
||||
mouse_middle_click = "close_current";
|
||||
mouse_right_click = "close_all";
|
||||
padding = 10;
|
||||
plain_text = "no";
|
||||
separator_height = 2;
|
||||
show_indicators = "yes";
|
||||
shrink = "no";
|
||||
word_wrap = "yes";
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
};
|
||||
|
||||
fullscreen_delay_everything = { fullscreen = "delay"; };
|
||||
|
||||
urgency_critical = {
|
||||
background = "#" + config.theme.colors.color1;
|
||||
foreground = "#" + config.theme.colors.color0;
|
||||
};
|
||||
urgency_low = {
|
||||
background = "#" + config.theme.colors.alt-bg;
|
||||
foreground = "#" + config.theme.colors.alt-fg;
|
||||
};
|
||||
urgency_normal = {
|
||||
background = "#" + config.theme.colors.alt-bg;
|
||||
foreground = "#" + config.theme.colors.alt-fg;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
8
home/programs/desktop/hyprcursor.nix
Executable file
8
home/programs/desktop/hyprcursor.nix
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }: {
|
||||
|
||||
# home.file.".local/share/icons/rose-pine-hyprcursor" = {
|
||||
# recursive = true;
|
||||
# source = ./rose-pine;
|
||||
# };
|
||||
|
||||
}
|
||||
60
home/programs/desktop/hyprlock.nix
Executable file
60
home/programs/desktop/hyprlock.nix
Executable file
|
|
@ -0,0 +1,60 @@
|
|||
{ config, ... }: {
|
||||
|
||||
xdg.configFile."hypr/hyprlock.conf".text = ''
|
||||
background {
|
||||
monitor =
|
||||
path = ${config.theme.lockscreenWallpaper}
|
||||
color = rgb(${config.theme.colors.bg})
|
||||
|
||||
blur_size = 4
|
||||
blur_passes = 3
|
||||
noise = 0.0117
|
||||
contrast = 1.3000
|
||||
brightness = 0.8000
|
||||
vibrancy = 0.2100
|
||||
vibrancy_darkness = 0.0
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor =
|
||||
size = 250, 50
|
||||
outline_thickness = 3
|
||||
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.64 # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true
|
||||
outer_color = rgb(${config.theme.colors.primary-bg})
|
||||
inner_color = rgb(${config.theme.colors.bg})
|
||||
font_color = rgb(${config.theme.colors.fg})
|
||||
fade_on_empty = true
|
||||
placeholder_text = <i>Password...</i> # Text rendered in the input box when it's empty.
|
||||
hide_input = false
|
||||
position = 0, 50
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
||||
|
||||
# Current time
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "<b><big> $(date +"%H:%M:%S") </big></b>"
|
||||
color = rgb(${config.theme.colors.fg})
|
||||
font_size = 64
|
||||
font_family = ${config.theme.font}
|
||||
position = 0, 16
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# Type to unlock
|
||||
label {
|
||||
monitor =
|
||||
text = Enter passowrd:
|
||||
color = rgb(${config.theme.colors.fg})
|
||||
font_size = 16
|
||||
font_family = ${config.theme.font}
|
||||
position = 0, 30
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
||||
'';
|
||||
}
|
||||
86
home/programs/desktop/keybinds.nix
Executable file
86
home/programs/desktop/keybinds.nix
Executable file
|
|
@ -0,0 +1,86 @@
|
|||
{ pkgs }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
let
|
||||
|
||||
modifier = "Mod4";
|
||||
left = "h";
|
||||
down = "j";
|
||||
up = "k";
|
||||
right = "l";
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
## Application binds
|
||||
"${modifier}+Tab" = "exec ${wofi}/bin/wofi";
|
||||
"${modifier}+q" = "kill";
|
||||
#"${modifier}+Space" = "exec ${cfg.config.menu}";
|
||||
"${modifier}+Return" = "exec ${kitty}/bin/kitty";
|
||||
"${modifier}+Shift+Return" = "exec ${kitty}/bin/kitty --floating";
|
||||
"${modifier}+Shift+r" = "reload";
|
||||
"${modifier}+Alt+Shift+r" = "restart";
|
||||
"${modifier}+L" = "exec ${hyprlock}/bin/hyprlock";
|
||||
|
||||
## Screenshot binds
|
||||
"Print" = "exec screenshot window";
|
||||
"Print+Shift" = "exec screenshot monitor";
|
||||
"Print+${modifier}" = "exec screenshot region";
|
||||
|
||||
## Brightness, volume, and media controls
|
||||
XF86MonBrightnessUp = "exec ${xorg.xbacklight} -inc 20";
|
||||
XF86MonBrightnessDown = "exec ${xorg.xbacklight} -dec 20";
|
||||
XF86AudioRaiseVolume = "exec ${pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
XF86AudioLowerVolume = "exec ${pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||
XF86AudioMute = "exec ${pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
XF86AudioPlay = "exec ${playerctl}/bin/playerctl play";
|
||||
XF86AudioPause = "exec ${playerctl}/bin/playerctl pause";
|
||||
XF86AudioNext = "exec ${playerctl}/bin/playerctl next";
|
||||
XF86AudioPrev = "exec ${playerctl}/bin/playerctl prev";
|
||||
|
||||
## Window controls
|
||||
"${modifier}+Shift+Alt+Space" = "focus mode_toggle";
|
||||
"${modifier}+c" = "split h";
|
||||
"${modifier}+v" = "split v";
|
||||
"${modifier}+T" = "floating toggle";
|
||||
"${modifier}+f" = "fullscreen toggle";
|
||||
"${modifier}+s" = "layout stacking";
|
||||
#"${modifier}+t" = "layout tabbed";
|
||||
#"${modifier}+e" = "layout toggle split";
|
||||
"${modifier}+Shift+${left}" = "move left";
|
||||
"${modifier}+Shift+${down}" = "move down";
|
||||
"${modifier}+Shift+${up}" = "move up";
|
||||
"${modifier}+Shift+${right}" = "move right";
|
||||
"${modifier}+${left}" = "focus left; exec $movemouse";
|
||||
"${modifier}+${down}" = "focus down; exec $movemouse";
|
||||
"${modifier}+${up}" = "focus up; exec $movemouse";
|
||||
"${modifier}+${right}" = "focus right; exec $movemouse";
|
||||
|
||||
## Workspace controls
|
||||
"${modifier}+1" = "workspace number 1";
|
||||
"${modifier}+2" = "workspace number 2";
|
||||
"${modifier}+3" = "workspace number 3";
|
||||
"${modifier}+4" = "workspace number 4";
|
||||
"${modifier}+5" = "workspace number 5";
|
||||
"${modifier}+6" = "workspace number 6";
|
||||
"${modifier}+7" = "workspace number 7";
|
||||
"${modifier}+8" = "workspace number 8";
|
||||
"${modifier}+9" = "workspace number 9";
|
||||
"${modifier}+0" = "workspace number 10";
|
||||
"${modifier}+Shift+1" = "move container to workspace number 1";
|
||||
"${modifier}+Shift+2" = "move container to workspace number 2";
|
||||
"${modifier}+Shift+3" = "move container to workspace number 3";
|
||||
"${modifier}+Shift+4" = "move container to workspace number 4";
|
||||
"${modifier}+Shift+5" = "move container to workspace number 5";
|
||||
"${modifier}+Shift+6" = "move container to workspace number 6";
|
||||
"${modifier}+Shift+7" = "move container to workspace number 7";
|
||||
"${modifier}+Shift+8" = "move container to workspace number 8";
|
||||
"${modifier}+Shift+9" = "move container to workspace number 9";
|
||||
"${modifier}+Shift+0" = "move container to workspace number 10";
|
||||
"${modifier}+Alt+${up}" = "move workspace to output up";
|
||||
"${modifier}+Alt+${down}" = "move workspace to output down";
|
||||
"${modifier}+Alt+${left}" = "move workspace to output left";
|
||||
"${modifier}+Alt+${right}" = "move workspace to output right";
|
||||
|
||||
}
|
||||
107
home/programs/desktop/sway.nix
Executable file
107
home/programs/desktop/sway.nix
Executable file
|
|
@ -0,0 +1,107 @@
|
|||
{ lib, pkgs, ... }:
|
||||
with lib;
|
||||
with pkgs;
|
||||
let
|
||||
|
||||
left = "h";
|
||||
down = "j";
|
||||
up = "k";
|
||||
right = "l";
|
||||
|
||||
in {
|
||||
imports = [ ./swayfx.nix ];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
extraSessionCommands = ''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
'';
|
||||
extraConfig = "";
|
||||
xwayland = true;
|
||||
checkConfig = false;
|
||||
package = pkgs.swayfx;
|
||||
wrapperFeatures = {
|
||||
base = true;
|
||||
gtk = true;
|
||||
};
|
||||
systemd = {
|
||||
enable = true;
|
||||
#xdgAutostart = true;
|
||||
#extraCommands = [
|
||||
#];
|
||||
#variables = [
|
||||
#];
|
||||
};
|
||||
|
||||
swaynag = {
|
||||
enable = true;
|
||||
settings = { };
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
output = {
|
||||
eDP-1 = {
|
||||
## Set HIDP scale (pixel integer scaling)
|
||||
scale = "1";
|
||||
};
|
||||
};
|
||||
|
||||
defaultWorkspace = "workspace number 1";
|
||||
|
||||
## Use Wofi as menu
|
||||
menu = "menu";
|
||||
## Use kitty as default terminal
|
||||
terminal = "kitty";
|
||||
## Startup scripts and programs
|
||||
startup = [
|
||||
{ command = "startupExtra"; }
|
||||
{ command = "startup"; } # defined in `home/scripts/startup.nix`
|
||||
{ command = "kitty"; }
|
||||
{ command = "kitty btop"; }
|
||||
];
|
||||
modifier = "Mod4";
|
||||
floating = { modifier = "Mod4"; };
|
||||
|
||||
## Window and focus settings
|
||||
window = { };
|
||||
focus = {
|
||||
followMouse = true;
|
||||
mouseWarping = false;
|
||||
newWindow = "smart";
|
||||
};
|
||||
|
||||
keybindings = mkOptionDefault (import ./keybinds.nix { inherit pkgs; });
|
||||
|
||||
#modes = {
|
||||
#resize = {
|
||||
#Escape = "mode default";
|
||||
#Return = "mode default";
|
||||
#"${down}" = "resize grow height 10 px or 10 ppt";
|
||||
#"${left}" = "resize shrink width 10 px or 10 ppt";
|
||||
#"${right}" = "resize grow width 10 px or 10 ppt";
|
||||
#"${up}" = "resize shrink height 10 px or 10 ppt";
|
||||
#};
|
||||
#};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [ ];
|
||||
|
||||
sessionVariables = {
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
XDG_CURRENT_DESKTOP = "sway";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
# needs qt5.qtwayland in systemPackages
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
141
home/programs/desktop/swayfx.nix
Executable file
141
home/programs/desktop/swayfx.nix
Executable file
|
|
@ -0,0 +1,141 @@
|
|||
{ self, inputs, outputs, lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with pkgs;
|
||||
|
||||
let
|
||||
|
||||
bg-color = "#424242";
|
||||
inactive-bg-color = "#424242";
|
||||
text-color = "#4f97d7";
|
||||
inactive-text-color = "#676E7D";
|
||||
urgent-bg-color = "#E53935";
|
||||
|
||||
colorSchemeDark = rec {
|
||||
primary = {
|
||||
normal = {
|
||||
background = "181818";
|
||||
foreground = "b9b9b9";
|
||||
};
|
||||
bright = {
|
||||
background = bright.black;
|
||||
foreground = bright.white;
|
||||
};
|
||||
};
|
||||
normal = {
|
||||
black = "252525";
|
||||
gray = "5b5b5b";
|
||||
red = "ed4a46";
|
||||
green = "70b433";
|
||||
yellow = "dbb32d";
|
||||
blue = "368aeb";
|
||||
magenta = "eb6eb7";
|
||||
cyan = "3fc5b7";
|
||||
white = "777777";
|
||||
};
|
||||
bright = {
|
||||
black = "3b3b3b";
|
||||
gray = "7b7b7b";
|
||||
red = "ff5e56";
|
||||
green = "83c746";
|
||||
yellow = "efc541";
|
||||
blue = "4f9cfe";
|
||||
magenta = "ff81ca";
|
||||
cyan = "56d8c9";
|
||||
white = "dedede";
|
||||
};
|
||||
};
|
||||
|
||||
colorScheme = colorSchemeDark;
|
||||
font = "Spleen-32x64";
|
||||
|
||||
bgColor = colorScheme.primary.normal.background;
|
||||
fgColor = colorScheme.primary.bright.foreground;
|
||||
acColor = colorScheme.normal.red;
|
||||
acColor2 = colorScheme.normal.yellow;
|
||||
|
||||
in {
|
||||
|
||||
imports = [ ];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
extraSessionCommands = "";
|
||||
extraConfig = "
|
||||
default_border pixel 3
|
||||
smart_corner_radius enable
|
||||
corner_radius 15
|
||||
shadows enable
|
||||
shadows_on_csd enable
|
||||
shadow_blur_radius 10
|
||||
blur enable
|
||||
blur_xray disable
|
||||
blur_passes 4
|
||||
blur_radius 1
|
||||
";
|
||||
|
||||
config = rec {
|
||||
|
||||
## Use waybar as desktop statusbar
|
||||
bars = [{
|
||||
command = "${waybar}/bin/waybar";
|
||||
position = "top";
|
||||
fonts = { size = 15.0; };
|
||||
}];
|
||||
|
||||
## Borders
|
||||
window = {
|
||||
titlebar = false;
|
||||
border = 1;
|
||||
};
|
||||
floating = { border = 1; };
|
||||
gaps.smartBorders = "on";
|
||||
|
||||
## Gaps
|
||||
gaps = {
|
||||
inner = 5;
|
||||
outer = 5;
|
||||
smartGaps = false;
|
||||
};
|
||||
|
||||
## Fonts
|
||||
fonts = {
|
||||
names = [ "Spleen-32x64" ];
|
||||
size = 10.0;
|
||||
};
|
||||
|
||||
## Colours
|
||||
colors = {
|
||||
focused = {
|
||||
border = bg-color;
|
||||
childBorder = bg-color;
|
||||
background = bg-color;
|
||||
text = text-color;
|
||||
indicator = "#00ff00";
|
||||
};
|
||||
unfocused = {
|
||||
border = inactive-bg-color;
|
||||
childBorder = inactive-bg-color;
|
||||
background = inactive-bg-color;
|
||||
text = inactive-text-color;
|
||||
indicator = "#00ff00";
|
||||
};
|
||||
focusedInactive = {
|
||||
border = inactive-bg-color;
|
||||
childBorder = inactive-bg-color;
|
||||
background = inactive-bg-color;
|
||||
text = inactive-text-color;
|
||||
indicator = "#00ff00";
|
||||
};
|
||||
urgent = {
|
||||
border = urgent-bg-color;
|
||||
childBorder = urgent-bg-color;
|
||||
background = urgent-bg-color;
|
||||
text = text-color;
|
||||
indicator = "#00ff00";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
262
home/programs/desktop/waybar.nix
Executable file
262
home/programs/desktop/waybar.nix
Executable file
|
|
@ -0,0 +1,262 @@
|
|||
{ pkgs, config, lib, ... }: {
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [ waybar ];
|
||||
};
|
||||
|
||||
services = {
|
||||
blueman-applet.enable = false;
|
||||
network-manager-applet.enable = true;
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
# package = waybar.packages."${pkgs.system}".waybar;
|
||||
# systemd.enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
spacing = 0;
|
||||
"margin-top" = config.theme.gaps-out;
|
||||
"margin-left" = config.theme.gaps-out;
|
||||
"margin-right" = config.theme.gaps-out;
|
||||
height = 44;
|
||||
modules-left = [ "custom/logo" "sway/window" ];
|
||||
modules-center = [ "sway/workspaces" ];
|
||||
modules-right = [ "tray" "backlight" "pulseaudio" "battery" "clock" "custom/power" ];
|
||||
|
||||
"wlr/taskbar" = {
|
||||
format = "{icon}";
|
||||
"on-click" = "activate";
|
||||
"on-click-right" = "fullscreen";
|
||||
|
||||
"icon-size" = 25;
|
||||
"tooltip-format" = "{title}";
|
||||
};
|
||||
"sway/window" = {
|
||||
"format" = "{title:30}";
|
||||
"max-length" = 32;
|
||||
};
|
||||
|
||||
"sway/workspaces" = {
|
||||
all-outputs = true;
|
||||
"on-click" = "activate";
|
||||
format = "{icon}";
|
||||
"format-icons" = {
|
||||
"default" = "";
|
||||
"1" = "1";
|
||||
"2" = "2";
|
||||
"3" = "3";
|
||||
"4" = "4";
|
||||
"5" = "5";
|
||||
"6" = "6";
|
||||
"7" = "7";
|
||||
"8" = "8";
|
||||
"9" = "9";
|
||||
"active" = "";
|
||||
"urgent" = "";
|
||||
};
|
||||
"persistent-workspaces" = {
|
||||
"1" = [ ];
|
||||
"2" = [ ];
|
||||
"3" = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
tray = { spacing = 16; };
|
||||
|
||||
clock = {
|
||||
"tooltip-format" = "<tt>{calendar}</tt>";
|
||||
"format-alt" = " {:%a, %d %b %Y}";
|
||||
format = " {:%I:%M %p}";
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{icon}";
|
||||
"format-bluetooth" = "";
|
||||
nospacing = 1;
|
||||
"tooltip-format" = "Volume : {volume}%";
|
||||
"format-muted" = "";
|
||||
"format-icons" = {
|
||||
"headphone" = "";
|
||||
"default" = [ "" "" "" ];
|
||||
};
|
||||
"on-click" = "pamixer -t";
|
||||
"scroll-step" = 1;
|
||||
};
|
||||
|
||||
"custom/logo" = {
|
||||
format = " ";
|
||||
tooltip = false;
|
||||
on-click = "menu";
|
||||
};
|
||||
|
||||
battery = {
|
||||
format = "{capacity}% {icon}";
|
||||
"format-icons" = {
|
||||
"charging" = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
"default" = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
};
|
||||
"format-full" = " ";
|
||||
interval = 10;
|
||||
states = {
|
||||
warning = 20;
|
||||
critical = 10;
|
||||
};
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/power" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
on-click = "powermenu";
|
||||
};
|
||||
|
||||
backlight = {
|
||||
device = "nvidia_0";
|
||||
format = "{icon}";
|
||||
"format-icons" = [ " " " " "" "" "" "" "" "" "" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
font-family: "${config.theme.font}";
|
||||
color: #${config.theme.colors.fg};
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: ${
|
||||
if config.theme.waybar-transparent then
|
||||
"rgba(0, 0, 0, 0)"
|
||||
else
|
||||
"#${config.theme.colors.bg}"
|
||||
};
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
border-radius: ${toString config.theme.rounding}px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.modules-left, .modules-center, .modules-right {
|
||||
border-radius: ${toString config.theme.rounding}px;
|
||||
background-color: #${config.theme.colors.bg};
|
||||
padding: 2px 6px;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#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 18px;
|
||||
margin: 6px 3px;
|
||||
border-radius: 4px;
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: #${config.theme.colors.primary-fg};
|
||||
background-color: #${config.theme.colors.primary-bg};
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #${config.theme.colors.color1};
|
||||
}
|
||||
|
||||
#window > * {
|
||||
font-family: "${config.theme.font-mono}";
|
||||
}
|
||||
|
||||
#memory,
|
||||
#custom-power,
|
||||
#battery,
|
||||
#backlight,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#clock,
|
||||
#tray,
|
||||
#backlight{
|
||||
border-radius: 9px;
|
||||
margin: 6px 3px;
|
||||
padding: 6px 12px;
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
}
|
||||
|
||||
#tray menu {
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
}
|
||||
|
||||
#custom-logo {
|
||||
padding-right: 7px;
|
||||
font-size: 15px;
|
||||
color: #${config.theme.colors.primary-bg};
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #f38ba8;
|
||||
color: #181825;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.warning,
|
||||
#battery.critical,
|
||||
#battery.urgent {
|
||||
background-color: #ff0048;
|
||||
color: #181825;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
animation: none;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
background-color: #${config.theme.colors.primary-bg};
|
||||
color: #${config.theme.colors.primary-fg};
|
||||
}
|
||||
|
||||
|
||||
tooltip {
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
padding: 5px;
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
117
home/programs/desktop/wlogout.nix
Executable file
117
home/programs/desktop/wlogout.nix
Executable file
|
|
@ -0,0 +1,117 @@
|
|||
{ config, pkgs, ... }: {
|
||||
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "lock";
|
||||
action = "${pkgs.hyprlock}/bin/hyprlock";
|
||||
text = "Lock";
|
||||
keybind = "l";
|
||||
}
|
||||
{
|
||||
label = "hibernate";
|
||||
action = "systemctl hibernate";
|
||||
text = "Hibernate";
|
||||
keybind = "h";
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "killall -9 Hyprland sleep 2";
|
||||
text = "Exit";
|
||||
keybind = "e";
|
||||
}
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "systemctl poweroff";
|
||||
text = "Shutdown";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
label = "suspend";
|
||||
action = "systemctl suspend";
|
||||
text = "Suspend";
|
||||
keybind = "u";
|
||||
}
|
||||
{
|
||||
label = "reboot";
|
||||
action = "systemctl reboot";
|
||||
text = "Reboot";
|
||||
keybind = "r";
|
||||
}
|
||||
];
|
||||
|
||||
style = ''
|
||||
* {
|
||||
font-family: "${config.theme.font}";
|
||||
background-image: none;
|
||||
transition: 20ms;
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: rgba(12,12,12,0.5);
|
||||
}
|
||||
|
||||
button {
|
||||
color: #${config.theme.colors.fg};
|
||||
font-size:20px;
|
||||
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 25%;
|
||||
|
||||
border-style: solid;
|
||||
background-color: #${config.theme.colors.bg};
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
|
||||
button:focus,
|
||||
button:active {
|
||||
color: #${config.theme.colors.primary-fg};
|
||||
background-color: #${config.theme.colors.primary-bg};
|
||||
border: 3px solid #${config.theme.colors.primary-bg};
|
||||
}
|
||||
|
||||
/*
|
||||
-----------------------------------------------------
|
||||
Buttons
|
||||
-----------------------------------------------------
|
||||
*/
|
||||
|
||||
#lock,#logout,#suspend,#hibernate,#shutdown,#reboot {
|
||||
margin: 10px;
|
||||
border-radius: ${toString config.theme.rounding}px;
|
||||
}
|
||||
|
||||
#lock {
|
||||
background-image: image(url("../resources/icons/lock.png"));
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("../resources/icons/logout.png"));
|
||||
}
|
||||
|
||||
#suspend {
|
||||
background-image: image(url("../resources/icons/suspend.png"));
|
||||
}
|
||||
|
||||
#hibernate {
|
||||
background-image: image(url("../resources/icons/hibernate.png"));
|
||||
}
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("../resources/icons/shutdown.png"));
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("../resources/icons/reboot.png"));
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."icons" = {
|
||||
recursive = true;
|
||||
source = ../resources/icons;
|
||||
};
|
||||
|
||||
}
|
||||
96
home/programs/desktop/wofi.nix
Executable file
96
home/programs/desktop/wofi.nix
Executable file
|
|
@ -0,0 +1,96 @@
|
|||
{ config, ... }: {
|
||||
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
allow_markup = true;
|
||||
width = 500;
|
||||
show = "drun";
|
||||
prompt = "Apps";
|
||||
normal_window = true;
|
||||
layer = "top";
|
||||
term = "foot";
|
||||
height = "305px";
|
||||
orientation = "vertical";
|
||||
halign = "fill";
|
||||
line_wrap = "off";
|
||||
dynamic_lines = false;
|
||||
allow_images = true;
|
||||
image_size = 24;
|
||||
exec_search = false;
|
||||
hide_search = false;
|
||||
parse_search = false;
|
||||
insensitive = true;
|
||||
hide_scroll = true;
|
||||
no_actions = true;
|
||||
sort_order = "default";
|
||||
gtk_dark = true;
|
||||
filter_rate = 100;
|
||||
key_expand = "Tab";
|
||||
key_exit = "Escape";
|
||||
};
|
||||
|
||||
style = ''
|
||||
/** ********** Fonts ********** **/
|
||||
|
||||
* {
|
||||
font-family: "${config.theme.font}";
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#window {
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
border-radius: ${toString config.theme.rounding}px;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
#input {
|
||||
background-color: #${config.theme.colors.bg};
|
||||
border: 0px solid #${config.theme.colors.primary-bg};
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#inner-box {}
|
||||
|
||||
#img {
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
#text {
|
||||
color: #${config.theme.colors.color7};
|
||||
}
|
||||
|
||||
#text:selected {
|
||||
color: #${config.theme.colors.fg};
|
||||
}
|
||||
|
||||
#entry {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: #${config.theme.colors.primary-bg};
|
||||
color: #${config.theme.colors.primary-fg};
|
||||
}
|
||||
|
||||
#unselected {}
|
||||
|
||||
#selected {}
|
||||
|
||||
#input,
|
||||
#entry:selected {
|
||||
border-radius: ${toString (config.theme.rounding - 10)}px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
84
home/programs/desktop/xdg-mime.nix
Executable file
84
home/programs/desktop/xdg-mime.nix
Executable file
|
|
@ -0,0 +1,84 @@
|
|||
# Mime allows us to configure the default applications for each file type
|
||||
{
|
||||
xdg = {
|
||||
mime.enable = true;
|
||||
configFile."mimeapps.list" = {
|
||||
#enable = true; # enables ? following declarations
|
||||
force = true; # forces the following declarations
|
||||
};
|
||||
#desktopEntries = { };
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
associations = {
|
||||
added = {
|
||||
## General Desktop
|
||||
#"text/plain" = [ "nvim.desktop" ];
|
||||
"text/markdown" = [ "obsidian.desktop" ];
|
||||
"inode/directory" = [ "nautilus.desktop" ];
|
||||
## Multimedia
|
||||
"image/gif" = [ "gimp.desktop" ];
|
||||
"image/png" = [ "gimp.desktop" ];
|
||||
"image/jpg" = [ "gimp.desktop" ];
|
||||
"image/jpeg" = [ "gimp.desktop" ];
|
||||
"image/webp" = [ "gimp.desktop" ];
|
||||
"audio/aac" = [ "vlc.desktop" ];
|
||||
"audio/mp4" = [ "vlc.desktop" ];
|
||||
"audio/ogg" = [ "vlc.desktop" ];
|
||||
"audio/opus" = [ "vlc.desktop" ];
|
||||
"audio/mpeg" = [ "vlc.desktop" ];
|
||||
"audio/aiff" = [ "vlc.desktop" ];
|
||||
"audio/flac" = [ "vlc.desktop" ];
|
||||
|
||||
## Web
|
||||
"text/css" = [ "firefox.desktop" ];
|
||||
"text/html" = [ "firefox.desktop" ];
|
||||
"application/json" = [ "nvim.desktop" ];
|
||||
};
|
||||
};
|
||||
defaultApplications = {
|
||||
## General Desktop
|
||||
"text/plain" = [ "nvim.desktop" ];
|
||||
"text/markdown" = [ "nvim.desktop" ];
|
||||
"inode/directory" = [ "yazi.desktop" ];
|
||||
"application/pdf" = [ "zathura.desktop" ];
|
||||
"application/zip" = [ "org.gnome.FileRoller.desktop" ];
|
||||
## Multimedia
|
||||
"image/gif" = [ "swayimg.desktop" ];
|
||||
"image/png" = [ "swayimg.desktop" ];
|
||||
"image/jpg" = [ "swayimg.desktop" ];
|
||||
"image/jpeg" = [ "swayimg.desktop" ];
|
||||
"image/webp" = [ "swayimg.desktop" ];
|
||||
"audio/aac" = [ "strawberry.desktop" ];
|
||||
"audio/mp4" = [ "strawberry.desktop" ];
|
||||
"audio/ogg" = [ "strawberry.desktop" ];
|
||||
"audio/opus" = [ "strawberry.desktop" ];
|
||||
"audio/mpeg" = [ "strawberry.desktop" ];
|
||||
"audio/aiff" = [ "strawberry.desktop" ];
|
||||
"audio/flac" = [ "strawberry.desktop" ];
|
||||
"audio/vnd.wav" = [ "strawberry.desktop" ];
|
||||
"video/mp4" = [ "vlc.desktop" ];
|
||||
"video/mpeg" = [ "vlc.desktop" ];
|
||||
"video/webm" = [ "vlc.desktop" ];
|
||||
"video/x-m4v" = [ "vlc.desktop" ];
|
||||
"video/x-msvideo" = [ "vlc.desktop" ];
|
||||
"video/quicktime" = [ "vlc.desktop" ];
|
||||
"video/x-matroska" = [ "vlc.desktop" ];
|
||||
## Web
|
||||
"text/css" = [ "nvim.desktop" ];
|
||||
"text/html" = [ "nvim.desktop" ];
|
||||
"application/json" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/ftp" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||
## Code
|
||||
"text/x-shellscript" = [ "nvim.desktop" ];
|
||||
"text/x-xml" = [ "nvim.desktop" ];
|
||||
"text/x-yaml" = [ "nvim.desktop" ];
|
||||
"text/x-toml" = [ "nvim.desktop" ];
|
||||
"text/x-nix" = [ "nvim.desktop" ];
|
||||
"text/x-rust" = [ "nvim.desktop" ];
|
||||
"text/x-python" = [ "nvim.desktop" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue