diff --git a/home-manager.nix b/home-manager.nix index e328f8a..4627a18 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -46,6 +46,7 @@ # if you don't want to manage your shell through Home Manager. home.sessionVariables = { EDITOR = "nvim"; + NIXOS_OZONE_WL = "1"; QT_QPA_PLATFORM = "wayland"; }; @@ -85,6 +86,7 @@ zathura # Personal utilities + anki ledger vesktop @@ -109,6 +111,7 @@ # Games mindustry-wayland + prismlauncher shattered-pixel-dungeon xonotic @@ -301,6 +304,7 @@ # Configure XDG xdg.mimeApps.defaultApplications = { + "inode/directory" = [ "thunar.desktop" ]; "text/html" = [ "firefox.desktop" ]; "video/mp4" = [ "vlc.desktop" ]; "video/x-matroska" = [ "vlc.desktop" ]; diff --git a/nixos.nix b/nixos.nix index 5bbd4b2..703e288 100644 --- a/nixos.nix +++ b/nixos.nix @@ -151,6 +151,12 @@ in # Define system-wide variables. environment.variables = { }; + # Define variables that will be initialized in PAM. + environment.sessionVariables = { + # Set env for Fcitx5 + QMODIFIERS = "@im=fcitx5"; + }; + # Set fish as the default shell for all users. users.defaultUserShell = pkgs.fish; @@ -304,6 +310,22 @@ in services.gvfs.enable = true; # For mounting drives, trash, etc. services.tumbler.enable = true; # Thumbnail support + # Enable the Fcitx5 IME + i18n.inputMethod = { + enable = true; + type = "fcitx5"; + + fcitx5 = { + addons = with pkgs; [ + fcitx5-mozc + fcitx5-gtk + fcitx5-catppuccin + ]; + + waylandFrontend = true; + }; + }; + ## ## SOUND # ## diff --git a/programs/hyprland/default.nix b/programs/hyprland/default.nix index f415d89..314f1cf 100644 --- a/programs/hyprland/default.nix +++ b/programs/hyprland/default.nix @@ -145,9 +145,12 @@ # Inject home-manager session variables exec-once = /etc/profiles/per-user/wizardlink/etc/profile.d/hm-session-vars.sh - # Execute your favorite apps at launch + # Start the core services of my desktop exec-once = ~/.local/share/scripts/hyprland/start_services.sh + # Open the apps I always use + exec-once = ~/.local/share/scripts/hyprland/start_apps.sh + # Set cursor size. env = HYPRCURSOR_SIZE, 36 env = XCURSOR_SIZE, 36 @@ -157,10 +160,10 @@ # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { - kb_layout = us,br,jp - kb_variant = ,,kana86 + kb_layout = + kb_variant = kb_model = - kb_options = grp:alts_toggle + kb_options = kb_rules = follow_mouse = 1 @@ -347,5 +350,8 @@ windowrulev2 = noblur, tag:apt windowrulev2 = noborder, tag:apt windowrulev2 = noshadow, tag:apt + + # Rules for anki + windowrulev2 = float, class:^(anki)$ ''; } diff --git a/programs/waybar.nix b/programs/waybar.nix index 57aff3a..9ba44d5 100644 --- a/programs/waybar.nix +++ b/programs/waybar.nix @@ -17,7 +17,6 @@ "cpu" "temperature" "battery" - "hyprland/language" "tray" ]; @@ -127,14 +126,6 @@ tooltip = false; }; - "hyprland/language" = { - format = " {}"; - format-en = "EN/US"; - format-pt-br = "PT/BR"; - #"on-click" = "hyprctl switchxkblayout www.hfd.cn-monsgeek-keyboard-1 next"; - tooltip = false; - }; - tray = { icon-size = 18; spacing = 10; diff --git a/scripts/hyprland/start_apps.sh b/scripts/hyprland/start_apps.sh new file mode 100755 index 0000000..f4dca8b --- /dev/null +++ b/scripts/hyprland/start_apps.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Open qbittorrent +qbittorrent & + +# Open vesktop +vesktop & + +# Open steam +steam & + +# Open firefox +firefox diff --git a/scripts/hyprland/start_services.sh b/scripts/hyprland/start_services.sh index c47ea64..78453a0 100755 --- a/scripts/hyprland/start_services.sh +++ b/scripts/hyprland/start_services.sh @@ -56,6 +56,11 @@ kdeconnect-cli --refresh & wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store & +# +# Start Fcitx5 +# +fcitx5 & + # # Start the blueman applet for managing bluetooth devices #