diff --git a/README.md b/README.md index 03e2140..ebfec12 100755 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ config here](https://github.com/Frost-Phoenix/nixos-config/tree/catppuccin) ## Gallery -![desktop-neofetch](./assets/screens/desktop-neofetch.png) +![desktop-fastfetch](./assets/screens/desktop-neofetch.png) ![busy-desktop](./assets/screens/desktop-busy.png) Screenshots up to date as of [this commit](https://github.com/pagedMov/nixos-config/commit/501aedc11976afe8c5386364c7a6e4b5b73af044) diff --git a/assets/scripts/keyboard_sound_thing.py b/assets/scripts/keyboard_sound_thing.py new file mode 100644 index 0000000..f6f66e0 --- /dev/null +++ b/assets/scripts/keyboard_sound_thing.py @@ -0,0 +1,36 @@ +import evdev, random, subprocess, os, threading, socket + +active_class = "" + +def watch_hyprland(): + global active_class + sig = os.environ["HYPRLAND_INSTANCE_SIGNATURE"] + sock_path = f"{os.environ['XDG_RUNTIME_DIR']}/hypr/{sig}/.socket2.sock" + s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + s.connect(sock_path) + for line in s.makefile(): + if line.startswith("activewindow>>"): + active_class = line.split(">>")[1].split(",")[0] + +threading.Thread(target=watch_hyprland, daemon=True).start() + +for path in evdev.list_devices(): + d = evdev.InputDevice(path) + if 'keyd virtual keyboard' in d.name: + dev = d + break + d.close() + +print(dev) + +for event in dev.read_loop(): + if event.type == 1 and event.value == 1 and active_class == "kitty": + if event.code == 28: + subprocess.Popen(['pw-play', '/home/pagedmov/.sysflake/assets/sound/msg_finish.wav']) + elif event.code == 14: + subprocess.Popen(['pw-cat', '--playback', '--volume=0.5', '/home/pagedmov/.sysflake/assets/sound/low_hp.wav']) + elif event.code == 1: + subprocess.Popen(['pw-play', '/home/pagedmov/.sysflake/assets/sound/menu_close.wav']) + else: + pitch = random.randint(-50,50) + subprocess.Popen(['play', '-q', '/home/pagedmov/.sysflake/assets/sound/msg.wav', 'pitch', str(pitch)]) diff --git a/assets/sound/1_select.ogg b/assets/sound/1_select.ogg new file mode 100644 index 0000000..6a58bb0 Binary files /dev/null and b/assets/sound/1_select.ogg differ diff --git a/assets/sound/2_accept.ogg b/assets/sound/2_accept.ogg new file mode 100644 index 0000000..b702fe8 Binary files /dev/null and b/assets/sound/2_accept.ogg differ diff --git a/assets/sound/3_delete.ogg b/assets/sound/3_delete.ogg new file mode 100644 index 0000000..c02a8e4 Binary files /dev/null and b/assets/sound/3_delete.ogg differ diff --git a/assets/sound/4_select2.ogg b/assets/sound/4_select2.ogg new file mode 100644 index 0000000..a1e9621 Binary files /dev/null and b/assets/sound/4_select2.ogg differ diff --git a/assets/sound/6_select_all.ogg b/assets/sound/6_select_all.ogg new file mode 100644 index 0000000..06155ec Binary files /dev/null and b/assets/sound/6_select_all.ogg differ diff --git a/assets/sound/7_equip.ogg b/assets/sound/7_equip.ogg new file mode 100644 index 0000000..febfe34 Binary files /dev/null and b/assets/sound/7_equip.ogg differ diff --git a/assets/sound/button.wav b/assets/sound/button.wav new file mode 100644 index 0000000..ab80565 Binary files /dev/null and b/assets/sound/button.wav differ diff --git a/assets/sound/crystal.wav b/assets/sound/crystal.wav new file mode 100644 index 0000000..0e238c5 Binary files /dev/null and b/assets/sound/crystal.wav differ diff --git a/assets/sound/cursor.wav b/assets/sound/cursor.wav new file mode 100644 index 0000000..a110f4f Binary files /dev/null and b/assets/sound/cursor.wav differ diff --git a/assets/sound/low_hp.wav b/assets/sound/low_hp.wav new file mode 100644 index 0000000..461efd6 Binary files /dev/null and b/assets/sound/low_hp.wav differ diff --git a/assets/sound/menu_close.wav b/assets/sound/menu_close.wav new file mode 100644 index 0000000..894de66 Binary files /dev/null and b/assets/sound/menu_close.wav differ diff --git a/assets/sound/menu_open.wav b/assets/sound/menu_open.wav new file mode 100644 index 0000000..a0a0502 Binary files /dev/null and b/assets/sound/menu_open.wav differ diff --git a/assets/sound/msg.wav b/assets/sound/msg.wav new file mode 100644 index 0000000..b8be197 Binary files /dev/null and b/assets/sound/msg.wav differ diff --git a/assets/sound/msg_finish.wav b/assets/sound/msg_finish.wav new file mode 100644 index 0000000..1eb5f3e Binary files /dev/null and b/assets/sound/msg_finish.wav differ diff --git a/docs/scripts.md b/docs/scripts.md index 84309f3..2451912 100644 --- a/docs/scripts.md +++ b/docs/scripts.md @@ -81,7 +81,7 @@ included in my nixpkgs overlay as custom packages, and these packages are declar - *Usage*: - `vipkg ` - **Example**: - - `vipkg neofetch` - Opens `nixpkgs/pkgs/tools/misc/neofetch/default.nix`. + - `vipkg fastfetch` - Opens `nixpkgs/pkgs/tools/misc/neofetch/default.nix`. - *Defined in*: `overlay/scripts/commands/vipkg.nix` --- diff --git a/flake.lock b/flake.lock index a6f8f87..a53ebba 100755 --- a/flake.lock +++ b/flake.lock @@ -107,11 +107,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1772039265, - "narHash": "sha256-3TR+B2DmkkkIi/b0CE8PuKkmb2jgzdKrOPsIwdWhsM0=", + "lastModified": 1772928715, + "narHash": "sha256-Z7qGN/5v7oBc6wjNtSR7YI/JneEzPvCqd+P6RAxMltA=", "owner": "9001", "repo": "copyparty", - "rev": "7c60adc69c977fb4b75e31c576131b1379498c3f", + "rev": "ffe6a9aa6fb7d49a4a1be3007c8d3297f88f4bc8", "type": "github" }, "original": { @@ -125,11 +125,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1772420042, - "narHash": "sha256-naZz40TUFMa0E0CutvwWsSPhgD5JldyTUDEgP9ADpfU=", + "lastModified": 1772867152, + "narHash": "sha256-RIFgZ4O6Eg+5ysZ8Tqb3YvcqiRaNy440GEY22ltjRrs=", "owner": "nix-community", "repo": "disko", - "rev": "5af7af10f14706e4095bd6bc0d9373eb097283c6", + "rev": "eaafb89b56e948661d618eefd4757d9ea8d77514", "type": "github" }, "original": { @@ -309,11 +309,11 @@ ] }, "locked": { - "lastModified": 1772569491, - "narHash": "sha256-bdr6ueeXO1Xg91sFkuvaysYF0mVdwHBpdyhTjBEWv+s=", + "lastModified": 1772845525, + "narHash": "sha256-Dp5Ir2u4jJDGCgeMRviHvEQDe+U37hMxp6RSNOoMMPc=", "owner": "nix-community", "repo": "home-manager", - "rev": "924e61f5c2aeab38504028078d7091077744ab17", + "rev": "27b93804fbef1544cb07718d3f0a451f4c4cd6c0", "type": "github" }, "original": { @@ -415,11 +415,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1772571633, - "narHash": "sha256-KjJ/Wttx+V9l2nx8Z+PNW0su6XuC0OyLL6dX70Rsx0c=", + "lastModified": 1772913214, + "narHash": "sha256-/tzDJr3CcM73Y4ZQmoFYSzNDs7RV7+enE72tvl+Fm0E=", "ref": "refs/heads/main", - "rev": "c11cadd8d6f7b8ea0dc3d49424dd7c4f7efa4bd7", - "revCount": 6979, + "rev": "a4ecae91600d7e8ceb31610176d6b40cb816711b", + "revCount": 7006, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -813,11 +813,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1772554988, - "narHash": "sha256-8Kb+MSE6QYVX1S96aZOluOMVfvSEOs70vgX980qVUaY=", + "lastModified": 1772736753, + "narHash": "sha256-au/m3+EuBLoSzWUCb64a/MZq6QUtOV8oC0D9tY2scPQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "87f6b6e02cb3f87a1be4f939326c94c8af9d55d8", + "rev": "917fec990948658ef1ccd07cef2a1ef060786846", "type": "github" }, "original": { @@ -964,11 +964,11 @@ "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1772599456, - "narHash": "sha256-WOO10Cb0gcZJhf2ZLL6VC93Hfw55nguWdC8cmpLdLig=", + "lastModified": 1772939073, + "narHash": "sha256-Fl451e4T94L1dUPjs5HEAbh/gP3vXFQBk9b52tW486Y=", "owner": "km-clay", "repo": "shed", - "rev": "210b57b9924363852687e7aae3ec0f3864a4742a", + "rev": "07d7015dd4950833671f2b795e2559295601e5af", "type": "github" }, "original": { diff --git a/hosts/work/config.nix b/hosts/work/config.nix index f5c6df6..03264cf 100755 --- a/hosts/work/config.nix +++ b/hosts/work/config.nix @@ -39,6 +39,10 @@ in programs.shed.enable = true; + services.udev.extraRules = '' + KERNEL=="event*", SUBSYSTEM=="input", MODE="0664", GROUP="input" + ''; + users = { groups.persist = { }; groups.davfs2 = { }; diff --git a/modules/home/environment/hyprland.nix b/modules/home/environment/hyprland.nix index 54b3f10..0ff663a 100755 --- a/modules/home/environment/hyprland.nix +++ b/modules/home/environment/hyprland.nix @@ -23,6 +23,11 @@ let "border_size 0, match:float 0, match:workspace f[1]" "rounding 0, match:float 0, match:workspace f[1]" ]; + hostWorkspaces = if (host == "phosphorous") then + [ + "m[DP-3], layoutopt:orientation:top" + ] + else []; in { options = { @@ -82,7 +87,7 @@ in { "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &" ]; - workspace = (if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "dualmonitor") then [ + workspace = hostWorkspaces ++ (if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "dualmonitor") then [ "1,persistent=true,monitor:${builtins.elemAt mons 0}" "2,persistent=true,monitor:${builtins.elemAt mons 0}" "3,persistent=true,monitor:${builtins.elemAt mons 0}" @@ -159,7 +164,7 @@ in { border_size = 3; "col.active_border" = lib.mkForce "rgba(404042ff)"; "col.inactive_border" = lib.mkForce "rgba(83858a00)"; - layout = "dwindle"; + layout = "master"; resize_on_border = true; snap = { @@ -191,6 +196,8 @@ in { master = { new_status = "master"; special_scale_factor = 1; + mfact = 0.65; + new_on_top = true; }; decoration = { @@ -237,7 +244,10 @@ in { "super shift, m, exit," "super, m, exec, fuzzel" "super, r, exec, neovide" - "super, b, togglesplit, # dwindle" + "super, b, layoutmsg, togglesplit, # dwindle" + "super, comma, layoutmsg, rollnext" # comma + "super, period, layoutmsg, rollprev" + "super, n, layoutmsg, swapwithmaster" "super, f, togglefloating" "super, g, fullscreen" "super, h, movefocus, l" diff --git a/modules/home/environment/shed/autocmd.nix b/modules/home/environment/shed/autocmd.nix new file mode 100644 index 0000000..298813f --- /dev/null +++ b/modules/home/environment/shed/autocmd.nix @@ -0,0 +1,24 @@ +{ self, pkgs, ... }: +let + shellsound = "${pkgs.myScripts.playshellsound}/bin/playshellsound"; + color-commit = "${pkgs.myScripts.color-commit}/bin/color-commit"; + sndpath = "${self}/assets/sound"; +in +{ + programs.shed = { + autocmds = [ + { + hooks = [ "post-cmd" ]; + command = "export PROMPT_GIT_LINE=\"$(prompt_git_line)\""; + } + { + hooks = [ "on-history-open" ]; + command = ''[ -n "$_NUM_MATCHES" ] && [ "$_NUM_MATCHES" -gt 0 ] && ${shellsound} "${sndpath}/nvim.wav"; fi''; + } + { + hooks = [ "on-completion-start" ]; + command = ''[ -n "$_NUM_MATCHES" ] && [ "$_NUM_MATCHES" -gt 1 ] && ${shellsound} "${sndpath}/nvim.wav"; fi''; + } + ]; + }; +} diff --git a/modules/home/environment/shed/default.nix b/modules/home/environment/shed/default.nix index fced860..98bd8f4 100644 --- a/modules/home/environment/shed/default.nix +++ b/modules/home/environment/shed/default.nix @@ -9,5 +9,6 @@ ./options.nix ./keymaps.nix ./functions.nix + ./autocmd.nix ]; } diff --git a/modules/home/environment/shed/extraconfig.nix b/modules/home/environment/shed/extraconfig.nix index 49812e0..69d7eda 100644 --- a/modules/home/environment/shed/extraconfig.nix +++ b/modules/home/environment/shed/extraconfig.nix @@ -7,8 +7,11 @@ in { programs.shed = { settings.extraPostConfig = /* bash */ '' - export PS1="\!prompt " - export PSR='\e[36;1m$\!shed_ver\e[0m' + export PS1="\@prompt " + export PSR='\e[36;1m$\@shed_ver\e[0m' + + export PROMPT_GIT_LINE="$(prompt_git_line)" + if [ "$0" = "-shed" ]; then ${shellsound} $FLAKEPATH/assets/sound/login.wav fi diff --git a/modules/home/environment/shed/functions.nix b/modules/home/environment/shed/functions.nix index 7952b43..ca71e6c 100644 --- a/modules/home/environment/shed/functions.nix +++ b/modules/home/environment/shed/functions.nix @@ -9,7 +9,59 @@ in functions = { prompt_topline = /* bash */ '' local user_and_host="\e[0m\e[1m$USER\e[1;36m@\e[1;31m$HOST\e[0m" - echo -n "\e[1;34m┏━ $user_and_host\n" + local mode_text="$(prompt_mode)" + echo -n "\e[1;34m┏━ $user_and_host $mode_text\n" + ''; + + prompt_mode = /* bash */ '' + local mode="" + local normal_fg='\e[0m\e[30m\e[1;43m' + local normal_bg='\e[0m\e[33m' + local insert_fg='\e[0m\e[30m\e[1;46m' + local insert_bg='\e[0m\e[36m' + local command_fg='\e[0m\e[30m\e[1;42m' + local command_bg='\e[0m\e[32m' + local visual_fg='\e[0m\e[30m\e[1;45m' + local visual_bg='\e[0m\e[35m' + local replace_fg='\e[0m\e[30m\e[1;41m' + local replace_bg='\e[0m\e[31m' + local search_fg='\e[0m\e[30m\e[1;47m' + local search_bg='\e[0m\e[39m' + local complete_fg='\e[0m\e[30m\e[1;47m' + local complete_bg='\e[0m\e[39m' + + + case "$SHED_VI_MODE" in + "NORMAL") + mode="$normal_bg''${normal_fg}NORMAL$normal_bg\e[0m" + ;; + "INSERT") + mode="$insert_bg''${insert_fg}INSERT$insert_bg\e[0m" + ;; + "COMMAND") + mode="$command_bg''${command_fg}COMMAND$command_bg\e[0m" + ;; + "VISUAL") + mode="$visual_bg''${visual_fg}VISUAL$visual_bg\e[0m" + ;; + "REPLACE") + mode="$replace_bg''${replace_fg}REPLACE$replace_bg\e[0m" + ;; + "VERBATIM") + mode="$replace_bg''${replace_fg}VERBATIM$replace_bg\e[0m" + ;; + "COMPLETE") + mode="$complete_bg''${complete_fg}COMPLETE$complete_bg\e[0m" + ;; + "SEARCH") + mode="$search_bg''${search_fg}SEARCH$search_bg\e[0m" + ;; + *) + mode="" + ;; + esac + + echo -en "$mode\n" ''; prompt_stat_line = /* bash */ '' @@ -17,71 +69,68 @@ in local last_cmd_status local last_cmd_runtime if [ "$last_exit_code" -eq "0" ]; then - last_cmd_status="\e[1;32m\e[0m" + last_cmd_status="\e[1;32m" else - last_cmd_status="\e[1;31m\e[0m" + last_cmd_status="\e[1;31m" fi local last_runtime_raw="$(echo -p "\t")" if [ -z "$last_runtime_raw" ]; then return 0 else - last_cmd_runtime="\e[1;38;2;249;226;175m󰔛 $(echo -p "\T")\e[0m" + last_cmd_runtime="\e[1;38;2;249;226;175m󰔛 ''${last_cmd_status}$(echo -p "\T")\e[0m" fi - echo -n "\e[1;34m┃ $last_cmd_runtime ($last_cmd_status)\n" + echo -n "\e[1;34m┃ $last_cmd_runtime\e[0m\n" ''; prompt_git_line = /* bash */ '' - git rev-parse --is-inside-work-tree > /dev/null 2>&1 || return + local status="$(git status --porcelain -b 2>/dev/null)" || return - local gitsigns - local status="$(git status --porcelain 2>/dev/null)" - local branch="$(git branch --show-current 2>/dev/null)" + local branch="" gitsigns="" ahead=0 behind=0 + local header="''${status%%$'\n'*}" - [ -n "$status" ] && echo "$status" | command grep -q '^ [MADR]' && gitsigns="$gitsigns!" - [ -n "$status" ] && echo "$status" | command grep -q '^??' && gitsigns="$gitsigns?" - [ -n "$status" ] && echo "$status" | command grep -q '^[MADR]' && gitsigns="$gitsigns+" + branch="''${header#\#\# }" + branch="''${branch%%...*}" + case "$header" in + *ahead*) ahead="''${header#*ahead }"; ahead="''${ahead%%[],]*}"; gitsigns="''${gitsigns}↑" ;; + esac + case "$header" in + *behind*) behind="''${header#*behind }"; behind="''${behind%%[],]*}"; gitsigns="''${gitsigns}↓" ;; + esac - local ahead="$(git rev-list --count @{upstream}..HEAD 2>/dev/null)" - local behind="$(git rev-list --count HEAD..@{upstream} 2>/dev/null)" - [ $ahead -gt 0 ] && gitsigns="$gitsigns↑" - [ $behind -gt 0 ] && gitsigns="$gitsigns↓" + case "$status" in + *$'\n'" "[MAR]*) gitsigns="''${gitsigns}!" ;; + esac + case "$status" in + *$'\n'"??"*) gitsigns="''${gitsigns}?" ;; + esac + case "$status" in + *$'\n'" "[D]*) gitsigns="''${gitsigns}" ;; + esac + case "$status" in + *$'\n'[MADR]*) gitsigns="''${gitsigns}+" ;; + esac - local diff="$(git diff --shortstat)" - local add="" - local del="" - local changed="" - i=0 - while read -d "," part; do - if [ $i -ge 3 ]; then break; fi - case $i in - 0) - changed="$(echo $part | cut -d' ' -f1)" - ;; - 1) - add="$(echo $part | cut -d' ' -f1)" - ;; - 2) - del="$(echo $part | cut -d' ' -f1)" - ;; - esac - i=$(($i + 1)) - done < <(echo "$diff,") + local diff="$(git diff --shortstat 2>/dev/null)" + + local diff="$(git diff --shortstat 2>/dev/null)" + local changed="" add="" del="" + if [ -n "$diff" ]; then + changed="''${diff%% file*}"; changed="''${changed##* }" + case "$diff" in + *insertion*) add="''${diff#*, }"; add="''${add%% *}" ;; + esac + case "$diff" in + *deletion*) del="''${diff% deletion*}"; del="''${del##* }" ;; + esac + fi if [ -n "$gitsigns" ] || [ -n "$branch" ]; then - if [ -n "$gitsigns" ]; then - gitsigns="\e[1;31m[$gitsigns]" - fi - if [ -n "$changed" ] && [ "$changed" -gt 0 ]; then - changed="\e[1;34m~$changed \e[0m" - fi - if [ -n "$add" ] && [ "$add" -gt 0 ]; then - add="\e[1;32m+$add \e[0m" - fi - if [ -n "$del" ] && [ "$del" -gt 0 ]; then - del="\e[1;31m-$del\e[0m" - fi - echo -n "\e[1;34m┃ \e[1;35m $branch$gitsigns\e[0m $changed$add$del\n" + [ -n "$gitsigns" ] && gitsigns="\e[1;31m[$gitsigns]" + [ -n "$changed" ] && [ "$changed" -gt 0 ] && changed="\e[1;34m~$changed \e[0m" + [ -n "$add" ] && [ "$add" -gt 0 ] && add="\e[1;32m+$add \e[0m" + [ -n "$del" ] && [ "$del" -gt 0 ] && del="\e[1;31m-$del\e[0m" + echo -n "\e[1;34m┃ \e[1;35m $branch$gitsigns\e[0m $changed$add$del\n" fi ''; @@ -110,12 +159,11 @@ in prompt = /* bash */ '' local statline="$(prompt_stat_line)" local topline="$(prompt_topline)" - local gitline="$(prompt_git_line)" local jobsline="$(prompt_jobs_line)" local sshline="$(prompt_ssh_line)" local pwdline="$(prompt_pwd_line)" local dollarline="$(prompt_dollar_line)" - local prompt="$topline$statline$gitline$jobsline$sshline$pwdline\n$dollarline" + local prompt="$topline$statline$PROMPT_GIT_LINE$jobsline$sshline$pwdline\n$dollarline" echo -en "$prompt" ''; diff --git a/modules/home/environment/shed/keymaps.nix b/modules/home/environment/shed/keymaps.nix index 4765a74..c2a0e49 100644 --- a/modules/home/environment/shed/keymaps.nix +++ b/modules/home/environment/shed/keymaps.nix @@ -42,12 +42,6 @@ _surround_2 = /* bash */ '' local start local end - if [ -z "$_ANCHOR" ]; then - echo "No anchor" 1>&2 - fi - if [ -z "$_CURSOR" ]; then - echo "No cursor" - fi if [ "$_ANCHOR" -lt "$_CURSOR" ]; then start=$_ANCHOR end=$_CURSOR @@ -62,7 +56,6 @@ left="''${_BUFFER:0:$start}" mid="''${_BUFFER:$start:$delta}" right="''${_BUFFER:$end}" - echo "sl = $_sl sr = $_sr start = $start end = $end delta = $delta left = $left mid = $mid right = $right" 1>&2 _BUFFER="$left$_sl$mid$_sr$right" _CURSOR=$start ''; diff --git a/modules/home/environment/shed/options.nix b/modules/home/environment/shed/options.nix index 5055b4c..d384dfd 100644 --- a/modules/home/environment/shed/options.nix +++ b/modules/home/environment/shed/options.nix @@ -7,6 +7,7 @@ settings = { autocd = true; autoHistory = true; + maxHistoryEntries = -1; }; }; } diff --git a/modules/home/environment/userpkgs.nix b/modules/home/environment/userpkgs.nix index ae78af8..e762174 100755 --- a/modules/home/environment/userpkgs.nix +++ b/modules/home/environment/userpkgs.nix @@ -69,6 +69,7 @@ in { dust porsmo w3m + sox neovide claude-code pythonWithStuff diff --git a/modules/home/environment/userservices.nix b/modules/home/environment/userservices.nix index 0fda9cd..b1033a0 100644 --- a/modules/home/environment/userservices.nix +++ b/modules/home/environment/userservices.nix @@ -1,5 +1,9 @@ { pkgs, self, ... }: +let + pythonWithPkgs = pkgs.python3.withPackages (p: [ p.evdev ]); + keyboardSfxScript = "${self}/assets/scripts/keyboard_sound_thing.py"; +in { systemd.user = { timers = { @@ -13,26 +17,11 @@ }; }; services = { - loginSound = { - Unit= { - Description = "Plays a sound on login"; - After = [ "graphical-session.target" ]; - WantedBy = [ "graphical-session.target" ]; - }; - - Service = { - ExecStart = "${pkgs.alsa-utils}/bin/aplay -qN ${self}/assets/sound/login.wav"; - Type = "simple"; - }; - }; - maintenanceCheck = { - Unit = { - Description = "Check for updates in my maintained packages"; - }; - - Service = { - ExecStart = "${pkgs.nix}/bin/nix-shell -p python3Packages.requests --run '${pkgs.python311}/bin/python ${pkgs.myScripts.check_updates}/bin/checkupdates.py'"; - Type = "simple"; + kitty-keyboard-sounds = { + description = "Keyboard sound effects for kitty"; + wantedBy = [ "hyprland-session.target" ]; + serviceConfig = { + ExecStart = "${pythonWithPkgs}/bin/python3 ${keyboardSfxScript}"; }; }; }; diff --git a/modules/home/files.nix b/modules/home/files.nix index 3ebac23..d5b4655 100755 --- a/modules/home/files.nix +++ b/modules/home/files.nix @@ -38,7 +38,7 @@ in { }; config = { home.file = { - ".config/neofetch/config.conf".text = '' + ".config/fastfetch/config.conf".text = '' username=$(whoami) name_length=''${#username} total_width=40 diff --git a/modules/home/programs/nixvim/keymaps.nix b/modules/home/programs/nixvim/keymaps.nix index bb2ce3d..471439f 100755 --- a/modules/home/programs/nixvim/keymaps.nix +++ b/modules/home/programs/nixvim/keymaps.nix @@ -52,9 +52,94 @@ mode = [ "n" "t" ]; } { - action = "COQnow"; - key = "!cq"; - mode = "n"; + action = "lua require('treesj').toggle()"; + key = "j"; + mode = [ "n" ]; + } + { + action = ""; + key = ""; + mode = [ "t" ]; + } + { + action = ''"+y''; + key = "y"; + mode = [ "n" "x" ]; + } + { + action = ''"+p''; + key = "p"; + mode = [ "n" "x" ]; + } + { + action.__raw = /*lua*/''function() require('opencode').prompt('test', {submit=true}) end''; + key = "at"; + mode = [ "n" "x" ]; + } + { + action.__raw = /*lua*/''function() require('opencode').select() end''; + key = "as"; + mode = [ "n" "x" ]; + } + { + action.__raw = /*lua*/''function() require('opencode').prompt('document', {submit=true}) end''; + key = "ad"; + mode = [ "n" "x" ]; + } + { + action.__raw = /*lua*/''function() require('opencode').prompt('review', {submit=true}) end''; + key = "ar"; + mode = [ "n" "x" ]; + } + { + action.__raw = /*lua*/''function() require('opencode').prompt('fix', {submit=true}) end''; + key = "af"; + mode = [ "n" "x" ]; + } + { + action.__raw = /*lua*/''function() require('opencode').ask("@this ", {submit=true}) end''; + key = "aa"; + mode = [ "n" "x" ]; + } + { + action.__raw = /*lua*/''function() require('opencode').explain("@this ") end''; + key = "ae"; + mode = [ "n" "x" ]; + } + { + action.__raw = /*lua*/''function() require('opencode').command("session.half.page.up") end''; + key = ""; + mode = [ "n" "x" ]; + } + { + action.__raw = /*lua*/''function() require('opencode').command("session.half.page.down") end''; + key = ""; + mode = [ "n" "x" ]; + } + { + action.__raw = /*lua*/''function() require('opencode').command("prompt.clear") end''; + key = ""; + mode = [ "n" "x" ]; + } + { + action.__raw = /*lua*/''function() require('opencode').operator("@this ") end''; + key = "go"; + mode = [ "n" "x" ]; + } + { + action.__raw = /*lua*/''function() return require('opencode').operator("@this ") .. "_" end''; + key = "goo"; + mode = [ "n" ]; + } + { + action = "lua require('opencode').toggle()"; + key = ""; + mode = [ "n" "t" ]; + } + { + action = "lua require('opencode').select()"; + key = ""; + mode = [ "n" "x" ]; } ]; }; diff --git a/modules/home/programs/nixvim/plugins/airline.nix b/modules/home/programs/nixvim/plugins/airline.nix index bca0ad9..777ef46 100644 --- a/modules/home/programs/nixvim/plugins/airline.nix +++ b/modules/home/programs/nixvim/plugins/airline.nix @@ -1,7 +1,7 @@ { programs.nixvim = { plugins.airline = { - enable = true; + enable = false; settings = { left_sep = ""; right_sep = ""; diff --git a/modules/home/programs/nixvim/plugins/alpha.nix b/modules/home/programs/nixvim/plugins/alpha.nix old mode 100755 new mode 100644 diff --git a/modules/home/programs/nixvim/plugins/barbar.nix b/modules/home/programs/nixvim/plugins/barbar.nix old mode 100755 new mode 100644 diff --git a/modules/home/programs/nixvim/plugins/bufferline.nix b/modules/home/programs/nixvim/plugins/bufferline.nix new file mode 100644 index 0000000..8e8a27a --- /dev/null +++ b/modules/home/programs/nixvim/plugins/bufferline.nix @@ -0,0 +1,12 @@ +{ + programs.nixvim = { + plugins.bufferline = { + enable = true; + settings = { + options = { + separator_style = "slant"; + }; + }; + }; + }; +} diff --git a/modules/home/programs/nixvim/plugins/cmp.nix b/modules/home/programs/nixvim/plugins/cmp.nix old mode 100755 new mode 100644 diff --git a/modules/home/programs/nixvim/plugins/copilot.nix b/modules/home/programs/nixvim/plugins/copilot.nix index b171127..20ae3ed 100644 --- a/modules/home/programs/nixvim/plugins/copilot.nix +++ b/modules/home/programs/nixvim/plugins/copilot.nix @@ -1,9 +1,17 @@ { - programs.nixvim.plugins.copilot-lua = { - enable = true; - settings = { - suggestion = { - auto_trigger = false; + programs.nixvim = { + plugins = { + copilot-lua = { + enable = true; + settings = { + suggestion = { + auto_trigger = false; + }; + }; + }; + + opencode = { + enable = true; }; }; }; diff --git a/modules/home/programs/nixvim/plugins/coq.nix b/modules/home/programs/nixvim/plugins/coq.nix old mode 100755 new mode 100644 diff --git a/modules/home/programs/nixvim/plugins/default.nix b/modules/home/programs/nixvim/plugins/default.nix old mode 100755 new mode 100644 index f23fd4b..6aa3b1e --- a/modules/home/programs/nixvim/plugins/default.nix +++ b/modules/home/programs/nixvim/plugins/default.nix @@ -4,7 +4,12 @@ imports = [ ./otter.nix ./treesitter.nix + ./bufferline.nix ./alpha.nix + ./mini.nix + ./wtf.nix + ./snacks.nix + ./noice.nix ./haskell.nix ./vim-matchup.nix # ./coq.nix @@ -14,7 +19,7 @@ ./lsp.nix ./rustaceanvim.nix ./fidget.nix - # ./lualine.nix + ./lualine.nix ./airline.nix ./nvim-lightbulb.nix ./neocord.nix diff --git a/modules/home/programs/nixvim/plugins/extra_plugins.nix b/modules/home/programs/nixvim/plugins/extra_plugins.nix old mode 100755 new mode 100644 index 77072f6..f295207 --- a/modules/home/programs/nixvim/plugins/extra_plugins.nix +++ b/modules/home/programs/nixvim/plugins/extra_plugins.nix @@ -11,15 +11,6 @@ hash = "sha256-Upx29rIPwW/e7Lkmf0PNOpIACnAXIzlkfa6V1p2nYHM="; }; }) - (pkgs.vimUtils.buildVimPlugin { - name = "vim-sneak"; - src = pkgs.fetchFromGitHub { - owner = "justinmk"; - repo = "vim-sneak"; - rev = "c13d0497139b8796ff9c44ddb9bc0dc9770ad2dd"; - hash = "sha256-ndWhnV0fgCcqCGwVyM07GfmUB3CitBZbOWvZtsB1tBk="; - }; - }) (pkgs.vimUtils.buildVimPlugin { name = "vim-slash"; src = pkgs.fetchFromGitHub { diff --git a/modules/home/programs/nixvim/plugins/fidget.nix b/modules/home/programs/nixvim/plugins/fidget.nix index 1d827dd..5751e8f 100644 --- a/modules/home/programs/nixvim/plugins/fidget.nix +++ b/modules/home/programs/nixvim/plugins/fidget.nix @@ -1,6 +1,6 @@ { programs.nixvim.plugins.fidget = { - enable = true; + enable = false; settings = { notification = { overrideVimNotify = true; diff --git a/modules/home/programs/nixvim/plugins/haskell.nix b/modules/home/programs/nixvim/plugins/haskell.nix old mode 100755 new mode 100644 diff --git a/modules/home/programs/nixvim/plugins/lsp.nix b/modules/home/programs/nixvim/plugins/lsp.nix old mode 100755 new mode 100644 index eeeb52c..229d004 --- a/modules/home/programs/nixvim/plugins/lsp.nix +++ b/modules/home/programs/nixvim/plugins/lsp.nix @@ -84,7 +84,7 @@ installRustc = false; settings = { check = { - allTargets = false; + allTargets = true; command = "clippy"; }; }; @@ -99,9 +99,9 @@ options = { # uses Xenon config because it has every option exposed to it nixos.expr = '' - (builtins.getFlake "github:pagedMov/nixos-config").nixosConfigurations.xenon.options''; + (builtins.getFlake "github:pagedMov/nixos-config").nixosConfigurations.phosphorous.options''; home.expr = '' - (builtins.getFlake "github:pagedMov/nixos-config").homeConfigurations.xenonHome.options''; + (builtins.getFlake "github:pagedMov/nixos-config").homeConfigurations.phospohorousHome.options''; }; }; }; diff --git a/modules/home/programs/nixvim/plugins/lualine.nix b/modules/home/programs/nixvim/plugins/lualine.nix old mode 100755 new mode 100644 index 6e50547..184d9e4 --- a/modules/home/programs/nixvim/plugins/lualine.nix +++ b/modules/home/programs/nixvim/plugins/lualine.nix @@ -1,7 +1,7 @@ { programs.nixvim = { plugins.lualine = { - enable = false; + enable = true; settings = { options = { icons_enabled = true; @@ -15,7 +15,7 @@ right = ""; }; always_divide_middle = true; - globalstatus = false; + globalstatus = true; refresh = { statusline = 1000; tabline = 1000; diff --git a/modules/home/programs/nixvim/plugins/mini.nix b/modules/home/programs/nixvim/plugins/mini.nix new file mode 100644 index 0000000..80e7c64 --- /dev/null +++ b/modules/home/programs/nixvim/plugins/mini.nix @@ -0,0 +1,8 @@ +{ + programs.nixvim = { + plugins = { + mini-align = { enable = true; }; + mini-clue = { enable = true; }; + }; + }; +} diff --git a/modules/home/programs/nixvim/plugins/noice.nix b/modules/home/programs/nixvim/plugins/noice.nix new file mode 100644 index 0000000..76e2af2 --- /dev/null +++ b/modules/home/programs/nixvim/plugins/noice.nix @@ -0,0 +1,33 @@ +{ + programs.nixvim = { + plugins.noice = { + enable = true; + settings = { + views = { + popupmenu = { + relative = "cursor"; + position = { + row = -2; + col = -2; + }; + size = { + width = 60; + height = "auto"; + }; + }; + cmdline_popup = { + relative = "cursor"; + position = { + row = 0; + col = -2; + }; + size = { + width = 60; + height = "auto"; + }; + }; + }; + }; + }; + }; +} diff --git a/modules/home/programs/nixvim/plugins/nvim-tree.nix b/modules/home/programs/nixvim/plugins/nvim-tree.nix old mode 100755 new mode 100644 diff --git a/modules/home/programs/nixvim/plugins/plugins.nix b/modules/home/programs/nixvim/plugins/plugins.nix old mode 100755 new mode 100644 index e9c6d0a..03cf5bf --- a/modules/home/programs/nixvim/plugins/plugins.nix +++ b/modules/home/programs/nixvim/plugins/plugins.nix @@ -8,6 +8,8 @@ helpview.enable = true; floaterm.enable = true; fugitive.enable = true; + hop.enable = true; + wilder.enable = true; indent-blankline.enable = true; lastplace.enable = true; markdown-preview.enable = true; diff --git a/modules/home/programs/nixvim/plugins/rustaceanvim.nix b/modules/home/programs/nixvim/plugins/rustaceanvim.nix index 75ebbd2..62d1ec4 100644 --- a/modules/home/programs/nixvim/plugins/rustaceanvim.nix +++ b/modules/home/programs/nixvim/plugins/rustaceanvim.nix @@ -7,6 +7,7 @@ server = { auto_attach = true; default_settings = { + cfgOverride.test = true; checkOnSave.command = "clippy"; }; }; diff --git a/modules/home/programs/nixvim/plugins/snacks.nix b/modules/home/programs/nixvim/plugins/snacks.nix new file mode 100644 index 0000000..74a850a --- /dev/null +++ b/modules/home/programs/nixvim/plugins/snacks.nix @@ -0,0 +1,7 @@ +{ + programs.nixvim = { + plugins.snacks = { + enable = true; + }; + }; +} diff --git a/modules/home/programs/nixvim/plugins/telescope.nix b/modules/home/programs/nixvim/plugins/telescope.nix old mode 100755 new mode 100644 diff --git a/modules/home/programs/nixvim/plugins/treesitter.nix b/modules/home/programs/nixvim/plugins/treesitter.nix index 60805a0..8bce943 100644 --- a/modules/home/programs/nixvim/plugins/treesitter.nix +++ b/modules/home/programs/nixvim/plugins/treesitter.nix @@ -2,14 +2,11 @@ programs.nixvim = { plugins.treesitter = { enable = true; - folding = { - enable = true; - }; - indent = { - enable = true; - }; - highlight = { - enable = true; + }; + plugins.treesj = { + enable = true; + settings = { + use_default_keymaps = false; }; }; }; diff --git a/modules/home/programs/nixvim/plugins/vim-matchup.nix b/modules/home/programs/nixvim/plugins/vim-matchup.nix old mode 100755 new mode 100644 diff --git a/modules/home/programs/nixvim/plugins/wtf.nix b/modules/home/programs/nixvim/plugins/wtf.nix new file mode 100644 index 0000000..07bf929 --- /dev/null +++ b/modules/home/programs/nixvim/plugins/wtf.nix @@ -0,0 +1,10 @@ +{ + programs.nixvim = { + plugins.wtf = { + enable = true; + options = { + context = true; + }; + }; + }; +} diff --git a/modules/sys/software/packages.nix b/modules/sys/software/packages.nix index 35f750c..7e43bfd 100755 --- a/modules/sys/software/packages.nix +++ b/modules/sys/software/packages.nix @@ -30,7 +30,7 @@ kitty lolcat lsof - neofetch + fastfetch nh nix-index nix-output-monitor diff --git a/overlay/scripts/wm-controls/mkscreenshots.nix b/overlay/scripts/wm-controls/mkscreenshots.nix index 831b5b1..caa603e 100644 --- a/overlay/scripts/wm-controls/mkscreenshots.nix +++ b/overlay/scripts/wm-controls/mkscreenshots.nix @@ -2,7 +2,7 @@ pkgs.writeShellApplication { name = "mkscreenshots"; - runtimeInputs = with pkgs; [ jq neofetch kitty coreutils nemo grimblast git ]; + runtimeInputs = with pkgs; [ jq fastfetch kitty coreutils nemo grimblast git ]; text = '' if [ -n "$(hyprctl clients -j | jq -r '.[] | select(.workspace.name == "4")')" ]; then echo "There are windows in workspace 4. This script uses workspace 4, so move those windows and run it again." @@ -14,7 +14,7 @@ pkgs.writeShellApplication { hyprctl dispatch focusmonitor 0 screenshotfetch() { - neofetch + fastfetch kitty @ scroll-window 20- @@ -38,7 +38,7 @@ pkgs.writeShellApplication { hyprctl dispatch exec "[float;size 40% 50%;move 57% 8%] nemo" sleep 1 - grimblast save output "$FLAKEPATH"/assets/screens/desktop-neofetch.png + grimblast save output "$FLAKEPATH"/assets/screens/desktop-fastfetch.png closewindows