Set up a launcher
This commit is contained in:
parent
e2c2928585
commit
782a7be91d
|
@ -38,6 +38,8 @@ with lib; {
|
||||||
"${config.home.homeDirectory}/.config/nixpkgs"
|
"${config.home.homeDirectory}/.config/nixpkgs"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
systemd.user.startServices = "sd-switch";
|
||||||
|
|
||||||
# Bluetooth controls
|
# Bluetooth controls
|
||||||
services.mpris-proxy.enable = true;
|
services.mpris-proxy.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
|
|
||||||
home.sessionPath = [
|
home.sessionPath = [
|
||||||
# Sometimes we want to install custom scripts here
|
# Sometimes we want to install custom scripts here
|
||||||
"~/.local/bin"
|
"${config.home.homeDirectory}/.local/bin"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
# More packages
|
# More packages
|
||||||
home.packages = (with pkgs; [
|
home.packages = (with pkgs; [
|
||||||
# CLI stuff
|
# CLI stuff
|
||||||
python
|
|
||||||
zip
|
zip
|
||||||
# TeX
|
# TeX
|
||||||
texlive.combined.scheme-full
|
texlive.combined.scheme-full
|
||||||
|
|
|
@ -6,6 +6,8 @@ let
|
||||||
birdtray = pkgs.birdtray.overrideAttrs (attrs: {
|
birdtray = pkgs.birdtray.overrideAttrs (attrs: {
|
||||||
cmakeFlags = [ "-DOPT_THUNDERBIRD_CMDLINE=${pkgs.thunderbird}/bin/thunderbird" ];
|
cmakeFlags = [ "-DOPT_THUNDERBIRD_CMDLINE=${pkgs.thunderbird}/bin/thunderbird" ];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
alwaysStartup = with pkgs; [ birdtray ];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./x11.nix ./wayland.nix ./alacritty.nix ];
|
imports = [ ./x11.nix ./wayland.nix ./alacritty.nix ];
|
||||||
|
@ -20,6 +22,11 @@ in
|
||||||
description = "Path to the wallpaper file";
|
description = "Path to the wallpaper file";
|
||||||
default = "";
|
default = "";
|
||||||
};
|
};
|
||||||
|
startup = mkOption {
|
||||||
|
type = types.listOf types.package;
|
||||||
|
description = "List of packages to include in ~/.config/autostart";
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = mkIf (cfg.type != null) {
|
config = mkIf (cfg.type != null) {
|
||||||
# Packages
|
# Packages
|
||||||
|
@ -100,6 +107,24 @@ in
|
||||||
# Set up Java font style
|
# Set up Java font style
|
||||||
_JAVA_OPTIONS = "-Dawt.useSystemAAFontSettings=lcd";
|
_JAVA_OPTIONS = "-Dawt.useSystemAAFontSettings=lcd";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.configFile =
|
||||||
|
let
|
||||||
|
f = pkg: {
|
||||||
|
name = "autostart/${pkg.name}.desktop";
|
||||||
|
value = {
|
||||||
|
source =
|
||||||
|
let
|
||||||
|
srcFile = pkgs.runCommand "${pkg.name}-startup" { } ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp $(ls -d ${pkg}/share/applications/*.desktop | head -n 1) $out/${pkg.name}.desktop
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
"${srcFile}/${pkg.name}.desktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
listToAttrs (map f (cfg.startup ++ alwaysStartup));
|
||||||
# IBus configuration
|
# IBus configuration
|
||||||
# dconf.settings."desktop/ibus/general" = {
|
# dconf.settings."desktop/ibus/general" = {
|
||||||
# engines-order = hm.gvariant.mkArray hm.gvariant.type.string [ "xkb:jp::jpn" "mozc-jp" "Bamboo" ];
|
# engines-order = hm.gvariant.mkArray hm.gvariant.type.string [ "xkb:jp::jpn" "mozc-jp" "Bamboo" ];
|
||||||
|
|
|
@ -129,7 +129,7 @@ in
|
||||||
{ command = "systemctl --user restart waybar"; always = true; }
|
{ command = "systemctl --user restart waybar"; always = true; }
|
||||||
# Startup programs
|
# Startup programs
|
||||||
{ command = "${cfg.browser}"; }
|
{ command = "${cfg.browser}"; }
|
||||||
{ command = "birdtray"; }
|
{ command = "env PYTHONPATH=$(python -m site --user-site) ${pkgs.ulauncher}/bin/ulauncher --hide-window --no-window-shadow"; }
|
||||||
] ++ (if cfg.discord != null then [
|
] ++ (if cfg.discord != null then [
|
||||||
{ command = "${cfg.discord}"; }
|
{ command = "${cfg.discord}"; }
|
||||||
] ++ lib.lists.optional
|
] ++ lib.lists.optional
|
||||||
|
@ -177,7 +177,6 @@ in
|
||||||
"${mod}+e" = "layout toggle split";
|
"${mod}+e" = "layout toggle split";
|
||||||
# Floating
|
# Floating
|
||||||
"${mod}+Shift+space" = "floating toggle";
|
"${mod}+Shift+space" = "floating toggle";
|
||||||
"${mod}+space" = "focus mode_toggle";
|
|
||||||
# Scratchpad
|
# Scratchpad
|
||||||
"${mod}+Shift+minus" = "move scratchpad";
|
"${mod}+Shift+minus" = "move scratchpad";
|
||||||
# Resize
|
# Resize
|
||||||
|
@ -187,6 +186,8 @@ in
|
||||||
"${mod}+Shift+c" = "reload";
|
"${mod}+Shift+c" = "reload";
|
||||||
"${mod}+Shift+e" =
|
"${mod}+Shift+e" =
|
||||||
"exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
|
"exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
|
||||||
|
# Launcher
|
||||||
|
"${mod}+space" = "exec ${pkgs.ulauncher}/bin/ulauncher-toggle";
|
||||||
} // {
|
} // {
|
||||||
## Splits
|
## Splits
|
||||||
"${mod}+v" = "split v";
|
"${mod}+v" = "split v";
|
||||||
|
@ -651,6 +652,8 @@ in
|
||||||
qt5.qtwayland
|
qt5.qtwayland
|
||||||
# For waybar
|
# For waybar
|
||||||
font-awesome
|
font-awesome
|
||||||
|
# For launcher
|
||||||
|
ulauncher
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue