autostart
This commit is contained in:
parent
09a3669b57
commit
693af2e90a
|
|
@ -1,7 +1,24 @@
|
|||
{config, ...}: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../../../user
|
||||
];
|
||||
|
||||
home.username = "ahnwuoa";
|
||||
services.activitywatch = {
|
||||
enable = true;
|
||||
watchers = {
|
||||
aw-watcher-afk.package = pkgs.activitywatch;
|
||||
aw-watcher-window.package = pkgs.activitywatch;
|
||||
};
|
||||
};
|
||||
systemd.user.targets.activitywatch = {
|
||||
Unit.Requires = lib.mkForce ["autostart.target"];
|
||||
Unit.After = lib.mkForce ["autostart.target"];
|
||||
Install.WantedBy = lib.mkForce ["autostart.target"];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,4 @@
|
|||
package = pkgs.libsForQt5.partitionmanager;
|
||||
};
|
||||
services.udisks2.enable = true;
|
||||
systemd.user.services = {
|
||||
plasma-kactivitymanagerd.enable = false;
|
||||
plasma-xdg-desktop-portal-kde.enable = false;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
22
user/autostart.nix
Normal file
22
user/autostart.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{pkgs, pkgs-stable, ...}: {
|
||||
systemd.user.targets.autostart = {
|
||||
Unit = {
|
||||
Wants = [
|
||||
"plasma-polkit-agent.service"
|
||||
"plasma-xdg-desktop-portal-kde.service"
|
||||
"plasma-dolphin.service"
|
||||
"xdg-desktop-portal.service"
|
||||
"copyq.service"
|
||||
"fcitx5.service"
|
||||
"picom.service"
|
||||
"safeeyes.service"
|
||||
];
|
||||
};
|
||||
};
|
||||
systemd.user.services = {
|
||||
copyq.Service.ExecStart = ["${pkgs.copyq}/bin/copyq"];
|
||||
fcitx5.Service.ExecStart = ["/run/current-system/sw/bin/fcitx5"];
|
||||
picom.Service.ExecStart = ["${pkgs.picom}/bin/picom"];
|
||||
safeeyes.Service.ExecStart = ["${pkgs-stable.safeeyes}/bin/safeeyes"];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,47 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
# set keyboard repeat rate
|
||||
xset r rate 200 30
|
||||
|
||||
# monitor settings
|
||||
xrandr --output DisplayPort-1 --mode 1920x1080 --rate 144
|
||||
|
||||
# tablet settings
|
||||
xsetwacom set "Wacom One by Wacom S Pen stylus" MapToOutput DisplayPort-0
|
||||
|
||||
# set color temperature
|
||||
sct 4500
|
||||
|
||||
# compositor
|
||||
picom &
|
||||
|
||||
LIBEXEC=/run/current-system/sw/libexec
|
||||
[ -d "$LIBEXEC" ] || LIBEXEC=/usr/lib
|
||||
# session manager
|
||||
"$LIBEXEC"/polkit-kde-authentication-agent-1 &
|
||||
# desktop portal
|
||||
"$LIBEXEC"/xdg-desktop-portal-kde &
|
||||
"$LIBEXEC"/xdg-desktop-portal &
|
||||
kded5 &
|
||||
|
||||
# ime
|
||||
export QT_QPA_PLATFORMTHEME="qt6ct"
|
||||
export GTK_IM_MODULE=fctix
|
||||
export QT_IM_MODULE=fcitx
|
||||
export XMODIFIERS=@im=fcitx
|
||||
fcitx5 &
|
||||
|
||||
# file manager daemon
|
||||
dolphin --daemon &
|
||||
|
||||
# qt setting
|
||||
export QT_QPA_PLATFORMTHEME="qt6ct"
|
||||
# same dpi for multi monitor
|
||||
export WINIT_X11_SCALE_FACTOR=1
|
||||
|
||||
safeeyes &
|
||||
|
||||
copyq &
|
||||
_vars="DBUS_SESSION_BUS_ADDRESS DISPLAY SSH_AUTH_SOCK XAUTHORITY XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID QT_PLUGIN_PATH QML2_IMPORT_PATH QT_QPA_PLATFORMTHEME QT_STYLE_OVERRIDE NIX_XDG_DESKTOP_PORTAL_DIR"
|
||||
systemctl --user import-environment $_vars
|
||||
dbus-update-activation-environment $_vars
|
||||
|
||||
xrdb -merge ~/.config/Xresources
|
||||
xset r rate 200 30
|
||||
xrandr --output DisplayPort-1 --mode 1920x1080 --rate 144
|
||||
xsetwacom set "Wacom One by Wacom S Pen stylus" MapToOutput DisplayPort-0
|
||||
sct 4500
|
||||
|
||||
systemctl --user start autostart.target
|
||||
|
||||
exec ${@:-awesome}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./autostart.nix
|
||||
./bin
|
||||
./config
|
||||
./home.nix
|
||||
|
|
|
|||
Loading…
Reference in a new issue