update niri config
This commit is contained in:
parent
d834ba70a0
commit
3207922b68
15 changed files with 495 additions and 58 deletions
|
|
@ -109,7 +109,7 @@
|
||||||
{ nixpkgs.pkgs = pkgs; }
|
{ nixpkgs.pkgs = pkgs; }
|
||||||
./system/configuration.nix
|
./system/configuration.nix
|
||||||
{
|
{
|
||||||
login-manager.greetd.enable = desktop == "sway";
|
login-manager.greetd.enable = desktop == "sway" || desktop == "niri";
|
||||||
my.gnome.enable = desktop == "gnome";
|
my.gnome.enable = desktop == "gnome";
|
||||||
my.kde.enable = desktop == "kde";
|
my.kde.enable = desktop == "kde";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,16 @@
|
||||||
if test "$argv[1]" = "run"
|
if test "$argv[1]" = "run"
|
||||||
test -n "$argv[2]" && set t "$argv[2]" || set t "terminal"
|
test -n "$argv[2]" && set t "$argv[2]" || set t "terminal"
|
||||||
|
|
||||||
exec j4-dmenu-desktop \
|
set -l launcher_args \
|
||||||
--dmenu="bmenu start -p Iniciar:" \
|
--dmenu="bmenu start -p Iniciar:" \
|
||||||
--term "$t" \
|
--term "$t" \
|
||||||
--i3-ipc \
|
|
||||||
--no-generic
|
--no-generic
|
||||||
|
|
||||||
|
if test -n "$SWAYSOCK"
|
||||||
|
set launcher_args $launcher_args --i3-ipc
|
||||||
|
end
|
||||||
|
|
||||||
|
exec j4-dmenu-desktop $launcher_args
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -n "$SWAYSOCK"
|
if test -n "$SWAYSOCK"
|
||||||
|
|
@ -22,6 +27,13 @@ if test -n "$SWAYSOCK"
|
||||||
|
|
||||||
test -n "$focused_output"
|
test -n "$focused_output"
|
||||||
and set focused_output "-m $focused_output"
|
and set focused_output "-m $focused_output"
|
||||||
|
else if test -n "$NIRI_SOCKET"
|
||||||
|
set -l focused_name (niri msg -j focused-output | jq -r '.name')
|
||||||
|
set -l focused_index (niri msg -j outputs | jq -r --arg focused "$focused_name" 'keys | index($focused)')
|
||||||
|
|
||||||
|
if test -n "$focused_index"; and test "$focused_index" != "null"
|
||||||
|
set focused_output "-m $focused_index"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
set -l config "$HOME/.config/bmenu.conf"
|
set -l config "$HOME/.config/bmenu.conf"
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
};
|
};
|
||||||
plymouth = {
|
plymouth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = lib.mkIf (config.my.desktop == "sway") "red_loader";
|
theme = lib.mkIf (config.my.desktop == "sway" || config.my.desktop == "niri") "red_loader";
|
||||||
themePackages = with pkgs; [
|
themePackages = with pkgs; [
|
||||||
(adi1090x-plymouth-themes.override { selected_themes = [ "red_loader" ]; })
|
(adi1090x-plymouth-themes.override { selected_themes = [ "red_loader" ]; })
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ let
|
||||||
;
|
;
|
||||||
|
|
||||||
cfg = config.login-manager.greetd;
|
cfg = config.login-manager.greetd;
|
||||||
|
isSway = desktop == "sway";
|
||||||
|
isNiri = desktop == "niri";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.login-manager.greetd = {
|
options.login-manager.greetd = {
|
||||||
|
|
@ -25,8 +27,7 @@ in
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = false;
|
services.xserver.enable = false;
|
||||||
|
|
||||||
# enable sway window manager
|
programs.sway = lib.mkIf isSway {
|
||||||
programs.sway = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.mySway;
|
package = pkgs.mySway;
|
||||||
wrapperFeatures.gtk = true;
|
wrapperFeatures.gtk = true;
|
||||||
|
|
@ -42,14 +43,22 @@ in
|
||||||
};
|
};
|
||||||
services.greetd =
|
services.greetd =
|
||||||
let
|
let
|
||||||
start-sway = pkgs.writeShellScriptBin "start-sway" ''
|
start-session = pkgs.writeShellScriptBin "start-session" (
|
||||||
mkdir -p ~/.local/share/sway
|
if isNiri then
|
||||||
exec sway 2>&1 | tee -a ~/.local/share/sway/sway.log
|
''
|
||||||
'';
|
mkdir -p ~/.local/share/niri
|
||||||
|
exec niri-session 2>&1 | tee -a ~/.local/share/niri/niri.log
|
||||||
|
''
|
||||||
|
else
|
||||||
|
''
|
||||||
|
mkdir -p ~/.local/share/sway
|
||||||
|
exec sway 2>&1 | tee -a ~/.local/share/sway/sway.log
|
||||||
|
''
|
||||||
|
);
|
||||||
greetd_main_script = pkgs.writeShellScriptBin "main" ''
|
greetd_main_script = pkgs.writeShellScriptBin "main" ''
|
||||||
export XDG_CURRENT_DESKTOP=sway GTK_THEME="${theme.gtk_theme}" XCURSOR_THEME="${theme.cursor_theme}"
|
export XDG_CURRENT_DESKTOP=${desktop} GTK_THEME="${theme.gtk_theme}" XCURSOR_THEME="${theme.cursor_theme}"
|
||||||
${pkgs.gtkgreet}/bin/gtkgreet -l -c ${lib.getExe start-sway}
|
${pkgs.gtkgreet}/bin/gtkgreet -l -c ${lib.getExe start-session}
|
||||||
swaymsg exit
|
${lib.optionalString isSway "swaymsg exit"}
|
||||||
'';
|
'';
|
||||||
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
||||||
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
|
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
|
||||||
|
|
@ -72,7 +81,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
initial_session = {
|
initial_session = {
|
||||||
command = lib.getExe start-sway;
|
command = lib.getExe start-session;
|
||||||
user = "lelgenio";
|
user = "lelgenio";
|
||||||
};
|
};
|
||||||
default_session = {
|
default_session = {
|
||||||
|
|
@ -81,6 +90,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
niri
|
||||||
sway
|
sway
|
||||||
swaylock
|
swaylock
|
||||||
swayidle
|
swayidle
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,9 @@
|
||||||
config = lib.mkIf config.my.niri.enable {
|
config = lib.mkIf config.my.niri.enable {
|
||||||
programs.niri.enable = true;
|
programs.niri.enable = true;
|
||||||
niri-flake.cache.enable = true;
|
niri-flake.cache.enable = true;
|
||||||
environment.systemPackages = with pkgs; [ fuzzel ];
|
environment.systemPackages = with pkgs; [
|
||||||
|
fuzzel
|
||||||
|
xwayland-satellite
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ in
|
||||||
wl-copy-file
|
wl-copy-file
|
||||||
foreign-env
|
foreign-env
|
||||||
]
|
]
|
||||||
++ (lib.optionals (desktop == "sway") [
|
++ (lib.optionals (desktop == "sway" || desktop == "niri") [
|
||||||
async-prompt
|
async-prompt
|
||||||
done
|
done
|
||||||
])
|
])
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
Unit = "gpg_unlock.service";
|
Unit = "gpg_unlock.service";
|
||||||
};
|
};
|
||||||
Install = {
|
Install = {
|
||||||
WantedBy = [ "sway-session.target" ];
|
WantedBy = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
./satty
|
./satty
|
||||||
./man.nix
|
./man.nix
|
||||||
./mpd.nix
|
./mpd.nix
|
||||||
./sway
|
./niri
|
||||||
./gnome.nix
|
./gnome.nix
|
||||||
./thunar.nix
|
./thunar.nix
|
||||||
./xdg-dirs.nix
|
./xdg-dirs.nix
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
my = import ./variables.nix // {
|
my = import ./variables.nix // {
|
||||||
sway.enable = true;
|
niri.enable = true;
|
||||||
pass.enable = true;
|
pass.enable = true;
|
||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
};
|
};
|
||||||
|
|
@ -168,15 +168,6 @@
|
||||||
torrent-client = lib.mkDefault "torrent.desktop";
|
torrent-client = lib.mkDefault "torrent.desktop";
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.sway.extraConfig =
|
|
||||||
lib.optionalString (osConfig.networking.hostName or "" == "monolith")
|
|
||||||
''
|
|
||||||
exec steam
|
|
||||||
exec obs --startreplaybuffer --disable-shutdown-check
|
|
||||||
exec deluge-gtk
|
|
||||||
exec nicotine
|
|
||||||
'';
|
|
||||||
|
|
||||||
# This value determines the Home Manager release that your
|
# This value determines the Home Manager release that your
|
||||||
# configuration is compatible with. This helps avoid breakage
|
# configuration is compatible with. This helps avoid breakage
|
||||||
# when a new Home Manager release introduces backwards
|
# when a new Home Manager release introduces backwards
|
||||||
|
|
|
||||||
205
user/niri/config.kdl
Normal file
205
user/niri/config.kdl
Normal file
|
|
@ -0,0 +1,205 @@
|
||||||
|
input {
|
||||||
|
keyboard {
|
||||||
|
xkb {
|
||||||
|
layout "us(colemak),br"
|
||||||
|
options "lv3:lsgt_switch,grp:shifts_toggle"
|
||||||
|
}
|
||||||
|
repeat-delay 200
|
||||||
|
repeat-rate 30
|
||||||
|
numlock
|
||||||
|
}
|
||||||
|
|
||||||
|
touchpad {
|
||||||
|
dwt
|
||||||
|
tap
|
||||||
|
natural-scroll
|
||||||
|
}
|
||||||
|
|
||||||
|
mouse {
|
||||||
|
accel-speed 0.0
|
||||||
|
accel-profile "flat"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output "AOC 24G2W1G4 ATNM6XA004804" {
|
||||||
|
mode "1920x1080@144.000"
|
||||||
|
position x=0 y=0
|
||||||
|
variable-refresh-rate
|
||||||
|
}
|
||||||
|
|
||||||
|
output "LG Electronics 25UM58G 0x01010101" {
|
||||||
|
mode "2560x1080@74.991"
|
||||||
|
scale 1.2
|
||||||
|
position x=1920 y=215
|
||||||
|
variable-refresh-rate
|
||||||
|
}
|
||||||
|
|
||||||
|
layout {
|
||||||
|
gaps 5
|
||||||
|
focus-ring {
|
||||||
|
width 2
|
||||||
|
active-color "#F44336"
|
||||||
|
inactive-color "#141414"
|
||||||
|
}
|
||||||
|
border {
|
||||||
|
off
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prefer-no-csd
|
||||||
|
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||||
|
|
||||||
|
spawn-at-startup "systemctl" "--user" "import-environment" "PATH"
|
||||||
|
spawn-at-startup "systemctl" "--user" "restart" "waybar.service"
|
||||||
|
spawn-at-startup "firefox-devedition"
|
||||||
|
spawn-at-startup "thunderbird"
|
||||||
|
spawn-at-startup "discordcanary"
|
||||||
|
spawn-at-startup "Telegram"
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id="^org.nicotine_plus.Nicotine$"
|
||||||
|
open-on-workspace "6"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id="^deluge$"
|
||||||
|
open-on-workspace "6"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id="^com.obsproject.Studio$"
|
||||||
|
open-on-workspace "6"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id="^thunderbird$"
|
||||||
|
open-on-workspace "7"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id="^astroid$"
|
||||||
|
open-on-workspace "7"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id=".*[Ss]team.*"
|
||||||
|
open-on-workspace "9"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id=".*[Tt]elegram.*"
|
||||||
|
open-on-workspace "10"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id="^vesktop$"
|
||||||
|
open-on-workspace "10"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id="^Element$"
|
||||||
|
open-on-workspace "10"
|
||||||
|
}
|
||||||
|
|
||||||
|
binds {
|
||||||
|
Mod+Return { spawn "alacritty"; }
|
||||||
|
Mod+Ctrl+Return { spawn "thunar"; }
|
||||||
|
Mod+S { spawn "wlauncher"; }
|
||||||
|
Mod+P { spawn "wpass"; }
|
||||||
|
Mod+G { spawn "demoji" "--lang" "pt" "--fallback" "--copy" "--" "wdmenu"; }
|
||||||
|
Mod+C { spawn "color_picker"; }
|
||||||
|
Mod+L { spawn "swaylock" "-f"; }
|
||||||
|
Mod+K { spawn "showkeys"; }
|
||||||
|
Mod+Ctrl+V { spawn "bash" "-c" "wl-paste | tesseract -l por - - | wl-copy"; }
|
||||||
|
Mod+Alt+X { spawn "bash" "-c" "pkill wl-crosshair || exec wl-crosshair"; }
|
||||||
|
Mod+Alt+C { spawn "bash" "-c" "pkill caffeinated || exec caffeinated"; }
|
||||||
|
|
||||||
|
XF86MonBrightnessDown { spawn "brightnessctl" "--min-value=1" "set" "5%-"; }
|
||||||
|
XF86MonBrightnessUp { spawn "brightnessctl" "--min-value=1" "set" "5%+"; }
|
||||||
|
|
||||||
|
XF86AudioRaiseVolume allow-when-locked=true { spawn "volumesh" "-i" "10"; }
|
||||||
|
XF86AudioLowerVolume allow-when-locked=true { spawn "volumesh" "-d" "10"; }
|
||||||
|
XF86AudioMute allow-when-locked=true { spawn "volumesh" "-t"; }
|
||||||
|
XF86AudioMicMute allow-when-locked=true { spawn "pactl" "set-source-mute" "@DEFAULT_SOURCE@" "toggle"; }
|
||||||
|
XF86AudioPlay { spawn "playerctl" "play-pause"; }
|
||||||
|
XF86AudioPause { spawn "playerctl" "play-pause"; }
|
||||||
|
XF86AudioNext { spawn "playerctl" "next"; }
|
||||||
|
XF86AudioPrev { spawn "playerctl" "previous"; }
|
||||||
|
|
||||||
|
Print { spawn "screenshotsh" "def"; }
|
||||||
|
Shift+Print { spawn "screenshotsh" "area"; }
|
||||||
|
Ctrl+Shift+Print { spawn "screenshotsh" "area-clip"; }
|
||||||
|
Ctrl+Print { spawn "screenshotsh" "clip"; }
|
||||||
|
Mod+Shift+S { spawn "screenshotsh" "edit"; }
|
||||||
|
|
||||||
|
Mod+F { fullscreen-window; }
|
||||||
|
Mod+X { close-window; }
|
||||||
|
|
||||||
|
Mod+Left { focus-column-left; }
|
||||||
|
Mod+Down { focus-window-down; }
|
||||||
|
Mod+Up { focus-window-up; }
|
||||||
|
Mod+Right { focus-column-right; }
|
||||||
|
Mod+N { focus-column-left; }
|
||||||
|
Mod+E { focus-window-down; }
|
||||||
|
Mod+I { focus-window-up; }
|
||||||
|
Mod+O { focus-column-right; }
|
||||||
|
|
||||||
|
Mod+Ctrl+Left { move-column-left; }
|
||||||
|
Mod+Ctrl+Down { move-window-down; }
|
||||||
|
Mod+Ctrl+Up { move-window-up; }
|
||||||
|
Mod+Ctrl+Right { move-column-right; }
|
||||||
|
Mod+Ctrl+N { move-column-left; }
|
||||||
|
Mod+Ctrl+E { move-window-down; }
|
||||||
|
Mod+Ctrl+I { move-window-up; }
|
||||||
|
Mod+Ctrl+O { move-column-right; }
|
||||||
|
|
||||||
|
Mod+Alt+Left { focus-monitor-left; }
|
||||||
|
Mod+Alt+Down { focus-monitor-down; }
|
||||||
|
Mod+Alt+Up { focus-monitor-up; }
|
||||||
|
Mod+Alt+Right { focus-monitor-right; }
|
||||||
|
Mod+Alt+N { focus-monitor-left; }
|
||||||
|
Mod+Alt+E { focus-monitor-down; }
|
||||||
|
Mod+Alt+I { focus-monitor-up; }
|
||||||
|
Mod+Alt+O { focus-monitor-right; }
|
||||||
|
|
||||||
|
Mod+Alt+Ctrl+Left { move-column-to-monitor-left; }
|
||||||
|
Mod+Alt+Ctrl+Down { move-column-to-monitor-down; }
|
||||||
|
Mod+Alt+Ctrl+Up { move-column-to-monitor-up; }
|
||||||
|
Mod+Alt+Ctrl+Right { move-column-to-monitor-right; }
|
||||||
|
Mod+Alt+Ctrl+N { move-column-to-monitor-left; }
|
||||||
|
Mod+Alt+Ctrl+E { move-column-to-monitor-down; }
|
||||||
|
Mod+Alt+Ctrl+I { move-column-to-monitor-up; }
|
||||||
|
Mod+Alt+Ctrl+O { move-column-to-monitor-right; }
|
||||||
|
|
||||||
|
Mod+Y { focus-workspace-down; }
|
||||||
|
Mod+U { focus-workspace-up; }
|
||||||
|
Mod+Ctrl+Y { move-column-to-workspace-down; }
|
||||||
|
Mod+Ctrl+U { move-column-to-workspace-up; }
|
||||||
|
|
||||||
|
Mod+BracketLeft { focus-workspace-down; }
|
||||||
|
Mod+BracketRight { focus-workspace-up; }
|
||||||
|
Mod+Tab { focus-workspace-up; }
|
||||||
|
Mod+Shift+Tab { focus-workspace-down; }
|
||||||
|
|
||||||
|
Mod+1 { focus-workspace 1; }
|
||||||
|
Mod+2 { focus-workspace 2; }
|
||||||
|
Mod+3 { focus-workspace 3; }
|
||||||
|
Mod+4 { focus-workspace 4; }
|
||||||
|
Mod+5 { focus-workspace 5; }
|
||||||
|
Mod+6 { focus-workspace 6; }
|
||||||
|
Mod+7 { focus-workspace 7; }
|
||||||
|
Mod+8 { focus-workspace 8; }
|
||||||
|
Mod+9 { focus-workspace 9; }
|
||||||
|
Mod+0 { focus-workspace 10; }
|
||||||
|
|
||||||
|
Mod+Shift+1 { move-column-to-workspace 1; }
|
||||||
|
Mod+Shift+2 { move-column-to-workspace 2; }
|
||||||
|
Mod+Shift+3 { move-column-to-workspace 3; }
|
||||||
|
Mod+Shift+4 { move-column-to-workspace 4; }
|
||||||
|
Mod+Shift+5 { move-column-to-workspace 5; }
|
||||||
|
Mod+Shift+6 { move-column-to-workspace 6; }
|
||||||
|
Mod+Shift+7 { move-column-to-workspace 7; }
|
||||||
|
Mod+Shift+8 { move-column-to-workspace 8; }
|
||||||
|
Mod+Shift+9 { move-column-to-workspace 9; }
|
||||||
|
Mod+Shift+0 { move-column-to-workspace 10; }
|
||||||
|
}
|
||||||
90
user/niri/default.nix
Normal file
90
user/niri/default.nix
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (config.my) font theme;
|
||||||
|
monolithAutostart = lib.optionalString ((osConfig.networking.hostName or "") == "monolith") ''
|
||||||
|
spawn-at-startup "steam"
|
||||||
|
spawn-at-startup "obs" "--startreplaybuffer" "--disable-shutdown-check"
|
||||||
|
spawn-at-startup "deluge-gtk"
|
||||||
|
spawn-at-startup "nicotine"
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../sway/kanshi.nix
|
||||||
|
../sway/mako.nix
|
||||||
|
../sway/swayidle.nix
|
||||||
|
../sway/swaylock.nix
|
||||||
|
../sway/gammastep.nix
|
||||||
|
./theme.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
config = lib.mkIf (config.my.niri.enable or false) {
|
||||||
|
my.mako.enable = true;
|
||||||
|
my.kanshi.enable = true;
|
||||||
|
my.swayidle.enable = true;
|
||||||
|
my.swaylock.enable = true;
|
||||||
|
my.mpd.enable = true;
|
||||||
|
my.zathura.enable = true;
|
||||||
|
my.satty.enable = true;
|
||||||
|
my.waybar.enable = true;
|
||||||
|
my.gammastep.enable = true;
|
||||||
|
|
||||||
|
xdg.configFile."niri/config.kdl".text = ''
|
||||||
|
${builtins.readFile ./config.kdl}
|
||||||
|
${monolithAutostart}
|
||||||
|
'';
|
||||||
|
|
||||||
|
services.kdeconnect = {
|
||||||
|
enable = true;
|
||||||
|
indicator = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.gpg-agent.pinentry.package = pkgs.pinentry-all;
|
||||||
|
|
||||||
|
xdg.configFile."OpenTabletDriver/settings.json" = {
|
||||||
|
force = true;
|
||||||
|
source = ../sway/open-tablet-driver.json;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
swaybg
|
||||||
|
swaylock
|
||||||
|
wdisplays
|
||||||
|
|
||||||
|
dhist
|
||||||
|
demoji
|
||||||
|
bmenu
|
||||||
|
wdmenu
|
||||||
|
wlauncher
|
||||||
|
volumesh
|
||||||
|
brightnessctl
|
||||||
|
showkeys
|
||||||
|
pamixer
|
||||||
|
libnotify
|
||||||
|
xdg-utils
|
||||||
|
screenshotsh
|
||||||
|
color_picker
|
||||||
|
wf-recorder
|
||||||
|
wl-clipboard
|
||||||
|
wtype
|
||||||
|
wl-crosshair
|
||||||
|
caffeinated
|
||||||
|
|
||||||
|
grim
|
||||||
|
satty
|
||||||
|
xdg-user-dirs
|
||||||
|
(tesseract5.override {
|
||||||
|
enableLanguages = [
|
||||||
|
"eng"
|
||||||
|
"por"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
94
user/niri/theme.nix
Normal file
94
user/niri/theme.nix
Normal file
|
|
@ -0,0 +1,94 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (config.my) theme font desktop;
|
||||||
|
inherit (theme)
|
||||||
|
color
|
||||||
|
gtk_theme
|
||||||
|
icon_theme
|
||||||
|
cursor_theme
|
||||||
|
;
|
||||||
|
in
|
||||||
|
lib.mkIf (desktop == "niri") {
|
||||||
|
home.pointerCursor = {
|
||||||
|
name = cursor_theme;
|
||||||
|
size = 24;
|
||||||
|
package = pkgs.bibata-cursors;
|
||||||
|
gtk.enable = true;
|
||||||
|
};
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
font = {
|
||||||
|
name = font.interface;
|
||||||
|
size = font.size.small;
|
||||||
|
};
|
||||||
|
theme = {
|
||||||
|
name = gtk_theme;
|
||||||
|
package = pkgs.orchis_theme_compact;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = icon_theme;
|
||||||
|
package = pkgs.papirus_red;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// (
|
||||||
|
let
|
||||||
|
shared.extraConfig = {
|
||||||
|
gtk-decoration-layout = "menu:";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
gtk4 = shared;
|
||||||
|
gtk3 = shared;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
xdg.configFile."gtk-3.0/settings.ini".force = true;
|
||||||
|
xdg.configFile."gtk-4.0/settings.ini".force = true;
|
||||||
|
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "gtk3";
|
||||||
|
style.name = "kvantum";
|
||||||
|
};
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
gtk-theme = gtk_theme;
|
||||||
|
icon-theme = icon_theme;
|
||||||
|
cursor-theme = cursor_theme;
|
||||||
|
color-scheme = "prefer-${color.type}";
|
||||||
|
};
|
||||||
|
"org/gnome/desktop/wm/preferences" = {
|
||||||
|
button-layout = "menu:";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xsettingsd = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
"Gtk/FontName" = "${font.interface} ${toString font.size.small}";
|
||||||
|
"Net/ThemeName" = "${gtk_theme}";
|
||||||
|
"Net/IconThemeName" = "${icon_theme}";
|
||||||
|
"Gtk/CursorThemeName" = "${cursor_theme}";
|
||||||
|
"Gtk/CursorThemeSize" = 24;
|
||||||
|
"Net/SoundThemeName" = "freedesktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
pkgs.bibata-cursors
|
||||||
|
pkgs.orchis_theme_compact
|
||||||
|
pkgs.papirus_red
|
||||||
|
|
||||||
|
liberation_ttf
|
||||||
|
hack-font
|
||||||
|
font-awesome_5
|
||||||
|
fira-code
|
||||||
|
material-wifi-icons
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -66,7 +66,7 @@ in
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
Install = {
|
Install = {
|
||||||
WantedBy = [ "sway-session.target" ];
|
WantedBy = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
let
|
let
|
||||||
asScript = filename: text: toString (pkgs.writeShellScript filename text);
|
asScript = filename: text: toString (pkgs.writeShellScript filename text);
|
||||||
|
|
||||||
|
isNiri = (config.my.desktop or "") == "niri";
|
||||||
cfg = config.my.swayidle;
|
cfg = config.my.swayidle;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -19,6 +20,8 @@ in
|
||||||
timeout = 360;
|
timeout = 360;
|
||||||
command = "${pkgs.swaylock}/bin/swaylock -f";
|
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
++ lib.optionals (!isNiri) [
|
||||||
{
|
{
|
||||||
timeout = 1800;
|
timeout = 1800;
|
||||||
command = asScript "swayidle-suspend-monitors" ''
|
command = asScript "swayidle-suspend-monitors" ''
|
||||||
|
|
@ -37,7 +40,7 @@ in
|
||||||
{
|
{
|
||||||
event = "after-resume";
|
event = "after-resume";
|
||||||
command = asScript "after-resume" ''
|
command = asScript "after-resume" ''
|
||||||
${pkgs.sway}/bin/swaymsg "output * dpms on"
|
${lib.optionalString (!isNiri) "${pkgs.sway}/bin/swaymsg \"output * dpms on\""}
|
||||||
${pkgs.systemd}/bin/systemctl --user restart \
|
${pkgs.systemd}/bin/systemctl --user restart \
|
||||||
kdeconnect.service kdeconnect-indicator.service
|
kdeconnect.service kdeconnect-indicator.service
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
dmenu = "bmenu";
|
dmenu = "bmenu";
|
||||||
desktop = "sway";
|
desktop = "niri";
|
||||||
browser = "firefox-devedition";
|
browser = "firefox-devedition";
|
||||||
editor = "kakoune";
|
editor = "kakoune";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,55 @@ let
|
||||||
theme
|
theme
|
||||||
accent
|
accent
|
||||||
font
|
font
|
||||||
|
desktop
|
||||||
;
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
|
workspaceModule = if desktop == "niri" then "niri/workspaces" else "sway/workspaces";
|
||||||
|
windowModule = if desktop == "niri" then "niri/window" else "sway/window";
|
||||||
|
languageModule = if desktop == "niri" then "niri/language" else "sway/language";
|
||||||
|
workspaceSettings =
|
||||||
|
if desktop == "niri" then
|
||||||
|
{
|
||||||
|
all-outputs = false;
|
||||||
|
current-only = false;
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
"1" = "";
|
||||||
|
"2" = "";
|
||||||
|
"3" = "";
|
||||||
|
"4" = "";
|
||||||
|
"5" = "";
|
||||||
|
"6" = "";
|
||||||
|
"7" = "";
|
||||||
|
"8" = "";
|
||||||
|
"9" = "";
|
||||||
|
"10" = "";
|
||||||
|
empty = "";
|
||||||
|
active = "";
|
||||||
|
focused = "";
|
||||||
|
urgent = "";
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
enable-bar-scroll = true;
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
"1" = "";
|
||||||
|
"2" = "";
|
||||||
|
"3" = "";
|
||||||
|
"4" = "";
|
||||||
|
"5" = "";
|
||||||
|
"6" = "";
|
||||||
|
"7" = "";
|
||||||
|
"8" = "";
|
||||||
|
"9" = "";
|
||||||
|
"10" = "";
|
||||||
|
urgent = "";
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
cfg = config.my.waybar;
|
cfg = config.my.waybar;
|
||||||
in
|
in
|
||||||
|
|
@ -22,18 +69,18 @@ in
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
systemd.target = "sway-session.target";
|
systemd.target = "graphical-session.target";
|
||||||
settings = [
|
settings = [
|
||||||
{
|
{
|
||||||
layer = "top";
|
layer = "top";
|
||||||
modules-left = [
|
modules-left = [
|
||||||
"sway/workspaces"
|
workspaceModule
|
||||||
"sway/mode"
|
]
|
||||||
"sway/window"
|
++ (lib.optional (desktop != "niri") "sway/mode")
|
||||||
];
|
++ [ windowModule ];
|
||||||
modules-center = [ "clock" ];
|
modules-center = [ "clock" ];
|
||||||
modules-right = lib.flatten [
|
modules-right = lib.flatten [
|
||||||
"sway/language"
|
languageModule
|
||||||
"mpd"
|
"mpd"
|
||||||
"custom/playerctl"
|
"custom/playerctl"
|
||||||
"tray"
|
"tray"
|
||||||
|
|
@ -82,26 +129,8 @@ in
|
||||||
format-linked = "";
|
format-linked = "";
|
||||||
format-disconnected = "";
|
format-disconnected = "";
|
||||||
};
|
};
|
||||||
"sway/workspaces" = {
|
"${workspaceModule}" = workspaceSettings;
|
||||||
enable-bar-scroll = true;
|
"${windowModule}" = {
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
"1" = "";
|
|
||||||
"2" = "";
|
|
||||||
"3" = "";
|
|
||||||
"4" = "";
|
|
||||||
"5" = "";
|
|
||||||
"6" = "";
|
|
||||||
"7" = "";
|
|
||||||
"8" = "";
|
|
||||||
"9" = "";
|
|
||||||
"10" = "";
|
|
||||||
urgent = "";
|
|
||||||
# focused = "";
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"sway/window" = {
|
|
||||||
max-length = 40;
|
max-length = 40;
|
||||||
};
|
};
|
||||||
"tray" = {
|
"tray" = {
|
||||||
|
|
@ -158,7 +187,7 @@ in
|
||||||
interval = 1;
|
interval = 1;
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
};
|
};
|
||||||
"sway/language" = {
|
"${languageModule}" = {
|
||||||
format = "{short} {variant}";
|
format = "{short} {variant}";
|
||||||
};
|
};
|
||||||
"custom/controller-battery" = {
|
"custom/controller-battery" = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue