Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release] 4.1.2 #299

Merged
merged 30 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7f2bcdc
Update VERSION
patrick330602 Dec 30, 2022
a5cba04
bugfix: sysdrive_prefix returning wrong label when Windows installed
epiciskandar Jan 11, 2023
1c2e963
replace `sed` with simple `basename`
epiciskandar Jan 24, 2023
297f6ef
wslu: sysdrive_prefix returning wrong label when Windows installed at…
patrick330602 Jan 24, 2023
f68117f
Add support for Rocky to installer
cjonesy Mar 14, 2023
ab11cad
Merge pull request #269 from cjonesy/add-rocky-install
patrick330602 Mar 19, 2023
7e976b8
wslact: fix memory-reclaim incoherence
kbpk Mar 22, 2023
2cd6c5d
wslact: increase memory reclamation amount
kbpk Mar 22, 2023
b19df3d
Deploy to Pengwin debian bookworm as well
crramirez Jul 3, 2023
c772490
Merge pull request #281 from crramirez/patch-9
patrick330602 Jul 22, 2023
db7c574
wslview: fix opening links with brackets
miduddin Sep 22, 2023
9cd1fc4
Merge pull request #271 from kbpk/dev/master
patrick330602 Oct 2, 2023
0339c25
Merge pull request #287 from miduddin/dev/master
patrick330602 Oct 2, 2023
e4aecb3
docs:fixed typos
Smoothieewastaken Oct 27, 2023
a180bfd
Merge pull request #292 from Smoothieewastaken/patch
patrick330602 Oct 27, 2023
b89be25
ci: upgrade CI pengwin deployment ruby version
patrick330602 Nov 12, 2023
1e450d8
fix: [#290] use proper folder for the states
patrick330602 Nov 12, 2023
86cc1e5
chore: [#288] improve documentation a bit
patrick330602 Nov 12, 2023
c818f00
fix: [#268] allow skipping validation
patrick330602 Nov 12, 2023
b6fa4b7
fix: [#264] make DESTDIR properly configured in header
patrick330602 Nov 12, 2023
7c6a9ed
fix: [#295] decode file protocol url properly
patrick330602 Dec 29, 2023
ea34a92
feat: [#293] allow set path with param -e to set BROWSER variable
patrick330602 Dec 30, 2023
e52ebcf
fix: [#294] add bash version requirement.
patrick330602 Dec 30, 2023
b08c0b8
fix: [#291] allow disable reading from registry
patrick330602 Dec 31, 2023
d3e688f
chore: shellcheck fix
patrick330602 Dec 31, 2023
4dc0017
perf: Use POSIX Parameter substitution instead of `basename` exec
hyperupcall Jan 6, 2024
2cc1c20
Merge branch 'fox-forks-hyperupcall-perf' into dev/master
patrick330602 Jan 7, 2024
060b047
fix: [#268] do not validate URL when skip flag is used
JaZo Jan 11, 2024
37da694
chore: update VERSION
patrick330602 Mar 10, 2024
4ee2c0c
Merge pull request #301 from JaZo/patch-1
patrick330602 Mar 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pkgbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
name: Pengwin Deploying
needs: pgwbuild
runs-on: ubuntu-20.04
container: circleci/ruby:2.3-jessie
container: cimg/ruby:2.7
steps:
- name: Retrive package for deployment
uses: actions/download-artifact@v1
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/pkgdeploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,21 @@ jobs:
name: Pengwin Deploying
needs: pgwbuild
runs-on: ubuntu-20.04
container: circleci/ruby:2.3-jessie
container: cimg/ruby:2.7
steps:
- name: Retrive package for deployment
uses: actions/download-artifact@v1
with:
name: PengwinDEBs
- run: gem install package_cloud
- name: deploy to the dev
- name: deploy to bullseye repo
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PGW_DEV_DEPLOY_KEY }}
run: package_cloud push whitewaterfoundry/wslu/debian/bullseye ./PengwinDEBs/*.deb --skip-errors
- name: deploy to bookworm
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PGW_DEV_DEPLOY_KEY }}
run: package_cloud push whitewaterfoundry/wslu/debian/bookworm ./PengwinDEBs/*.deb --skip-errors
rpmobsbuild:
name: RPM - OpenSUSE Build Service
runs-on: ubuntu-20.04
Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

We love pull requests from everyone. By participating in this project, you agree to abide by [Code of Conduct](CODE_OF_CONDUCT.md).

> **ATTENTION!**
>
> Built-in versions of wslu in Ubuntu are no longer supported by me.
>
> If you have problems, please check whther you are using the [PPA version of wslu](https://launchpad.net/~wslutilities/+archive/ubuntu/wslu). If not, please report to the Ubuntu WSL team; However, the PPA version of wslu will address most issue that come from the built-in version.

## Code contributions

### Setup
Expand Down Expand Up @@ -83,6 +89,7 @@ For contributing, there are several functions and variables built-in the header
- `wslu_util_name` - current utility name
- `wslu_version` - wslu version, written by `VERSION`
- `wslu_prefix` - the location `wslu` installed to, written by the `PREFIX` during the make.
- `wslu_dest_dir` - the location `wslu` installed to, written by the `DESTDIR` during the make.
- `wslu_debug` - the variable used for calling utility across. This will allow calling the `--debug` option for other `wslu` utilities inside script easier.
- Formatting: `black`, `red`, `green`, `brown`, `blue`, `purple`, `cyan`, `yellow`, `white`, `dark_gray`, `light_red`, `light_green`, `light_blue`, `light_purple`, `light_cyan`, `light_gray`, `orange`, `light_orange`, `deep_purple`, `bold`, `reset`
- Indicator: `info`, `input_info`, `error`, `warn`
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ VERTMP = $(shell cat ./VERSION)

all: doc
[ -d $(OUTPATH) ] || mkdir $(OUTPATH)
sed -e 's/VERSIONPLACEHOLDER/'$(VERTMP)'/' -e 's|PREFIXPLACEHOLDER|'$(PREFIX)'|' $(HEADER) > $(HEADER).tmp; \
sed -e 's/VERSIONPLACEHOLDER/'$(VERTMP)'/' -e 's|PREFIXPLACEHOLDER|'$(PREFIX)'|' -e 's|DESTDIRPLACEHOLDER|'$(DESTDIR)'|' $(HEADER) > $(HEADER).tmp; \
for file in $(SOURCES); do \
cat $(HEADER).tmp $$file > $(OUTPATH)/`basename $$file`; \
mv $(OUTPATH)/`basename $$file` $(OUTPATH)/`basename $$file .sh`; \
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@

[![GitHub license](https://img.shields.io/github/license/wslutilities/wslu?style=flat-square&label=license&color=blue&logo=github)](https://github.com/wslutilities/wslu/blob/master/LICENSE)
[![GitHub (pre-)release](https://img.shields.io/github/v/release/wslutilities/wslu?include_prereleases&logo=github&style=flat-square)](https://github.com/wslutilities/wslu)
[![Twitter Follow](https://img.shields.io/twitter/follow/wslutilities?style=flat-square&logo=twitter&color=1DA1F2&label=follow)](https://twitter.com/wslutilities)
[![Mastodon Follow](https://img.shields.io/mastodon/follow/108802672885079993?color=6364FF&domain=https%3A%2F%2Ffosstodon.org&label=follow&logo=mastodon&logoColor=6364FF&style=flat-square)](https://fosstodon.org/@wslutilities)

</div>

> **ATTENTION!**
>
> Built-in versions of wslu in Ubuntu are no longer supported by me.
>
> If you have problems, please check whther you are using the [PPA version of wslu](https://launchpad.net/~wslutilities/+archive/ubuntu/wslu). If not, please report to the Ubuntu WSL team; However, the PPA version of wslu will address most issue that come from the built-in version.

This is a collection of utilities for the Linux Subsystem for Windows (WSL), such as converting Linux paths to Windows paths or creating Linux application shortcuts on the Windows Desktop.

- Requires at least Windows 10 Creators Update;
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.0-1
4.1.2-1
8 changes: 4 additions & 4 deletions docs/wslact.1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Currently, we have two features available:
.nf
\fBts, time-sync\fR \- Time Sync
\fBam, auto-mount\fR \- Auto Mounting
\fBmr, mem-reclaim\fR \- Memory Reclaimation
\fBmr, memory-reclaim\fR \- Memory Reclamation
.fi
.in
.SH COMMANDS
Expand Down Expand Up @@ -52,11 +52,11 @@ pass a list of options you want to pass to \fImount\fR command.
print a simple help.
.in
.fi
.SS "Memory Reclaimation"
Memory Reclaimation (\fImem-reclaim\fR) feature allows you to reclaim memory by dropping memory cache. Requires sudo.
.SS "Memory Reclamation"
Memory Reclamation (\fImemory-reclaim\fR) feature allows you to reclaim memory by dropping memory cache. Requires sudo.
.TP
SYNOPSIS
.B wslact auto-mount
.B wslact memory-reclaim
.RB [ \-h ]
.TP
OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion docs/wslfetch.1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ add a colorbar to the printed information. This can also be set with the configu
Force to print information with generic WSL logo.
.TP
.B -t, --theme \fITHEME\fR
set a cutom theme from the file \fITHEME\fR. This can also be set with the configuration \fIWSLFETCH_THEME_PATH\fR.
set a custom theme from the file \fITHEME\fR. This can also be set with the configuration \fIWSLFETCH_THEME_PATH\fR.
.TP
.B -o, --options \fIOPTIONS\fR
set custom options from the file \fIOPTIONS\fR. Please refer to the WSLFETCH_INFO_SECTION in the CONFIGURATION section for more information.
Expand Down
2 changes: 1 addition & 1 deletion docs/wslgsu.1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Print current version.
Use a separate user to execute the command/service. By default it's \fIroot\fR.
.TP
.B -n, --name \fINAME\fR
Add an explicit name instead of the default of autoamtically extracting a name from the service/command.
Add an explicit name instead of the default of automatically extracting a name from the service/command.
.TP
.B -S, --service
Using this option means you are addng a system service. without \fB-S\fR, you are adding a command to system.
Expand Down
4 changes: 2 additions & 2 deletions docs/wslsys.1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ For example, \fB"0x5df84068"\fR.
.TP
.B -b, --branch
Print current release branch of your Windows 10.
For example, \fB"rs_prerelease"\fR means you are on rs_prerelease realease branch.
For example, \fB"rs_prerelease"\fR means you are on rs_prerelease release branch.
.TP
.B -B, --build
Print current build version of your Windows 10.
Expand Down Expand Up @@ -73,7 +73,7 @@ Print the current IPv4 address for your WSL distro.
For example, \fB"127.37.41.23"\fR.
.TP
.B -S, --display-scaling
Print the current disply scaling from your display setting.
Print the current display scaling from your display setting.
For example, \fB"2"\fR for 200% scaling.
.TP
.B -l, --locale
Expand Down
6 changes: 5 additions & 1 deletion docs/wslu.7
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Entering debug mode.
Entering verbose mode.
.SH CONFIGURATION
.TP
The defualt configuration is stored in /usr/share/wslu/conf. You can override the default configuration in \'/etc/wslu/conf\', \'/etc/wslu/custom.conf\', \'$HOME/.config/wslu/conf\', or \'$HOME/.wslurc\'. They will be read in the direction they are listed.
The default configuration is stored in /usr/share/wslu/conf. You can override the default configuration in \'/etc/wslu/conf\', \'/etc/wslu/custom.conf\', \'$HOME/.config/wslu/conf\', or \'$HOME/.wslurc\'. They will be read in the direction they are listed.
.SH EXIT STATUS
.TP
.B 1
Expand Down Expand Up @@ -80,6 +80,10 @@ unsupported feature (for your Windows 10 build)
.TP
.B 40
Unknown system input.
.SH CONFIGURATION
.TP
.B WSLVIEW_DEFAULT_ENGINE
control whether to enable the chcp workaround for powershell. By default it is true; if you encounter any PowerShell issues, you can try to disable it.
.SH BUG
Report bugs to <https://github.com/wslutilities/wslu/issues>;
For Ubuntu specific bugs, report to <https://bugs.launchpad.net/ubuntu/+source/wslu>.
Expand Down
11 changes: 10 additions & 1 deletion docs/wslview.1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- Component of WSL Utilities
.SH SYNOPSIS
.B wslview, wview, wslstart, wstart
.RB [ \-hvur ]
.RB [ \-ehsvurE ]
.PP
.B wslview, wview, wslstart, wstart
.I LINK/FILE
Expand All @@ -19,11 +19,17 @@ print a simple help.
.B -v, --version
print current version.
.TP
.B -s, --skip-validation-check
skip url validation check.
.TP
.B -u, --unreg-as-browser
remove \fBwslview\fR as the default WSL web browser.
.TP
.B -r, --reg-as-browser
register \fBwslview\fR as the default WSL web browser.
.TP
.B -e, --export-as-browser
register \fBwslview\fR as the default WSL web browser using export method.
.SH CONFIGURATION
.TP
.B WSLVIEW_DEFAULT_ENGINE
Expand All @@ -35,6 +41,9 @@ cmd: use cmd.exe to start website/folder/file
cmd_explorer: use explorer.exe via cmd.exe to start website/folder/file
.in
.fi
.TP
.B WSLVIEW_SKIP_VALIDATION_CHECK
whether to skip validation check. Default is 1, which is not skipping. Can be either `0` or `1`.
.SH AUTHOR
Created by Patrick Wu <me@patrickwu.space>
.SH REPORTING BUGS
Expand Down
2 changes: 1 addition & 1 deletion extras/scripts/manpage_deploy.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ ! -d "./website/wslu/man/${wslu_ver}" ] ; then
cp ./docs/*.html ./website/wslu/man/${wslu_ver}
rm -f ./website/wslu/man/*.html
for f in $(ls -d ./website/wslu/man/${wslu_ver}/*.html); do
fname="$(basename ${f})"
fname="${f##*/}"
ln -s ./${wslu_ver}/${fname} ./website/wslu/man/${fname}
done
fi
2 changes: 1 addition & 1 deletion extras/scripts/wslu-install
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ case $distro in
Alpine*) sudo apk add git;;
Arch*) sudo pacman -Syyu git --noconfirm;;
Scientific*) sudo yum install -y git;;
*Fedora*) sudo dnf install -y git;;
*Fedora*|*Rocky*) sudo dnf install -y git;;
*Gentoo*) sudo emerge -a n dev-vcs/git;;
*Generic*) [ "fedora" == "$(cat /etc/os-release | grep -e "LIKE=" | sed -e 's/ID_LIKE=//g')" ] && sudo dnf install -y git || exit 1;;
*) exit 1;;
Expand Down
9 changes: 8 additions & 1 deletion src/etc/conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# wslu: control whether to enable the chcp workaround for powershell.
# By default it is true; if you encounter any PowerShell issues, you can try to disable it.
WSLU_POWERSHELL_CHCP_WORKAROUND=true

# wslfetch: the sections of info from wslsys to show in wslfetch.
# Available options:
# windows-install-date
Expand Down Expand Up @@ -66,4 +70,7 @@ WSLVAR_DEFAULT_VARTYPE=1
# powershell: use powershell.exe to start website/folder/file
# cmd: use cmd.exe to start website/folder/file
# cmd_explorer: use explorer.exe via cmd.exe to start website/folder/file
WSLVIEW_DEFAULT_ENGINE="powershell"
WSLVIEW_DEFAULT_ENGINE="powershell"

# wslview: whether to skip validation check. Default is 1, which is not skipping. Can be either `0` or `1`.
WSLVIEW_SKIP_VALIDATION_CHECK=1
9 changes: 8 additions & 1 deletion src/etc/user/conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# wslu: control whether to enable the chcp workaround for powershell.
# By default it is true; if you encounter any PowerShell issues, you can try to disable it.
# WSLU_POWERSHELL_CHCP_WORKAROUND=true

# wslfetch: the sections of info from wslsys to show in wslfetch.
# Available options:
# windows-install-date
Expand Down Expand Up @@ -58,4 +62,7 @@
# powershell: use powershell.exe to start website/folder/file
# cmd: use cmd.exe to start website/folder/file
# cmd_explorer: use explorer.exe via cmd.exe to start website/folder/file
# WSLVIEW_DEFAULT_ENGINE="powershell"
# WSLVIEW_DEFAULT_ENGINE="powershell"

# wslview: whether to skip validation check. Default is 1, which is not skipping. Can be either `0` or `1`.
# WSLVIEW_SKIP_VALIDATION_CHECK=1
3 changes: 2 additions & 1 deletion src/wslact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function memory_reclaim {
error_echo "\`wslact memory-reclaim\` requires you to run as root. Aborted." 1
fi

sync
echo 1 > /proc/sys/vm/drop_caches
echo "${info} Memory Reclaimed."
}
Expand All @@ -101,7 +102,7 @@ while [ "$1" != "" ]; do
case "$1" in
ts|time-sync|tr|time-reset) time_reset "$@"; exit;;
am|auto-mount|sm|smart-mount) auto_mount "$@"; exit;;
mr|mem-reclaim) memory_reclaim "$@"; exit;;
mr|memory-reclaim|mem-reclaim) memory_reclaim "$@"; exit;;
-h|--help) help "$0" "$help_short"; exit;;
-v|--version) version; exit;;
*) error_echo "Invalid Input. Aborted." 22;;
Expand Down
2 changes: 1 addition & 1 deletion src/wslfetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ is_generic=0

help_short="wslfetch [-hvcg] [-t THEME] [-o OPTIONS]"

PARSED_ARGUMENTS=$(getopt -a -n "$(basename "$wslu_util_name")" -o hvtcgo: --long help,version,theme,colorbar,generic,options: -- "$@")
PARSED_ARGUMENTS=$(getopt -a -n "${wslu_util_name##*/}" -o hvtcgo: --long help,version,theme,colorbar,generic,options: -- "$@")
#shellcheck disable=SC2181
[ "$?" != "0" ] && help "$wslu_util_name" "$help_short"

Expand Down
3 changes: 2 additions & 1 deletion src/wslgsu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ if [[ "$wa_gs_commd" != "" ]] || [[ $isWakeup -eq 1 ]]; then
# handling no name given case
if [[ "$wa_gs_name" = "" ]]; then
debug_echo "No name given, automatically generate"
wa_gs_name=$(basename "$(echo "$wa_gs_commd" | awk '{print $1}')")
wa_gs_name=$(echo "$wa_gs_commd" | awk '{print $1}')
wa_gs_name=${wa_gs_name##*/}
fi
wa_gs_commd="wsl.exe -d $WSL_DISTRO_NAME -u $wa_gs_user $wa_gs_commd"
wa_gs_dscp="Executing following command \`$wa_gs_name\` from $WSL_DISTRO_NAME when computer start up; Generated By WSL Utilities"
Expand Down
Loading
Loading