Migrate config (frues-pc machine for now) from https://git.peprolinbot.com/peprolinbot/nixos-config, with improvements
This commit is contained in:
parent
ebd178b0a5
commit
7606f9e051
66 changed files with 9465 additions and 73 deletions
10
users/pedro/home-configuration/browsers/default.nix
Normal file
10
users/pedro/home-configuration/browsers/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{...}: {
|
||||
imports = [(import ./librewolf.nix)];
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = ["librewolf.desktop"];
|
||||
"text/xml" = ["librewolf.desktop"];
|
||||
"x-scheme-handler/http" = ["librewolf.desktop"];
|
||||
"x-scheme-handler/https" = ["librewolf.desktop"];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
selectedFilterLists = [
|
||||
"user-filters"
|
||||
"ublock-filters"
|
||||
"ublock-badware"
|
||||
"ublock-privacy"
|
||||
"ublock-quick-fixes"
|
||||
"ublock-unbreak"
|
||||
"easylist"
|
||||
"easyprivacy"
|
||||
"LegitimateURLShortener"
|
||||
"adguard-spyware-url"
|
||||
"urlhaus-1"
|
||||
"curben-phishing"
|
||||
"plowe-0"
|
||||
"fanboy-cookiemonster"
|
||||
"ublock-cookies-easylist"
|
||||
];
|
||||
}
|
128
users/pedro/home-configuration/browsers/librewolf.nix
Normal file
128
users/pedro/home-configuration/browsers/librewolf.nix
Normal file
|
@ -0,0 +1,128 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"webgl.disabled" = false;
|
||||
"privacy.resistFingerprinting" = true;
|
||||
"privacy.clearOnShutdown.history" = false;
|
||||
"privacy.clearOnShutdown.cookies" = false;
|
||||
"network.cookie.lifetimePolicy" = 0;
|
||||
"identity.fxaccounts.enabled" = true;
|
||||
};
|
||||
profiles.pedro = {
|
||||
search = {
|
||||
force = true;
|
||||
default = "FruesX";
|
||||
privateDefault = "FruesX";
|
||||
order = ["FruesX" "ddg" "google"];
|
||||
engines = {
|
||||
"FruesX" = {
|
||||
urls = [{template = "https://searx.peprolinbot.com/search?q={searchTerms}";}];
|
||||
icon = "https://searx.peprolinbot.com/favicon.ico";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
containersForce = true;
|
||||
containers = {
|
||||
Personal = {
|
||||
color = "blue";
|
||||
icon = "fingerprint";
|
||||
id = 1;
|
||||
};
|
||||
University = {
|
||||
color = "pink";
|
||||
icon = "briefcase";
|
||||
id = 2;
|
||||
};
|
||||
Shopping = {
|
||||
color = "orange";
|
||||
icon = "cart";
|
||||
id = 3;
|
||||
};
|
||||
Banking = {
|
||||
color = "green";
|
||||
icon = "dollar";
|
||||
id = 4;
|
||||
};
|
||||
Private = {
|
||||
color = "purple";
|
||||
icon = "chill";
|
||||
id = 5;
|
||||
};
|
||||
};
|
||||
|
||||
extensions = {
|
||||
force = true;
|
||||
packages = with inputs.firefox-addons.packages.${pkgs.system}; [
|
||||
ublock-origin # Included in Librewolf
|
||||
bitwarden
|
||||
skip-redirect
|
||||
libredirect
|
||||
multi-account-containers
|
||||
tridactyl
|
||||
];
|
||||
|
||||
settings = {
|
||||
"uBlock0@raymondhill.net".settings = import ./extensions/ublock-origin.nix;
|
||||
};
|
||||
};
|
||||
bookmarks = {};
|
||||
settings = {
|
||||
webgl.disabled = false;
|
||||
privacy.resistFingerprinting = true;
|
||||
privacy.clearOnShutdown = {
|
||||
history = false;
|
||||
cookies = false;
|
||||
};
|
||||
network.cookie.lifetimePolicy = 0;
|
||||
identity.fxaccounts.enabled = true;
|
||||
|
||||
# Sync settings
|
||||
services.sync.engine = {
|
||||
bookmarks = true;
|
||||
history = true;
|
||||
tabs = true;
|
||||
addresses = false;
|
||||
creditcards = false;
|
||||
passwords = false;
|
||||
prefs = false;
|
||||
addons = false;
|
||||
};
|
||||
browser.urlbar.autoFill = false;
|
||||
|
||||
# Layout
|
||||
browser.uiCustomization.state = builtins.toJSON {
|
||||
currentVersion = 20;
|
||||
newElementCount = 5;
|
||||
dirtyAreaCache = ["nav-bar" "PersonalToolbar" "toolbar-menubar" "TabsToolbar" "widget-overflow-fixed-list"];
|
||||
placements = {
|
||||
PersonalToolbar = ["personal-bookmarks"];
|
||||
TabsToolbar = ["tabbrowser-tabs" "new-tab-button" "alltabs-button"];
|
||||
nav-bar = [
|
||||
"back-button"
|
||||
"forward-button"
|
||||
"stop-reload-button"
|
||||
"urlbar-container"
|
||||
"downloads-button"
|
||||
"ublock0_raymondhill_net-browser-action" # uBlock
|
||||
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action" # Bitwarden
|
||||
"7esoorv3_alefvanoon_anonaddy_me-browser-action" # LibRedirect
|
||||
"_testpilot-containers-browser-action" # Multi-account containers
|
||||
"unified-extensions-button" # Button with the rest of extensions
|
||||
];
|
||||
toolbar-menubar = ["menubar-items"];
|
||||
unified-extensions-area = [];
|
||||
widget-overflow-fixed-list = [];
|
||||
};
|
||||
seen = ["developer-button" "ublock0_raymondhill_net-browser-action" "_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action" "_testpilot-containers-browser-action"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,3 +1,37 @@
|
|||
{...}: {
|
||||
imports = [(import ./zsh.nix)]; # shell
|
||||
{osConfig, ...}: {
|
||||
imports =
|
||||
[
|
||||
./programs
|
||||
./distrobox.nix
|
||||
./git.nix
|
||||
./gpg.nix
|
||||
./packages.nix
|
||||
./services.nix
|
||||
./stylix.nix
|
||||
./zsh.nix
|
||||
]
|
||||
++ (
|
||||
if osConfig.hm-pedro.de != "none"
|
||||
then [
|
||||
./browsers
|
||||
./gtk.nix
|
||||
./kitty.nix
|
||||
./libreoffice.nix
|
||||
./nemo.nix
|
||||
./qt.nix
|
||||
./spotify.nix
|
||||
./vscodium.nix
|
||||
]
|
||||
else []
|
||||
)
|
||||
++ (
|
||||
if osConfig.hm-pedro.de == "hyprland"
|
||||
then [
|
||||
./hyprland
|
||||
./scripts
|
||||
./waybar
|
||||
./mako.nix
|
||||
]
|
||||
else []
|
||||
);
|
||||
}
|
||||
|
|
37
users/pedro/home-configuration/distrobox.nix
Normal file
37
users/pedro/home-configuration/distrobox.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
hasDE = osConfig.hm-pedro.de != "none";
|
||||
in {
|
||||
programs.distrobox = {
|
||||
enable = true;
|
||||
enableSystemdUnit = true;
|
||||
containers = {
|
||||
debian13 = {
|
||||
image = "debian:13";
|
||||
entry = false;
|
||||
additional_packages = "git";
|
||||
init_hooks = [
|
||||
"ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker"
|
||||
"ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker-compose"
|
||||
];
|
||||
};
|
||||
|
||||
kali = {
|
||||
image = "docker.io/kalilinux/kali-rolling:latest";
|
||||
entry = false;
|
||||
init_hooks = [
|
||||
"ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker"
|
||||
"ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker-compose"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs;
|
||||
if hasDE
|
||||
then [boxbuddy]
|
||||
else [];
|
||||
}
|
20
users/pedro/home-configuration/git.nix
Normal file
20
users/pedro/home-configuration/git.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{pkgs, ...}: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
userName = "Pedro Rey Anca";
|
||||
userEmail = "personal@peprolinbot.com";
|
||||
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
key = null; # Let GnuPG decide what signing key to use depending on commit’s author.
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
credential.helper = "store";
|
||||
};
|
||||
};
|
||||
|
||||
# home.packages = [ pkgs.gh pkgs.git-lfs ];
|
||||
}
|
25
users/pedro/home-configuration/gpg.nix
Normal file
25
users/pedro/home-configuration/gpg.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
keyserver = "hkps://keys.openpgp.org";
|
||||
};
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
pinentry = {
|
||||
package =
|
||||
if osConfig.hm-pedro.de == "none"
|
||||
then pkgs.pinentry-curses
|
||||
else pkgs.pinentry-gnome3;
|
||||
program = "pinentry-gnome3";
|
||||
};
|
||||
sshKeys = ["D2A3680589B81F2B07DA6CFE21DF848F1AF4E9D3"];
|
||||
};
|
||||
}
|
11
users/pedro/home-configuration/gtk.nix
Normal file
11
users/pedro/home-configuration/gtk.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
11
users/pedro/home-configuration/hyprland/default.nix
Normal file
11
users/pedro/home-configuration/hyprland/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
./hypridle.nix
|
||||
./variables.nix
|
||||
./utils.nix
|
||||
];
|
||||
|
||||
xdg.configFile."hypr/default_wallpaper.png".source = ./default_wallpaper.png;
|
||||
}
|
BIN
users/pedro/home-configuration/hyprland/default_wallpaper.png
Normal file
BIN
users/pedro/home-configuration/hyprland/default_wallpaper.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 MiB |
23
users/pedro/home-configuration/hyprland/hypridle.nix
Normal file
23
users/pedro/home-configuration/hyprland/hypridle.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{...}: {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
|
||||
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 300; # 5 min
|
||||
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
|
||||
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
|
||||
}
|
||||
{
|
||||
timeout = 330; # 5.5 min
|
||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
389
users/pedro/home-configuration/hyprland/hyprland.nix
Normal file
389
users/pedro/home-configuration/hyprland/hyprland.nix
Normal file
|
@ -0,0 +1,389 @@
|
|||
{pkgs, ...}: {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
};
|
||||
systemd.enable = false;
|
||||
|
||||
plugins = [
|
||||
pkgs.hyprlandPlugins.hyprgrass
|
||||
];
|
||||
|
||||
settings = let
|
||||
app_menu = "${pkgs.fuzzel}/bin/fuzzel";
|
||||
in {
|
||||
# Autostart
|
||||
exec-once = [
|
||||
"uwsm app -- nm-applet"
|
||||
"uwsm app -- ${pkgs.wl-clip-persist}/bin/persist --clipboard regular"
|
||||
"uwsm app -- bash -c 'if [ ! -f ~/.config/hypr/wallpaper.png ]; then wall-change ~/.config/hypr/default_wallpaper.png; fi'"
|
||||
"uwsm app -- ${pkgs.swaybg}/bin/swaybg -m fill -i ~/.config/hypr/wallpaper.png &"
|
||||
"uwsm app -- ${pkgs.poweralertd}/bin/poweralertd"
|
||||
"uwsm app -- waybar"
|
||||
"uwsm app -- element-desktop --hidden"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "es,us";
|
||||
kb_options = "grp:alt_caps_toggle";
|
||||
numlock_by_default = true;
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
};
|
||||
|
||||
general = {
|
||||
"$mainMod" = "SUPER";
|
||||
layout = "dwindle";
|
||||
gaps_in = 0;
|
||||
gaps_out = 0;
|
||||
border_size = 2;
|
||||
no_border_on_floating = false;
|
||||
};
|
||||
|
||||
misc = {
|
||||
disable_autoreload = true;
|
||||
disable_hyprland_logo = true;
|
||||
always_follow_on_dnd = true;
|
||||
layers_hog_keyboard_focus = true;
|
||||
animate_manual_resizes = false;
|
||||
enable_swallow = true;
|
||||
focus_on_activate = true;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
force_split = 0;
|
||||
special_scale_factor = 1.0;
|
||||
split_width_multiplier = 1.0;
|
||||
use_active_for_splits = true;
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
special_scale_factor = 1;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 0;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 1;
|
||||
passes = 1;
|
||||
brightness = 1;
|
||||
contrast = 1.400;
|
||||
ignore_opacity = true;
|
||||
noise = 0;
|
||||
new_optimizations = true;
|
||||
xray = false;
|
||||
};
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
|
||||
ignore_window = true;
|
||||
offset = "0 2";
|
||||
range = 20;
|
||||
render_power = 3;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = [
|
||||
"fluent_decel, 0, 0.2, 0.4, 1"
|
||||
"easeOutCirc, 0, 0.55, 0.45, 1"
|
||||
"easeOutCubic, 0.33, 1, 0.68, 1"
|
||||
"easeinoutsine, 0.37, 0, 0.63, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
# Windows
|
||||
"windowsIn, 1, 3, easeOutCubic, popin 30%" # window open
|
||||
"windowsOut, 1, 3, fluent_decel, popin 70%" # window close.
|
||||
"windowsMove, 1, 2, easeinoutsine, slide" # everything in between, moving, dragging, resizing.
|
||||
|
||||
# Fade
|
||||
"fadeIn, 1, 3, easeOutCubic" # fade in (open) -> layers and windows
|
||||
"fadeOut, 1, 2, easeOutCubic" # fade out (close) -> layers and windows
|
||||
"fadeSwitch, 0, 1, easeOutCirc" # fade on changing activewindow and its opacity
|
||||
"fadeShadow, 1, 10, easeOutCirc" # fade on changing activewindow for shadows
|
||||
"fadeDim, 1, 4, fluent_decel" # the easing of the dimming of inactive windows
|
||||
"border, 1, 2.7, easeOutCirc" # for animating the border's color switch speed
|
||||
"borderangle, 1, 30, fluent_decel, once" # for animating the border's gradient angle - styles: once (default), loop
|
||||
"workspaces, 1, 4, easeOutCubic, fade" # styles: slide, slidevert, fade, slidefade, slidefadevert
|
||||
];
|
||||
};
|
||||
|
||||
bind =
|
||||
[
|
||||
# show keybinds list
|
||||
"$mainMod, F1, exec, show-keybinds"
|
||||
|
||||
# keybindings
|
||||
"$mainMod, Return, exec, uwsm app -- kitty"
|
||||
"ALT, Return, exec, uwsm app -- kitty --title float_kitty"
|
||||
"$mainMod SHIFT, Return, exec, uwsm app -- kitty --start-as=fullscreen -o 'font_size=16'"
|
||||
"$mainMod, B, exec, uwsm app -- librewolf"
|
||||
"$mainMod, N, exec, uwsm app -- makoctl mode -t do-not-disturb"
|
||||
"$mainMod SHIFT, N, exec, uwsm app -- swaync-client -d"
|
||||
"$mainMod SHIFT, Q, killactive,"
|
||||
"$mainMod, F, fullscreen, 0"
|
||||
"$mainMod SHIFT, F, fullscreen, 1"
|
||||
"$mainMod, Space, togglefloating,"
|
||||
"$mainMod, D, exec, uwsm app -- ${app_menu}"
|
||||
"$mainMod SHIFT, E, exec, uwsm app -- ${pkgs.bemoji}/bin/bemoji -n"
|
||||
"$mainMod, M, exec, uwsm app -- element-desktop"
|
||||
"$mainMod, Y, exec, uwsm app -- kitty spotify_player"
|
||||
"$mainMod, X, exec, uwsm app -- rofi-rbw"
|
||||
"$mainMod, Escape, exec, uwsm app -- loginctl lock-session"
|
||||
"$mainMod SHIFT, Escape, exec, uwsm app -- shutdown-script"
|
||||
"$mainMod, P, pseudo,"
|
||||
"$mainMod SHIFT, P, togglesplit,"
|
||||
"$mainMod, E, exec, uwsm app -- nemo"
|
||||
"$mainMod SHIFT, B, exec, uwsm app -- pkill -SIGUSR1 .waybar-wrapped"
|
||||
"$mainMod, C ,exec, uwsm app -- ${pkgs.hyprpicker}/bin/hyprpicker -a"
|
||||
"$mainMod, W,exec, uwsm app -- wallpaper-picker"
|
||||
|
||||
# screenshot
|
||||
"$mainMod, Print, exec, uwsm app -- screenshot-menu"
|
||||
",Print, exec, uwsm app -- ${pkgs.grimblast}/bin/grimblast --notify --freeze copy area"
|
||||
]
|
||||
++ (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||
builtins.concatLists (
|
||||
builtins.genList (
|
||||
x: let
|
||||
ws = let
|
||||
c = (x + 1) / 10;
|
||||
in
|
||||
builtins.toString (x + 1 - (c * 10));
|
||||
in [
|
||||
"$mainMod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mainMod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
|
||||
]
|
||||
)
|
||||
10
|
||||
)
|
||||
)
|
||||
++ [
|
||||
"$mainMod CTRL, c, workspace, emptym"
|
||||
"$mainMod SHIFT, c, movetoworkspace, emptym"
|
||||
|
||||
"$mainMod, S, togglespecialworkspace,"
|
||||
"$mainMod SHIFT, S, movetoworkspacesilent, special"
|
||||
]
|
||||
++ (
|
||||
# Window focus, movement and control
|
||||
builtins.concatLists (
|
||||
let
|
||||
keys = ["H" "L" "K" "J"];
|
||||
directions = ["l" "r" "u" "d"];
|
||||
resize = toString 80; # Change this to change how much a window resizes each keypress
|
||||
resize_list = ["-${resize} 0" "${resize} 0" "0 -${resize}" "0 ${resize}"];
|
||||
in
|
||||
builtins.genList (
|
||||
x: let
|
||||
k = builtins.elemAt keys x;
|
||||
d = builtins.elemAt directions x;
|
||||
r = builtins.elemAt resize_list x;
|
||||
in [
|
||||
"$mainMod, ${k}, movefocus, ${d}"
|
||||
"$mainMod SHIFT, ${k}, movewindow, ${d}"
|
||||
"$mainMod CTRL, ${k}, resizeactive, ${r}"
|
||||
"$mainMod ALT, ${k}, moveactive, ${r}"
|
||||
]
|
||||
)
|
||||
4
|
||||
)
|
||||
)
|
||||
++ [
|
||||
"$mainMod, mouse_down, workspace, e-1"
|
||||
"$mainMod, mouse_up, workspace, e+1"
|
||||
|
||||
# laptop brigthness
|
||||
",XF86MonBrightnessUp, exec, brightnessctl set 5%+"
|
||||
",XF86MonBrightnessDown, exec, brightnessctl set 5%-"
|
||||
"$mainMod, XF86MonBrightnessUp, exec, brightnessctl set 100%+"
|
||||
"$mainMod, XF86MonBrightnessDown, exec, brightnessctl set 100%-"
|
||||
|
||||
# clipboard manager
|
||||
"$mainMod, V, exec, cliphist list | fuzzel --dmenu --prompt '📋 ' | cliphist decode | wl-copy"
|
||||
];
|
||||
|
||||
# Bindings that work when locked
|
||||
bindl = [
|
||||
# media and volume controls
|
||||
",XF86AudioRaiseVolume,exec, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ && wp-vol"
|
||||
",XF86AudioLowerVolume,exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && wp-vol"
|
||||
",XF86AudioMute,exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
",XF86AudioPlay,exec, playerctl play-pause"
|
||||
",XF86AudioNext,exec, playerctl next"
|
||||
",XF86AudioPrev,exec, playerctl previous"
|
||||
",XF86AudioStop, exec, playerctl stop"
|
||||
];
|
||||
|
||||
# mouse binding
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
# windowrule
|
||||
windowrule = [
|
||||
"float,class:vimiv"
|
||||
"center,class:vimiv"
|
||||
"float,class:mpv"
|
||||
"center,class:mpv"
|
||||
"size 1200 725,class:mpv"
|
||||
"float,title:^(float_kitty)$"
|
||||
"center,title:^(float_kitty)$"
|
||||
"size 950 600,title:^(float_kitty)$"
|
||||
"tile, class:neovide"
|
||||
"idleinhibit focus,class:mpv"
|
||||
"float,class:udiskie"
|
||||
"float,title:^(Volume Control)$"
|
||||
"float,title:^(Firefox — Sharing Indicator)$"
|
||||
"move 0 0,title:^(Firefox — Sharing Indicator)$"
|
||||
"size 700 450,title:^(Volume Control)$"
|
||||
"move 40 55%,title:^(Volume Control)$"
|
||||
"float, title:^(Picture-in-Picture)$"
|
||||
"opacity 1.0 override 1.0 override, title:^(Picture-in-Picture)$"
|
||||
"pin, title:^(Picture-in-Picture)$"
|
||||
"opacity 1.0 override 1.0 override, class:(Aseprite)"
|
||||
"opacity 1.0 override 1.0 override, class:(Unity)"
|
||||
"idleinhibit focus, class:^(mpv)$"
|
||||
"idleinhibit fullscreen, class:^(firefox)$"
|
||||
"float,class:^(zenity)$"
|
||||
"center,class:^(zenity)$"
|
||||
"size 850 500,class:^(zenity)$"
|
||||
"float,class:^(pavucontrol)$"
|
||||
"float,class:^(.sameboy-wrapped)$"
|
||||
"float,class:^(file_progress)$"
|
||||
"float,class:^(confirm)$"
|
||||
"float,class:^(dialog)$"
|
||||
"float,class:^(download)$"
|
||||
"float,class:^(notification)$"
|
||||
"float,class:^(error)$"
|
||||
"float,class:^(confirmreset)$"
|
||||
"float,title:^(Open File)$"
|
||||
"float,title:^(branchdialog)$"
|
||||
"float,title:^(Confirm to replace files)$"
|
||||
"float,title:^(File Operation Progress)$"
|
||||
|
||||
"opacity 0.0 override,class:^(xwaylandvideobridge)$"
|
||||
"noanim,class:^(xwaylandvideobridge)$"
|
||||
"noinitialfocus,class:^(xwaylandvideobridge)$"
|
||||
"maxsize 1 1,class:^(xwaylandvideobridge)$"
|
||||
"noblur,class:^(xwaylandvideobridge)$"
|
||||
];
|
||||
|
||||
monitor = [
|
||||
",preferred,auto,1"
|
||||
];
|
||||
|
||||
xwayland = {
|
||||
force_zero_scaling = true;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_direction_lock = false;
|
||||
};
|
||||
ecosystem = {
|
||||
no_update_news = true;
|
||||
no_donation_nag = true;
|
||||
};
|
||||
plugin = {
|
||||
touch_gestures = {
|
||||
# The default sensitivity is probably too low on tablet screens,
|
||||
# I recommend turning it up to 4.0
|
||||
sensitivity = 5.0;
|
||||
|
||||
# must be >= 3
|
||||
workspace_swipe_fingers = 3;
|
||||
|
||||
# switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers
|
||||
# and can be used at the same time
|
||||
# possible values: l, r, u, or d
|
||||
# to disable it set it to anything else
|
||||
workspace_swipe_edge = "no";
|
||||
|
||||
# in milliseconds
|
||||
long_press_delay = 400;
|
||||
|
||||
# resize windows by long-pressing on window borders and gaps.
|
||||
# If general:resize_on_border is enabled, general:extend_border_grab_area is used for floating
|
||||
# windows
|
||||
resize_on_border_long_press = true;
|
||||
|
||||
# in pixels, the distance from the edge that is considered an edge
|
||||
edge_margin = 20;
|
||||
|
||||
# emulates touchpad swipes when swiping in a direction that does not trigger workspace swipe.
|
||||
# ONLY triggers when finger count is equal to workspace_swipe_fingers
|
||||
#
|
||||
# might be removed in the future in favor of event hooks
|
||||
emulate_touchpad_swipe = false;
|
||||
|
||||
hyprgrass-bind = [
|
||||
# swipe left from right edge
|
||||
", edge:r:l, exec, playerctl next"
|
||||
|
||||
# swipe right from left edge
|
||||
", edge:l:r, exec, playerctl previous"
|
||||
|
||||
# swipe up from bottom edge
|
||||
", edge:d:u, exec, pkill -SIGUSR2 wvkbd" # Show wvkbd
|
||||
|
||||
# swipe down to bottom edge
|
||||
", edge:u:d, exec, pkill -SIGUSR1 wvkbd" # Hide wvkbd
|
||||
|
||||
# tap with 3 fingers
|
||||
", tap:4, exec, pkill -SIGRTMIN wvkbd" # Toggles wvkbd
|
||||
|
||||
# swipe up from left edge
|
||||
", edge:l:u, exec, pamixer -i 4"
|
||||
|
||||
# swipe down from left edge
|
||||
", edge:l:d, exec, pamixer -d 4"
|
||||
|
||||
# swipe up with 3 fingers
|
||||
", swipe:3:u, exec, ${pkgs.nwg-drawer}/bin/nwg-drawer"
|
||||
|
||||
# swipe down with 3 fingers
|
||||
", swipe:3:d, killactive"
|
||||
|
||||
# swipe diagonally left and down with 3 fingers
|
||||
", swipe:3:ld, exec, uwsm app -- librewolf"
|
||||
|
||||
# swipe diagonally right and down with 3 fingers
|
||||
", swipe:3:rd, exec, uwsm app -- xournalpp"
|
||||
|
||||
# tap with 3 fingers
|
||||
", tap:3, exec, playerctl play-pause"
|
||||
];
|
||||
|
||||
# longpress can trigger mouse binds:
|
||||
hyprgrass-bindm = [
|
||||
", longpress:2, movewindow"
|
||||
", longpress:3, resizewindow"
|
||||
];
|
||||
|
||||
experimental = {
|
||||
# send proper cancel events to windows instead of hacky touch_up events,
|
||||
# NOT recommended as it crashed a few times, once it's stabilized I'll make it the default
|
||||
send_cancel = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
73
users/pedro/home-configuration/hyprland/hyprlock.nix
Normal file
73
users/pedro/home-configuration/hyprland/hyprlock.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{config, ...}: {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = let
|
||||
colors = with config.lib.stylix.colors; {
|
||||
text = base05;
|
||||
accent = base0E;
|
||||
warning = base0A;
|
||||
};
|
||||
in {
|
||||
general = {
|
||||
hide_cursor = true;
|
||||
};
|
||||
|
||||
background = {
|
||||
path = "~/.config/hypr/wallpaper.png";
|
||||
blur_passes = 2;
|
||||
};
|
||||
|
||||
label = [
|
||||
# Time
|
||||
{
|
||||
text = "cmd[update:30000] echo \"<b><big> $(date +\"%R\") </big></b>\"";
|
||||
color = "rgb(${colors.text})";
|
||||
font_size = 110;
|
||||
shadow_passes = 3;
|
||||
shadow_size = 3;
|
||||
|
||||
position = "0, -100";
|
||||
halign = "center";
|
||||
valign = "top";
|
||||
}
|
||||
|
||||
# Date
|
||||
{
|
||||
text = "cmd[update:43200000] echo \"$(date +\"%A, %d %B %Y\")\"";
|
||||
color = "rgb(${colors.text})";
|
||||
font_size = 18;
|
||||
position = "0, -300";
|
||||
halign = "center";
|
||||
valign = "top";
|
||||
}
|
||||
];
|
||||
|
||||
# User Avatar
|
||||
image = {
|
||||
path = "~/.face.png";
|
||||
size = 125;
|
||||
border_color = "rgb(${colors.accent})";
|
||||
|
||||
position = "0, -450";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
input-field = {
|
||||
size = "300, 60";
|
||||
outline_thickness = 4;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.4;
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
placeholder_text = "<span foreground=\"##${colors.text}\"><i> Logged in as </i><span foreground=\"##${colors.accent}\">$USER</span></span>";
|
||||
hide_input = false;
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
capslock_color = "rgb(${colors.warning})";
|
||||
position = "0, -100";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
49
users/pedro/home-configuration/hyprland/utils.nix
Normal file
49
users/pedro/home-configuration/hyprland/utils.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{pkgs, ...}: {
|
||||
services.hyprpolkitagent.enable = true;
|
||||
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
use-bold = true;
|
||||
line-height = 25;
|
||||
fields = "name,generic,comment,categories,filename,keywords";
|
||||
terminal = "kitty";
|
||||
prompt = "'🔍 '";
|
||||
layer = "top";
|
||||
lines = 10;
|
||||
width = 35;
|
||||
horizontal-pad = 25;
|
||||
inner-pad = 5;
|
||||
dpi-aware = false;
|
||||
};
|
||||
border = {
|
||||
radius = 15;
|
||||
width = 3;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.cliphist = {
|
||||
enable = true;
|
||||
|
||||
allowImages = true;
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
(pkgs.writeShellApplication
|
||||
{
|
||||
# From https://github.com/emersion/mako/wiki/Volume-change-notification#1-create-the-notifier-script
|
||||
name = "wp-vol";
|
||||
runtimeInputs = with pkgs; [wireplumber gawk bc];
|
||||
text = ''
|
||||
# Get the volume level and convert it to a percentage
|
||||
volume=$(wpctl get-volume @DEFAULT_AUDIO_SINK@)
|
||||
volume=$(echo "$volume" | awk '{print $2}')
|
||||
volume=$(echo "( $volume * 100 ) / 1" | bc)
|
||||
|
||||
notify-send -t 1000 -a 'wp-vol' -h "int:value:$volume" "Volume: ''${volume}%"
|
||||
'';
|
||||
})
|
||||
];
|
||||
}
|
31
users/pedro/home-configuration/hyprland/variables.nix
Normal file
31
users/pedro/home-configuration/hyprland/variables.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{lib, ...}: let
|
||||
variables = {
|
||||
NIXOS_OZONE_WL = 1;
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
__GL_GSYNC_ALLOWED = 0;
|
||||
__GL_VRR_ALLOWED = 0;
|
||||
_JAVA_AWT_WM_NONEREPARENTING = 1;
|
||||
DISABLE_QT5_COMPAT = 0;
|
||||
GDK_BACKEND = "wayland,x11,*";
|
||||
ANKI_WAYLAND = 1;
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
WLR_DRM_NO_ATOMIC = 1;
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = 1;
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = 1;
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
MOZ_ENABLE_WAYLAND = 1;
|
||||
MOZ_USE_XINPUT2 = 1;
|
||||
WLR_BACKEND = "vulkan";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
};
|
||||
in {
|
||||
home.sessionVariables = variables;
|
||||
|
||||
xdg.configFile."uwsm/env".text = builtins.concatStringsSep "\n" (
|
||||
lib.attrsets.mapAttrsToList (
|
||||
name: value: "export ${name}=\"${builtins.toString value}\""
|
||||
)
|
||||
variables
|
||||
);
|
||||
}
|
34
users/pedro/home-configuration/kitty.nix
Normal file
34
users/pedro/home-configuration/kitty.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{pkgs, ...}: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
shellIntegration.enableZshIntegration = true;
|
||||
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
window_padding_width = 10;
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
mouse_hide_wait = 60;
|
||||
|
||||
## Tabs
|
||||
tab_title_template = "{index}";
|
||||
active_tab_font_style = "normal";
|
||||
inactive_tab_font_style = "normal";
|
||||
tab_bar_style = "powerline";
|
||||
tab_powerline_style = "round";
|
||||
active_tab_foreground = "#1e1e2e";
|
||||
active_tab_background = "#cba6f7";
|
||||
inactive_tab_foreground = "#bac2de";
|
||||
inactive_tab_background = "#313244";
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
## Tabs
|
||||
"alt+1" = "goto_tab 1";
|
||||
"alt+2" = "goto_tab 2";
|
||||
"alt+3" = "goto_tab 3";
|
||||
"alt+4" = "goto_tab 4";
|
||||
};
|
||||
};
|
||||
}
|
9
users/pedro/home-configuration/libreoffice.nix
Normal file
9
users/pedro/home-configuration/libreoffice.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
libreoffice
|
||||
hunspell
|
||||
hunspellDicts.en_US
|
||||
hunspellDicts.en_GB-ise
|
||||
hunspellDicts.es_ES
|
||||
];
|
||||
}
|
31
users/pedro/home-configuration/mako.nix
Normal file
31
users/pedro/home-configuration/mako.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{...}: {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default-timeout = 5000;
|
||||
|
||||
"mode=do-not-disturb" = {
|
||||
invisible = 1;
|
||||
};
|
||||
|
||||
# From https://github.com/emersion/mako/wiki/Volume-change-notification
|
||||
"app-name=wp-vol" = {
|
||||
layer = "overlay";
|
||||
history = 0;
|
||||
anchor = "top-center";
|
||||
# Group all volume notifications together
|
||||
group-by = "app-name";
|
||||
# Hide the group-index
|
||||
format = "<b>%s</b>\\n%b";
|
||||
};
|
||||
"app-name=volume group-index=0" = {
|
||||
# Only show last notification
|
||||
invisible = 0;
|
||||
};
|
||||
"app-name=volume grouped=false" = {
|
||||
# Force initial volume notification to be visible
|
||||
invisible = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
13
users/pedro/home-configuration/nemo.nix
Normal file
13
users/pedro/home-configuration/nemo.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [nemo-with-extensions];
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"inode/directory" = ["nemo.desktop"];
|
||||
"application/x-gnome-saved-search" = ["nemo.desktop"];
|
||||
};
|
||||
dconf.settings = {
|
||||
"org/cinnamon/desktop/applications/terminal" = {
|
||||
exec = "kitty";
|
||||
};
|
||||
};
|
||||
}
|
91
users/pedro/home-configuration/packages.nix
Normal file
91
users/pedro/home-configuration/packages.nix
Normal file
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
hasDE = osConfig.hm-pedro.de != "none";
|
||||
in {
|
||||
xdg.mimeApps.enable = hasDE;
|
||||
xdg.mimeApps.defaultApplications =
|
||||
{
|
||||
"application/pdf" = ["okularApplication_pdf.desktop" "org.gnome.Evince.desktop"];
|
||||
"text/plain" = ["org.gnome.TextEditor.desktop"];
|
||||
}
|
||||
// builtins.listToAttrs (map (key: {
|
||||
name = "image/${key}";
|
||||
value = ["vimiv.desktop"];
|
||||
}) ["png" "jpeg" "webp" "bmp" "gif"])
|
||||
// builtins.listToAttrs (map (key: {
|
||||
name = "video/${key}";
|
||||
value = ["mpv.desktop"];
|
||||
}) ["mp4" "x-matroska" "webm"]);
|
||||
|
||||
home.packages = with pkgs; ([
|
||||
# CLI utils
|
||||
bitwarden-cli
|
||||
file # Show file information
|
||||
gtrash # rm replacement, put deleted files in system trash
|
||||
imagemagick
|
||||
lazygit # Simple terminal UI for git commands
|
||||
jq # command-line JSON processor
|
||||
nitch # neofetch-like util
|
||||
tdf # cli pdf viewer
|
||||
todo # cli todo list
|
||||
yazi # terminal file manager
|
||||
yt-dlp
|
||||
wtype # xdotool type for wayland
|
||||
caligula # TUI for disk imaging
|
||||
ffmpeg
|
||||
killall
|
||||
man-pages # extra man pages
|
||||
openssl
|
||||
pamixer # pulseaudio command line mixer
|
||||
playerctl # controller for media players
|
||||
wl-clipboard # clipboard utils for wayland (wl-copy, wl-paste)
|
||||
unzip
|
||||
wget
|
||||
usbutils
|
||||
gotify-cli
|
||||
]
|
||||
++ (
|
||||
if hasDE
|
||||
then [
|
||||
#GUI Utils
|
||||
zenity # Create GTK dialog boxes from CLI
|
||||
file-roller # Archive manager
|
||||
wdisplays # Configuring displays in Wayland compositors
|
||||
pavucontrol # pulseaudio volume controle (GUI)
|
||||
|
||||
# GUI Apps
|
||||
evince # gnome pdf viewer
|
||||
freetube # YouTube client
|
||||
thunderbird
|
||||
vlc
|
||||
mpv # video player
|
||||
xournalpp # For notes and pdf editing
|
||||
qbittorrent # torrent client
|
||||
speedcrunch # Fast power user calculator
|
||||
simple-scan
|
||||
orca-slicer
|
||||
kdePackages.okular # KDE's pdf viewer/editor (supports digital signing)
|
||||
inkscape
|
||||
kdePackages.kleopatra # GPG GUI
|
||||
gimp
|
||||
gnome-text-editor
|
||||
gparted # partition manager
|
||||
vimiv-qt # Image viewer, vim-like
|
||||
webcord
|
||||
|
||||
# Wine stuff
|
||||
winetricks
|
||||
wineWowPackages.wayland
|
||||
bottles
|
||||
|
||||
# VPN
|
||||
wireguard-tools
|
||||
openconnect
|
||||
networkmanager-openconnect
|
||||
]
|
||||
else []
|
||||
));
|
||||
}
|
11
users/pedro/home-configuration/programs/cli.nix
Normal file
11
users/pedro/home-configuration/programs/cli.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{...}: {
|
||||
programs.bat.enable = true;
|
||||
|
||||
programs.btop.enable = true;
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
9
users/pedro/home-configuration/programs/default.nix
Normal file
9
users/pedro/home-configuration/programs/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{osConfig, ...}: {
|
||||
imports =
|
||||
[./cli.nix]
|
||||
++ (
|
||||
if osConfig.hm-pedro.de != "none"
|
||||
then [./gui.nix]
|
||||
else []
|
||||
);
|
||||
}
|
5
users/pedro/home-configuration/programs/gui.nix
Normal file
5
users/pedro/home-configuration/programs/gui.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{...}: {
|
||||
programs.cava.enable = true; # Not GUI, but only wanted in machines with GUI
|
||||
|
||||
programs.element-desktop.enable = true;
|
||||
}
|
22
users/pedro/home-configuration/qt.nix
Normal file
22
users/pedro/home-configuration/qt.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
qtctConf = ''
|
||||
[Appearance]
|
||||
style=kvantum
|
||||
icon_theme=${config.stylix.iconTheme.${config.stylix.polarity}}
|
||||
|
||||
[Fonts]
|
||||
general="${config.stylix.fonts.sansSerif.name},${builtins.toString config.stylix.fonts.sizes.applications},-1,5,50,0,0,0,0,0,Regular"
|
||||
fixed="${config.stylix.fonts.monospace.name},${builtins.toString config.stylix.fonts.sizes.applications},-1,5,50,0,0,0,0,0,Regular"
|
||||
'';
|
||||
in {
|
||||
qt = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
xdg.configFile."qt5ct/qt5ct.conf".text = qtctConf;
|
||||
xdg.configFile."qt6ct/qt6ct.conf".text = qtctConf;
|
||||
}
|
70
users/pedro/home-configuration/scripts/default.nix
Normal file
70
users/pedro/home-configuration/scripts/default.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages =
|
||||
[
|
||||
(pkgs.writeShellApplication {
|
||||
name = "ddcmonitorctl";
|
||||
runtimeInputs = with pkgs; [ddcutil];
|
||||
text = builtins.readFile ./scripts/ddcmonitorctl.sh;
|
||||
})
|
||||
]
|
||||
++ (let
|
||||
wall-change = pkgs.writeShellApplication {
|
||||
name = "wall-change";
|
||||
runtimeInputs = with pkgs; [swaybg imagemagick];
|
||||
text = builtins.readFile ./scripts/wall-change.sh;
|
||||
};
|
||||
setbg-apotd = pkgs.writeShellApplication {
|
||||
name = "setbg-apotd";
|
||||
runtimeInputs = [pkgs.curl pkgs.gnugrep pkgs.gnused wall-change];
|
||||
text = builtins.readFile ./scripts/setbg-apotd.sh;
|
||||
};
|
||||
setbg-bpotd = pkgs.writeShellApplication {
|
||||
name = "setbg-bpotd";
|
||||
runtimeInputs = with pkgs; [pkgs.curl pkgs.jq wall-change];
|
||||
text = builtins.readFile ./scripts/setbg-bpotd.sh;
|
||||
};
|
||||
wallpaper-picker = pkgs.writeShellApplication {
|
||||
name = "wallpaper-picker";
|
||||
runtimeInputs = [pkgs.fuzzel setbg-apotd setbg-bpotd wall-change];
|
||||
text = builtins.readFile ./scripts/wallpaper-picker.sh;
|
||||
};
|
||||
in [
|
||||
wall-change
|
||||
setbg-apotd
|
||||
setbg-bpotd
|
||||
wallpaper-picker
|
||||
])
|
||||
++ [
|
||||
(pkgs.writeShellApplication {
|
||||
name = "runbg";
|
||||
text = builtins.readFile ./scripts/runbg.sh;
|
||||
})
|
||||
|
||||
(pkgs.writeShellApplication {
|
||||
name = "toggle_blur";
|
||||
text = builtins.readFile ./scripts/toggle_blur.sh;
|
||||
})
|
||||
(pkgs.writeShellApplication {
|
||||
name = "toggle_oppacity";
|
||||
text = builtins.readFile ./scripts/toggle_oppacity.sh;
|
||||
})
|
||||
|
||||
(pkgs.writeShellApplication {
|
||||
name = "shutdown-script";
|
||||
runtimeInputs = with pkgs; [fuzzel];
|
||||
text = builtins.readFile ./scripts/shutdown-script.sh;
|
||||
})
|
||||
|
||||
(pkgs.writeShellApplication {
|
||||
name = "show-keybinds";
|
||||
runtimeInputs = with pkgs; [fuzzel gnugrep];
|
||||
text = builtins.readFile ./scripts/show-keybinds.sh;
|
||||
})
|
||||
|
||||
(pkgs.writeShellApplication {
|
||||
name = "screenshot-menu";
|
||||
runtimeInputs = with pkgs; [fuzzel grimblast swappy];
|
||||
text = builtins.readFile ./scripts/screenshot-menu.sh;
|
||||
})
|
||||
];
|
||||
}
|
14
users/pedro/home-configuration/scripts/scripts/ddcmonitorctl.sh
Executable file
14
users/pedro/home-configuration/scripts/scripts/ddcmonitorctl.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
if [ "$1" == "on" ]; then
|
||||
state_opt=1
|
||||
elif [ "$1" == "off" ]; then
|
||||
state_opt=4
|
||||
else
|
||||
echo "First argument must be either 'on' or 'off'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
monitor_count=$(bash -c "ddcutil detect | grep Display | wc -l")
|
||||
|
||||
seq "$monitor_count" | xargs -n 1 ddcutil setvcp d6 $state_opt -d
|
14
users/pedro/home-configuration/scripts/scripts/runbg.sh
Executable file
14
users/pedro/home-configuration/scripts/scripts/runbg.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
[ $# -eq 0 ] && { # $# is number of args
|
||||
echo "$(basename "$0"): missing command" >&2
|
||||
exit 1
|
||||
}
|
||||
prog="$(which "$1")" # see below
|
||||
[ -z "$prog" ] && {
|
||||
echo "$(basename "$0"): unknown command: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
shift # remove $1, now $prog, from args
|
||||
tty -s && exec </dev/null # if stdin is a terminal, redirect from null
|
||||
tty -s <&1 && exec >/dev/null # if stdout is a terminal, redirect to null
|
||||
tty -s <&2 && exec 2>&1 # stderr to stdout (which might not be null)
|
||||
"$prog" "$@" & # $@ is all args
|
114
users/pedro/home-configuration/scripts/scripts/screenshot-menu.sh
Executable file
114
users/pedro/home-configuration/scripts/scripts/screenshot-menu.sh
Executable file
|
@ -0,0 +1,114 @@
|
|||
#### Options
|
||||
|
||||
option_1=" Capture"
|
||||
option_2=" Timer capture"
|
||||
|
||||
option_capture_1=" All Screen"
|
||||
option_capture_2=" Capture Active Screen"
|
||||
option_capture_3=" Capture Area/Window/Application"
|
||||
|
||||
option_time_1="5s"
|
||||
option_time_2="10s"
|
||||
option_time_3="20s"
|
||||
option_time_4="30s"
|
||||
option_time_5="60s"
|
||||
|
||||
####
|
||||
|
||||
|
||||
#### Initial menu to decide wether a timer is wanted
|
||||
|
||||
want_timer_cmd() {
|
||||
echo -e "$option_1\n$option_2" | fuzzel --dmenu -p 'Screenshot: '
|
||||
}
|
||||
|
||||
####
|
||||
|
||||
|
||||
#### Choose Timer seconds
|
||||
|
||||
timer_cmd() {
|
||||
echo -e "$option_time_1\n$option_time_2\n$option_time_3\n$option_time_4\n$option_time_5" | fuzzel --dmenu -p 'Choose timer: '
|
||||
}
|
||||
|
||||
timer_menu() {
|
||||
selected_timer="$(timer_cmd)"
|
||||
if [[ "$selected_timer" == "$option_time_1" ]]; then
|
||||
countdown=5
|
||||
elif [[ "$selected_timer" == "$option_time_2" ]]; then
|
||||
countdown=10
|
||||
elif [[ "$selected_timer" == "$option_time_3" ]]; then
|
||||
countdown=20
|
||||
elif [[ "$selected_timer" == "$option_time_4" ]]; then
|
||||
countdown=30
|
||||
elif [[ "$selected_timer" == "$option_time_5" ]]; then
|
||||
countdown=60
|
||||
fi
|
||||
}
|
||||
|
||||
####
|
||||
|
||||
|
||||
#### Chose Screenshot Type
|
||||
|
||||
type_screenshot_cmd() {
|
||||
echo -e "$option_capture_1\n$option_capture_2\n$option_capture_3" | fuzzel --dmenu -p 'Type of screenshot: '
|
||||
}
|
||||
|
||||
type_screenshot_menu() {
|
||||
selected_type_screenshot="$(type_screenshot_cmd)"
|
||||
if [[ "$selected_type_screenshot" == "$option_capture_1" ]]; then
|
||||
option_type_screenshot=screen
|
||||
elif [[ "$selected_type_screenshot" == "$option_capture_2" ]]; then
|
||||
option_type_screenshot=output
|
||||
elif [[ "$selected_type_screenshot" == "$option_capture_3" ]]; then
|
||||
option_type_screenshot=area
|
||||
fi
|
||||
}
|
||||
|
||||
####
|
||||
|
||||
|
||||
### Run the timer
|
||||
|
||||
timer() {
|
||||
# Countdown notifications must start at 10 seconds so they aren't annoying
|
||||
if [[ $countdown -gt 10 ]]; then
|
||||
notify-send -t 1000 "Taking Screenshot in ${countdown} seconds"
|
||||
sleep $((countdown - 10))
|
||||
countdown=10
|
||||
fi
|
||||
while [[ $countdown -ne 0 ]]; do
|
||||
notify-send -t 900 "Taking Screenshot in ${countdown}"
|
||||
countdown=$((countdown - 1))
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
####
|
||||
|
||||
|
||||
#### Main logic
|
||||
|
||||
chosen="$(want_timer_cmd)"
|
||||
if [ -z "$chosen" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
type_screenshot_menu
|
||||
if [ -z "$selected_type_screenshot" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ $option_2 == *$chosen* ]]; then
|
||||
timer_menu
|
||||
if [ -z "$selected_timer" ]; then
|
||||
exit
|
||||
fi
|
||||
timer
|
||||
else
|
||||
sleep 0.7 # So fuzzel has time to fade-out
|
||||
fi
|
||||
GRIMBLAST_EDITOR="swappy -f " grimblast --notify edit "$option_type_screenshot"
|
||||
|
||||
####
|
32
users/pedro/home-configuration/scripts/scripts/setbg-apotd.sh
Executable file
32
users/pedro/home-configuration/scripts/scripts/setbg-apotd.sh
Executable file
|
@ -0,0 +1,32 @@
|
|||
## Based on https://github.com/sgsax/apod-desktop/blob/master/apod
|
||||
|
||||
|
||||
# base URL for the APOD website
|
||||
BASE_URL=https://apod.nasa.gov/apod/
|
||||
|
||||
# API endpoint which returns the Picture Of The Day data
|
||||
PAGE_URL="$BASE_URL/astropix.html"
|
||||
|
||||
IMG_FILE=/tmp/apotd.jpg
|
||||
|
||||
|
||||
echo Getting APOD page...
|
||||
if ! page_data=$(curl -s $PAGE_URL); then
|
||||
echo "Unable to retrieve page";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# extract the image url from the astropix page
|
||||
echo Getting image url...
|
||||
imgurl=$(echo "$page_data" | grep -i "img src" | sed -e 's/.*<img src="\(.*\)".*/\1/i')
|
||||
echo "Image url is $imgurl"
|
||||
|
||||
# get that image file
|
||||
echo "Getting image at ${BASE_URL}${imgurl}"
|
||||
if ! curl "${BASE_URL}${imgurl}" -o $IMG_FILE; then
|
||||
echo "Unable to retrieve image"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
#set wallpaper using swaybg
|
||||
wall-change "$IMG_FILE"
|
29
users/pedro/home-configuration/scripts/scripts/setbg-bpotd.sh
Executable file
29
users/pedro/home-configuration/scripts/scripts/setbg-bpotd.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
# base URL for Bing
|
||||
BASE_URL=https://bing.com
|
||||
|
||||
# API endpoint which returns the Picture Of The Day data
|
||||
ENDPOINT="$BASE_URL/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US"
|
||||
|
||||
IMG_FILE=/tmp/bpotd.jpg
|
||||
|
||||
|
||||
echo Querying the API...
|
||||
if ! api_data=$(curl "$ENDPOINT"); then
|
||||
echo "Unable to contact the API";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# extract the image url from the astropix page
|
||||
echo Getting image url...
|
||||
imgurl=$(echo "$api_data" | jq -r .images[0].url)
|
||||
echo "Image url is $imgurl"
|
||||
|
||||
# get that image file
|
||||
echo "Getting image at ${BASE_URL}${imgurl}"
|
||||
if ! curl "${BASE_URL}${imgurl}" -o $IMG_FILE; then
|
||||
echo "Unable to retrieve image"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
#set wallpaper using swaybg
|
||||
wall-change "$IMG_FILE"
|
4
users/pedro/home-configuration/scripts/scripts/show-keybinds.sh
Executable file
4
users/pedro/home-configuration/scripts/scripts/show-keybinds.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
config_file=~/.config/hypr/hyprland.conf
|
||||
keybinds=$(grep -oP '(?<=bind=).*' $config_file)
|
||||
keybinds=$(echo "$keybinds" | sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
|
||||
fuzzel --width 75 --dmenu <<< "$keybinds"
|
13
users/pedro/home-configuration/scripts/scripts/shutdown-script.sh
Executable file
13
users/pedro/home-configuration/scripts/scripts/shutdown-script.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
respond="$(echo -e " Shutdown\n Restart\n Cancel" | fuzzel --dmenu --lines=3 --width=15 --prompt='Choose action: ')"
|
||||
|
||||
if [ "$respond" = ' Shutdown' ]
|
||||
then
|
||||
echo "shutdown"
|
||||
shutdown now
|
||||
elif [ "$respond" = ' Restart' ]
|
||||
then
|
||||
echo "restart"
|
||||
reboot
|
||||
else
|
||||
notify-send "Shutdown cancelled"
|
||||
fi
|
5
users/pedro/home-configuration/scripts/scripts/toggle_blur.sh
Executable file
5
users/pedro/home-configuration/scripts/scripts/toggle_blur.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
if hyprctl getoption decoration:blur:enabled | grep "int: 1" >/dev/null ; then
|
||||
hyprctl keyword decoration:blur:enabled false >/dev/null
|
||||
else
|
||||
hyprctl keyword decoration:blur:enabled true >/dev/null
|
||||
fi
|
7
users/pedro/home-configuration/scripts/scripts/toggle_oppacity.sh
Executable file
7
users/pedro/home-configuration/scripts/scripts/toggle_oppacity.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
if hyprctl getoption decoration:active_opacity | grep "float: 1" >/dev/null ; then
|
||||
hyprctl keyword decoration:active_opacity 0.90 >/dev/null
|
||||
hyprctl keyword decoration:inactive_opacity 0.90 >/dev/null
|
||||
else
|
||||
hyprctl keyword decoration:active_opacity 1 >/dev/null
|
||||
hyprctl keyword decoration:inactive_opacity 1 >/dev/null
|
||||
fi
|
|
@ -0,0 +1,9 @@
|
|||
PIDS=$(pgrep -f "swaybg")
|
||||
|
||||
swaybg -m fill -i "$1" &
|
||||
|
||||
if [ -n "$PIDS" ]; then
|
||||
echo "$PIDS" | xargs kill
|
||||
fi
|
||||
|
||||
magick "$1" ~/.config/hypr/wallpaper.png
|
14
users/pedro/home-configuration/scripts/scripts/wallpaper-picker.sh
Executable file
14
users/pedro/home-configuration/scripts/scripts/wallpaper-picker.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
bpotd_entry="⚙️ Bing's Picture Of The Day"
|
||||
apotd_entry="⚙️ NASA's Astronomy Picture Of The Day"
|
||||
wallpapers_folder=$HOME/Pictures/Wallpapers/
|
||||
|
||||
wallpaper_name=$(echo -e "$bpotd_entry\n$apotd_entry" | { cat; find "$wallpapers_folder" -type f | sed "s|$wallpapers_folder||"; } | fuzzel --dmenu)
|
||||
if [ "$wallpaper_name" == "$bpotd_entry" ]; then
|
||||
setbg-bpotd
|
||||
elif [ "$wallpaper_name" == "$apotd_entry" ]; then
|
||||
setbg-apotd
|
||||
elif [[ -f $wallpapers_folder/$wallpaper_name ]]; then
|
||||
wall-change "$wallpapers_folder/$wallpaper_name"
|
||||
else
|
||||
exit 1
|
||||
fi
|
13
users/pedro/home-configuration/services.nix
Normal file
13
users/pedro/home-configuration/services.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{osConfig, ...}: let
|
||||
hasDE = osConfig.hm-pedro.de != "none";
|
||||
in {
|
||||
services.nextcloud-client = {
|
||||
enable = hasDE;
|
||||
startInBackground = true;
|
||||
};
|
||||
|
||||
services.kdeconnect = {
|
||||
enable = hasDE;
|
||||
indicator = true;
|
||||
};
|
||||
}
|
6
users/pedro/home-configuration/spotify.nix
Normal file
6
users/pedro/home-configuration/spotify.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
spotify-player
|
||||
sptlrx
|
||||
];
|
||||
}
|
53
users/pedro/home-configuration/stylix.nix
Normal file
53
users/pedro/home-configuration/stylix.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.stylix.homeModules.stylix];
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = true;
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
polarity = "dark";
|
||||
|
||||
targets = {
|
||||
librewolf.profileNames = ["pedro"];
|
||||
};
|
||||
|
||||
fonts = {
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.jetbrains-mono;
|
||||
name = "JetBrainsMono Nerd Font";
|
||||
};
|
||||
serif = config.stylix.fonts.monospace;
|
||||
sansSerif = config.stylix.fonts.monospace;
|
||||
emoji = config.stylix.fonts.monospace;
|
||||
};
|
||||
|
||||
cursor = {
|
||||
package = pkgs.catppuccin-cursors.mochaDark;
|
||||
name = "Catppuccin Mocha Dark";
|
||||
size = 22;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
enable = true;
|
||||
package = pkgs.catppuccin-papirus-folders.override {
|
||||
flavor = "mocha";
|
||||
accent = "lavender";
|
||||
};
|
||||
light = "Papirus-Light";
|
||||
dark = "Papirus-Dark";
|
||||
};
|
||||
|
||||
opacity = {
|
||||
applications = 0.65;
|
||||
desktop = 1.0;
|
||||
popups = 0.8;
|
||||
terminal = 0.55;
|
||||
};
|
||||
};
|
||||
}
|
91
users/pedro/home-configuration/vscodium.nix
Normal file
91
users/pedro/home-configuration/vscodium.nix
Normal file
|
@ -0,0 +1,91 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [cmake black alejandra]; # The CMake extension needs it
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
profiles.default = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
# nix language
|
||||
bbenoist.nix
|
||||
# nix-shell suport
|
||||
arrterian.nix-env-selector
|
||||
# nix formatting
|
||||
kamadorueda.alejandra
|
||||
# python
|
||||
ms-python.python
|
||||
ms-python.black-formatter
|
||||
# OCaml
|
||||
ocamllabs.ocaml-platform
|
||||
# CMake
|
||||
ms-vscode.cmake-tools
|
||||
# TOML
|
||||
tamasfe.even-better-toml
|
||||
|
||||
# Theming
|
||||
catppuccin.catppuccin-vsc-icons
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
"update.mode" = "none";
|
||||
"extensions.autoUpdate" = false; # This stuff fixes vscode freaking out when theres an update
|
||||
"window.titleBarStyle" = "custom"; # needed otherwise vscode crashes, see https://github.com/NixOS/nixpkgs/issues/246509
|
||||
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
"vsicons.dontShowNewVersionMessage" = true;
|
||||
"explorer.confirmDragAndDrop" = true;
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.minimap.enabled" = true;
|
||||
"workbench.startupEditor" = "none";
|
||||
|
||||
"editor.formatOnSave" = true;
|
||||
"editor.formatOnType" = true;
|
||||
"editor.formatOnPaste" = true;
|
||||
|
||||
"workbench.layoutControl.type" = "menu";
|
||||
"workbench.editor.limit.enabled" = true;
|
||||
"workbench.editor.limit.value" = 10;
|
||||
"workbench.editor.limit.perEditorGroup" = true;
|
||||
"workbench.editor.showTabs" = "multiple";
|
||||
"files.autoSave" = "onWindowChange";
|
||||
"explorer.openEditors.visible" = 0;
|
||||
"breadcrumbs.enabled" = false;
|
||||
"editor.renderControlCharacters" = false;
|
||||
"workbench.activityBar.location" = "default";
|
||||
"workbench.statusBar.visible" = false;
|
||||
"editor.scrollbar.verticalScrollbarSize" = 4;
|
||||
"editor.scrollbar.horizontalScrollbarSize" = 4;
|
||||
"editor.scrollbar.vertical" = "auto";
|
||||
"editor.scrollbar.horizontal" = "auto";
|
||||
"workbench.layoutControl.enabled" = false;
|
||||
|
||||
"editor.mouseWheelZoom" = true;
|
||||
|
||||
"C_Cpp.autocompleteAddParentheses" = true;
|
||||
"C_Cpp.formatting" = "clangFormat";
|
||||
"C_Cpp.intelliSenseCacheSize" = 2048;
|
||||
"C_Cpp.intelliSenseMemoryLimit" = 2048;
|
||||
"C_Cpp.default.browse.path" = [
|
||||
''''${workspaceFolder}/**''
|
||||
];
|
||||
"C_Cpp.default.cStandard" = "gnu99";
|
||||
"C_Cpp.inlayHints.parameterNames.hideLeadingUnderscores" = false;
|
||||
"C_Cpp.intelliSenseUpdateDelay" = 500;
|
||||
"C_Cpp.workspaceParsingPriority" = "medium";
|
||||
"C_Cpp.clang_format_sortIncludes" = true;
|
||||
"C_Cpp.doxygen.generatedStyle" = "/**";
|
||||
};
|
||||
# Keybindings
|
||||
keybindings = [
|
||||
{
|
||||
key = "ctrl+q";
|
||||
command = "editor.action.commentLine";
|
||||
when = "editorTextFocus && !editorReadonly";
|
||||
}
|
||||
{
|
||||
key = "ctrl+s";
|
||||
command = "workbench.action.files.saveFiles";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
10
users/pedro/home-configuration/waybar/default.nix
Normal file
10
users/pedro/home-configuration/waybar/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./settings.nix
|
||||
./style.nix
|
||||
];
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
157
users/pedro/home-configuration/waybar/settings.nix
Normal file
157
users/pedro/home-configuration/waybar/settings.nix
Normal file
|
@ -0,0 +1,157 @@
|
|||
{host, ...}: {
|
||||
programs.waybar.settings.mainBar = {
|
||||
position = "top";
|
||||
layer = "top";
|
||||
# height= 15;
|
||||
margin-top = 0;
|
||||
margin-bottom = 5;
|
||||
margin-left = 0;
|
||||
margin-right = 0;
|
||||
modules-left = [
|
||||
"custom/launcher"
|
||||
"custom/playerctl#backward"
|
||||
"custom/playerctl#play"
|
||||
"custom/playerctl#forward"
|
||||
];
|
||||
modules-center = [
|
||||
"hyprland/workspaces"
|
||||
];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"cpu"
|
||||
"memory"
|
||||
"disk"
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"idle_inhibitor"
|
||||
"network"
|
||||
"clock"
|
||||
];
|
||||
|
||||
clock = {
|
||||
format = " {:%H:%M}";
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
format-alt = " {:%d/%m}";
|
||||
};
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
active-only = false;
|
||||
all-outputs = false;
|
||||
disable-scroll = false;
|
||||
on-scroll-up = "hyprctl dispatch workspace e-1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e+1";
|
||||
format = "{name}";
|
||||
on-click = "activate";
|
||||
format-icons = {
|
||||
urgent = "";
|
||||
active = "";
|
||||
default = "";
|
||||
sort-by-number = true;
|
||||
};
|
||||
};
|
||||
|
||||
"custom/playerctl#backward" = {
|
||||
format = " ";
|
||||
on-click = "playerctl previous";
|
||||
on-scroll-up = "playerctl volume .05+";
|
||||
on-scroll-down = "playerctl volume .05-";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/playerctl#play" = {
|
||||
format = "{icon}";
|
||||
return-type = "json";
|
||||
exec = "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F";
|
||||
on-click = "playerctl play-pause";
|
||||
on-scroll-up = "playerctl volume .05+";
|
||||
on-scroll-down = "playerctl volume .05-";
|
||||
format-icons = {
|
||||
Playing = "<span> </span>";
|
||||
Paused = "<span> </span>";
|
||||
Stopped = "<span> </span>";
|
||||
};
|
||||
};
|
||||
|
||||
"custom/playerctl#forward" = {
|
||||
format = " ";
|
||||
on-click = "playerctl next";
|
||||
on-scroll-up = "playerctl volume .05+";
|
||||
on-scroll-down = "playerctl volume .05-";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
memory = {
|
||||
format = " {}%";
|
||||
format-alt = " {used} GiB"; #
|
||||
interval = 2;
|
||||
};
|
||||
|
||||
cpu = {
|
||||
format = " {usage}%";
|
||||
format-alt = " {avg_frequency} GHz";
|
||||
interval = 2;
|
||||
};
|
||||
|
||||
disk = {
|
||||
# path = "/";
|
||||
format = " {percentage_used}%";
|
||||
interval = 60;
|
||||
};
|
||||
|
||||
network = {
|
||||
format-wifi = " {signalStrength}%";
|
||||
format-ethernet = " ";
|
||||
tooltip-format = "Connected to {essid} {ifname} via {gwaddr}";
|
||||
format-linked = "{ifname} (No IP)";
|
||||
format-disconnected = " ";
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 20;
|
||||
spacing = 8;
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = " ";
|
||||
format-icons = {
|
||||
default = [" "];
|
||||
};
|
||||
scroll-step = 5;
|
||||
on-click = "pamixer -t";
|
||||
on-click-right = "pavucontrol";
|
||||
};
|
||||
|
||||
battery = {
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = [" " " " " " " " " "];
|
||||
format-charging = " {capacity}%";
|
||||
format-full = " {capacity}%";
|
||||
format-warning = " {capacity}%";
|
||||
interval = 5;
|
||||
states = {
|
||||
warning = 20;
|
||||
};
|
||||
format-time = "{H}h{M}m";
|
||||
tooltip = true;
|
||||
tooltip-format = "{time}";
|
||||
};
|
||||
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = " ";
|
||||
deactivated = " ";
|
||||
};
|
||||
timeout = 30;
|
||||
};
|
||||
|
||||
"custom/launcher" = {
|
||||
format = "";
|
||||
on-click = "pkill fuzzel || fuzzel";
|
||||
on-click-right = "pkill fuzzel || wallpaper-picker";
|
||||
tooltip = false;
|
||||
};
|
||||
};
|
||||
}
|
155
users/pedro/home-configuration/waybar/style.nix
Normal file
155
users/pedro/home-configuration/waybar/style.nix
Normal file
|
@ -0,0 +1,155 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
stylix.targets.waybar.addCss = false;
|
||||
|
||||
programs.waybar.style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
|
||||
window#waybar {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.module {
|
||||
background: @base00;
|
||||
color: @base05;
|
||||
margin: 5px 0px;
|
||||
min-height: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: @base02;
|
||||
color: @base05;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
color: @base05;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin: 5px 5px;
|
||||
padding: 8px 12px;
|
||||
border-radius: 12px 12px 24px 24px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 15px;
|
||||
color: @base00;
|
||||
background-color: @base0D;
|
||||
min-width: 15px;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
#workspaces button.visible {
|
||||
background-color: @base0F;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: @base0E;
|
||||
min-width: 35px;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background-color: @base07;
|
||||
min-width: 35px;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
border-radius: 10px 0px 0px 24px;
|
||||
padding-left: 15px;
|
||||
padding-right: 9px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
#memory {
|
||||
border-radius: 0;
|
||||
padding-left: 9px;
|
||||
padding-right: 9px;
|
||||
}
|
||||
#disk {
|
||||
border-radius: 0px 24px 10px 0px;
|
||||
padding-left: 9px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#tray {
|
||||
border-radius: 10px 24px 10px 24px;
|
||||
padding: 0 20px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
border-radius: 10px 0px 0px 24px;
|
||||
padding-left: 15px;
|
||||
padding-right: 9px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
#battery {
|
||||
border-radius: 0;
|
||||
padding-left: 9px;
|
||||
padding-right: 9px;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
border-radius: 0;
|
||||
padding-left: 9px;
|
||||
padding-right: 9px;
|
||||
}
|
||||
|
||||
#network {
|
||||
border-radius: 0px 24px 10px 0px;
|
||||
padding-left: 9px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
border-radius: 0px 0px 0px 40px;
|
||||
padding: 10px 10px 15px 25px;
|
||||
margin: 0px;
|
||||
margin-left: 7px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#custom-launcher {
|
||||
color: @base0D;
|
||||
border-radius: 0px 0px 40px 0px;
|
||||
margin: 0px;
|
||||
padding: 0px 30px 0px 10px;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
#custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.forward {
|
||||
font-size: 22px;
|
||||
}
|
||||
#custom-playerctl.backward:hover, #custom-playerctl.play:hover, #custom-playerctl.forward:hover{
|
||||
color: @base05;
|
||||
}
|
||||
#custom-playerctl.backward {
|
||||
color: @base0E;
|
||||
border-radius: 24px 0px 0px 10px;
|
||||
padding-left: 16px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
#custom-playerctl.play {
|
||||
color: @base0D;
|
||||
padding: 0 5px;
|
||||
}
|
||||
#custom-playerctl.forward {
|
||||
color: @base0E;
|
||||
border-radius: 0px 10px 24px 0px;
|
||||
padding-right: 12px;
|
||||
margin-right: 7px
|
||||
}
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue