home: code readability improvements

This commit is contained in:
Aly Raffauf 2024-07-10 23:43:51 -04:00
parent fd556431e4
commit 59b3293571
15 changed files with 481 additions and 447 deletions

View file

@ -15,6 +15,7 @@
enable = true;
enableCompletion = true;
enableVteIntegration = true;
shellOptions = [
"autocd"
"cdspell"
@ -26,6 +27,7 @@
"globstar"
"histappend"
];
initExtra = ''
export PS1="[\[$(tput setaf 27)\]\u\[$(tput setaf 135)\]@\[$(tput setaf 45)\]\h:\[$(tput setaf 33)\]\w] \[$(tput sgr0)\]$ "
'';

View file

@ -8,6 +8,7 @@
programs.chromium = {
enable = true;
package = config.ar.home.apps.chromium.package;
extensions = [
{id = "enamippconapkdmgfgjchkhakpfinmaj";} # dearrow
{id = "jldhpllghnbhlbpcmnajkpdmadaolakh";} # todoist

View file

@ -40,9 +40,7 @@
LockDatabaseScreenLock = false;
};
SSHAgent = {
Enabled = true;
};
SSHAgent.Enabled = true;
};
xdg.configFile."keepassxc/keepassxc.ini".text =

View file

@ -9,6 +9,7 @@
enable = true;
mouse = true;
newSession = true;
plugins = with pkgs; [
tmuxPlugins.battery
tmuxPlugins.better-mouse-mode
@ -16,7 +17,9 @@
tmuxPlugins.resurrect
tmuxPlugins.weather
];
terminal = "tmux-256color";
extraConfig = ''
run-shell ${pkgs.tmuxPlugins.battery}/share/tmux-plugins/battery/battery.tmux
run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux

View file

