Compare commits
No commits in common. "34ea27db26efddba227423b47f09cbaac58d94d6" and "2eba0109540391697b80e744eb38f29bd55bde3a" have entirely different histories.
34ea27db26
...
2eba010954
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, username, ... }:
|
||||
{
|
||||
imports = [ ./plasma.nix ];
|
||||
home-manager.users.${username}.imports = [ ./home/desktop.nix ];
|
||||
nixpkgs.config.chromium.commandLineArgs = "--password-store='gnome-libsecret' --enable-features=UseOzonePlatform --ozone-platform=wayland";
|
||||
hardware.bluetooth.enable = true;
|
||||
|
@ -15,11 +16,6 @@
|
|||
hunspell
|
||||
hunspellDicts.en_GB-large
|
||||
];
|
||||
plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
plasma-browser-integration
|
||||
konsole
|
||||
kate
|
||||
];
|
||||
};
|
||||
security = {
|
||||
polkit.enable = true;
|
||||
|
@ -40,14 +36,7 @@
|
|||
};
|
||||
gtk.iconCache.enable = true;
|
||||
services = {
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
desktopManager.plasma6 = {
|
||||
enable = true;
|
||||
enableQt5Integration = true;
|
||||
};
|
||||
dbus.packages = [ pkgs.gcr ];
|
||||
flatpak.enable = true;
|
||||
printing.enable = true;
|
||||
pipewire = {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
imports = [
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
./shell/default.nix
|
||||
./scripts/default.nix
|
||||
./services/password-store/default.nix
|
||||
./scripts/default.nix
|
||||
];
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
./emacs/default.nix
|
||||
./terminal/default.nix
|
||||
./browser/default.nix
|
||||
./zathura/default.nix
|
||||
./services/email/default.nix
|
||||
./services/calendar/default.nix
|
||||
];
|
||||
|
|
BIN
system/home/icons/nix/nix-owo-transparent.png
Normal file
BIN
system/home/icons/nix/nix-owo-transparent.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 112 KiB |
BIN
system/home/icons/nix/nix-owo-white.png
Normal file
BIN
system/home/icons/nix/nix-owo-white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 84 KiB |
BIN
system/home/icons/nix/nix-shooting.png
Normal file
BIN
system/home/icons/nix/nix-shooting.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
BIN
system/home/icons/nix/nix-snowflake-cute.png
Normal file
BIN
system/home/icons/nix/nix-snowflake-cute.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
system/home/icons/nix/nixos-confetti.png
Normal file
BIN
system/home/icons/nix/nixos-confetti.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 89 KiB |
13
system/home/lib/to_capital.nix
Normal file
13
system/home/lib/to_capital.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
lib: string:
|
||||
with lib;
|
||||
let
|
||||
chars =
|
||||
let
|
||||
lc = strings.splitString "" string;
|
||||
in
|
||||
(lists.sublist 1 (lists.length lc - 2) lc);
|
||||
in
|
||||
(strings.concatStringsSep "" (
|
||||
(lists.singleton (strings.toUpper (lists.elemAt chars 0)))
|
||||
++ (lists.sublist 1 (lists.length chars) chars)
|
||||
))
|
|
@ -3,15 +3,22 @@ let
|
|||
browser = [ "firefox.desktop" ];
|
||||
in
|
||||
{
|
||||
"inode/directory" = [ "thunar.desktop" ];
|
||||
"inode/symlink" = [ "thunar.desktop" ];
|
||||
|
||||
"image/jpeg" = [ "swayimg.desktop" ];
|
||||
"image/png" = [ "swayimg.desktop" ];
|
||||
"video/mp4" = [ "mpv.desktop" ];
|
||||
|
||||
"text/plain" = emacs;
|
||||
"text/richtext" = emacs;
|
||||
"text/org" = emacs;
|
||||
"text/markdown" = emacs;
|
||||
"text/rust" = emacs;
|
||||
"text/csv" = emacs;
|
||||
"text/html" = emacs;
|
||||
"text/css" = emacs;
|
||||
"text/tab-separated-values" = emacs;
|
||||
"text/html" = browser;
|
||||
|
||||
"text/x-emacs-lisp" = emacs;
|
||||
"text/x-fortran" = emacs;
|
||||
|
@ -38,6 +45,8 @@ in
|
|||
"application/x-docbook+xml" = emacs;
|
||||
"application/x-yaml" = emacs;
|
||||
|
||||
"application/pdf" = [ "org.pwmt.zathura.desktop" ];
|
||||
"application/epub+zip" = [ "org.pwmt.zathura.desktop" ];
|
||||
"application/msword" = [ "writer.desktop" ];
|
||||
|
||||
"application/x-extension-htm" = browser;
|
||||
|
|
257
system/home/sway/default.nix
Normal file
257
system/home/sway/default.nix
Normal file
|
@ -0,0 +1,257 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./waybar/default.nix ];
|
||||
stylix.targets.swaylock.useImage = false; # Using swaylock-effects instead
|
||||
home.packages = with pkgs; [
|
||||
libreoffice-fresh
|
||||
ffmpeg
|
||||
grim
|
||||
slurp
|
||||
swappy
|
||||
wl-clipboard
|
||||
swayimg
|
||||
swaybg
|
||||
(writeShellScriptBin "swaylockfx" ''
|
||||
${swaylock-effects}/bin/swaylock --screenshots --clock --indicator --effect-blur 7x5 --effect-vignette 0.5:0.5
|
||||
'')
|
||||
(writeShellScriptBin "protonmail-setup-bridge" ''
|
||||
pkill -9 -f protonmail-bridge
|
||||
${protonmail-bridge}/bin/protonmail-bridge -c
|
||||
swaymsg exec "${protonmail-bridge}/bin/protonmail-bridge -n"
|
||||
'')
|
||||
];
|
||||
programs = {
|
||||
waybar.systemd.target = "sway-session.target";
|
||||
fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
icon-theme = config.gtk.iconTheme.name;
|
||||
icons-enabled = true;
|
||||
fields = "filename,name,generic,categories";
|
||||
fuzzy = true;
|
||||
filter-desktop = true;
|
||||
terminal = "${config.programs.alacritty.package}/bin/alacritty -e";
|
||||
lines = 24;
|
||||
width = 80;
|
||||
tabs = 4;
|
||||
layer = "overlay";
|
||||
};
|
||||
border = {
|
||||
width = 1;
|
||||
radius = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
swaylock = {
|
||||
enable = true;
|
||||
package = pkgs.swaylock-effects;
|
||||
};
|
||||
wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "reboot";
|
||||
action = "systemctl reboot";
|
||||
text = "Reboot";
|
||||
keybind = "r";
|
||||
}
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "systemctl poweroff";
|
||||
text = "Shutdown";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "swaymsg exit";
|
||||
text = "Logout";
|
||||
keybind = "l";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
services = {
|
||||
kanshi.systemdTarget = "sway-session.target";
|
||||
gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
|
||||
avizo = {
|
||||
enable = true;
|
||||
settings.default.image-opacity = lib.mkForce "1.0";
|
||||
};
|
||||
kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
mako = {
|
||||
enable = true;
|
||||
anchor = "top-right";
|
||||
width = 600;
|
||||
height = 600;
|
||||
layer = "top";
|
||||
markup = true;
|
||||
maxVisible = 10;
|
||||
icons = true;
|
||||
iconPath = with config.gtk.iconTheme; "${package}/share/icons/${name}";
|
||||
borderRadius = 5;
|
||||
borderSize = 1;
|
||||
defaultTimeout = 0;
|
||||
};
|
||||
swayidle = {
|
||||
enable = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 60 * 15; # 15 minutes
|
||||
command = "swaylockfx";
|
||||
}
|
||||
];
|
||||
};
|
||||
udiskie = {
|
||||
enable = true;
|
||||
notify = true;
|
||||
automount = true;
|
||||
tray = "never";
|
||||
};
|
||||
};
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
package = pkgs.swayfx.overrideAttrs (old: {
|
||||
passthru.providedSessions = [ "sway" ];
|
||||
});
|
||||
swaynag.enable = true;
|
||||
systemd.enable = true;
|
||||
xwayland = true;
|
||||
checkConfig = false;
|
||||
config = {
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "gb";
|
||||
xkb_options = "ctrl:nocaps";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
tap = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
};
|
||||
};
|
||||
seat = {
|
||||
"seat0" = {
|
||||
xcursor_theme = "${config.gtk.cursorTheme.name} ${toString config.gtk.cursorTheme.size}";
|
||||
};
|
||||
};
|
||||
modifier = "Mod4";
|
||||
terminal = "${config.programs.alacritty.package}/bin/alacritty";
|
||||
menu = "${config.programs.fuzzel.package}/bin/fuzzel";
|
||||
workspaceAutoBackAndForth = true;
|
||||
bars = [ ];
|
||||
gaps = {
|
||||
inner = 5;
|
||||
outer = 0;
|
||||
};
|
||||
startup = [
|
||||
{ command = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"; }
|
||||
{ command = "${pkgs.protonmail-bridge}/bin/protonmail-bridge -n"; }
|
||||
{ command = "${pkgs.dex}/bin/dex -a"; }
|
||||
{ command = "${config.services.mako.package}/bin/mako"; }
|
||||
];
|
||||
window = {
|
||||
border = 1;
|
||||
titlebar = false;
|
||||
commands = [
|
||||
{
|
||||
criteria.window_role = "(?:pop-up|bubble|dialog)";
|
||||
command = "floating enable";
|
||||
}
|
||||
{
|
||||
criteria.app_id = "(?:org\.kde\.polkit-kde-authentication-agent-1|Pinentry|pavucontrol|\.blueman-manager-wrapped|nm-connection-editor)";
|
||||
command = "floating enable";
|
||||
}
|
||||
{
|
||||
criteria.class = "(?:[Mm]atplotlib|.*\.py|Idl)";
|
||||
command = "floating enable";
|
||||
}
|
||||
{
|
||||
# Catch-all for file dialog windows
|
||||
criteria.title = "(?:Open|Save) (?:File|Folder|As)";
|
||||
command = "floating enable, resize set width 1030 height 710";
|
||||
}
|
||||
{
|
||||
# Inhibit idle when watching vidoes
|
||||
criteria.app_id = "(?:firefox|mpv)";
|
||||
command = "inhibit_idle fullscreen";
|
||||
}
|
||||
{
|
||||
# Window rules for game sessions.
|
||||
# Note: controllers don't reset idle timer
|
||||
criteria.class = "(?:steam_app|Minecraft).*";
|
||||
command = "floating enable, fullscreen enable, inhibit_idle focus";
|
||||
}
|
||||
];
|
||||
};
|
||||
floating.border = 1;
|
||||
keybindings =
|
||||
let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in
|
||||
lib.mkOptionDefault {
|
||||
# Movement
|
||||
"${modifier}+comma" = "workspace prev";
|
||||
"${modifier}+period" = "workspace next";
|
||||
"${modifier}+shift+comma" = "move workspace prev";
|
||||
"${modifier}+shift+period" = "move workspace next";
|
||||
"${modifier}+bracketleft" = "move workspace to output left";
|
||||
"${modifier}+bracketright" = "move workspace to output right";
|
||||
|
||||
# Function keys
|
||||
## Screenshot
|
||||
"Print" = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.swappy}/bin/swappy -f -";
|
||||
|
||||
## Sound
|
||||
"XF86AudioMute" = "exec ${config.services.avizo.package}/bin/volumectl %";
|
||||
"XF86AudioMicMute" = "exec ${config.services.avizo.package}/bin/volumectl -m %";
|
||||
"XF86AudioRaiseVolume" = "exec ${config.services.avizo.package}/bin/volumectl -u + 5";
|
||||
"XF86AudioLowerVolume" = "exec ${config.services.avizo.package}/bin/volumectl -u - 5";
|
||||
|
||||
## Playback
|
||||
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
|
||||
## Brightness
|
||||
"XF86MonBrightnessUp" = "exec ${config.services.avizo.package}/bin/lightctl + 5";
|
||||
"XF86MonBrightnessDown" = "exec ${config.services.avizo.package}/bin/lightctl - 5";
|
||||
|
||||
# System utilities
|
||||
"Mod4+Mod1+l" = "exec swaylockfx";
|
||||
"${modifier}+z" = "exec ${config.services.mako.package}/bin/makoctl restore";
|
||||
"${modifier}+Shift+z" = "exec ${config.services.mako.package}/bin/makoctl dismiss -a";
|
||||
"${modifier}+Shift+p" = "exec ${config.programs.wlogout.package}/bin/wlogout";
|
||||
"${modifier}+Shift+Return" = "exec ${config.programs.emacs.finalPackage}/bin/emacsclient -c";
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
bindgesture swipe:right workspace prev
|
||||
bindgesture swipe:left workspace next
|
||||
corner_radius 5
|
||||
blur enable
|
||||
blur_xray disable
|
||||
blur_passes 3
|
||||
blur_radius 5
|
||||
shadows enable
|
||||
shadow_blur_radius 5
|
||||
layer_effects "system-menu" blur enable; blur_ignore_transparent enable; shadows enable
|
||||
layer_effects "gtk-layer-shell" blur enable; blur_ignore_transparent enable; shadows enable
|
||||
layer_effects "notifications" blur enable; blur_ignore_transparent enable; shadows enable
|
||||
layer_effects "launcher" blur enable; blur_ignore_transparent enable; shadows enable
|
||||
layer_effects "logout_dialog" blur enable; blur_ignore_transparent enable; shadows enable
|
||||
layer_effects "waybar" blur enable; blur_ignore_transparent enable; shadows enable
|
||||
layer_effects "avizo" blur enable; blur_ignore_transparent enable; shadows enable
|
||||
titlebar_separator enable
|
||||
'';
|
||||
};
|
||||
xdg.configFile."swappy/config".source = ./swappy.conf;
|
||||
}
|
10
system/home/sway/swappy.conf
Normal file
10
system/home/sway/swappy.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Default]
|
||||
save_dir=$HOME/Pictures/Screenshots/
|
||||
save_filename_format=swappy-%Y%m%d-%H%M%S.png
|
||||
show_panel=false
|
||||
line_size=5
|
||||
text_size=20
|
||||
text_font=sans-serif
|
||||
paint_mode=brush
|
||||
early_exit=false
|
||||
fill_shape=false
|
390
system/home/sway/waybar/default.nix
Normal file
390
system/home/sway/waybar/default.nix
Normal file
|
@ -0,0 +1,390 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
stylix.targets.waybar.enable = false;
|
||||
systemd.user.targets.tray.Unit = {
|
||||
Description = "Home Manager System Tray";
|
||||
Requires = [ "graphical-session.target" ];
|
||||
};
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings.main = {
|
||||
name = "main";
|
||||
layer = "top";
|
||||
position = "top";
|
||||
# Layout
|
||||
"modules-left" = [
|
||||
"sway/window"
|
||||
"mpris"
|
||||
];
|
||||
"modules-center" = [ "sway/workspaces" ];
|
||||
"modules-right" = [
|
||||
"custom/notification"
|
||||
"pulseaudio"
|
||||
"network"
|
||||
"bluetooth"
|
||||
"clock#calendar"
|
||||
"clock"
|
||||
"backlight"
|
||||
"battery"
|
||||
"custom/weather"
|
||||
"tray"
|
||||
];
|
||||
# Module config
|
||||
"sway/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = " ";
|
||||
"2" = " ";
|
||||
"3" = " ";
|
||||
"4" = " ";
|
||||
"5" = " ";
|
||||
"6" = " ";
|
||||
default = " ";
|
||||
urgent = " ";
|
||||
};
|
||||
all-outputs = false;
|
||||
persistent-workspaces = {
|
||||
"1" = [ ];
|
||||
"2" = [ ];
|
||||
"3" = [ ];
|
||||
"4" = [ ];
|
||||
"5" = [ ];
|
||||
"6" = [ ];
|
||||
};
|
||||
};
|
||||
"sway/window" = {
|
||||
"format" = "{title}";
|
||||
"max-length" = 50;
|
||||
"rewrite" = {
|
||||
"(.*) - GNU Emacs at (.*)" = " $1 [$2]";
|
||||
"(alacritty.*)" = " $1";
|
||||
"(.*) - mpv" = " $1";
|
||||
"swayimg: (.*)" = " $1";
|
||||
"swappy" = " swappy";
|
||||
"(btm)" = " Resource Usage [$1]";
|
||||
"(cava)" = " Music Visualiser [$1]";
|
||||
"(.*) - Thunar" = " $1";
|
||||
"Mozilla Firefox" = " $1";
|
||||
"(.*) — Mozilla Firefox" = " $1";
|
||||
"Nyxt - (.*)" = " $1";
|
||||
"(.*) - Chromium" = " $1";
|
||||
"(Signal.*)" = " $1";
|
||||
"((?:.*)WebCord.*)" = " $1";
|
||||
"(Cartridges.*)" = " $1";
|
||||
"([Ss]team.*)" = " $1";
|
||||
"(Prism Launcher.*)" = " Minecraft ($1)";
|
||||
"(.*)(?: *)PrusaSlicer-(.*)" = " $1 PrusaSlicer ($2)";
|
||||
"(.*)(?: *)PrusaSlicer G-code Viewer-(.*)" = " $1 G-code Viewer ($2)";
|
||||
"FreeCAD (.*)" = " FreeCAD $1";
|
||||
"(.*) - Blender.* " = " $1";
|
||||
"(X2Go Client)" = " $1";
|
||||
"(NoMachine|Nxplayer.bin) (.*)" = " $1 $2";
|
||||
};
|
||||
};
|
||||
mpris = {
|
||||
"format" = "{player_icon} {artist} - {title} {status_icon}";
|
||||
"tooltip-format" = "{player_icon} ({player}) {dynamic}";
|
||||
"title-len" = 64;
|
||||
"interval" = 1;
|
||||
"dynamic-order" = [
|
||||
"album"
|
||||
"artist"
|
||||
"title"
|
||||
"position"
|
||||
"length"
|
||||
];
|
||||
"player-icons" = {
|
||||
"default" = " ";
|
||||
"emms" = " ";
|
||||
"firefox" = " ";
|
||||
"mpv" = " ";
|
||||
};
|
||||
"status-icons" = {
|
||||
"playing" = "";
|
||||
"paused" = "";
|
||||
"stopped" = "";
|
||||
};
|
||||
"ignored-players" = [ ];
|
||||
};
|
||||
pulseaudio = {
|
||||
scroll-step = 5;
|
||||
format = "{format_source}{icon}{volume}%";
|
||||
format-muted = "{format_source} ";
|
||||
format-source = " ";
|
||||
format-source-muted = " ";
|
||||
format-icons = {
|
||||
car = " ";
|
||||
default = [
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
];
|
||||
hands-free = " ";
|
||||
headset = " ";
|
||||
phone = " ";
|
||||
portable = " ";
|
||||
headphone = " ";
|
||||
};
|
||||
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
on-click-right = "${pkgs.pamixer}/bin/pamixer -t";
|
||||
on-scroll-up = "${pkgs.pamixer}/bin/pamixer -i 5";
|
||||
on-scroll-down = "${pkgs.pamixer}/bin/pamixer -d 5";
|
||||
};
|
||||
disk = {
|
||||
format = " {percentage_used}%";
|
||||
path = config.home.homeDirectory;
|
||||
};
|
||||
cpu = {
|
||||
format = " {usage}%";
|
||||
tooltip = false;
|
||||
};
|
||||
memory = {
|
||||
format = " {}%";
|
||||
};
|
||||
temperature = {
|
||||
critical-threshold = 80;
|
||||
format = "{icon} {temperatureC}°C";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
network = {
|
||||
format-icons = [
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
];
|
||||
format-wifi = "{icon}";
|
||||
format-ethernet = " ";
|
||||
format-linked = " ";
|
||||
format-disconnected = " ";
|
||||
tooltip-format = "{essid} ({signalStrength}%)";
|
||||
on-click = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
|
||||
};
|
||||
bluetooth = {
|
||||
format = "";
|
||||
format-disabled = "";
|
||||
format-off = "";
|
||||
format-on = "";
|
||||
format-connected = "";
|
||||
tooltip-format = "{status} | {device_alias}";
|
||||
on-click = "${pkgs.blueman}/bin/blueman-manager";
|
||||
};
|
||||
"clock#calendar" = {
|
||||
format = " {:%Y-%m-%d}";
|
||||
tooltip-format = "<tt>{calendar}</tt>";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
mode-mon-col = 3;
|
||||
weeks-pos = "left";
|
||||
on-scroll = 1;
|
||||
format =
|
||||
let
|
||||
scheme = config.lib.stylix.scheme.withHashtag;
|
||||
in
|
||||
{
|
||||
months = "<span color='${scheme.red}'><b>{}</b></span>";
|
||||
weeks = "<span color='${scheme.cyan}'><b>W{}</b></span>";
|
||||
weekdays = "<span color='${scheme.orange}'><b>{}</b></span>";
|
||||
days = "<span color='${scheme.base05}'><b>{}</b></span>";
|
||||
today = "<span color='${scheme.base0D}'><b><i>{}</i></b></span>";
|
||||
};
|
||||
};
|
||||
actions = {
|
||||
on-scroll-up = "shift_up";
|
||||
on-scroll-down = "shift_down";
|
||||
};
|
||||
};
|
||||
clock.format = " {:%R}";
|
||||
backlight = {
|
||||
format = "{icon}";
|
||||
tooltip-format = "{percent}%";
|
||||
format-icons = [
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
];
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
warning = 20;
|
||||
critical = 10;
|
||||
};
|
||||
format = "{icon}";
|
||||
format-time = "{H}:{m}";
|
||||
format-charging = " ({time})";
|
||||
format-plugged = " ";
|
||||
format-warning = "{icon}{capacity}%";
|
||||
format-critical = "{icon}{capacity}% ({time})";
|
||||
tooltip-format = "{capacity}% | {power}W | {time}";
|
||||
format-icons = [
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
];
|
||||
};
|
||||
"custom/notification" =
|
||||
let
|
||||
makoctl = "${config.services.mako.package}/bin/makoctl";
|
||||
jq = "${pkgs.jq}/bin/jq";
|
||||
in
|
||||
{
|
||||
exec = "( ${makoctl} list | ${jq} -e '.data[] | length > 0' >/dev/null && echo ' ' ) || echo ' ' ";
|
||||
format = "{}";
|
||||
on-click = "${makoctl} dismiss -a";
|
||||
interval = 3;
|
||||
};
|
||||
"custom/weather" =
|
||||
let
|
||||
date-format = "%Y-%m-%d";
|
||||
custom-indicator = "{ICON}{temp_C}({FeelsLikeC})";
|
||||
in
|
||||
{
|
||||
format = "{}°";
|
||||
tooltip = true;
|
||||
interval = 900; # Every 15 minutes
|
||||
exec = ''${pkgs.wttrbar}/bin/wttrbar --location Didcot --date-format "${date-format}" --custom-indicator "${custom-indicator}"'';
|
||||
return-type = "json";
|
||||
};
|
||||
tray = {
|
||||
icon-size = 20;
|
||||
show-passive-items = true;
|
||||
spacing = 5;
|
||||
};
|
||||
};
|
||||
style =
|
||||
let
|
||||
scheme = config.lib.stylix.scheme.withHashtag;
|
||||
alpha = "0.8";
|
||||
in
|
||||
''
|
||||
* {
|
||||
all: unset;
|
||||
font-family: ${config.stylix.fonts.monospace.name};
|
||||
font-size: ${toString config.stylix.fonts.sizes.popups}px;
|
||||
}
|
||||
|
||||
window {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
window > box {
|
||||
color: ${scheme.base05};
|
||||
background: ${scheme.base00};
|
||||
margin: 5px 5px 0px;
|
||||
padding: 0px;
|
||||
border-top: 1px solid ${scheme.base04};
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: alpha(${scheme.base00}, ${alpha});
|
||||
border: 1px solid ${scheme.base0D};
|
||||
border-radius: 5px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
color: ${scheme.base05};
|
||||
border: none;
|
||||
padding: 5px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#workspaces,
|
||||
#window,
|
||||
#mpris,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#bluetooth,
|
||||
#backlight,
|
||||
#battery,
|
||||
#clock,
|
||||
#custom-notification,
|
||||
#custom-weather,
|
||||
#tray {
|
||||
margin: 0px;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
#workspaces,
|
||||
#window,
|
||||
#tray,
|
||||
#backlight,
|
||||
#battery,
|
||||
#custom-weather {
|
||||
color: ${scheme.base05};
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
background: transparent;
|
||||
color: ${scheme.base05};
|
||||
margin: 0px;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
#workspaces button.persistent {
|
||||
color: ${scheme.base03};
|
||||
}
|
||||
#workspaces button.focused {
|
||||
color: ${scheme.base0D};
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
color: ${scheme.base09};
|
||||
}
|
||||
|
||||
#mpris {
|
||||
color: ${scheme.base04};
|
||||
}
|
||||
|
||||
#custom-notification {
|
||||
color: ${scheme.base08};
|
||||
}
|
||||
#pulseaudio {
|
||||
color: ${scheme.base09};
|
||||
}
|
||||
#network {
|
||||
color: ${scheme.base0A};
|
||||
}
|
||||
#bluetooth {
|
||||
color: ${scheme.base0B};
|
||||
}
|
||||
#clock.calendar {
|
||||
color: ${scheme.base0C};
|
||||
}
|
||||
#clock {
|
||||
color: ${scheme.base0D};
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
color: ${scheme.base09};
|
||||
}
|
||||
#battery.critical {
|
||||
color: ${scheme.base08};
|
||||
}
|
||||
#battery.charging,
|
||||
#battery.plugged {
|
||||
color: ${scheme.base0B};
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
15
system/home/zathura/default.nix
Normal file
15
system/home/zathura/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ ... }:
|
||||
{
|
||||
# TODO add emacs keybinds
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
adjust-open = "best-fit";
|
||||
database = "null";
|
||||
dbus-service = true;
|
||||
sandbox = "normal";
|
||||
scroll-page-aware = true;
|
||||
synctex = true;
|
||||
};
|
||||
};
|
||||
}
|
208
system/home/zathura/emacs-keys-for-zathura.txt
Normal file
208
system/home/zathura/emacs-keys-for-zathura.txt
Normal file
|
@ -0,0 +1,208 @@
|
|||
# Being an Emacs user, it is natural for me to use emacs-like and info-like keybindings for zathura.
|
||||
#
|
||||
# Zathura configuration documentation is available at
|
||||
# https://git.pwmt.org/pwmt/zathura/-/blob/e5d2ca487147e79d0bb7acbf5174cd9dcc92a86c/doc/man/zathurarc.5.rst
|
||||
# A full list of available functions and default keybindings is available at
|
||||
# https://git.pwmt.org/pwmt/zathura/-/blob/e5d2ca487147e79d0bb7acbf5174cd9dcc92a86c/zathura/config.c#L301
|
||||
#
|
||||
# If you want to integrate Zathura with Emacs AUCTeX mode, see
|
||||
# [emacs wiki](https://www.emacswiki.org/emacs/AUCTeX).
|
||||
#
|
||||
# Put the following inside `$XDG_CONFIG_HOME/zathura/zathurarc
|
||||
|
||||
## niceties
|
||||
# when selecting text with mouse,
|
||||
# copy to clipboard
|
||||
set selection-clipboard clipboard
|
||||
|
||||
# keep several lines of text when
|
||||
# scrolling a screenful
|
||||
set scroll-full-overlap 0.2
|
||||
|
||||
# see documentation for details
|
||||
set scroll-page-aware true
|
||||
set window-title-basename true
|
||||
set adjust-open width
|
||||
set statusbar-home-tilde true
|
||||
set vertical-center true
|
||||
set synctex true
|
||||
# large bold font easier on the eyes in index mode
|
||||
# status bar can be disabled with A-s
|
||||
set font "FreeSans bold 16"
|
||||
set zoom-step 3
|
||||
|
||||
map [normal] <C-b> scroll left
|
||||
map [normal] <C-n> scroll down
|
||||
map [normal] <C-p> scroll up
|
||||
map [normal] <C-f> scroll right
|
||||
map [normal] <C-g> abort
|
||||
map [insert] <C-g> abort
|
||||
map [normal] <C-[> abort
|
||||
map [normal] <A-\<> goto top
|
||||
map [normal] <A-\>> goto bottom
|
||||
map [normal] a adjust_window best-fit
|
||||
map [normal] s adjust_window width
|
||||
map [normal] F display_link
|
||||
map [normal] <C-c> copy_link
|
||||
map [normal] f follow
|
||||
map [normal] m mark_add
|
||||
map [normal] \' mark_evaluate
|
||||
map [normal] \, navigate next
|
||||
map [normal] \. navigate previous
|
||||
map [normal] <A-Right> navigate next
|
||||
map [normal] <A-Left> navigate previous
|
||||
map [normal] <PageDown> scroll full-down
|
||||
map [normal] <PageUp> scroll full-up
|
||||
map [normal] <C-P> print
|
||||
map [normal] c recolor
|
||||
map [normal] R reload
|
||||
map [normal] v rotate rotate_cw
|
||||
map [normal] V rotate rotate_ccw
|
||||
map [normal] <Left> scroll left
|
||||
map [normal] <Up> scroll up
|
||||
map [normal] <Down> scroll down
|
||||
map [normal] <Right> scroll right
|
||||
map [normal] <A-a> scroll half-left
|
||||
map [normal] <C-V> scroll half-down
|
||||
map [normal] <A-V> scroll half-up
|
||||
map [normal] <A-e> scroll half-right
|
||||
map [normal] <C-a> scroll full-left
|
||||
map [normal] <C-v> scroll full-down
|
||||
map [normal] <Return> scroll full-down
|
||||
map [normal] <A-v> scroll full-up
|
||||
map [normal] <C-e> scroll full-right
|
||||
map [normal] <Space> scroll full-down
|
||||
map [normal] <C-h> scroll full-up
|
||||
map [normal] <BackSpace> scroll full-up
|
||||
map [normal] <S-Space> scroll full-up
|
||||
map [normal] l jumplist backward
|
||||
map [normal] r jumplist forward
|
||||
map [normal] <A-r> bisect forward
|
||||
map [normal] <A-l> bisect backward
|
||||
# still need to use '/' to trigger search
|
||||
map [normal] <C-s> search forward
|
||||
map [normal] <C-r> search backward
|
||||
map [normal] p snap_to_page
|
||||
map [normal] <C-i> toggle_index
|
||||
map [normal] i toggle_index
|
||||
map [normal] <Tab> toggle_index
|
||||
map [normal] <A-s> toggle_statusbar
|
||||
map [normal] <A-i> focus_inputbar
|
||||
map [normal] d toggle_page_mode
|
||||
map [normal] q quit
|
||||
map [normal] + zoom in
|
||||
map [normal] - zoom out
|
||||
map [normal] = zoom in
|
||||
map [normal] <A-P> toggle_presentation
|
||||
map [normal] <A-F> toggle_fullscreen
|
||||
map [normal] j toggle_fullscreen
|
||||
map [fullscreen] j toggle_fullscreen
|
||||
map [fullscreen] q toggle_fullscreen
|
||||
map [fullscreen] <C-b> scroll left
|
||||
map [fullscreen] <C-n> scroll down
|
||||
map [fullscreen] <C-p> scroll up
|
||||
map [fullscreen] <C-f> scroll right
|
||||
map [fullscreen] <C-g> abort
|
||||
map [fullscreen] <C-[> abort
|
||||
map [fullscreen] <A-\<> goto top
|
||||
map [fullscreen] <A-\>> goto bottom
|
||||
map [fullscreen] a adjust_window best-fit
|
||||
map [fullscreen] s adjust_window width
|
||||
map [fullscreen] F display_link
|
||||
map [fullscreen] <C-c> copy_link
|
||||
map [fullscreen] f follow
|
||||
map [fullscreen] m mark_add
|
||||
map [fullscreen] \' mark_evaluate
|
||||
map [fullscreen] \, navigate next
|
||||
map [fullscreen] \. navigate previous
|
||||
map [fullscreen] <A-Right> navigate next
|
||||
map [fullscreen] <A-Left> navigate previous
|
||||
map [fullscreen] <PageDown> scroll full-down
|
||||
map [fullscreen] <PageUp> scroll full-up
|
||||
map [fullscreen] <C-P> print
|
||||
map [fullscreen] c recolor
|
||||
map [fullscreen] R reload
|
||||
map [fullscreen] v rotate rotate_cw
|
||||
map [fullscreen] V rotate rotate_ccw
|
||||
map [fullscreen] <Left> scroll left
|
||||
map [fullscreen] <Up> scroll up
|
||||
map [fullscreen] <Down> scroll down
|
||||
map [fullscreen] <Right> scroll right
|
||||
map [fullscreen] <A-a> scroll half-left
|
||||
map [fullscreen] <C-V> scroll half-down
|
||||
map [fullscreen] <A-V> scroll half-up
|
||||
map [fullscreen] <A-e> scroll half-right
|
||||
map [fullscreen] <C-a> scroll full-left
|
||||
map [fullscreen] <C-v> scroll full-down
|
||||
map [fullscreen] <Return> scroll full-down
|
||||
map [fullscreen] <A-v> scroll full-up
|
||||
map [fullscreen] <C-e> scroll full-right
|
||||
map [fullscreen] <Space> scroll full-down
|
||||
map [fullscreen] <C-h> scroll full-up
|
||||
map [fullscreen] <BackSpace> scroll full-up
|
||||
map [fullscreen] <S-Space> scroll full-up
|
||||
map [fullscreen] l jumplist backward
|
||||
map [fullscreen] r jumplist forward
|
||||
map [fullscreen] <A-r> bisect forward
|
||||
map [fullscreen] <A-l> bisect backward
|
||||
map [fullscreen] <C-s> search forward
|
||||
map [fullscreen] <C-r> search backward
|
||||
map [fullscreen] p snap_to_page
|
||||
map [fullscreen] i toggle_index
|
||||
map [fullscreen] <C-i> toggle_index
|
||||
map [fullscreen] <Tab> toggle_index
|
||||
map [fullscreen] <A-s> toggle_statusbar
|
||||
map [fullscreen] <A-i> focus_inputbar
|
||||
map [fullscreen] d toggle_page_mode
|
||||
map [fullscreen] + zoom in
|
||||
map [fullscreen] - zoom out
|
||||
map [fullscreen] = zoom in
|
||||
# status bar will obscure last item in index mode
|
||||
map [index] <A-s> toggle_statusbar
|
||||
map [index] q toggle_index
|
||||
map [index] i toggle_index
|
||||
map [index] <C-p> navigate_index up
|
||||
map [index] <C-h> navigate_index up
|
||||
map [index] <BackSpace> navigate_index up
|
||||
map [index] <C-n> navigate_index down
|
||||
map [index] <A-v> navigate_index up
|
||||
map [index] <C-v> navigate_index down
|
||||
map [index] \< navigate_index top
|
||||
map [index] \> navigate_index bottom
|
||||
map [index] <A-\<> navigate_index top
|
||||
map [index] <A-\>> navigate_index bottom
|
||||
map [index] <C-b> navigate_index collapse
|
||||
map [index] <C-f> navigate_index expand
|
||||
map [index] <C-i> navigate_index expand-all
|
||||
map [index] <A-i> navigate_index collapse-all
|
||||
map [index] <Up> navigate_index up
|
||||
map [index] <Down> navigate_index down
|
||||
map [index] <Left> navigate_index collapse
|
||||
map [index] <Right> navigate_index expand
|
||||
map [index] <C-m> navigate_index select
|
||||
map [index] <Space> navigate_index select
|
||||
map [index] <Return> navigate_index select
|
||||
map [index] <C-j> navigate_index select
|
||||
map [index] <Esc> toggle_index
|
||||
map [index] <C-[> toggle_index
|
||||
map [index] <C-g> toggle_index
|
||||
map [index] <C-c> toggle_index
|
||||
map [presentation] i toggle_index
|
||||
map [presentation] r navigate next
|
||||
map [presentation] <Down> navigate next
|
||||
map [presentation] <Right> navigate next
|
||||
map [presentation] <PageDown> navigate next
|
||||
map [presentation] <Space> navigate next
|
||||
map [presentation] l navigate previous
|
||||
map [presentation] <Left> navigate previous
|
||||
map [presentation] <Up> navigate previous
|
||||
map [presentation] <PageUp> navigate previous
|
||||
map [presentation] <S-Space> navigate previous
|
||||
map [presentation] <BackSpace> navigate previous
|
||||
map [presentation] <F5> toggle_presentation
|
||||
map [presentation] q toggle_presentation
|
||||
map [presentation] <C-h> navigate previous
|
||||
map [presentation] <M-v> navigate previous
|
||||
map [presentation] <C-v> navigate next
|
||||
map [presentation] <A-\<> goto top
|
||||
map [presentation] <A-\>> goto bottom
|
18
system/plasma.nix
Normal file
18
system/plasma.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
plasma-browser-integration
|
||||
konsole
|
||||
kate
|
||||
];
|
||||
services = {
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
desktopManager.plasma6 = {
|
||||
enable = true;
|
||||
enableQt5Integration = true;
|
||||
};
|
||||
};
|
||||
}
|
49
system/sway.nix
Normal file
49
system/sway.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ pkgs, username, ... }:
|
||||
{
|
||||
environment = {
|
||||
sessionVariables.GRIM_DEFAULT_DIR = "$HOME/Pictures/Screenshots";
|
||||
systemPackages = [ pkgs.xarchiver ];
|
||||
};
|
||||
programs = {
|
||||
thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [
|
||||
thunar-archive-plugin
|
||||
thunar-volman
|
||||
];
|
||||
};
|
||||
sway.enable = true;
|
||||
};
|
||||
services = {
|
||||
tumbler.enable = true;
|
||||
udisks2.enable = true;
|
||||
gvfs = {
|
||||
enable = true;
|
||||
package = pkgs.gnome3.gvfs;
|
||||
};
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings =
|
||||
let
|
||||
default_session.command = "sway";
|
||||
in
|
||||
{
|
||||
inherit default_session;
|
||||
initial_session = {
|
||||
inherit (default_session) command;
|
||||
user = username;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
style = "adwaita";
|
||||
platformTheme = "gnome";
|
||||
};
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config.common.default = "*"; # TODO change for xdg-desktop-portal > 1.17 changes
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue