usability improvements
This commit is contained in:
9
modules/home-manager/bluetooth-picker.nix
Normal file
9
modules/home-manager/bluetooth-picker.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{pkgs, ...}:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.rofi-bluetooth
|
||||
];
|
||||
|
||||
# patch the rofi-bluetooth script to use an alternative rofi-command variable
|
||||
|
||||
}
|
@@ -10,17 +10,32 @@ let
|
||||
# Nix environment selector
|
||||
arrterian.nix-env-selector
|
||||
];
|
||||
|
||||
# baseExtensions = with pkgs; [
|
||||
# (vscode-with-extensions.override {
|
||||
# vscodeExtensions = with vscode-extensions; [
|
||||
# bbenoist.nix
|
||||
|
||||
# ];
|
||||
# })
|
||||
# ];
|
||||
|
||||
baseSettings = {
|
||||
# visual
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
"window.titleBarStyle" = "native";
|
||||
"window.customTitleBarVisibility" = "never";
|
||||
"window.menuBarVisibility" = "hidden";
|
||||
|
||||
"window.autoDetectColorScheme" = true;
|
||||
"workbench.preferredDarkColorTheme" = "Default Dark Modern";
|
||||
"workbench.preferredLightColorTheme" = "Default Light Modern";
|
||||
|
||||
"editor.fontFamily" = "'FiraCode Nerd Font Mono', 'monospace', monospace";
|
||||
"terminal.integrated.fontFamily" = "FiraCode Nerd Font Mono";
|
||||
"workbench.iconTheme" = "vs-seti";
|
||||
|
||||
# telemetry
|
||||
"telemetry.enableCrashReporter" = false;
|
||||
"telemetry.enableTelemetry" = false;
|
||||
"telemetry.telemetryLevel" = "off";
|
||||
"redhat.telemetry.enabled" = false;
|
||||
|
||||
# editor QOL
|
||||
@@ -127,7 +142,6 @@ in
|
||||
ms-python.vscode-pylance
|
||||
ms-toolsai.vscode-jupyter-slideshow
|
||||
ms-toolsai.jupyter-renderers
|
||||
|
||||
# Typst
|
||||
myriad-dreamin.tinymist
|
||||
]) ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
@@ -174,7 +188,6 @@ in
|
||||
"editor.wordSeparators" = "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?";
|
||||
};
|
||||
"[typst-code]" = {
|
||||
"git.openRepositoryInParentFolders" = "never";
|
||||
"editor.wordSeparators" = "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?";
|
||||
};
|
||||
"tinymist.fontPaths" = [
|
||||
|
@@ -8,7 +8,6 @@
|
||||
services.flatpak.uninstallUnmanaged = false;
|
||||
|
||||
services.flatpak.packages = [
|
||||
"com.github.flxzt.rnote"
|
||||
"com.github.tchx84.Flatseal"
|
||||
"com.spotify.Client"
|
||||
"io.podman_desktop.PodmanDesktop"
|
||||
|
47
modules/home-manager/fusuma.nix
Normal file
47
modules/home-manager/fusuma.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{pkgs, config, lib, ...}:
|
||||
let
|
||||
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
||||
in
|
||||
{
|
||||
config = {
|
||||
services.fusuma = {
|
||||
enable = true;
|
||||
settings = {
|
||||
swipe = {
|
||||
"3" = {
|
||||
up = {
|
||||
command = "exec ${hyprctl} dispatch fullscreen 1";
|
||||
};
|
||||
|
||||
down = {
|
||||
command = "exec ${lib.getExe config.nix-config.launcher}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pinch = {
|
||||
"4" = {
|
||||
"in" = {
|
||||
command = "exec ${hyprctl} dispatch togglespecialworkspace magic";
|
||||
};
|
||||
"out" = {
|
||||
command = "exec ${hyprctl} dispatch togglespecialworkspace magic";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
hold = {
|
||||
"5" = {
|
||||
command = "exec ${lib.getExe config.nix-config.launcher}";
|
||||
threshold = 0.1;
|
||||
};
|
||||
};
|
||||
|
||||
threshold = {
|
||||
pinch = 0.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@@ -4,9 +4,9 @@
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
# avoid starting multiple hyprlock instances.
|
||||
before_sleep_cmd = "pidof hyprlock || hyprlock --immediate-render --no-fade-in";
|
||||
lock_cmd = "pidof hyprlock || hyprlock --immediate-render --no-fade-in";
|
||||
# See: https://github.com/hyprwm/hypridle/issues/146
|
||||
before_sleep_cmd = "hyprlock --no-fade-in";
|
||||
lock_cmd = "hyprlock";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
};
|
||||
@@ -22,7 +22,7 @@
|
||||
{
|
||||
# dim screen after 2 minutes
|
||||
timeout = 120;
|
||||
on-timeout = "brightnessctl -s set 2";
|
||||
on-timeout = "brightnessctl -s set 2%";
|
||||
on-resume = "brightnessctl -r";
|
||||
# monitor backlight restore.
|
||||
}
|
||||
@@ -40,6 +40,5 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@ in
|
||||
"wl-paste --watch cliphist store"
|
||||
"${lib.getExe pkgs.waybar}"
|
||||
"${lib.getExe pkgs.hypridle}"
|
||||
# TODO - currently broken
|
||||
"${pkgs.owncloud-client}"
|
||||
"${lib.getExe pkgs.keepassxc}"
|
||||
];
|
||||
|
@@ -23,6 +23,9 @@ in
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
# debug = {
|
||||
# disable_logs = false;
|
||||
# };
|
||||
general = {
|
||||
resize_on_border = true;
|
||||
gaps_in = 5;
|
||||
@@ -98,6 +101,9 @@ in
|
||||
# the internal monitor, always at the "center"
|
||||
"eDP-1, ${cfg.internal-screen.resolution}, 0x0, ${cfg.internal-screen.scale}"
|
||||
|
||||
# ultra wide monitor at home
|
||||
"desc:Samsung Electric Company C34H89x H4ZN501178, 3440x1440@99.98, auto-up, 1"
|
||||
|
||||
# Samsung monitors at irchel (matching the description)
|
||||
"desc:Samsung Electric Company LS27D80xU, 2560x1440@59.95, auto-up, 1"
|
||||
|
||||
@@ -126,7 +132,7 @@ in
|
||||
# Global overview
|
||||
pkgs.hyprlandPlugins.hyprspace
|
||||
# Touch gestures
|
||||
pkgs.hyprlandPlugins.hyprgrass
|
||||
# pkgs.hyprlandPlugins.hyprgrass
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@@ -28,7 +28,7 @@ in
|
||||
# Close window
|
||||
"$mod, Q, killactive,"
|
||||
# Force close window
|
||||
# "$mod+Shift, Q, forcekillactive,"
|
||||
"$mod+Shift, Q, forcekillactive,"
|
||||
|
||||
# Toggle Floating and reduce size
|
||||
"$mod, f, togglefloating,"
|
||||
@@ -49,21 +49,25 @@ in
|
||||
"$mod+Shift, up, movewindow, u"
|
||||
"$mod+Shift, down, movewindow, d"
|
||||
|
||||
# Move window to workspace
|
||||
"$mod+Ctrl, left, movetoworkspace, -1"
|
||||
"$mod+Ctrl, right, movetoworkspace, +1"
|
||||
|
||||
# Switch workspace
|
||||
"$mod+Alt, left, workspace, -1"
|
||||
"$mod+Alt, right, workspace, +1"
|
||||
"$mod, left, workspace, -1"
|
||||
"$mod, right, workspace, +1"
|
||||
"$mod, mouse_down, workspace, -1"
|
||||
"$mod, mouse_up, workspace, +1"
|
||||
|
||||
|
||||
# move to scratch workspace
|
||||
"$mod+Ctrl, up, movetoworkspace, special:magic"
|
||||
"$mod+Ctrl, down, movetoworkspace, 1"
|
||||
# toggle scratch workspace
|
||||
"$mod+Alt, up, togglespecialworkspace, magic"
|
||||
"$mod+Alt, down, togglespecialworkspace, magic"
|
||||
"$mod+Ctrl, down, movetoworkspace, prev"
|
||||
|
||||
# switch to scratch workspace
|
||||
"$mod, up, togglespecialworkspace, magic"
|
||||
"$mod, down, togglespecialworkspace, magic"
|
||||
|
||||
|
||||
# Screenshot
|
||||
"$mod, Print, exec, hyprshot -m region -o ~/Pictures/Screenshots"
|
||||
@@ -80,7 +84,7 @@ in
|
||||
|
||||
# Other pickers using the same launcher
|
||||
"$mod+Ctrl, space, exec, ${lib.getExe config.nix-config.filePicker}"
|
||||
|
||||
"$mod, period, exec, ${lib.getExe config.nix-config.emojiPicker}"
|
||||
];
|
||||
|
||||
# repeatable bindings
|
||||
@@ -97,25 +101,26 @@ in
|
||||
"$mod, KP_Subtract, resizeactive, -2% -2%"
|
||||
"$mod, PLUS, resizeactive, 2% 2%"
|
||||
"$mod, KP_Add, resizeactive, 2% 2%"
|
||||
|
||||
|
||||
];
|
||||
|
||||
# lock-screen bindings
|
||||
bindl = [
|
||||
## depending on the setup: lock screen or switch to clamshell mode
|
||||
# in any case, the internal screen is turned off
|
||||
# ", switch:on:Lid Switch, exec, loginctl lock-session"
|
||||
", XF86PowerOff, exec, hyprctl dispatch dpms on eDP-1"
|
||||
## depending on the setup we expect different behaviors when closing the lid:
|
||||
# either sleep & lock screen OR switch to clamshell mode
|
||||
# through the `services.logind.lidSwitch` and `services.logind.lidSwitchDocked` we can differentiate both cases
|
||||
# when not docked, the system is put to sleep and the screen is implicitly locked as per the hypridle configuration
|
||||
# when docked, the lid switch is ignored by logind and needs to be handled manually, see below:
|
||||
|
||||
|
||||
# if an additional monitor is detected, simply deactivate the internal screen and continue working on the external monitor
|
||||
", switch:on:Lid Switch, exec, hyprctl dispatch dpms off eDP-1"
|
||||
", switch:on:Lid Switch, exec, sleep 0.5; hyprctl monitors | grep 'dpmsStatus: 1' && hyprctl keyword monitor 'eDP-1,disable'"
|
||||
# # if no external monitor is detected, lock the screen
|
||||
# ", switch:on:Lid Switch, exec, sleep 0.5; hyprctl monitors | grep 'dpmsStatus: 1' || loginctl lock-session"
|
||||
|
||||
", switch:on:Lid Switch, exec, hyprctl keyword monitor 'eDP-1,disable"
|
||||
## on reopening the lid, turn the internal screen back on
|
||||
", switch:off:Lid Switch, exec, hyprctl dispatch dpms on eDP-1"
|
||||
# if an external monitor was connected, then we need to reload the monitor configuration
|
||||
", switch:off:Lid Switch, exec, hyprctl monitors | grep 'ID 1' && hyprctl reload"
|
||||
# we need to reload the monitor configuration so that the internal screen is turned back on
|
||||
", switch:off:Lid Switch, exec, hyprctl reload"
|
||||
];
|
||||
|
||||
# bindr = [
|
||||
@@ -129,7 +134,21 @@ in
|
||||
# resize the window using right click
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
bind= , XF86AudioMicMute, submap, player_submap
|
||||
|
||||
submap=player_submap
|
||||
bind=, XF86AudioRaiseVolume, exec, notify-send previous; hyprctl dispatch submap reset
|
||||
bind=, XF86AudioLowerVolume, exec, notify-send next; hyprctl dispatch submap reset
|
||||
bind=, XF86AudioMicMute, exec, notify-send pause; hyprctl dispatch submap reset
|
||||
submap=reset
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -5,16 +5,12 @@
|
||||
settings = {
|
||||
|
||||
|
||||
# # prevent the screen being shown for a split second
|
||||
# animations = {
|
||||
# animation = "fadeIn, 0, 0, linear";
|
||||
# };
|
||||
|
||||
general = {
|
||||
# immediately lock the screen
|
||||
grace = 0;
|
||||
no_fade_in = false;
|
||||
disable_loading_bar = false;
|
||||
# no_fade_in = false;
|
||||
# disable_loading_bar = false;
|
||||
};
|
||||
|
||||
background = {
|
||||
|
@@ -17,7 +17,6 @@ in
|
||||
|
||||
config = {
|
||||
|
||||
|
||||
# required to autoload fonts from packages installed via Home Manager
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
@@ -85,14 +84,17 @@ in
|
||||
};
|
||||
};
|
||||
"clock" = {
|
||||
format = " {:%H:%M}";
|
||||
format = "{:%H:%M}";
|
||||
interval = 1;
|
||||
tooltip-format = "{calendar}";
|
||||
calendar = {
|
||||
"format" = {
|
||||
"today" = "<span color='#fAfBfC'><b>{}</b></span>";
|
||||
};
|
||||
};
|
||||
# calendar = {
|
||||
# format = "%Y-%m-%d\n %A\n\n%H:%M";
|
||||
# start-day = 1; # Monday
|
||||
# first-weekday = 1; # Monday
|
||||
# week-number = false;
|
||||
# long-weekdays = true;
|
||||
# hide-if-empty = false;
|
||||
# };
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
@@ -104,7 +106,7 @@ in
|
||||
};
|
||||
"bluetooth" = {
|
||||
format-on = "";
|
||||
format-off = "BT-off";
|
||||
format-off = "";
|
||||
format-disabled = "";
|
||||
format-connected-battery = "{device_battery_percentage}% ";
|
||||
format-alt = "{device_alias} ";
|
||||
@@ -137,7 +139,7 @@ in
|
||||
format = "{volume}% {icon}";# {format_source}";
|
||||
format-bluetooth = "{volume}% {icon}";# {format_source}";
|
||||
format-bluetooth-muted = " {icon}";# {format_source}";
|
||||
format-muted = "🔇";# {format_source}";
|
||||
format-muted = "";# {format_source}";
|
||||
format-alt = "{format_source} {icon}";
|
||||
# format-source = " {volume}%";
|
||||
# format-source-muted = "";
|
||||
|
@@ -47,6 +47,8 @@ in
|
||||
cursor_trail_decay = "0.1 0.4";
|
||||
url_style = "curly";
|
||||
notify_on_cmd_finish = "unfocused";
|
||||
|
||||
window_padding_width = 5;
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
|
@@ -33,6 +33,10 @@ let
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
|
||||
emojiPicker = pkgs.writeShellScriptBin "emoji-picker" ''
|
||||
curl -s https://raw.githubusercontent.com/littleboycoding/emoji-dmenu/refs/heads/master/emoji.txt | fuzzel --dmenu | cut -d ' ' -f 1 | wl-copy
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
@@ -54,6 +58,12 @@ in
|
||||
type = lib.types.package;
|
||||
default = filePicker;
|
||||
};
|
||||
|
||||
emojiPicker = lib.mkOption {
|
||||
description = "Package to use as a emoji picker";
|
||||
type = lib.types.package;
|
||||
default = emojiPicker;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
@@ -107,6 +117,7 @@ in
|
||||
home.packages = with pkgs; [
|
||||
powerMenu
|
||||
filePicker
|
||||
emojiPicker
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@@ -52,7 +52,8 @@ in
|
||||
|
||||
stylix = {
|
||||
# Stylix is already enabled since the system is configured to use it
|
||||
# enable = true;
|
||||
enable = true;
|
||||
image = ./../../wallpapers/magicpattern-87PP9Zd7MNo-unsplash.jpg;
|
||||
# don't theme applications by default
|
||||
autoEnable = false;
|
||||
|
||||
@@ -68,8 +69,8 @@ in
|
||||
};
|
||||
|
||||
|
||||
image = ./../../wallpapers/magicpattern-87PP9Zd7MNo-unsplash.jpg;
|
||||
|
||||
polarity = lib.mkDefault "dark";
|
||||
|
||||
fonts = {
|
||||
|
||||
@@ -107,41 +108,75 @@ in
|
||||
popups = 0.9;
|
||||
terminal = cfg.terminalOpacity;
|
||||
};
|
||||
|
||||
base16Scheme = {
|
||||
scheme = "onelight";
|
||||
author = "https://github.com/one-dark";
|
||||
base00 = "#fafafa";
|
||||
base01 = "#f4f4f4";
|
||||
base02 = "#e5e5e6";
|
||||
base03 = "#dfdfe0";
|
||||
base04 = "#d7d7d8";
|
||||
base05 = "#383a42";
|
||||
base06 = "#202227";
|
||||
base07 = "#090a0b";
|
||||
base08 = "#d84a3d";
|
||||
base09 = "#a626a4";
|
||||
base0A = "#c18401";
|
||||
base0B = "#50a14f";
|
||||
base0C = "#0070a8";
|
||||
base0D = "#4078f2";
|
||||
base0E = "#a626a4";
|
||||
base0F = "#986801";
|
||||
};
|
||||
|
||||
targets = {
|
||||
hyprpaper.enable = true;
|
||||
hyprlock.enable = true;
|
||||
# disabled because they overwrite too many settings
|
||||
# gnome
|
||||
# wofi
|
||||
# vscode
|
||||
# waybar
|
||||
# kitty
|
||||
|
||||
fontconfig.enable = true;
|
||||
font-packages.enable = true;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
stylix.base16Scheme = {
|
||||
scheme = "onelight";
|
||||
author = "https://github.com/one-dark";
|
||||
base00 = "#fafafa";
|
||||
base01 = "#f4f4f4";
|
||||
base02 = "#e5e5e6";
|
||||
base03 = "#dfdfe0";
|
||||
base04 = "#d7d7d8";
|
||||
base05 = "#383a42";
|
||||
base06 = "#202227";
|
||||
base07 = "#090a0b";
|
||||
base08 = "#d84a3d";
|
||||
base09 = "#a626a4";
|
||||
base0A = "#c18401";
|
||||
base0B = "#50a14f";
|
||||
base0C = "#0070a8";
|
||||
base0D = "#4078f2";
|
||||
base0E = "#a626a4";
|
||||
base0F = "#986801";
|
||||
|
||||
};
|
||||
# https://pltanton.dev/posts/2024/02/nix-based-dark-light-theme-switch/
|
||||
home.packages = [
|
||||
(lib.lowPrio (pkgs.writeShellApplication {
|
||||
name = "toggle-theme";
|
||||
runtimeInputs = with pkgs; [ home-manager coreutils ripgrep ];
|
||||
text =
|
||||
''
|
||||
"$(home-manager generations | head -1 | rg -o '/[^ ]*')"/specialisation/light-theme/activate
|
||||
echo "Switched to light theme"
|
||||
'';
|
||||
}))
|
||||
];
|
||||
|
||||
stylix.targets = {
|
||||
hyprpaper.enable = true;
|
||||
hyprlock.enable = true;
|
||||
gnome.enable = true;
|
||||
|
||||
# disabled because they overwrite too many settings
|
||||
# wofi.enable = true;
|
||||
# vscode.enable = true;
|
||||
# waybar.enable = true;
|
||||
# kitty.enable = true;
|
||||
specialisation.light-theme.configuration = {
|
||||
stylix = {
|
||||
polarity = "light";
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
(lib.hiPrio (pkgs.writeShellApplication {
|
||||
name = "toggle-theme";
|
||||
runtimeInputs = with pkgs; [ home-manager coreutils ripgrep ];
|
||||
text =
|
||||
''
|
||||
"$(home-manager generations | head -2 | tail -1 | rg -o '/[^ ]*')"/activate
|
||||
echo "Switched to dark theme"
|
||||
'';
|
||||
}))
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user