mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
move to wayland
This commit is contained in:
@@ -89,8 +89,8 @@ in
|
|||||||
{
|
{
|
||||||
o = "${pkgs.xdg-utils}/bin/xdg-open";
|
o = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||||
ns = "nix-shell --run zsh";
|
ns = "nix-shell --run zsh";
|
||||||
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
|
pbcopy = "${pkgs.wl-clipboard}/bin/wl-copy";
|
||||||
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
|
pbpaste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
||||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||||
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
|
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
|
||||||
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
||||||
@@ -106,9 +106,14 @@ in
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
services.displayManager.cosmic-greeter.enable = false;
|
# services.displayManager.cosmic-greeter.enable = false;
|
||||||
services.desktopManager.cosmic.enable = true;
|
services.desktopManager.cosmic.enable = true;
|
||||||
services.system76-scheduler.enable = true;
|
# services.system76-scheduler.enable = true;
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = [ pkgs.xdg-desktop-portal-cosmic ];
|
||||||
|
};
|
||||||
|
|
||||||
users.users.applicative = {
|
users.users.applicative = {
|
||||||
name = "applicative";
|
name = "applicative";
|
||||||
@@ -148,26 +153,35 @@ in
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.applicative = {
|
home-manager.users.applicative =
|
||||||
xdg.enable = true;
|
lib.recursiveUpdate
|
||||||
home.stateVersion = "25.11";
|
(import ./graphical/home-manager.nix {
|
||||||
# programs.git = config.home-manager.users.me.programs.git;
|
inherit lib pkgs config;
|
||||||
# programs.alacritty = config.home-manager.users.me.programs.alacritty;
|
})
|
||||||
};
|
{
|
||||||
|
xdg.enable = true;
|
||||||
|
home.stateVersion = "25.11";
|
||||||
|
services.hyprpaper.enable = false;
|
||||||
|
# programs.git = config.home-manager.users.me.programs.git;
|
||||||
|
# programs.alacritty = config.home-manager.users.me.programs.alacritty;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
services.power-profiles-daemon.enable = true;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
services.displayManager = {
|
services.displayManager = {
|
||||||
autoLogin = {
|
autoLogin = {
|
||||||
enable = true;
|
enable = false;
|
||||||
user = config.users.users.me.name;
|
user = config.users.users.me.name;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = false;
|
||||||
displayManager.lightdm = {
|
displayManager.lightdm = {
|
||||||
enable = true;
|
enable = false;
|
||||||
greeters.gtk = {
|
greeters.gtk = {
|
||||||
enable = true;
|
enable = false;
|
||||||
indicators = [
|
indicators = [
|
||||||
"~spacer"
|
"~spacer"
|
||||||
"~host"
|
"~host"
|
||||||
@@ -261,8 +275,8 @@ in
|
|||||||
./hledger.nix
|
./hledger.nix
|
||||||
./htop.nix
|
./htop.nix
|
||||||
./uni.nix
|
./uni.nix
|
||||||
./i3.nix
|
# ./i3.nix
|
||||||
./hyprland.nix
|
./graphical
|
||||||
./i3status-rust.nix
|
./i3status-rust.nix
|
||||||
./keyboard
|
./keyboard
|
||||||
./kdeconnect.nix
|
./kdeconnect.nix
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.me.services.dunst = {
|
home-manager.users.me.services.dunst = {
|
||||||
enable = true;
|
enable = false;
|
||||||
iconTheme = pkgs.lib.niveum.theme.icon;
|
|
||||||
settings = {
|
settings = {
|
||||||
global = {
|
global = {
|
||||||
transparency = 10;
|
transparency = 10;
|
||||||
|
|||||||
92
configs/graphical/default.nix
Normal file
92
configs/graphical/default.nix
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
stylixColors = config.lib.stylix.colors;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
withUWSM = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
package = pkgs.hyprland;
|
||||||
|
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.ydotool.enable = true;
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = [
|
||||||
|
pkgs.xdg-desktop-portal-hyprland
|
||||||
|
pkgs.xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
config.common.default = "*";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.dbus = {
|
||||||
|
implementation = "broker";
|
||||||
|
# needed for GNOME services outside of GNOME (?)
|
||||||
|
packages = [ pkgs.gcr ];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.xdg-desktop-portal
|
||||||
|
pkgs.xdg-desktop-portal-hyprland
|
||||||
|
];
|
||||||
|
|
||||||
|
# services.displayManager.cosmic-greeter = {
|
||||||
|
# enable = true;
|
||||||
|
# wayland.enable = true;
|
||||||
|
# extraPackages = with pkgs.kdePackages; [
|
||||||
|
# qtmultimedia
|
||||||
|
# qtsvg
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
services.libinput = {
|
||||||
|
enable = true;
|
||||||
|
touchpad.tapping = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.regreet =
|
||||||
|
let
|
||||||
|
wallpaper =
|
||||||
|
pkgs.runCommand "textured-monochrome-wallpaper.png"
|
||||||
|
{
|
||||||
|
buildInputs = [ pkgs.imagemagick ];
|
||||||
|
}
|
||||||
|
''
|
||||||
|
magick -size 2560x1440 plasma:fractal \
|
||||||
|
-colorspace Gray \
|
||||||
|
-normalize \
|
||||||
|
-fill ${lib.escapeShellArg config.lib.stylix.colors.withHashtag.base00} -colorize 100% \
|
||||||
|
-attenuate 0.15 +noise Gaussian \
|
||||||
|
$out
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
background = {
|
||||||
|
path = wallpaper;
|
||||||
|
fit = "Fill";
|
||||||
|
};
|
||||||
|
appearance.greeting_msg = "स्वागतम्";
|
||||||
|
widget.clock.format = "%F %H:%M";
|
||||||
|
};
|
||||||
|
font = {
|
||||||
|
inherit (config.stylix.fonts.sansSerif) name;
|
||||||
|
size = config.stylix.fonts.sizes.applications;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
inherit (config.home-manager.users.me.gtk.iconTheme) package name;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.me = import ./home-manager.nix {
|
||||||
|
inherit lib pkgs config;
|
||||||
|
};
|
||||||
|
}
|
||||||
380
configs/graphical/home-manager.nix
Normal file
380
configs/graphical/home-manager.nix
Normal file
@@ -0,0 +1,380 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
klem = pkgs.klem.override {
|
||||||
|
options.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||||
|
options.scripts = {
|
||||||
|
"p.r paste" = pkgs.writers.writeDash "p.r" ''
|
||||||
|
${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \
|
||||||
|
| ${pkgs.coreutils}/bin/tail --lines=1 \
|
||||||
|
| ${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'
|
||||||
|
'';
|
||||||
|
"envs.sh paste" = pkgs.writers.writeDash "envs-host" ''
|
||||||
|
${pkgs.curl}/bin/curl -F "file=@-" https://envs.sh
|
||||||
|
'';
|
||||||
|
# this segfaults
|
||||||
|
# "envs.sh mirror" = pkgs.writers.writeDash "envs-mirror" ''
|
||||||
|
# ${pkgs.curl}/bin/curl -F "url=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
|
||||||
|
# '';
|
||||||
|
"envs.sh shorten" = pkgs.writers.writeDash "envs-shorten" ''
|
||||||
|
${pkgs.curl}/bin/curl -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
|
||||||
|
'';
|
||||||
|
"go.r shorten" = pkgs.writers.writeDash "go.r" ''
|
||||||
|
${pkgs.curl}/bin/curl -fSs http://go.r -F "uri=$(${pkgs.coreutils}/bin/cat)"
|
||||||
|
'';
|
||||||
|
"4d2.org paste" = pkgs.writers.writeDash "4d2-paste" ''
|
||||||
|
${pkgs.curl}/bin/curl -F "file=@-" https://depot.4d2.org/
|
||||||
|
'';
|
||||||
|
"0x0.st shorten" = pkgs.writers.writeDash "0x0.st" ''
|
||||||
|
${pkgs.curl}/bin/curl -fSs https://0x0.st -F "shorten=$(${pkgs.coreutils}/bin/cat)"
|
||||||
|
'';
|
||||||
|
"rot13" = pkgs.writers.writeDash "rot13" ''
|
||||||
|
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
|
||||||
|
'';
|
||||||
|
"ipa" = pkgs.writers.writeDash "ipa" ''
|
||||||
|
${pkgs.ipa}/bin/ipa
|
||||||
|
'';
|
||||||
|
"betacode" = pkgs.writers.writeDash "betacode" ''
|
||||||
|
${pkgs.betacode}/bin/betacode
|
||||||
|
'';
|
||||||
|
"curl" = pkgs.writers.writeDash "curl" ''
|
||||||
|
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
||||||
|
'';
|
||||||
|
ocr = pkgs.writers.writeDash "ocr" ''
|
||||||
|
${pkgs.tesseract4}/bin/tesseract -l eng+deu - stdout
|
||||||
|
'';
|
||||||
|
emojai = pkgs.writers.writeDash "emojai" ''
|
||||||
|
${pkgs.curl}/bin/curl https://www.emojai.app/api/generate -X POST -H 'Content-Type: application/json' --data-raw "$(${pkgs.jq}/bin/jq -sR '{emoji:.}')" | ${pkgs.jq}/bin/jq -r .result
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.mako.enable = true;
|
||||||
|
|
||||||
|
services.hyprsunset.enable = true;
|
||||||
|
|
||||||
|
programs.ashell = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
# position = "bottom";
|
||||||
|
modules = {
|
||||||
|
left = [
|
||||||
|
"Workspaces"
|
||||||
|
[
|
||||||
|
"WindowTitle"
|
||||||
|
]
|
||||||
|
[
|
||||||
|
"MediaPlayer"
|
||||||
|
]
|
||||||
|
];
|
||||||
|
center = [ "Clock" ];
|
||||||
|
right = [
|
||||||
|
"KeyboardLayout"
|
||||||
|
[
|
||||||
|
"Tray"
|
||||||
|
"SystemInfo"
|
||||||
|
"Settings"
|
||||||
|
]
|
||||||
|
];
|
||||||
|
};
|
||||||
|
workspaces = {
|
||||||
|
workspace_names =
|
||||||
|
let
|
||||||
|
arabic = [
|
||||||
|
"١"
|
||||||
|
"٢"
|
||||||
|
"٣"
|
||||||
|
"٤"
|
||||||
|
"٥"
|
||||||
|
"٦"
|
||||||
|
"٧"
|
||||||
|
"٨"
|
||||||
|
"٩"
|
||||||
|
"١٠"
|
||||||
|
];
|
||||||
|
hindi = [
|
||||||
|
"१"
|
||||||
|
"२"
|
||||||
|
"३"
|
||||||
|
"४"
|
||||||
|
"५"
|
||||||
|
"६"
|
||||||
|
"७"
|
||||||
|
"८"
|
||||||
|
"९"
|
||||||
|
"१०"
|
||||||
|
];
|
||||||
|
hebrew = [
|
||||||
|
"א"
|
||||||
|
"ב"
|
||||||
|
"ג"
|
||||||
|
"ד"
|
||||||
|
"ה"
|
||||||
|
"ו"
|
||||||
|
"ז"
|
||||||
|
"ח"
|
||||||
|
"ט"
|
||||||
|
"י"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
hindi;
|
||||||
|
visibility_mode = "MonitorSpecific";
|
||||||
|
enable_workspace_filling = false;
|
||||||
|
disable_special_workspaces = true;
|
||||||
|
};
|
||||||
|
keyboard_layout.labels = {
|
||||||
|
"de" = "🇩🇪";
|
||||||
|
};
|
||||||
|
window_title = {
|
||||||
|
mode = "Title";
|
||||||
|
truncate_title_after_length = 75;
|
||||||
|
};
|
||||||
|
media_player = {
|
||||||
|
max_title_length = 40;
|
||||||
|
};
|
||||||
|
system_info.indicators = [
|
||||||
|
"Cpu"
|
||||||
|
"Memory"
|
||||||
|
{ Disk = "/"; }
|
||||||
|
];
|
||||||
|
clock.format = "%Y-%m-%d (%W %a) %H:%M";
|
||||||
|
settings.indicators = [
|
||||||
|
"IdleInhibitor"
|
||||||
|
"PowerProfile"
|
||||||
|
"Audio"
|
||||||
|
"Bluetooth"
|
||||||
|
"Network"
|
||||||
|
"Vpn"
|
||||||
|
"Battery"
|
||||||
|
];
|
||||||
|
appearance = {
|
||||||
|
font_name = config.stylix.fonts.sansSerif.name;
|
||||||
|
backdrop = 0.3;
|
||||||
|
scale_factor = 0.85;
|
||||||
|
# style = "Solid";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.hyprpaper = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
ipc = "on";
|
||||||
|
splash = false;
|
||||||
|
preload = [ "${config.users.users.me.home}/.cache/wallpaper/wallpaper" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.hypridle = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||||
|
ignore_dbus_inhibit = false;
|
||||||
|
lock_cmd = "hyprlock";
|
||||||
|
};
|
||||||
|
listener = [
|
||||||
|
{
|
||||||
|
timeout = 900;
|
||||||
|
on-timeout = "hyprlock";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 1200;
|
||||||
|
on-timeout = "hyprctl dispatch dpms off";
|
||||||
|
on-resume = "hyprctl dispatch dpms on";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.hyprlock = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
animations.enabled = false;
|
||||||
|
general = {
|
||||||
|
hide_cursor = true;
|
||||||
|
ignore_empty_input = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
iconTheme = {
|
||||||
|
name = "Adwaita";
|
||||||
|
package = pkgs.adwaita-icon-theme;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland =
|
||||||
|
let
|
||||||
|
mod = "SUPER";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
systemd.enable = false;
|
||||||
|
systemd.variables = [ "--all" ];
|
||||||
|
settings = {
|
||||||
|
env = [
|
||||||
|
"XCURSOR_SIZE,${toString config.stylix.cursor.size}" # TODO
|
||||||
|
"HYPRCURSOR_SIZE,${toString config.stylix.cursor.size}" # TODO
|
||||||
|
"HYPRCURSOR_THEME,${config.stylix.cursor.name}"
|
||||||
|
"QT_QPA_PLATFORM=wayland"
|
||||||
|
"GDK_BACKEND=wayland"
|
||||||
|
"NIXOS_OZONE_WL=1"
|
||||||
|
"HYPRSHOT_DIR=${config.home-manager.users.me.xdg.userDirs.download}/screenshots"
|
||||||
|
];
|
||||||
|
permission = [
|
||||||
|
"${lib.getExe pkgs.hyprshot}, screencopy, allow"
|
||||||
|
"${pkgs.xdg-desktop-portal-hyprland}/libexec/.xdg-desktop-portal-hyprland-wrapped, screencopy, allow"
|
||||||
|
];
|
||||||
|
monitor = ",preferred,auto,1"; # TODO https://wiki.hypr.land/Configuring/Monitors/
|
||||||
|
exec-once = [
|
||||||
|
(lib.getExe pkgs.ashell)
|
||||||
|
"hyprctl dispatch exec \"[workspace special:उपलविशेषः silent] obsidian\""
|
||||||
|
"${lib.getExe' pkgs.wl-clipboard "wl-paste"} -t text --watch ${lib.getExe pkgs.clipman} store"
|
||||||
|
# (lib.getExe pkgs.hyprsunset)
|
||||||
|
# (lib.getExe pkgs.hyprpaper)
|
||||||
|
];
|
||||||
|
|
||||||
|
general = {
|
||||||
|
gaps_in = 2;
|
||||||
|
gaps_out = 2;
|
||||||
|
border_size = 1;
|
||||||
|
resize_on_border = true;
|
||||||
|
allow_tearing = false;
|
||||||
|
layout = "dwindle";
|
||||||
|
};
|
||||||
|
|
||||||
|
decoration = {
|
||||||
|
rounding = 2;
|
||||||
|
rounding_power = 2;
|
||||||
|
active_opacity = 1.0;
|
||||||
|
inactive_opacity = 1.0;
|
||||||
|
shadow = {
|
||||||
|
enabled = true;
|
||||||
|
range = 4;
|
||||||
|
render_power = 3;
|
||||||
|
};
|
||||||
|
blur = {
|
||||||
|
enabled = true;
|
||||||
|
size = 3;
|
||||||
|
passes = 1;
|
||||||
|
vibrancy = 0.17;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
animations = {
|
||||||
|
enabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
dwindle = {
|
||||||
|
pseudotile = true;
|
||||||
|
preserve_split = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
master.new_status = "master";
|
||||||
|
|
||||||
|
gesture = [
|
||||||
|
"3, horizontal, workspace"
|
||||||
|
];
|
||||||
|
|
||||||
|
input = {
|
||||||
|
kb_layout = "de";
|
||||||
|
kb_variant = "T3";
|
||||||
|
kb_options = "compose:caps,grp:ctrls_toggle";
|
||||||
|
follow_mouse = 1;
|
||||||
|
sensitivity = 0;
|
||||||
|
touchpad.natural_scroll = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
bindm = [
|
||||||
|
"${mod}, mouse:272, movewindow"
|
||||||
|
"${mod}, mouse:273, resizewindow"
|
||||||
|
];
|
||||||
|
bindel = [
|
||||||
|
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
|
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
|
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||||
|
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||||
|
",XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+"
|
||||||
|
",XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-"
|
||||||
|
", Print, exec, ${lib.getExe pkgs.hyprshot} -m region --clipboard-only"
|
||||||
|
"${mod}, Print, exec, ${lib.getExe pkgs.hyprshot} -m region"
|
||||||
|
];
|
||||||
|
bindl = [
|
||||||
|
", XF86AudioNext, exec, playerctl next"
|
||||||
|
", XF86AudioPause, exec, playerctl play-pause"
|
||||||
|
", XF86AudioPlay, exec, playerctl play-pause"
|
||||||
|
", XF86AudioPrev, exec, playerctl previous"
|
||||||
|
];
|
||||||
|
bind = [
|
||||||
|
"${mod}, Return, exec, ${lib.getExe pkgs.niveum-terminal}"
|
||||||
|
"${mod} SHIFT, Q, killactive,"
|
||||||
|
"${mod} SHIFT, R, exit,"
|
||||||
|
"${mod}, t, exec, ${lib.getExe pkgs.niveum-filemanager}"
|
||||||
|
"${mod}, Y, exec, ${lib.getExe pkgs.niveum-browser}"
|
||||||
|
"${mod}, Q, exec, ${lib.getExe pkgs.clipman} pick --tool=rofi"
|
||||||
|
"${mod}, u, exec, ${lib.getExe pkgs.unicodmenu}"
|
||||||
|
"${mod}, p, exec, ${lib.getExe pkgs.rofi-pass-wayland}"
|
||||||
|
"${mod} Shift, Z, togglefloating,"
|
||||||
|
"${mod}, D, exec, ${lib.getExe pkgs.rofi} -show run"
|
||||||
|
"${mod}, v, togglesplit," # dwindle
|
||||||
|
"${mod} SHIFT, V, pseudo," # dwindle
|
||||||
|
"${mod}, F, fullscreen"
|
||||||
|
"${mod}, h, movefocus, l"
|
||||||
|
"${mod}, l, movefocus, r"
|
||||||
|
"${mod}, k, movefocus, u"
|
||||||
|
"${mod}, j, movefocus, d"
|
||||||
|
"${mod}, F9, exec, hyprctl hyprsunset temperature -1000"
|
||||||
|
"${mod}, F10, exec, hyprctl hyprsunset temperature +1000" # reset color temperature
|
||||||
|
|
||||||
|
"${mod}, F12, exec, ${klem}/bin/klem"
|
||||||
|
"${mod} SHIFT, W, exec, hyprlock"
|
||||||
|
"${mod} SHIFT, H, movewindow, l"
|
||||||
|
"${mod} SHIFT, L, movewindow, r"
|
||||||
|
"${mod} SHIFT, K, movewindow, u"
|
||||||
|
"${mod} SHIFT, J, movewindow, d"
|
||||||
|
"${mod}, S, togglespecialworkspace, magic"
|
||||||
|
"${mod} SHIFT, S, movetoworkspace, special:magic"
|
||||||
|
"${mod}, O, togglespecialworkspace, उपलविशेषः"
|
||||||
|
"${mod} SHIFT, O, movetoworkspace, special:उपलविशेषः"
|
||||||
|
]
|
||||||
|
++ lib.concatMap (
|
||||||
|
i:
|
||||||
|
let
|
||||||
|
key = lib.mod i 10;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
"${mod}, ${toString key}, workspace, ${toString i}"
|
||||||
|
"${mod} SHIFT, ${toString key}, movetoworkspace, ${toString i}"
|
||||||
|
]
|
||||||
|
) (lib.range 1 10);
|
||||||
|
|
||||||
|
windowrule = [
|
||||||
|
"suppressevent maximize, class:.*" # ignore maximize requests from apps
|
||||||
|
"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" # fix some dragging issues with wayyland
|
||||||
|
|
||||||
|
"float,title:^(Picture-in-Picture)$"
|
||||||
|
"pin,title:^(Picture-in-Picture)$"
|
||||||
|
"size 640 360,title:^(Picture-in-Picture)$"
|
||||||
|
"move 100%-640 100%-360,title:^(Picture-in-Picture)$"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
bind = ${mod}, R, submap, resize
|
||||||
|
submap = resize
|
||||||
|
binde = , l, resizeactive, 10 0
|
||||||
|
binde = , h, resizeactive, -10 0
|
||||||
|
binde = , k, resizeactive, 0 -10
|
||||||
|
binde = , j, resizeactive, 0 10
|
||||||
|
bind = , escape, submap, reset
|
||||||
|
submap = reset
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,289 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
stylixColors = config.lib.stylix.colors;
|
|
||||||
ashellConfig = (pkgs.formats.toml { }).generate "config.toml" {
|
|
||||||
# position = "bottom";
|
|
||||||
modules = {
|
|
||||||
left = [
|
|
||||||
"Workspaces"
|
|
||||||
[
|
|
||||||
"WindowTitle"
|
|
||||||
]
|
|
||||||
];
|
|
||||||
center = [ "Clock" ];
|
|
||||||
right = [
|
|
||||||
"KeyboardLayout"
|
|
||||||
[
|
|
||||||
"Tray"
|
|
||||||
"SystemInfo"
|
|
||||||
"Settings"
|
|
||||||
"CustomNotifications"
|
|
||||||
]
|
|
||||||
];
|
|
||||||
};
|
|
||||||
workspaces = {
|
|
||||||
workspace_names = [
|
|
||||||
"١"
|
|
||||||
"٢"
|
|
||||||
"٣"
|
|
||||||
"٤"
|
|
||||||
"٥"
|
|
||||||
"٦"
|
|
||||||
"٧"
|
|
||||||
"٨"
|
|
||||||
"٩"
|
|
||||||
"١٠"
|
|
||||||
];
|
|
||||||
visibility_mode = "MonitorSpecific";
|
|
||||||
enable_workspace_filling = false;
|
|
||||||
disable_special_workspaces = true;
|
|
||||||
};
|
|
||||||
keyboard_layout.labels = {
|
|
||||||
"de" = "🇩🇪";
|
|
||||||
};
|
|
||||||
window_title = {
|
|
||||||
mode = "Title";
|
|
||||||
truncate_title_after_length = 75;
|
|
||||||
};
|
|
||||||
media_player = {
|
|
||||||
max_title_length = 40;
|
|
||||||
};
|
|
||||||
system_info.indicators = [
|
|
||||||
"Cpu"
|
|
||||||
"Memory"
|
|
||||||
{ Disk = "/"; }
|
|
||||||
];
|
|
||||||
clock.format = "%Y-%m-%d (%W %a) %H:%M";
|
|
||||||
settings.indicators = [
|
|
||||||
"IdleInhibitor"
|
|
||||||
"PowerProfile"
|
|
||||||
"Audio"
|
|
||||||
"Bluetooth"
|
|
||||||
"Network"
|
|
||||||
"Vpn"
|
|
||||||
"Battery"
|
|
||||||
];
|
|
||||||
appearance = {
|
|
||||||
font_name = config.stylix.fonts.sansSerif.name;
|
|
||||||
backdrop = 0.3;
|
|
||||||
scale_factor = 0.75;
|
|
||||||
# style = "Solid";
|
|
||||||
primary_color = "#" + stylixColors.base0D;
|
|
||||||
success_color = "#" + stylixColors.base0B;
|
|
||||||
text_color = "#" + stylixColors.base05;
|
|
||||||
workspace_colors = [ ("#" + stylixColors.base0E) ];
|
|
||||||
background_color = "#" + stylixColors.base00;
|
|
||||||
danger_color = "#" + stylixColors.base08;
|
|
||||||
secondary_color = "#" + stylixColors.base0A;
|
|
||||||
};
|
|
||||||
|
|
||||||
CustomModule = [
|
|
||||||
{
|
|
||||||
name = "CustomNotifications";
|
|
||||||
icon = "🔔";
|
|
||||||
command = "${lib.getExe' pkgs.swaynotificationcenter "swaync-client"} -t -sw";
|
|
||||||
listen_cmd = "${lib.getExe' pkgs.swaynotificationcenter "swaync-client"} -swb";
|
|
||||||
icons."dnd.*" = "🔕";
|
|
||||||
alert = ".*notification";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
withUWSM = true;
|
|
||||||
xwayland.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.me = {
|
|
||||||
home.file.".config/ashell/config.toml".source = ashellConfig;
|
|
||||||
|
|
||||||
services.swaync.enable = true;
|
|
||||||
|
|
||||||
services.mako.enable = true;
|
|
||||||
|
|
||||||
services.clipman.enable = true;
|
|
||||||
|
|
||||||
services.hyprsunset.enable = true;
|
|
||||||
|
|
||||||
services.hypridle = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
general = {
|
|
||||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
|
||||||
ignore_dbus_inhibit = false;
|
|
||||||
lock_cmd = "hyprlock";
|
|
||||||
};
|
|
||||||
listener = [
|
|
||||||
{
|
|
||||||
timeout = 900;
|
|
||||||
on-timeout = "hyprlock";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
timeout = 1200;
|
|
||||||
on-timeout = "hyprctl dispatch dpms off";
|
|
||||||
on-resume = "hyprctl dispatch dpms on";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
systemd.enable = !config.programs.hyprland.enable;
|
|
||||||
settings =
|
|
||||||
let
|
|
||||||
mod = "SUPER";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
env = [
|
|
||||||
"XCURSOR_SIZE,${toString config.stylix.cursor.size}" # TODO
|
|
||||||
"HYPRCURSOR_SIZE,${toString config.stylix.cursor.size}" # TODO
|
|
||||||
"HYPRCURSOR_THEME,${config.stylix.cursor.name}"
|
|
||||||
"QT_QPA_PLATFORM=wayland"
|
|
||||||
"GDK_BACKEND=wayland"
|
|
||||||
"HYPRSHOT_DIR=${config.home-manager.users.me.xdg.userDirs.download}/Screenshots"
|
|
||||||
];
|
|
||||||
permission = [
|
|
||||||
"${lib.getExe pkgs.hyprshot}, screencopy, allow"
|
|
||||||
"${pkgs.xdg-desktop-portal-hyprland}/libexec/.xdg-desktop-portal-hyprland-wrapped, screencopy, allow"
|
|
||||||
];
|
|
||||||
monitor = ",preferred,auto,auto"; # TODO https://wiki.hypr.land/Configuring/Monitors/
|
|
||||||
exec-once = [
|
|
||||||
(lib.getExe pkgs.ashell)
|
|
||||||
"hyprctl dispatch exec \"[workspace special:obsidian silent] obsidian\""
|
|
||||||
];
|
|
||||||
|
|
||||||
general = {
|
|
||||||
gaps_in = 2;
|
|
||||||
gaps_out = 2;
|
|
||||||
border_size = 1;
|
|
||||||
resize_on_border = true;
|
|
||||||
allow_tearing = false;
|
|
||||||
layout = "dwindle";
|
|
||||||
};
|
|
||||||
|
|
||||||
decoration = {
|
|
||||||
rounding = 2;
|
|
||||||
rounding_power = 2;
|
|
||||||
active_opacity = 1.0;
|
|
||||||
inactive_opacity = 0.9;
|
|
||||||
shadow = {
|
|
||||||
enabled = true;
|
|
||||||
range = 4;
|
|
||||||
render_power = 3;
|
|
||||||
};
|
|
||||||
blur = {
|
|
||||||
enabled = true;
|
|
||||||
size = 3;
|
|
||||||
passes = 1;
|
|
||||||
vibrancy = 0.17;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
animations = {
|
|
||||||
enabled = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
dwindle = {
|
|
||||||
pseudotile = true;
|
|
||||||
preserve_split = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
master.new_status = "master";
|
|
||||||
|
|
||||||
gesture = [
|
|
||||||
"3, horizontal, workspace"
|
|
||||||
];
|
|
||||||
|
|
||||||
input = {
|
|
||||||
kb_layout = "de";
|
|
||||||
kb_variant = "T3";
|
|
||||||
kb_options = "compose:caps,grp:ctrls_toggle";
|
|
||||||
follow_mouse = 1;
|
|
||||||
sensitivity = 0;
|
|
||||||
touchpad.natural_scroll = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
bindm = [
|
|
||||||
"${mod}, mouse:272, movewindow"
|
|
||||||
"${mod}, mouse:273, resizewindow"
|
|
||||||
];
|
|
||||||
bindel = [
|
|
||||||
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
|
||||||
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
|
||||||
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
|
||||||
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
|
||||||
",XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+"
|
|
||||||
",XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-"
|
|
||||||
", Print, exec, ${lib.getExe pkgs.hyprshot} -m region --clipboard-only"
|
|
||||||
"${mod}, Print, exec, ${lib.getExe pkgs.hyprshot} -m region"
|
|
||||||
];
|
|
||||||
bindl = [
|
|
||||||
", XF86AudioNext, exec, playerctl next"
|
|
||||||
", XF86AudioPause, exec, playerctl play-pause"
|
|
||||||
", XF86AudioPlay, exec, playerctl play-pause"
|
|
||||||
", XF86AudioPrev, exec, playerctl previous"
|
|
||||||
];
|
|
||||||
bind = [
|
|
||||||
"${mod}, Return, exec, ${lib.getExe pkgs.niveum-terminal}"
|
|
||||||
"${mod} SHIFT, Q, killactive,"
|
|
||||||
"${mod} SHIFT, R, exit,"
|
|
||||||
"${mod}, t, exec, ${lib.getExe pkgs.niveum-filemanager}"
|
|
||||||
"${mod}, Y, exec, ${lib.getExe pkgs.niveum-browser}"
|
|
||||||
"${mod}, Q, exec, ${lib.getExe pkgs.clipman} pick --tool=${lib.getExe pkgs.rofi}"
|
|
||||||
"${mod}, u, exec, ${lib.getExe pkgs.unicodmenu}"
|
|
||||||
"${mod}, p, exec, rofi-pass"
|
|
||||||
"${mod} Shift, Z, togglefloating,"
|
|
||||||
"${mod}, D, exec, ${lib.getExe pkgs.rofi} -show run"
|
|
||||||
"${mod}, P, pseudo," # dwindle
|
|
||||||
"${mod}, v, togglesplit," # dwindle
|
|
||||||
"${mod}, F, fullscreen"
|
|
||||||
"${mod}, h, movefocus, l"
|
|
||||||
"${mod}, l, movefocus, r"
|
|
||||||
"${mod}, k, movefocus, u"
|
|
||||||
"${mod}, j, movefocus, d"
|
|
||||||
"${mod} SHIFT, H, movewindow, l"
|
|
||||||
"${mod} SHIFT, L, movewindow, r"
|
|
||||||
"${mod} SHIFT, K, movewindow, u"
|
|
||||||
"${mod} SHIFT, J, movewindow, d"
|
|
||||||
"${mod}, S, togglespecialworkspace, magic"
|
|
||||||
"${mod} SHIFT, S, movetoworkspace, special:magic"
|
|
||||||
"${mod}, O, togglespecialworkspace, obsidian"
|
|
||||||
"${mod} SHIFT, O, movetoworkspace, special:obsidian"
|
|
||||||
]
|
|
||||||
++ lib.concatMap (
|
|
||||||
i:
|
|
||||||
let
|
|
||||||
key = lib.mod i 10;
|
|
||||||
in
|
|
||||||
[
|
|
||||||
"${mod}, ${toString key}, workspace, ${toString i}"
|
|
||||||
"${mod} SHIFT, ${toString key}, movetoworkspace, ${toString i}"
|
|
||||||
]
|
|
||||||
) (lib.range 1 10);
|
|
||||||
|
|
||||||
windowrule = [
|
|
||||||
"suppressevent maximize, class:.*" # ignore maximize requests from apps
|
|
||||||
"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" # fix some dragging issues with wayyland
|
|
||||||
|
|
||||||
"float,title:^(Picture-in-Picture)$"
|
|
||||||
"pin,title:^(Picture-in-Picture)$"
|
|
||||||
"size 640 360,title:^(Picture-in-Picture)$"
|
|
||||||
"move 100%-640 100%-360,title:^(Picture-in-Picture)$"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -116,6 +116,7 @@ in
|
|||||||
swaymsg -s $SWAYSOCK 'input * xkb_variant "${defaultLanguage.variant},${variant}"'
|
swaymsg -s $SWAYSOCK 'input * xkb_variant "${defaultLanguage.variant},${variant}"'
|
||||||
swaymsg -s $SWAYSOCK 'input * xkb_options "${lib.concatStringsSep "," xkbOptions}"'
|
swaymsg -s $SWAYSOCK 'input * xkb_options "${lib.concatStringsSep "," xkbOptions}"'
|
||||||
elif [ -n "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
|
elif [ -n "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
|
||||||
|
hyprctl keyword input:kb_variant "" # otherwise we end up with an invalid combination for a short while
|
||||||
hyprctl keyword input:kb_layout "${defaultLanguage.code},${code}"
|
hyprctl keyword input:kb_layout "${defaultLanguage.code},${code}"
|
||||||
hyprctl keyword input:kb_variant "${defaultLanguage.variant},${variant}"
|
hyprctl keyword input:kb_variant "${defaultLanguage.variant},${variant}"
|
||||||
elif [ -n "$DISPLAY" ]; then
|
elif [ -n "$DISPLAY" ]; then
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ in
|
|||||||
bat # better cat
|
bat # better cat
|
||||||
dos2unix
|
dos2unix
|
||||||
genpass # generate passwords
|
genpass # generate passwords
|
||||||
(pkgs.writers.writeDashBin "genpassphrase" ''${pkgs.genpass}/bin/genpass --passphrase | ${pkgs.gnused}/bin/sed 's/ /-/g;s/\(^\|-\)\([a-z]\)/\1\U\2/g;s/$/-'$(${pkgs.coreutils}/bin/date +%Y)'/' '')
|
(pkgs.writers.writeDashBin "genpassphrase" ''${pkgs.genpass}/bin/genpass "$@" --passphrase | ${pkgs.gnused}/bin/sed 's/ /-/g;s/\(^\|-\)\([a-z]\)/\1\U\2/g;s/$/-'$(${pkgs.coreutils}/bin/date +%Y)'/' '')
|
||||||
gcc
|
gcc
|
||||||
python3Packages.jsonschema # json validation
|
python3Packages.jsonschema # json validation
|
||||||
pup # html toolkit
|
pup # html toolkit
|
||||||
@@ -102,9 +102,8 @@ in
|
|||||||
arandr # xrandr for noobs
|
arandr # xrandr for noobs
|
||||||
wdisplays
|
wdisplays
|
||||||
libnotify # for notify-send
|
libnotify # for notify-send
|
||||||
xclip # clipboard CLI
|
wl-clipboard # clipboard CLI
|
||||||
dragon-drop # drag and drop
|
dragon-drop # drag and drop
|
||||||
xorg.xkill # kill by clicking
|
|
||||||
portfolio # personal finance overview
|
portfolio # personal finance overview
|
||||||
audacity
|
audacity
|
||||||
calibre
|
calibre
|
||||||
@@ -245,7 +244,7 @@ in
|
|||||||
text2pdf
|
text2pdf
|
||||||
lowdown
|
lowdown
|
||||||
glow # markdown to term
|
glow # markdown to term
|
||||||
libreoffice
|
libreoffice-qt6-fresh
|
||||||
# gnumeric
|
# gnumeric
|
||||||
dia
|
dia
|
||||||
pandoc
|
pandoc
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
# dracula # https://draculatheme.com/
|
# dracula # https://draculatheme.com/
|
||||||
# }.yaml";
|
# }.yaml";
|
||||||
|
|
||||||
|
|
||||||
stylix.fonts = {
|
stylix.fonts = {
|
||||||
serif = {
|
serif = {
|
||||||
package = pkgs.noto-fonts;
|
package = pkgs.noto-fonts;
|
||||||
@@ -65,7 +66,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
sizes = {
|
sizes = {
|
||||||
terminal = 6;
|
terminal = 10;
|
||||||
applications = 10;
|
applications = 10;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,18 +12,26 @@ in
|
|||||||
systemd.user.services.wallpaper = {
|
systemd.user.services.wallpaper = {
|
||||||
wantedBy = [ "graphical-session.target" ];
|
wantedBy = [ "graphical-session.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
path = [
|
||||||
|
pkgs.curl
|
||||||
|
pkgs.hyprland
|
||||||
|
];
|
||||||
script = ''
|
script = ''
|
||||||
set -euf
|
set -euf
|
||||||
|
|
||||||
mkdir -p ${stateDir}
|
mkdir -p ${stateDir}
|
||||||
chmod o+rx ${stateDir}
|
chmod o+rx ${stateDir}
|
||||||
cd ${stateDir}
|
cd ${stateDir}
|
||||||
(${pkgs.curl}/bin/curl -s -o wallpaper.tmp -z wallpaper.tmp ${lib.escapeShellArg url} && cp wallpaper.tmp wallpaper) || :
|
(${pkgs.curl}/bin/curl -s -o wallpaper.tmp -z wallpaper.tmp ${lib.escapeShellArg url} && cp wallpaper.tmp wallpaper.png) || :
|
||||||
${pkgs.feh}/bin/feh --no-fehbg --bg-scale wallpaper
|
hyprctl hyprpaper preload ${stateDir}/wallpaper.png
|
||||||
|
hyprctl hyprpaper wallpaper ",${stateDir}/wallpaper.png"
|
||||||
|
sleep 5
|
||||||
|
hyprctl hyprpaper unload unused
|
||||||
|
true
|
||||||
'';
|
'';
|
||||||
startAt = "*:00,10,20,30,40,50";
|
startAt = "*:00,10,20,30,40,50";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = "always";
|
Restart = "on-failure";
|
||||||
RestartSec = "15s";
|
RestartSec = "15s";
|
||||||
StartLimitBurst = 0;
|
StartLimitBurst = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -54,21 +54,6 @@ in
|
|||||||
|
|
||||||
sshPort = 22022;
|
sshPort = 22022;
|
||||||
|
|
||||||
theme = {
|
|
||||||
gtk = {
|
|
||||||
name = "Adwaita-dark";
|
|
||||||
package = pkgs.gnome-themes-extra;
|
|
||||||
};
|
|
||||||
icon = {
|
|
||||||
name = "Adwaita";
|
|
||||||
package = pkgs.adwaita-icon-theme;
|
|
||||||
};
|
|
||||||
cursor = {
|
|
||||||
name = "capitaine-cursors-white";
|
|
||||||
package = pkgs.capitaine-cursors;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
retiolumAddresses = lib.mapAttrs (_: v: { inherit (v.retiolum) ipv4 ipv6; }) (
|
retiolumAddresses = lib.mapAttrs (_: v: { inherit (v.retiolum) ipv4 ipv6; }) (
|
||||||
lib.filterAttrs (_: v: v ? "retiolum") machines
|
lib.filterAttrs (_: v: v ? "retiolum") machines
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
dmenu,
|
dmenu,
|
||||||
gawk,
|
gawk,
|
||||||
libnotify,
|
libnotify,
|
||||||
xclip,
|
wl-clipboard,
|
||||||
khard,
|
khard,
|
||||||
}:
|
}:
|
||||||
writers.writeDashBin "emailmenu" ''
|
writers.writeDashBin "emailmenu" ''
|
||||||
@@ -16,11 +16,11 @@ writers.writeDashBin "emailmenu" ''
|
|||||||
dmenu
|
dmenu
|
||||||
gawk
|
gawk
|
||||||
libnotify
|
libnotify
|
||||||
xclip
|
wl-clipboard
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
chosen=$(${khard}/bin/khard email --parsable | awk '!seen[$0]++' | dmenu -i -p 📧 -1 -l 10 | tee --append "$history_file" | cut -f1)
|
chosen=$(${khard}/bin/khard email --parsable | awk '!seen[$0]++' | dmenu -i -p 📧 -1 -l 10 | tee --append "$history_file" | cut -f1)
|
||||||
[ "$chosen" != "" ] || exit
|
[ "$chosen" != "" ] || exit
|
||||||
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
|
echo "$chosen" | tr -d '\n' | wl-copy
|
||||||
notify-send --app-name="$(basename "$0")" "'$chosen' copied to clipboard." &
|
notify-send --app-name="$(basename "$0")" "'$chosen' copied to clipboard." &
|
||||||
''
|
''
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
curl,
|
curl,
|
||||||
gnused,
|
gnused,
|
||||||
coreutils,
|
coreutils,
|
||||||
xclip,
|
wl-clipboard,
|
||||||
libnotify,
|
libnotify,
|
||||||
writers,
|
writers,
|
||||||
options ? { },
|
options ? { },
|
||||||
@@ -17,14 +17,6 @@ let
|
|||||||
{
|
{
|
||||||
imports = [ options ];
|
imports = [ options ];
|
||||||
options = {
|
options = {
|
||||||
selection = lib.mkOption {
|
|
||||||
default = "clipboard";
|
|
||||||
type = lib.types.enum [
|
|
||||||
"primary"
|
|
||||||
"secondary"
|
|
||||||
"clipboard"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
dmenu = lib.mkOption {
|
dmenu = lib.mkOption {
|
||||||
default = "${dmenu}/bin/dmenu -i -p klem";
|
default = "${dmenu}/bin/dmenu -i -p klem";
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
@@ -49,7 +41,7 @@ in
|
|||||||
writers.writeDashBin "klem" ''
|
writers.writeDashBin "klem" ''
|
||||||
set -efu
|
set -efu
|
||||||
|
|
||||||
${xclip}/bin/xclip -selection ${cfg.selection} -out \
|
${wl-clipboard}/bin/wl-paste \
|
||||||
| case $(echo "${lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)}" | ${cfg.dmenu}) in
|
| case $(echo "${lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)}" | ${cfg.dmenu}) in
|
||||||
${lib.concatStringsSep "\n" (
|
${lib.concatStringsSep "\n" (
|
||||||
lib.mapAttrsToList (option: script: ''
|
lib.mapAttrsToList (option: script: ''
|
||||||
@@ -58,7 +50,7 @@ writers.writeDashBin "klem" ''
|
|||||||
)}
|
)}
|
||||||
*) ${coreutils}/bin/cat ;;
|
*) ${coreutils}/bin/cat ;;
|
||||||
esac \
|
esac \
|
||||||
| ${xclip}/bin/xclip -selection ${cfg.selection} -in
|
| ${wl-clipboard}/bin/wl-copy
|
||||||
|
|
||||||
${libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard."
|
${libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard."
|
||||||
''
|
''
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
di-fm-key-file,
|
di-fm-key-file,
|
||||||
radioStreams,
|
radioStreams,
|
||||||
executableName ? "mpv-radio",
|
executableName ? "mpv-radio",
|
||||||
mpvCommand ? "${mpv}/bin/mpv --force-window=yes",
|
mpvCommand ? "${mpv}/bin/mpv",
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
streams = radioStreams.override {
|
streams = radioStreams.override {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
writers,
|
writers,
|
||||||
mktemp,
|
mktemp,
|
||||||
qrencode,
|
qrencode,
|
||||||
xclip,
|
wl-clipboard,
|
||||||
nsxiv,
|
nsxiv,
|
||||||
}:
|
}:
|
||||||
writers.writeDashBin "qrpaste" ''
|
writers.writeDashBin "qrpaste" ''
|
||||||
@@ -11,6 +11,6 @@ writers.writeDashBin "qrpaste" ''
|
|||||||
clean() {
|
clean() {
|
||||||
rm "$file"
|
rm "$file"
|
||||||
}
|
}
|
||||||
${qrencode}/bin/qrencode "$(${xclip}/bin/xclip -selection clipboard -out)" -o "$file"
|
${qrencode}/bin/qrencode "$(${wl-clipboard}/bin/wl-paste)" -o "$file"
|
||||||
${nsxiv}/bin/nsxiv "$file"
|
${nsxiv}/bin/nsxiv "$file"
|
||||||
''
|
''
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
writers,
|
writers,
|
||||||
xclip,
|
wl-clipboard,
|
||||||
espeak,
|
espeak,
|
||||||
}:
|
}:
|
||||||
writers.writeDashBin "ttspaste" ''
|
writers.writeDashBin "ttspaste" ''
|
||||||
${xclip}/bin/xclip -selection clipboard -out | ${espeak}/bin/espeak
|
${wl-clipboard}/bin/wl-paste | ${espeak}/bin/espeak
|
||||||
''
|
''
|
||||||
# curl, mpv,
|
# curl, mpv,
|
||||||
# ${curl}/bin/curl -G http://tts.r/api/tts --data-urlencode 'text@-' | ${mpv}/bin/mpv -
|
# ${curl}/bin/curl -G http://tts.r/api/tts --data-urlencode 'text@-' | ${mpv}/bin/mpv -
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
dmenu,
|
dmenu,
|
||||||
gnused,
|
gnused,
|
||||||
libnotify,
|
libnotify,
|
||||||
xclip,
|
wl-clipboard,
|
||||||
xdotool,
|
xdotool,
|
||||||
gawk,
|
gawk,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
@@ -113,7 +113,7 @@ writers.writeDashBin "unicodmenu" ''
|
|||||||
gawk
|
gawk
|
||||||
gnused
|
gnused
|
||||||
libnotify
|
libnotify
|
||||||
xclip
|
wl-clipboard
|
||||||
xdotool
|
xdotool
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ writers.writeDashBin "unicodmenu" ''
|
|||||||
|
|
||||||
[ "$chosen" != "" ] || exit
|
[ "$chosen" != "" ] || exit
|
||||||
|
|
||||||
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
|
echo "$chosen" | tr -d '\n' | wl-copy
|
||||||
|
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
xdotool key Shift+Insert
|
xdotool key Shift+Insert
|
||||||
|
|||||||
@@ -41,11 +41,6 @@
|
|||||||
device = "/dev/disk/by-uuid/D4AC-91B0";
|
device = "/dev/disk/by-uuid/D4AC-91B0";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
"/mnt/sd-card" = {
|
|
||||||
device = "/dev/disk/by-id/mmc-5E4S5_0x4c585d15-part1";
|
|
||||||
fsType = "ext4";
|
|
||||||
options = [ "nofail" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|||||||
Reference in New Issue
Block a user