@ -10,6 +10,7 @@
package = pkgs.vscodium;
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
userSettings = {
"diffEditor.ignoreTrimWhitespace" = false;
"editor.fontFamily" = "'NotoSansM Nerd Font', 'monospace', monospace";
@ -42,6 +43,7 @@
"[shellscript]" = {
"editor.defaultFormatter" = "foxundermoon.shell-format";
};
"shellformat.flag" = "-i 4";
"terminal.external.linuxExec" = lib.getExe config.ar.home.defaultApps.terminal;

View file

@ -20,11 +20,13 @@
["sway/workspaces" "sway/scratchpad" "sway/mode"]
++ lib.optionals (config.ar.home.desktop.hyprland.tabletMode.menuButton)
["custom/menu" "custom/hyprland-close"];
modules-center = ["clock"];
modules-right = [
"tray"
"group/hardware"
];
"hyprland/workspaces" = {
"all-outputs" = true;
"format" = "{icon} {name}";
@ -32,18 +34,22 @@
"default" = "󰝥";
"active" = "󰪥";
};
"sort-by" = "id";
};
"hyprland/submap" = {
"on-click" = ''${lib.getExe'
config.wayland.windowManager.hyprland.package "hyprctl"} dispatch submap reset'';
};
"hyprland/window" = {
"format" = "";
"max-length" = 100;
"separate-outputs" = true;
"icon" = true;
};
"sway/workspaces" = {
"all-outputs" = true;
"format" = "{icon} {name}";
@ -53,12 +59,15 @@
};
"sort-by" = "id";
};
"sway/mode" = {
"on-click" = ''${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} mode default'';
};
"sway/window" = {
"max-length" = 100;
};
"sway/scratchpad" = {
"format" = "{icon} {count}";
"show-empty" = false;
@ -66,27 +75,33 @@
"tooltip" = true;
"tooltip-format" = "{app}: {title}";
};
"custom/sway-close" = {
"on-click" = ''${lib.getExe'
config.wayland.windowManager.sway.package "swaymsg"} kill'';
"format" = "󰅗";
};
"custom/hyprland-close" = {
"on-click" = ''${lib.getExe'
config.wayland.windowManager.hyprland.package "hyprctl"} dispatch killactive'';
"format" = "󰅗";
};
"river/window" = {
"max-length" = 100;
};
"river/tags" = {
"num-tags" = 4;
};
"clock" = {
"tooltip-format" = "{:%Y-%m-%d | %H:%M}";
"interval" = 60;
"format" = "{:%I:%M%p}";
};
"battery" = {
"states" = {"critical" = 20;};
"format" = "{icon}";
@ -95,6 +110,7 @@
{capacity}%: {timeTo}.
Draw: {power} watts.'';
};
"inhibitor" = {
"what" = "sleep";
"format" = "{icon}";
@ -103,6 +119,7 @@
"deactivated" = "";
};
};
"bluetooth" = {
"format" = "󰂯";
"format-disabled" = ""; # an empty format will hide the module
@ -115,20 +132,24 @@
"tooltip-format-enumerate-connected" = "{device_alias} {device_address}";
"on-click" = lib.getExe' pkgs.blueberry "blueberry";
};
"pulseaudio" = {
"format" = "{icon}";
"format-bluetooth" = "{volume}% {icon}󰂯";
"format-muted" = "";
"format-icons" = {
"headphones" = "󰋋";
"handsfree" = "󰋎";
"headset" = "󰋎";
"default" = ["" "" ""];
};
"scroll-step" = 5;
"ignored-sinks" = ["Easy Effects Sink"];
"on-click" = "${lib.getExe pkgs.pavucontrol} -t 3";
};
"network" = {
"format-wifi" = "{icon}";
"format-ethernet" = "󰈀";
@ -140,21 +161,28 @@
"tooltip-format-disconnected" = "Disconnected";
"on-click" = "${lib.getExe config.ar.home.defaultApps.terminalEditor} --class nmtui -e ${pkgs.networkmanager}/bin/nmtui";
};
"tray" = {"spacing" = 15;};
"custom/logout" = {
"on-click" = "${lib.getExe pkgs.wlogout}";
"format" = "󰗽";
};
"custom/menu" = {
"on-click" = "${lib.getExe pkgs.nwg-drawer} -mt 5";
"format" = "󰀻";
};
"power-profiles-daemon" = {
"format" = "{icon}";
"tooltip-format" = ''
Profile: {profile}
Driver: {driver}'';
"tooltip" = true;
"format-icons" = {
"default" = "󱐌";
"performance" = "󱐌";
@ -162,6 +190,7 @@
"power-saver" = "󰌪";
};
};
"group/hardware" = {
"orientation" = "horizontal";
modules = ["pulseaudio" "power-profiles-daemon" "battery" "custom/logout"];

View file

@ -17,13 +17,9 @@
workspaces-only-on-primary = true;
};
"org/cinnamon/desktop/interface" = {
clock-use-24h = false;
};
"org/cinnamon/desktop/interface".clock-use-24h = false;
"org/gnome/desktop/interface" = {
clock-format = "12h";
};
"org/gnome/desktop/interface".clock-format = "12h";
"org/cinnamon/settings-daemon/peripherals/touchscreen".orientation-lock = false;
@ -57,9 +53,7 @@
switch-to-workspace-9 = ["<Super>9"];
};
"org/cinnamon/desktop/keybindings" = {
custom-list = ["__dummy__" "custom0"];
};
"org/cinnamon/desktop/keybindings".custom-list = ["__dummy__" "custom0"];
"org/cinnamon/desktop/keybindings/custom-keybindings/custom0" = {
binding = ["<Super>e"];

View file

@ -6,6 +6,7 @@
}: {
config = lib.mkIf config.ar.home.desktop.gnome.enable {
dconf.enable = true;
dconf.settings = {
"org/gnome/desktop/datetime".automatic-timezone = true;
@ -55,6 +56,7 @@
xdg.mimeApps = {
enable = true;
defaultApplications = {
"x-scheme-handler/sms" = "org.gnome.Shell.Extensions.GSConnect.desktop";
"x-scheme-handler/tel" = "org.gnome.Shell.Extensions.GSConnect.desktop";

View file

@ -7,315 +7,323 @@
imports = [./randomWallpaper.nix ./redShift.nix];
config = lib.mkIf config.ar.home.desktop.sway.enable {
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.gtk = true;
checkConfig = false;
};
ar.home.theme.gtk.hideTitleBar =
if config.wayland.windowManager.sway.package == pkgs.sway
then true
else false;
wayland = {
windowManager.sway.enable = true;
windowManager.sway.wrapperFeatures.gtk = true;
windowManager.sway.checkConfig = false;
wayland.windowManager.sway.config = let
modifier = "Mod4";
swaymsg = lib.getExe' config.wayland.windowManager.sway.package "swaymsg";
windowManager.sway.config = let
modifier = "Mod4";
swaymsg = lib.getExe' config.wayland.windowManager.sway.package "swaymsg";
# Default apps
browser = lib.getExe config.ar.home.defaultApps.webBrowser;
fileManager = lib.getExe config.ar.home.defaultApps.fileManager;
editor = lib.getExe config.ar.home.defaultApps.editor;
terminal = lib.getExe config.ar.home.defaultApps.terminal;
# Default apps
browser = lib.getExe config.ar.home.defaultApps.webBrowser;
fileManager = lib.getExe config.ar.home.defaultApps.fileManager;
editor = lib.getExe config.ar.home.defaultApps.editor;
terminal = lib.getExe config.ar.home.defaultApps.terminal;
brightness = lib.getExe' pkgs.swayosd "swayosd-client";
brightness_up = "${brightness} --brightness=raise";
brightness_down = "${brightness} --brightness=lower";
volume = brightness;
volume_up = "${volume} --output-volume=raise";
volume_down = "${volume} --output-volume=lower";
volume_mute = "${volume} --output-volume=mute-toggle";
mic_mute = "${volume} --input-volume=mute-toggle";
media = lib.getExe pkgs.playerctl;
media_play = "${media} play-pause";
media_next = "${media} next";
media_prev = "${media} previous";
brightness = lib.getExe' pkgs.swayosd "swayosd-client";
brightness_up = "${brightness} --brightness=raise";
brightness_down = "${brightness} --brightness=lower";
volume = brightness;
volume_up = "${volume} --output-volume=raise";
volume_down = "${volume} --output-volume=lower";
volume_mute = "${volume} --output-volume=mute-toggle";
mic_mute = "${volume} --input-volume=mute-toggle";
media = lib.getExe pkgs.playerctl;
media_play = "${media} play-pause";
media_next = "${media} next";
media_prev = "${media} previous";
# Sway desktop utilities
bar = lib.getExe pkgs.waybar;
launcher = lib.getExe pkgs.fuzzel;
notifyd = lib.getExe pkgs.mako;
wallpaperd = "${lib.getExe pkgs.swaybg} -i ${config.ar.home.theme.wallpaper}";
logout = lib.getExe pkgs.wlogout;
lock = lib.getExe pkgs.swaylock;
idled = pkgs.writeShellScript "sway-idled" ''
${lib.getExe pkgs.swayidle} -w \
before-sleep '${media} pause' \
before-sleep '${lock}' \
timeout 240 '${lib.getExe pkgs.brightnessctl} -s set 10' \
resume '${lib.getExe pkgs.brightnessctl} -r' \
timeout 300 '${lock}' \
timeout 330 '${swaymsg} "output * dpms off"' \
resume '${swaymsg} "output * dpms on"' \
${
if config.ar.home.desktop.sway.autoSuspend
then ''timeout 900 '${lib.getExe' pkgs.systemd "systemctl"} suspend' \''
else ''\''
}
'';
# Sway desktop utilities
bar = lib.getExe pkgs.waybar;
launcher = lib.getExe pkgs.fuzzel;
notifyd = lib.getExe pkgs.mako;
wallpaperd = "${lib.getExe pkgs.swaybg} -i ${config.ar.home.theme.wallpaper}";
logout = lib.getExe pkgs.wlogout;
lock = lib.getExe pkgs.swaylock;
idled = pkgs.writeShellScript "sway-idled" ''
${lib.getExe pkgs.swayidle} -w \
before-sleep '${media} pause' \
before-sleep '${lock}' \
timeout 240 '${lib.getExe pkgs.brightnessctl} -s set 10' \
resume '${lib.getExe pkgs.brightnessctl} -r' \
timeout 300 '${lock}' \
timeout 330 '${swaymsg} "output * dpms off"' \
resume '${swaymsg} "output * dpms on"' \
${
if config.ar.home.desktop.sway.autoSuspend
then ''timeout 900 '${lib.getExe' pkgs.systemd "systemctl"} suspend' \''
else ''\''
}
'';
screenshot = lib.getExe' pkgs.shotman "shotman";
screenshot_screen = "${screenshot} --capture output";
screenshot_region = "${screenshot} --capture region";
screenshot = lib.getExe' pkgs.shotman "shotman";
screenshot_screen = "${screenshot} --capture output";
screenshot_region = "${screenshot} --capture region";
qt_platform_theme = "qt6ct";
gdk_scale = "1.5";
qt_platform_theme = "qt6ct";
gdk_scale = "1.5";
cycleSwayDisplayModes = pkgs.writeShellScriptBin "cycleSwayDisplayModes" ''
# TODO: remove petalburg hardcodes
current_mode=$(${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} -t get_outputs -p | grep "Current mode" | grep -Eo '[0-9]+x[0-9]+ @ [0-9.]+ Hz' | tr -d " " | grep 2880)
cycleSwayDisplayModes = pkgs.writeShellScriptBin "cycleSwayDisplayModes" ''
# TODO: remove petalburg hardcodes
current_mode=$(${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} -t get_outputs -p | grep "Current mode" | grep -Eo '[0-9]+x[0-9]+ @ [0-9.]+ Hz' | tr -d " " | grep 2880)
if [ $current_mode = "2880x1800@90.001Hz" ]; then
${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} output "eDP-1" mode "2880x1800@60.001Hz";
${lib.getExe pkgs.libnotify} "Display set to 2880x1800@60.001Hz."
elif [ $current_mode = "2880x1800@60.001Hz" ]; then
${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} output "eDP-1" mode "2880x1800@90.001Hz";
${lib.getExe pkgs.libnotify} "Display set to 2880x1800@90.001Hz."
fi
'';
in {
bars = [{command = "${bar}";}];
modifier = "${modifier}";
colors.background = "${config.ar.home.theme.colors.primary}EE";
colors.focused = {
background = "${config.ar.home.theme.colors.primary}EE";
border = "${config.ar.home.theme.colors.primary}EE";
childBorder = "${config.ar.home.theme.colors.primary}EE";
indicator = "${config.ar.home.theme.colors.primary}EE";
text = "${config.ar.home.theme.colors.text}";
};
colors.focusedInactive = {
background = "${config.ar.home.theme.colors.inactive}AA";
border = "${config.ar.home.theme.colors.inactive}AA";
childBorder = "${config.ar.home.theme.colors.inactive}AA";
indicator = "${config.ar.home.theme.colors.inactive}AA";
text = "${config.ar.home.theme.colors.text}";
};
colors.unfocused = {
background = "${config.ar.home.theme.colors.inactive}AA";
border = "${config.ar.home.theme.colors.inactive}AA";
childBorder = "${config.ar.home.theme.colors.inactive}AA";
indicator = "${config.ar.home.theme.colors.inactive}AA";
text = "${config.ar.home.theme.colors.text}";
};
defaultWorkspace = "workspace number 1";
focus = {
followMouse = "always";
newWindow = "focus";
# mouseWarping = "container";
};
fonts = {
names = ["${config.gtk.font.name}"];
style = "Bold";
size = config.gtk.font.size + 0.0;
};
gaps.inner = 5;
gaps.outer = 5;
input = {
"type:touchpad" = {
click_method = "clickfinger";
dwt = "enabled";
natural_scroll = "enabled";
scroll_method = "two_finger";
tap = "enabled";
tap_button_map = "lrm";
if [ $current_mode = "2880x1800@90.001Hz" ]; then
${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} output "eDP-1" mode "2880x1800@60.001Hz";
${lib.getExe pkgs.libnotify} "Display set to 2880x1800@60.001Hz."
elif [ $current_mode = "2880x1800@60.001Hz" ]; then
${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} output "eDP-1" mode "2880x1800@90.001Hz";
${lib.getExe pkgs.libnotify} "Display set to 2880x1800@90.001Hz."
fi
'';
in {
bars = [{command = "${bar}";}];
modifier = "${modifier}";
colors.background = "${config.ar.home.theme.colors.primary}EE";
colors.focused = {
background = "${config.ar.home.theme.colors.primary}EE";
border = "${config.ar.home.theme.colors.primary}EE";
childBorder = "${config.ar.home.theme.colors.primary}EE";
indicator = "${config.ar.home.theme.colors.primary}EE";
text = "${config.ar.home.theme.colors.text}";
};
"type:keyboard" = {
xkb_layout = "us";
xkb_variant = "altgr-intl";
colors.focusedInactive = {
background = "${config.ar.home.theme.colors.inactive}AA";
border = "${config.ar.home.theme.colors.inactive}AA";
childBorder = "${config.ar.home.theme.colors.inactive}AA";
indicator = "${config.ar.home.theme.colors.inactive}AA";
text = "${config.ar.home.theme.colors.text}";
};
"1386:21186:Wacom_HID_52C2_Finger" = {
map_to_output = "'Samsung Display Corp. 0x4152 Unknown'";
colors.unfocused = {
background = "${config.ar.home.theme.colors.inactive}AA";
border = "${config.ar.home.theme.colors.inactive}AA";
childBorder = "${config.ar.home.theme.colors.inactive}AA";
indicator = "${config.ar.home.theme.colors.inactive}AA";
text = "${config.ar.home.theme.colors.text}";
};
"1386:21186:Wacom_HID_52C2_Pen" = {
map_to_output = "'Samsung Display Corp. 0x4152 Unknown'";
defaultWorkspace = "workspace number 1";
focus = {
followMouse = "always";
newWindow = "focus";
# mouseWarping = "container";
};
};
keybindings = {
# Apps
"${modifier}+B" = "exec ${browser}";
"${modifier}+E" = "exec ${editor}";
"${modifier}+F" = "exec ${fileManager}";
"${modifier}+R" = "exec ${launcher}";
"${modifier}+T" = "exec ${terminal}";
# Manage session.
"${modifier}+C" = "kill";
"${modifier}+Control+L" = "exec ${lock}";
"${modifier}+M" = "exec ${logout}";
# Basic window management.
"${modifier}+Shift+W" = "fullscreen toggle";
"${modifier}+Shift+V" = "floating toggle";
# Move focus with modifier + arrow keys
"${modifier}+Left" = "focus left";
"${modifier}+Down" = "focus down";
"${modifier}+Up" = "focus up";
"${modifier}+Right" = "focus right";
# Move focus with modifier + hjkl keys (vim/ADM-3A terminal)
"${modifier}+H" = "focus left";
"${modifier}+J" = "focus down";
"${modifier}+K" = "focus up";
"${modifier}+L" = "focus right";
# Move window with modifier SHIFT + arrow keys
"${modifier}+Shift+Left" = "move left";
"${modifier}+Shift+Down" = "move down";
"${modifier}+Shift+Up" = "move up";
"${modifier}+Shift+Right" = "move right";
# Move window with modifier SHIFT + hjkl keys
"${modifier}+Shift+H" = "move left";
"${modifier}+Shift+J" = "move down";
"${modifier}+Shift+K" = "move up";
"${modifier}+Shift+L" = "move right";
# Gnome-like workspaces.
"${modifier}+Comma" = "workspace prev";
"${modifier}+Period" = "workspace next";
"${modifier}+Shift+Comma" = "move container to workspace prev; workspace prev";
"${modifier}+Shift+Period" = "move container to workspace next; workspace next";
# Switch workspaces with modifier + [0-9]
"${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";
# Move active window to a workspace with modifier + SHIFT + [0-9]
"${modifier}+Shift+1" = "move container to workspace number 1; workspace 1";
"${modifier}+Shift+2" = "move container to workspace number 2; workspace 2";
"${modifier}+Shift+3" = "move container to workspace number 3; workspace 3";
"${modifier}+Shift+4" = "move container to workspace number 4; workspace 4";
"${modifier}+Shift+5" = "move container to workspace number 5; workspace 5";
"${modifier}+Shift+6" = "move container to workspace number 6; workspace 6";
"${modifier}+Shift+7" = "move container to workspace number 7; workspace 7";
"${modifier}+Shift+8" = "move container to workspace number 8; workspace 8";
"${modifier}+Shift+9" = "move container to workspace number 9; workspace 9";
"${modifier}+Shift+0" = "move container to workspace number 10; workspace 10";
# Move workspace to another output.
"${modifier}+Control+Shift+Left" = "move workspace to output left";
"${modifier}+Control+Shift+Down" = "move workspace to output down";
"${modifier}+Control+Shift+Up" = "move workspace to output up";
"${modifier}+Control+Shift+Right" = "move workspace to output right";
# Move workspace to another output.
"${modifier}+Control+Shift+H" = "move workspace to output left";
"${modifier}+Control+Shift+J" = "move workspace to output down";
"${modifier}+Control+Shift+K" = "move workspace to output up";
"${modifier}+Control+Shift+L" = "move workspace to output right";
# Scratchpad show and move
"${modifier}+S" = "scratchpad show";
"${modifier}+Shift+S" = "move scratchpad";
# For petalburg
"XF86Launch4" = "exec pp-adjuster";
"XF86Launch3" = "exec ${lib.getExe cycleSwayDisplayModes}";
# Screenshots
"PRINT" = "exec ${screenshot_screen}";
"${modifier}+PRINT" = "exec ${screenshot_region}";
# Show/hide waybar
"${modifier}+F11" = "exec pkill -SIGUSR1 waybar";
"Ctrl+Mod1+M" = "mode move";
"Ctrl+Mod1+R" = "mode resize";
};
modes = {
move = {
Escape = "mode default";
Left = "move left";
Down = "move down";
Up = "move up";
Right = "move right";
H = "move left";
J = "move down";
K = "move up";
L = "move right";
Comma = "move container to workspace prev; workspace prev";
Period = "move container to workspace next; workspace next";
"1" = "move container to workspace number 1; workspace 1";
"2" = "move container to workspace number 2; workspace 2";
"3" = "move container to workspace number 3; workspace 3";
"4" = "move container to workspace number 4; workspace 4";
"5" = "move container to workspace number 5; workspace 5";
"6" = "move container to workspace number 6; workspace 6";
"7" = "move container to workspace number 7; workspace 7";
"8" = "move container to workspace number 8; workspace 8";
"9" = "move container to workspace number 9; workspace 9";
"0" = "move container to workspace number 10; workspace 10";
S = "move scratchpad";
fonts = {
names = ["${config.gtk.font.name}"];
style = "Bold";
size = config.gtk.font.size + 0.0;
};
resize = {
Escape = "mode default";
Left = "resize shrink width 10 px";
Down = "resize grow height 10 px";
Up = "resize shrink height 10 px";
Right = "resize grow width 10 px";
gaps.inner = 5;
gaps.outer = 5;
input = {
"type:touchpad" = {
click_method = "clickfinger";
dwt = "enabled";
natural_scroll = "enabled";
scroll_method = "two_finger";
tap = "enabled";
tap_button_map = "lrm";
};
"type:keyboard" = {
xkb_layout = "us";
xkb_variant = "altgr-intl";
};
"1386:21186:Wacom_HID_52C2_Finger" = {
map_to_output = "'Samsung Display Corp. 0x4152 Unknown'";
};
"1386:21186:Wacom_HID_52C2_Pen" = {
map_to_output = "'Samsung Display Corp. 0x4152 Unknown'";
};
};
};
startup = [
{
command =
if config.ar.home.desktop.sway.randomWallpaper
then "true"
else "${wallpaperd}";
}
{command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";}
{command = "${idled}";}
{command = lib.getExe pkgs.autotiling;}
{command = lib.getExe' pkgs.blueman "blueman-applet";}
{command = lib.getExe' pkgs.networkmanagerapplet "nm-applet";}
{command = lib.getExe' pkgs.playerctl "playerctld";}
{command = lib.getExe' pkgs.swayosd "swayosd-server";}
{command = notifyd;}
];
output = {
"BOE 0x095F Unknown" = {
scale = "1.5";
keybindings = {
# Apps
"${modifier}+B" = "exec ${browser}";
"${modifier}+E" = "exec ${editor}";
"${modifier}+F" = "exec ${fileManager}";
"${modifier}+R" = "exec ${launcher}";
"${modifier}+T" = "exec ${terminal}";
# Manage session.
"${modifier}+C" = "kill";
"${modifier}+Control+L" = "exec ${lock}";
"${modifier}+M" = "exec ${logout}";
# Basic window management.
"${modifier}+Shift+W" = "fullscreen toggle";
"${modifier}+Shift+V" = "floating toggle";
# Move focus with modifier + arrow keys
"${modifier}+Left" = "focus left";
"${modifier}+Down" = "focus down";
"${modifier}+Up" = "focus up";
"${modifier}+Right" = "focus right";
# Move focus with modifier + hjkl keys (vim/ADM-3A terminal)
"${modifier}+H" = "focus left";
"${modifier}+J" = "focus down";
"${modifier}+K" = "focus up";
"${modifier}+L" = "focus right";
# Move window with modifier SHIFT + arrow keys
"${modifier}+Shift+Left" = "move left";
"${modifier}+Shift+Down" = "move down";
"${modifier}+Shift+Up" = "move up";
"${modifier}+Shift+Right" = "move right";
# Move window with modifier SHIFT + hjkl keys
"${modifier}+Shift+H" = "move left";
"${modifier}+Shift+J" = "move down";
"${modifier}+Shift+K" = "move up";
"${modifier}+Shift+L" = "move right";
# Gnome-like workspaces.
"${modifier}+Comma" = "workspace prev";
"${modifier}+Period" = "workspace next";
"${modifier}+Shift+Comma" = "move container to workspace prev; workspace prev";
"${modifier}+Shift+Period" = "move container to workspace next; workspace next";
# Switch workspaces with modifier + [0-9]
"${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";
# Move active window to a workspace with modifier + SHIFT + [0-9]
"${modifier}+Shift+1" = "move container to workspace number 1; workspace 1";
"${modifier}+Shift+2" = "move container to workspace number 2; workspace 2";
"${modifier}+Shift+3" = "move container to workspace number 3; workspace 3";
"${modifier}+Shift+4" = "move container to workspace number 4; workspace 4";
"${modifier}+Shift+5" = "move container to workspace number 5; workspace 5";
"${modifier}+Shift+6" = "move container to workspace number 6; workspace 6";
"${modifier}+Shift+7" = "move container to workspace number 7; workspace 7";
"${modifier}+Shift+8" = "move container to workspace number 8; workspace 8";
"${modifier}+Shift+9" = "move container to workspace number 9; workspace 9";
"${modifier}+Shift+0" = "move container to workspace number 10; workspace 10";
# Move workspace to another output.
"${modifier}+Control+Shift+Left" = "move workspace to output left";
"${modifier}+Control+Shift+Down" = "move workspace to output down";
"${modifier}+Control+Shift+Up" = "move workspace to output up";
"${modifier}+Control+Shift+Right" = "move workspace to output right";
# Move workspace to another output.
"${modifier}+Control+Shift+H" = "move workspace to output left";
"${modifier}+Control+Shift+J" = "move workspace to output down";
"${modifier}+Control+Shift+K" = "move workspace to output up";
"${modifier}+Control+Shift+L" = "move workspace to output right";
# Scratchpad show and move
"${modifier}+S" = "scratchpad show";
"${modifier}+Shift+S" = "move scratchpad";
# For petalburg
"XF86Launch4" = "exec pp-adjuster";
"XF86Launch3" = "exec ${lib.getExe cycleSwayDisplayModes}";
# Screenshots
"PRINT" = "exec ${screenshot_screen}";
"${modifier}+PRINT" = "exec ${screenshot_region}";
# Show/hide waybar
"${modifier}+F11" = "exec pkill -SIGUSR1 waybar";
"Ctrl+Mod1+M" = "mode move";
"Ctrl+Mod1+R" = "mode resize";
};
"LG Display 0x0569 Unknown" = {
scale = "1.0";
modes = {
move = {
Escape = "mode default";
Left = "move left";
Down = "move down";
Up = "move up";
Right = "move right";
H = "move left";
J = "move down";
K = "move up";
L = "move right";
Comma = "move container to workspace prev; workspace prev";
Period = "move container to workspace next; workspace next";
"1" = "move container to workspace number 1; workspace 1";
"2" = "move container to workspace number 2; workspace 2";
"3" = "move container to workspace number 3; workspace 3";
"4" = "move container to workspace number 4; workspace 4";
"5" = "move container to workspace number 5; workspace 5";
"6" = "move container to workspace number 6; workspace 6";
"7" = "move container to workspace number 7; workspace 7";
"8" = "move container to workspace number 8; workspace 8";
"9" = "move container to workspace number 9; workspace 9";
"0" = "move container to workspace number 10; workspace 10";
S = "move scratchpad";
};
resize = {
Escape = "mode default";
Left = "resize shrink width 10 px";
Down = "resize grow height 10 px";
Up = "resize shrink height 10 px";
Right = "resize grow width 10 px";
};
};
"Samsung Display Corp. 0x4152 Unknown" = {
scale = "2.0";
startup = [
{
command =
if config.ar.home.desktop.sway.randomWallpaper
then "true"
else "${wallpaperd}";
}
{command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";}
{command = "${idled}";}
{command = lib.getExe pkgs.autotiling;}
{command = lib.getExe' pkgs.blueman "blueman-applet";}
{command = lib.getExe' pkgs.networkmanagerapplet "nm-applet";}
{command = lib.getExe' pkgs.playerctl "playerctld";}
{command = lib.getExe' pkgs.swayosd "swayosd-server";}
{command = notifyd;}
];
output = {
"BOE 0x095F Unknown".scale = "1.5";
"LG Display 0x0569 Unknown".scale = "1.0";
"Samsung Display Corp. 0x4152 Unknown".scale = "2.0";
"LG Electronics LG ULTRAWIDE 311NTAB5M720".scale = "1.25";
"Guangxi Century Innovation Display Electronics Co., Ltd 27C1U-D 0000000000001" = {
scale = "1.5";
pos = "-2560 0";
};
"HP Inc. HP 24mh 3CM037248S " = {
scale = "1.0";
pos = "-1920 0";
};
};
"LG Electronics LG ULTRAWIDE 311NTAB5M720" = {
scale = "1.25";
};
"Guangxi Century Innovation Display Electronics Co., Ltd 27C1U-D 0000000000001" = {
scale = "1.5";
pos = "-2560 0";
};
"HP Inc. HP 24mh 3CM037248S " = {
scale = "1.0";
pos = "-1920 0";
};
};
floating = {
criteria = [
floating.criteria = [
{app_id = ".blueman-manager-wrapped";}
{app_id = "Bitwarden";}
{app_id = "blueberry.py";}
@ -330,93 +338,94 @@
{window_role = "pop-up";}
{window_type = "dialog";}
];
window = {
titlebar = false;
commands = [
{
command = "floating enable; sticky toggle; resize 35ppt 10ppt";
criteria = {
title = "^Picture-in-Picture$";
app_id = "firefox";
};
}
{
command = "resize set 40ppt 60ppt; move position center";
criteria = {title = "Open Folder";};
}
{
command = "resize set 40ppt 60ppt; move position center";
criteria = {title = "Open File";};
}
{
command = "resize set 40ppt 60ppt; move position center";
criteria = {app_id = "blueberry.py";};
}
{
command = "resize set 60ppt 80ppt; move position center";
criteria = {app_id = "solaar";};
}
{
command = "resize set 80ppt 80ppt; move position center";
criteria = {app_id = "org.keepassxc.KeePassXC";};
}
{
command = "resize set 40ppt 60ppt; move position center";
criteria = {app_id = ".blueman-manager-wrapped";};
}
{
command = "resize set 40ppt 60ppt; move position center";
criteria = {app_id = "pavucontrol";};
}
];
};
workspaceAutoBackAndForth = true;
};
window = {
titlebar = false;
commands = [
{
command = "floating enable; sticky toggle; resize 35ppt 10ppt";
criteria = {
title = "^Picture-in-Picture$";
app_id = "firefox";
};
}
{
command = "resize set 40ppt 60ppt; move position center";
criteria = {title = "Open Folder";};
}
{
command = "resize set 40ppt 60ppt; move position center";
criteria = {title = "Open File";};
}
{
command = "resize set 40ppt 60ppt; move position center";
criteria = {app_id = "blueberry.py";};
}
{
command = "resize set 60ppt 80ppt; move position center";
criteria = {app_id = "solaar";};
}
{
command = "resize set 80ppt 80ppt; move position center";
criteria = {app_id = "org.keepassxc.KeePassXC";};
}
{
command = "resize set 40ppt 60ppt; move position center";
criteria = {app_id = ".blueman-manager-wrapped";};
}
{
command = "resize set 40ppt 60ppt; move position center";
criteria = {app_id = "pavucontrol";};
}
];
};
workspaceAutoBackAndForth = true;
};
wayland.windowManager.sway.extraConfig = let
brightness = lib.getExe' pkgs.swayosd "swayosd-client";
brightness_up = "${brightness} --brightness=raise";
brightness_down = "${brightness} --brightness=lower";
volume = brightness;
volume_up = "${volume} --output-volume=raise";
volume_down = "${volume} --output-volume=lower";
volume_mute = "${volume} --output-volume=mute-toggle";
mic_mute = "${volume} --input-volume=mute-toggle";
media = lib.getExe pkgs.playerctl;
media_play = "${media} play-pause";
media_next = "${media} next";
media_prev = "${media} previous";
in ''
bindsym --locked XF86MonBrightnessUp exec ${brightness_up}
bindsym --locked XF86MonBrightnessDown exec ${brightness_down}
bindsym --locked XF86AudioRaiseVolume exec ${volume_up}
bindsym --locked XF86AudioLowerVolume exec ${volume_down}
bindsym --locked XF86AudioMute exec ${volume_mute}
bindsym --locked XF86AudioMicMute exec ${mic_mute}
bindsym --locked XF86AudioPlay exec ${media_play}
bindsym --locked XF86AudioPrev exec ${media_prev}
bindsym --locked XF86AudioNext exec ${media_next}
bindsym --locked XF86Launch2 exec ${media_play}
windowManager.sway.extraConfig = let
brightness = lib.getExe' pkgs.swayosd "swayosd-client";
brightness_up = "${brightness} --brightness=raise";
brightness_down = "${brightness} --brightness=lower";
volume = brightness;
volume_up = "${volume} --output-volume=raise";
volume_down = "${volume} --output-volume=lower";
volume_mute = "${volume} --output-volume=mute-toggle";
mic_mute = "${volume} --input-volume=mute-toggle";
media = lib.getExe pkgs.playerctl;
media_play = "${media} play-pause";
media_next = "${media} next";
media_prev = "${media} previous";
in ''
bindsym --locked XF86MonBrightnessUp exec ${brightness_up}
bindsym --locked XF86MonBrightnessDown exec ${brightness_down}
bindsym --locked XF86AudioRaiseVolume exec ${volume_up}
bindsym --locked XF86AudioLowerVolume exec ${volume_down}
bindsym --locked XF86AudioMute exec ${volume_mute}
bindsym --locked XF86AudioMicMute exec ${mic_mute}
bindsym --locked XF86AudioPlay exec ${media_play}
bindsym --locked XF86AudioPrev exec ${media_prev}
bindsym --locked XF86AudioNext exec ${media_next}
bindsym --locked XF86Launch2 exec ${media_play}
mode "move" {
bindgesture swipe:right move container to workspace prev; workspace prev
bindgesture swipe:left move container to workspace next; workspace next
bindgesture pinch:inward+up move up
bindgesture pinch:inward+down move down
bindgesture pinch:inward+left move left
bindgesture pinch:inward+right move right
}
mode "move" {
bindgesture swipe:right move container to workspace prev; workspace prev
bindgesture swipe:left move container to workspace next; workspace next
bindgesture pinch:inward+up move up
bindgesture pinch:inward+down move down
bindgesture pinch:inward+left move left
bindgesture pinch:inward+right move right
}
bindgesture swipe:right workspace prev
bindgesture swipe:left workspace next
bindgesture swipe:right workspace prev
bindgesture swipe:left workspace next
bindswitch --reload --locked lid:on output eDP-1 disable
bindswitch --reload --locked lid:off output eDP-1 enable
bindswitch --reload --locked lid:on output eDP-1 disable
bindswitch --reload --locked lid:off output eDP-1 enable
${
if config.wayland.windowManager.sway.package == pkgs.swayfx
then "
${
if config.wayland.windowManager.sway.package == pkgs.swayfx
then "
blur enable
blur_passes 1
@ -438,9 +447,10 @@
layer_effects swayosd blur_ignore_transparent enable
layer_effects waybar blur enable
layer_effects waybar blur_ignore_transparent enable"
else ""
}
'';
else ""
}
'';
};
xdg.portal = {
enable = true;

View file

@ -38,7 +38,6 @@
'';
in {
config = lib.mkIf config.ar.home.desktop.sway.randomWallpaper {
# Packages that should be installed to the user profile.
home.packages = with pkgs; [swaybg sway-randomWallpaper];
wayland.windowManager.sway.config.startup = [

View file

@ -6,8 +6,8 @@
}: {
config = lib.mkIf config.ar.home.desktop.sway.redShift {
home.packages = with pkgs; [gammastep];
wayland.windowManager.sway.config.startup = [
# {command = "${pkgs.geoclue2}/libexec/geoclue-2.0/demos/agent";}
{command = "${lib.getExe pkgs.gammastep} -l 33.74:-84.38";}
];
};

View file

@ -57,42 +57,44 @@ in {
size = lib.mkDefault 11;
};
gtk3.extraConfig = lib.attrsets.optionalAttrs (cfg.darkMode) {gtk-application-prefer-dark-theme = 1;};
gtk3 = {
extraConfig = lib.attrsets.optionalAttrs (cfg.darkMode) {gtk-application-prefer-dark-theme = 1;};
extraCss = ''
@define-color accent_bg_color ${cfg.colors.primary};
@define-color accent_color @accent_bg_color;
gtk4.extraConfig = lib.attrsets.optionalAttrs (cfg.darkMode) {gtk-application-prefer-dark-theme = 1;};
${
lib.strings.optionalString
cfg.gtk.hideTitleBar
''
/* No (default) title bar on wayland */
headerbar.default-decoration {
/* You may need to tweak these values depending on your GTK theme */
margin-bottom: 50px;
margin-top: -100px;
gtk3.extraCss = ''
@define-color accent_bg_color ${cfg.colors.primary};
@define-color accent_color @accent_bg_color;
background: transparent;
padding: 0;
border: 0;
min-height: 0;
font-size: 0;
box-shadow: none;
}
${
lib.strings.optionalString
cfg.gtk.hideTitleBar
''
/* No (default) title bar on wayland */
headerbar.default-decoration {
/* You may need to tweak these values depending on your GTK theme */
margin-bottom: 50px;
margin-top: -100px;
/* rm -rf window shadows */
window.csd, /* gtk4? */
window.csd decoration { /* gtk3 */
box-shadow: none;
}
''
}
'';
};
background: transparent;
padding: 0;
border: 0;
min-height: 0;
font-size: 0;
box-shadow: none;
}
/* rm -rf window shadows */
window.csd, /* gtk4? */
window.csd decoration { /* gtk3 */
box-shadow: none;
}
''
}
'';
gtk4.extraCss = config.gtk.gtk3.extraCss;
gtk4 = {
extraConfig = lib.attrsets.optionalAttrs (cfg.darkMode) {gtk-application-prefer-dark-theme = 1;};
extraCss = config.gtk.gtk3.extraCss;
};
};
qt = {

View file

@ -11,8 +11,8 @@
ref = "master";
};
in {
".mozilla/firefox/default/chrome" = {inherit source;};
".mozilla/firefox/work/chrome" = {inherit source;};
".mozilla/firefox/default/chrome".source = source;
".mozilla/firefox/work/chrome".source = source;
};
programs.firefox = {
@ -39,11 +39,9 @@
force = true;
engines = {
"Bing" = {
metaData = {
hidden = true;
alias = "!bing";
};
"Bing".metaData = {
hidden = true;
alias = "!bing";
};
"Brave" = {
@ -63,11 +61,9 @@
];
};
"Google" = {
metaData = {
hidden = true;
alias = "!google";
};
"Google".metaData = {
hidden = true;
alias = "!google";
};
"Kagi" = {
@ -133,6 +129,7 @@
];
};
};
order = [
"Brave"
"Kagi"
@ -193,18 +190,14 @@
default = "Google";
force = true;
engines = {
"Bing" = {
metaData = {
hidden = true;
alias = "!bing";
};
"Bing".metaData = {
hidden = true;
alias = "!bing";
};
"DuckDuckGo" = {
metaData = {
hidden = true;
alias = "!ddg";
};
"DuckDuckGo".metaData = {
hidden = true;
alias = "!ddg";
};
};
};

View file

@ -53,6 +53,8 @@ in {
--
Aly Raffauf (née Chace)
'';
showSignature = "append";
};
thunderbird = {
@ -99,23 +101,21 @@ in {
inherit settings;
isDefault = true;
};
work = {inherit settings;};
work.settings = settings;
};
};
};
xdg.desktopEntries.thunderwork = {
categories = ["Application" "Network" "Chat" "Email" "Feed" "GTK" "News"];
exec = "thunderbird -P work --name thunderwork %U";
comment = "Read and write e-mails or RSS feeds, or manage tasks on calendars.";
exec = "thunderbird -P work --name thunderwork %U";
genericName = "Email Client";
icon = "thunderbird";
mimeType = ["message/rfc822" "x-scheme-handler/mailto" "text/calendar" "text/x-vcard"];
name = "Thunderbird (work)";
settings.StartupWMClass = "thunderwork";
startupNotify = true;
terminal = false;
settings = {
StartupWMClass = "thunderwork";
};
};
}

View file

@ -10,6 +10,7 @@ self: {
username = "dustin";
homeDirectory = "/home/dustin";
stateVersion = "24.05";
packages = with pkgs; [
fractal
libreoffice-fresh
@ -24,9 +25,7 @@ self: {
xdg.mimeApps = {
enable = true;
defaultApplications = {
"application/epub+zip" = "com.calibre_ebook.calibre.desktop;org.gnome.Evince.desktop;com.calibre_ebook.calibre.ebook-viewer.desktop;";
};
defaultApplications."application/epub+zip" = "com.calibre_ebook.calibre.desktop;org.gnome.Evince.desktop;com.calibre_ebook.calibre.ebook-viewer.desktop;";
};
ar.home = {