diff --git a/profiles/work/home.nix b/profiles/work/home.nix index 28eacf3..f535d01 100644 --- a/profiles/work/home.nix +++ b/profiles/work/home.nix @@ -46,6 +46,7 @@ # Office libreoffice-fresh mate.atril + openboard xournalpp glib newsflash diff --git a/user/wm/hyprland/hyprland.nix b/user/wm/hyprland/hyprland.nix index 36a4ad3..bc2d8e6 100644 --- a/user/wm/hyprland/hyprland.nix +++ b/user/wm/hyprland/hyprland.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, userSettings, ... }: +{ config, lib, pkgs, userSettings, systemSettings, ... }: { imports = [ @@ -7,10 +7,13 @@ (import ../../app/dmenu-scripts/networkmanager-dmenu.nix { dmenu_command = "fuzzel -d"; inherit config lib pkgs; }) - (import ./hyprprofiles/hyprprofiles.nix { - dmenuCmd = "fuzzel -d"; inherit config lib pkgs; - }) - ]; + ../input/nihongo.nix + ] ++ + (if (systemSettings.profile == "personal") then + [ (import ./hyprprofiles/hyprprofiles.nix { + dmenuCmd = "fuzzel -d"; inherit config lib pkgs; })] + else + []); gtk.cursorTheme = { package = pkgs.quintom-cursor-theme; @@ -224,9 +227,13 @@ monitor=HDMI-A-1,1920x1080,1920x0,1 monitor=DP-1,1920x1080,0x0,1 - # 2 monitor setup + # hdmi tv #monitor=eDP-1,1920x1080,1920x0,1 - #monitor=DP-1,1920x1200,0x0,1 + #monitor=HDMI-A-1,1920x1080,0x0,1 + + # hdmi work projector + #monitor=eDP-1,1920x1080,1920x0,1 + #monitor=HDMI-A-1,1920x1200,0x0,1 xwayland { force_zero_scaling = true @@ -245,6 +252,7 @@ } misc { + disable_hyprland_logo = true mouse_move_enables_dpms = false } decoration { @@ -302,7 +310,7 @@ #!/bin/sh imgname="/tmp/screenshot-ocr-$(date +%Y%m%d%H%M%S).png" txtname="/tmp/screenshot-ocr-$(date +%Y%m%d%H%M%S)" - txtfname="/tmp/screenshot-ocr-$(date +%Y%m%d%H%M%S).txt" + txtfname=$txtname.txt grim -g "$(slurp)" $imgname; tesseract $imgname $txtname; wl-copy -n < $txtfname @@ -750,6 +758,7 @@ background-size: auto 100%; } ''; + services.udiskie.enable = true; services.udiskie.tray = "always"; programs.swaylock = { diff --git a/user/wm/input/nihongo.nix b/user/wm/input/nihongo.nix new file mode 100644 index 0000000..0d75797 --- /dev/null +++ b/user/wm/input/nihongo.nix @@ -0,0 +1,111 @@ +{ pkgs, ... }: + +{ + i18n.inputMethod = { + enabled = "fcitx5"; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + fcitx5-gtk + ]; + }; + home.file.".config/fcitx5/config".text = '' + [Hotkey] + # Enumerate when press trigger key repeatedly + EnumerateWithTriggerKeys=True + # Temporally switch between first and current Input Method + AltTriggerKeys= + # Enumerate Input Method Forward + EnumerateForwardKeys= + # Enumerate Input Method Backward + EnumerateBackwardKeys= + # Skip first input method while enumerating + EnumerateSkipFirst=False + # Toggle embedded preedit + TogglePreedit= + + [Hotkey/TriggerKeys] + 0=Super+comma + + [Hotkey/EnumerateGroupForwardKeys] + 0=Super+space + + [Hotkey/EnumerateGroupBackwardKeys] + 0=Shift+Super+space + + [Hotkey/ActivateKeys] + 0=Hangul_Hanja + + [Hotkey/DeactivateKeys] + 0=Hangul_Romaja + + [Hotkey/PrevPage] + 0=Up + + [Hotkey/NextPage] + 0=Down + + [Hotkey/PrevCandidate] + 0=Shift+Tab + + [Hotkey/NextCandidate] + 0=Tab + + [Behavior] + # Active By Default + ActiveByDefault=False + # Share Input State + ShareInputState=No + # Show preedit in application + PreeditEnabledByDefault=True + # Show Input Method Information when switch input method + ShowInputMethodInformation=True + # Show Input Method Information when changing focus + showInputMethodInformationWhenFocusIn=False + # Show compact input method information + CompactInputMethodInformation=True + # Show first input method information + ShowFirstInputMethodInformation=True + # Default page size + DefaultPageSize=5 + # Override Xkb Option + OverrideXkbOption=False + # Custom Xkb Option + CustomXkbOption= + # Force Enabled Addons + EnabledAddons= + # Force Disabled Addons + DisabledAddons= + # Preload input method to be used by default + PreloadInputMethod=True + # Allow input method in the password field + AllowInputMethodForPassword=False + # Show preedit text when typing password + ShowPreeditForPassword=False + # Interval of saving user data in minutes + AutoSavePeriod=30 + ''; + home.file.".config/fcitx5/profile".text = '' + [Groups/0] + # Group Name + Name=Default + # Layout + Default Layout=us + # Default Input Method + DefaultIM=mozc + + [Groups/0/Items/0] + # Name + Name=keyboard-us + # Layout + Layout= + + [Groups/0/Items/1] + # Name + Name=mozc + # Layout + Layout= + + [GroupOrder] + 0=Default + ''; +}