{"id":21323635,"url":"https://github.com/adham-elaraby/dotfiles-win32","last_synced_at":"2026-04-10T01:03:52.665Z","repository":{"id":221256691,"uuid":"753602801","full_name":"adham-elaraby/dotfiles-win32","owner":"adham-elaraby","description":"Windows 10 development config","archived":false,"fork":false,"pushed_at":"2024-08-16T11:27:34.000Z","size":20775,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T12:12:21.850Z","etag":null,"topics":["ahk-script","dotfiles","nvim","powershell-profile","starship","terminal","windows-10","wsl-setup","wsl2"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adham-elaraby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-06T12:58:41.000Z","updated_at":"2025-01-17T12:07:20.000Z","dependencies_parsed_at":"2024-02-07T01:29:28.131Z","dependency_job_id":"ef970cd5-2db1-4c78-9205-e162a4ff5f15","html_url":"https://github.com/adham-elaraby/dotfiles-win32","commit_stats":null,"previous_names":["adham-elaraby/dotfiles-win32"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adham-elaraby%2Fdotfiles-win32","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adham-elaraby%2Fdotfiles-win32/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adham-elaraby%2Fdotfiles-win32/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adham-elaraby%2Fdotfiles-win32/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adham-elaraby","download_url":"https://codeload.github.com/adham-elaraby/dotfiles-win32/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243801676,"owners_count":20350108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ahk-script","dotfiles","nvim","powershell-profile","starship","terminal","windows-10","wsl-setup","wsl2"],"created_at":"2024-11-21T20:25:59.868Z","updated_at":"2025-12-30T22:54:15.378Z","avatar_url":"https://github.com/adham-elaraby.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotfiles-win32\nPowershell and WSL setup for better experience.\nSets up a custom ps prompt, adds autocomplete and predictions, and custom keybindings. While lazy loading the profile in the background for quick prompt access.\n\n![screenshot-setup](https://github.com/adham-elaraby/dotfiles-win32/assets/63326537/9fb7e386-e8e7-4625-b80d-e3f27bf8d013)\n\n\n## Scoop dependencies\n`scoop bucket add extras`\n\n- 7zip\n- cacert\n- cmake\n- curl\n- dark\n- espanso\n- ffmpeg\n- git\n- innounp\n- lf\n- bat\n- less\n- ntop\n- eza\n- llvm\n- make\n- mkvtoolnix\n- mpv\n- neofetch\n- openjdk\n- perl\n- neovim\n- stack\n- starship\n- sudo\n- wget\n- youtube-dl\n- yt-dlp\n- zig\n- posh-git\n- archwsl (https://wsldl-pg.github.io/ArchW-docs/How-to-Setup/)\n- extras/carapace-bin\n\n## Other dependencies\n- AltDrag (fork available)\n- f.lux\n- GoldenDict\n- dwm-win32 ([adham-elaraby/dwm-win32](https://github.com/adham-elaraby/dwm-win32)) \n- fd\n- which\n- posh-git\n- PSFzf\n- fzf\n- Terminal-Icons (powershell)\n\n## PowerShell 7\nFirst prompt upon launch is a stripped down version while profile loads in background, this reduces wait time.\n- `Alt+c` calls `fzf` and `Set-Location` to the chosen directory\n- `Ctrl+r` calls `fzf` on `history`\n- `Ctrl+t` calls fzf and returns the path to files and directories in prompt\n- `Tab` to Menue Complete\n- `Right` to accept prediction word by word\n- `Ctrl+b` and `Ctrl+f` to move one character back and forth\n- `Alt+b` and `Alt+f // Right` moves one word back or forward\n\n## Arch WSL\n### disable WSLg (prevent Terminal loss of focus)\nCreate .wslconfig in `%USERPROFILE%`\n\n```\n[wsl2]\nguiApplications=false\n```\n\n### Arch Setup fixes\nnote that arch does not have `/usr/lib/libedit.so.2` like ubuntu and therefore we must symlink it to the correct lib to ensure intel drivers function correctly.\n\nSteps:\n\nLook for file with .so's\n`ls /usr/lib/wsl/drivers/iigd_*` \n\nthen pass the directory to the following command and look for `not found`. eg:\n`ldd /usr/lib/wsl/drivers/iigd_dch.inf_amd64_d8bdffa26077ee9a/*.so`\n\nIn my case the `libedit` package wasn't even installed yet.\n`sudo pacman -S libedit`\n\nThen check to see what libedit version is available in the libs directory and symlink it eg:\n`sudo ln -sf libedit.so.0.0.72 /usr/lib/libedit.so.2`\n\nCheck again for any unfound libraries. In mycase I still needed `intel-gmmlib` as seen by `libigdmm.so.12 (not found)`\n`sudo pacman -S intel-gmmlib`\n\n## Windows Group Policy Edits\n### Disable Win Key shortcuts\nYou can try enable gpedit through the `gpedit-enabler.bat` script in Scripts\n1. Type Edit group policy in the Start menu search bar.\n2. Right-click on the Best match result and select Run as administrator.\n3. Navigate to User Configuration \u003e Administrative Templates \u003e Windows Components \u003e File Explorer.\n4. Double-click on the Turn off Windows Key Hotkeys option on the right-hand side.\n\n## tmux container for PowerShell\nwe will run an alpine wsl container, that will only host a tmux session, and then launch a Powershell Instance on it, this will allow us to use powershell and arch wsl on an independant tmux process.\n\n![Tmux-Scratchpad](https://github.com/adham-elaraby/dotfiles-win32/assets/63326537/77d39a4f-adf6-4483-89c0-914b84731480)\n\n\n### Setup\n- Install Windows Subsystem for Linux, and set to WSL 1 for speed improvements.\n- Install the Alpine Linux distribution. I use this as the base for the tmux feature, since it has very low overhead (less than 12MB, including tmux).\n- The next few steps are optional. Create a new, cloned WSL instance for PowerShell tmux. You could just use the default Alpine instance, but I like to have a single-purpose WSL instance, similar to Docker containers named posh_tmux.\n\n```\nmkdir $env:userprofile\\Documents\\WSL\\instances # Or wherever you want to set this up\nmkdir $env:userprofile\\Documents\\WSL\\images\ncd $env:userprofile\\Documents\\WSL\nwsl --export Alpine .\\images\\alpine_base.tar\nmkdir .\\instances\\posh_tmux\nwsl --import posh_tmux .\\instances\\posh_tmux .\\images\\alpine_base.tar --version 1 \n```\n- Launch the WSL instance as root with `wsl -d posh_tmux -u root`\n- `adduser tmux`\n- Set the default user for the instance by creating /etc/wsl.conf with the following contents:\n```\n[user]\ndefault = tmux\n```\n- apk add tmux to install tmux\n\n- Exit the session, relaunch with wsl ~ -d posh_tmux (omitting the username, since it will now default to the tmux user)\n- Create a ~/.profile with the following:\n```\nif tmux has-session -t=posh; then\n  exec tmux attach-session -t posh\nelse\n  exec tmux new-session -s posh -n PowerShell\nfi\n```\n\n-Create a ~/.tmux.conf with the following:\n```\nset -g default-command \"cd $(pwsh.exe -c 'Write-Host -NoNewLine \\$env:userprofile' | xargs -0 wslpath); exec pwsh.exe --nologo\"\nset-window-option -g automatic-rename off\nbind c new-window -n \"PowerShell\"\n\n# Give this tmux a \"PowerShell blue\" color to differentiate it\n#set -g status-bg blue\n\n\n# Mouse support\nset -g mouse on\n\n# Start windows and panes at 1, not 0\nset -g base-index 1\nset -g pane-base-index 1\nset-window-option -g pane-base-index 1\nset-option -g renumber-windows on\n\n# Set true colors\nset-option -sa terminal-overrides \",xterm*:Tc\"\nset-option -g focus-events on\n\n\n\n# Use UTF8\nset -qg utf8\nset-window-option -qg utf8 on\n\n# Set vi-mode\nset-window-option -g mode-keys vi\n\n# ^ Keybindings\nbind-key -T copy-mode-vi v send-keys -X begin-selection\nbind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle\nbind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel\n\n# Bind r to source this file\nunbind r\n#bind r source ~/.tmux.conf\nbind r source-file ~/.tmux.conf \\; display \"Reloaded!\"\n\n# Recommended, to avoid the Ctrl+B finger-gymnastics\n# Change default prefix to Screen's\nunbind C-b\nset-option -g prefix C-Space\nbind-key C-Space send-prefix\n#bind-key -n C-b send-prefix\nbind C-Space last-window\n\n# Maybe later C-S-J C-S-K\nbind-key -n C-Tab next-window\nbind-key -n C-S-Tab previous-window\n\n#if you want tmux to pass along these (and other) xterm-style key sequences to programs running inside tmux, then you will need to enable the xterm-keys window option.\n#set-option -gw xterm-keys on\n\n\n# Optional\n# split panes using - and |\nbind | split-window -h\nbind - split-window -v\nunbind '\"'\nunbind %\n\nset -g history-limit 10000\n\nset -g default-terminal \"screen-256color\"\n\n# Plugins\n#set -g @plugin 'tmux-plugins/tpm'\n#set -g @plugin 'tmux-plugins/tmux-sensible'\n#set -g @plugin 'christoomey/vim-tmux-navigator'\n#set -g @plugin 'tmux-plugins/tmux-yank'\n\n# Status bar customization\nset -g status-interval 10         # update the status bar every 10 seconds\nset -g status-justify left\n    set -g status-position bottom\nset -g status-left-length 200     # increase length (from 10)\nset -g status-style 'bg=default'  # transparent background\n\n# STATUS BAR STYLE 1 - PLAIN\nset -g status-left \"#[fg=#b4befe,bg=default]  #S #[fg=#45475a,bg=default]|\"\nset -g status-right \"#[fg=#eba0ac,bg=default]#{?window_zoomed_flag, ,} #[fg=#45475a,bg=default]|#[fg=#f2dcdc,bg=default] %m/%d/%y \"\nset -g window-status-current-format '#[fg=#b4befe,bg=default] #I#W'\nset -g window-status-format '#[fg=gray,bg=default] #I #W'\n\n# STATUS BAR STYLE 2 - BUBBLES\n#set -g status-left '#[fg=#2b2a30,bg=default]#[fg=#b4befe,bg=#2b2a30]  #S #[fg=#2b2a30,bg=default]#[fg=#45475a,bg=default] |'\n#set -g status-right '#[fg=#2b2a30,bg=default] #[fg=#eba0ac,bg=#2b2a30]#{?window_zoomed_flag,,}#[fg=#2b2a30,bg=default] #[fg=#45475a,bg=default]| #[fg=#2b2a30,bg=default]#[fg=#f2dcdc,bg=#2b2a30]%m/%d/%y#[fg=#2b2a30,bg=default]'\n#set -g window-status-current-format '#[fg=#2b2a30,bg=default] #[fg=#b4befe,bg=#2b2a30]#I#W#[fg=#2b2a30,bg=default]'\n#set -g window-status-format '#[fg=gray,bg=default]  #I #W '\n\n\nset -g window-status-last-style 'fg=white,bg=default'\nset -g pane-border-style 'fg=#b4befe'\nset -g pane-active-border-style 'fg=#b4befe'\nset -g default-terminal \"${TERM}\"\nset -g message-command-style bg=default,fg=#f2dcdc\nset -g message-style bg=default,fg=#f2dcdc\nset -g mode-style bg=default,fg=#f2dcdc\n```\n- Set up a PowerShell Core tmux profile in Windows Terminal with the launch command `wsl -d posh_tmux`\n\n- If you need to access the instance without entering tmux/PowerShell (for instance, to sudo apk upgrade or to edit the config), launch instead with `wsl ~ -d tmux_posh -u root`\n\n- You can access tmux commands from within PowerShell by wsl -d tmux_posh -e tmux \u003ctmux_command. For instance, wsl -d tmux_posh -e tmux rename-window host1. - TODO: Create a tmux wrapper PowerShell function for this.\n\n- TODO: PowerShell prompt function to set the window name dynamically to the last executed command\n\n\n### Fixing Ctrl-Tab not being read by tmux\nIf your key binds don't work on Windows Terminal/WSL, that is:\n\n`bind -r C-Tab next-window`\n`bind -r C-S-Tab previous-window`\nYou need to go to the terminal key bind settings and add mappings for the tab with modifiers. For Windows Terminal it will be Setting-\u003eOpen JSON file-\u003ego to \"actions\"-\u003eand add the following:\n```\n{\n    \"command\":\n    {\n        \"action\": \"sendInput\",\n        \"input\": \"\\u001b[27;5;9~\"\n    },\n    \"keys\": \"ctrl+tab\"\n},\n{\n    \"command\":\n    {\n        \"action\": \"sendInput\",\n        \"input\": \"\\u001b[27;6;9~\"\n    },\n    \"keys\": \"ctrl+shift+tab\"\n},\n```\n\n## Aliases to consider\n### Git functions\n```powershell\nfunction ginit ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git init $remaining\n}\nfunction gremote ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git remote $remaining\n}\nfunction gclone ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git clone $remaining\n}\nfunction gadd ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git add $remaining\n}\nfunction gmv ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git mv $remaining\n}\nfunction grestore ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git restore $remaining\n}\nfunction grm ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git rm $remaining\n}\nfunction gdiff ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git diff $remaining\n}\nfunction ggrep ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git grep $remaining\n}\nfunction glog ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git log $remaining\n}\nfunction gshow ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git show $remaining\n}\nfunction gstatus ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git status $remaining\n}\nfunction gbranch ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git branch $remaining\n}\nfunction gcheckout ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git checkout $remaining\n}\nfunction gcommit ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git commit $remaining\n}\nfunction gmerge ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git merge $remaining\n}\nfunction grebase ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git rebase $remaining\n}\nfunction greset ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git reset $remaining\n}\nfunction gswitch ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git switch $remaining\n}\nfunction gtag ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git tag $remaining\n}\nfunction gfetch ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git fetch $remaining\n}\nfunction gpull ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git pull $remaining\n}\nfunction gpush ([Parameter(ValueFromRemainingArguments)] $remaining) {\n    git push $remaining\n}\n\nfunction gch ($message) {\n    git add .\n    git commit -m $message\n    git push\n}\nfunction gnb ($branch_name) {\n    gcheckout -b $branch_name\n    gcommit -m \"new branch - $($branch_name)\"\n    gpush --set-upstream origin $branch_name\n}\nfunction gstart ([Parameter(Mandatory)] $repo) {\n    ginit\n    gremote add origin $repo\n    gadd .\n    gpush --set-upstream origin master\n}\nfunction mergemaster {\n    $cur_branch = gbranch --show-current\n    gpull\n    gcheckout master\n    gpull\n    gcheckout $cur_branch\n    gmerge master\n}\n\n# CD\n\nfunction .. {\n    Set-Location ..\n}\nfunction ... {\n    Set-Location ../..\n}\nfunction .... {\n    Set-Location ../../..\n}\nfunction ..... {\n    Set-Location ../../../..\n}\nfunction ...... {\n    Set-Location ../../../../..\n}\n\nfunction projects {\n    Set-Location ~/Projects\n}\n```\n\n## TODOs:\n- [ ] Research into [mikebattista/PowerShell-WSL-Interop](https://github.com/mikebattista/PowerShell-WSL-Interop) for the possibility of a wsl1 interop with pwsh\n- [ ] Create a light WSL 1 TMUX Container for pwsh as detailed [here](https://superuser.com/questions/408874/tmux-screen-alternative-for-powershell)\n- [ ] move to zsh? or bashrc and bashrc_noclear\n- [ ] update pwsh config to reflect my functions for launching arch instead of ubuntu\n- [ ] SystemVerilog\n- [ ] lunarvim install \u0026 cofig\n- [ ] lf config\n- [ ] stow dotfiles?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadham-elaraby%2Fdotfiles-win32","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadham-elaraby%2Fdotfiles-win32","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadham-elaraby%2Fdotfiles-win32/lists"}