Skip to content

Commit

Permalink
[Release] 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick330602 authored Dec 27, 2022
2 parents 9034956 + a0e0959 commit 664e123
Show file tree
Hide file tree
Showing 20 changed files with 311 additions and 61 deletions.
34 changes: 0 additions & 34 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

104 changes: 104 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Bug Report
description: Create a report to help us improve
labels: ["Bug"]
assignees:
- patrick330602
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
> **ATTENTION!**
>
> Built-in versions of wslu in Ubuntu are no longer supported by me.
>
> If you have problems, please:
> 1. Report to the Ubuntu WSL team; or
> 2. Try the PPA version of WSL here: <https://launchpad.net/~wslutilities/+archive/ubuntu/wslu>
>
> Usually The PPA version of wslu will address most of your problems.
- type: dropdown
id: win-version
attributes:
label: Windows Version
description: What version of Windows are you running?
options:
- Windows 10
- Windows 11
validations:
required: true
- type: input
id: win-build
attributes:
label: Windows Build Number
description: What's your Windows build number?
placeholder: e.g. build 17704
validations:
required: true
- type: dropdown
id: wsl-version
attributes:
label: WSL Version
description: What version of WSL are you running?
options:
- WSL 1
- WSL 2
- Not Applicable
validations:
required: true
- type: input
id: wsl-distro
attributes:
label: Distro Version
description: What's the distro? If it happens on multiple distros, please list them.
placeholder: e.g. Ubuntu 20.04
validations:
required: true
- type: input
id: wslu-version
attributes:
label: WSL Utilities Version
description: What's the version of WSL Utilities?
placeholder: e.g. 2.3.4
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context about the problem here.
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/wslutilities/wslu/blob/7920eb4f94873666477032a33ab57a9b6ee9ad96/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
cp -f ./CODE_OF_CONDUCT.md ./website/coc.md
cp -f ./CONTRIBUTING.md ./website/contributing.md
git --git-dir=./website/.git --work-tree=./website add -A
git --git-dir=./website/.git --work-tree=./website commit -m "Manpage update"
git --git-dir=./website/.git --work-tree=./website commit -m "Document update"
git --git-dir=./website/.git --work-tree=./website push
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ all: doc
rm $(HEADER).tmp
chmod +x $(OUTPATH)/*

install: doc_install res_install
install: doc_install res_install conf_install
install -Dm 755 out/* -t $(DESTDIR)$(PREFIX)/bin

uninstall:
Expand Down Expand Up @@ -62,6 +62,9 @@ res_install:
install -Dm 644 src/etc/*.desktop $(DESTDIR)$(PREFIX)/share/wslu
install -Dm 644 src/etc/conf $(DESTDIR)$(PREFIX)/share/wslu

conf_install:
install -Dm 644 src/etc/user/conf $(DESTDIR)/etc/wslu

clean:
rm -rf $(OUTPATH)
rm -rf $(OUTMANPATH)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![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>

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0-1
4.1.0-1
3 changes: 3 additions & 0 deletions docs/wslsys.1
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ For example, \fB"light"\fR.
.B -T, --win-system-type
Print whether the system is running in Windows Desktop, Windows Server, or Windows Domain Controller.
For example, \fB"Server"\fR.
.TP
.B -d, --systemd-status
Print the status of systemd in WSL.
.SH AUTHOR
Created by Patrick Wu <[email protected]>
.SH REPORTING BUGS
Expand Down
2 changes: 1 addition & 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 \'/usr/share/wslu/custom.conf\', \'$HOME/.config/wslu/conf\', or \'$HOME/.wslurc\'. They will be read in the direction they are listed.
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.
.SH EXIT STATUS
.TP
.B 1
Expand Down
3 changes: 3 additions & 0 deletions docs/wslusc.1
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ Default GUI type. Default type is 'legacy'. Use 'native' for Native GUI generati
.TP
.B WSLUSC_SMART_ICON_DETECTION
Smart Icon Detection. Requires wslpy (Requires Python 3.5). default is \'false\'.
.TP
.B WSLUSC_BASE_CONVERTER_ENGINE
Converter engine. You can choose either 'ffmpeg' or 'imagemagick'. By default it is 'imagemagick'.
.SH AUTHOR
Created by Patrick Wu <[email protected]>
.SH REPORTING BUGS
Expand Down
2 changes: 1 addition & 1 deletion extras/build/alpine/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Patrick Wu <[email protected]>
# Contributor: Patrick Wu <[email protected]>
pkgname=wslu
pkgver=4.0.0
pkgver=4.1.0
pkgrel=0
pkgdesc="A collection of utilities for the Linux Subsystem for Windows"
url="https://github.com/wslutilities/wslu"
Expand Down
2 changes: 1 addition & 1 deletion extras/build/arch/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Patrick Wu <[email protected]>

pkgname=wslu
pkgver=4.0.0
pkgver=4.1.0
pkgrel=0
pkgdesc="A collection of utilities for the Linux Subsystem for Windows"
arch=('any')
Expand Down
4 changes: 4 additions & 0 deletions extras/build/rpm/copr/wslu.spec
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ make
# for os <= 7
mkdir -p %{?buildroot}/usr/share/man/man1/
mkdir -p %{?buildroot}/usr/share/man/man7/
mkdir -p %{?buildroot}/usr/share/applications/
mkdir -p %{?buildroot}/usr/share/wslu/
mkdir -p %{?buildroot}/usr/bin/
mkdir -p %{?buildroot}/etc/wslu/
# normal part
make PREFIX=/usr DESTDIR=%{?buildroot} install
ln -sf /usr/bin/wslview %{?buildroot}/usr/bin/wview
Expand Down Expand Up @@ -74,6 +76,8 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/wslgsu
%{_bindir}/wslclip
/usr/share/wslu/
/usr/share/applications/
/etc/wslu
%doc /usr/share/man/

%changelog
Expand Down
4 changes: 4 additions & 0 deletions extras/build/rpm/obs/wslu.spec
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ make
# for os <= 7
mkdir -p %{?buildroot}/usr/share/man/man1/
mkdir -p %{?buildroot}/usr/share/man/man7/
mkdir -p %{?buildroot}/usr/share/applications/
mkdir -p %{?buildroot}/usr/share/wslu/
mkdir -p %{?buildroot}/usr/bin/
mkdir -p %{?buildroot}/etc/wslu/
# normal part
make PREFIX=/usr DESTDIR=%{?buildroot} install
ln -sf /usr/bin/wslview %{?buildroot}/usr/bin/wview
Expand Down Expand Up @@ -74,6 +76,8 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/wslvar
%{_bindir}/wslclip
/usr/share/wslu/
/usr/share/applications/
/etc/wslu/
%doc /usr/share/man/

%changelog
Expand Down
6 changes: 6 additions & 0 deletions src/etc/conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
# wsl-kernel
# wsl-package-count
# wsl-ip
# wsl-systemd-status
# 'wsl-version' will be always ignored since it is builtin in wslfetch.
WSLFETCH_INFO_SECTION="windows-build,windows-rel-branch,wsl-release,wsl-kernel,windows-uptime"

Expand All @@ -49,6 +50,11 @@ WSLUSC_GUITYPE="legacy"
# wslusc: Smart Icon Detection. Requires wslpy (Requires Python 3.5).
WSLUSC_SMART_ICON_DETECTION=false

# wslusc: Converter engine. You can choose either `ffmpeg` or `imagemagick`. By default it is `imagemagick`.
# - `ffmpeg` engine supports .png and .svg; However, svg support is usually not included by default;
# - `imagemagick` engine supports .png, .svg, .ico, and .xpm.
WSLUSC_BASE_CONVERTER_ENGINE=imagemagick

# wslvar: Default Type of variable to get when not specifying option. Default type is 1.
# Available Types:
# 1: User Shell Folders
Expand Down
61 changes: 61 additions & 0 deletions src/etc/user/conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# wslfetch: the sections of info from wslsys to show in wslfetch.
# Available options:
# windows-install-date
# windows-rel-branch
# windows-build
# windows-full-build
# display-scaling
# windows-locale
# windows-theme
# windows-uptime
# wsl-uptime
# wsl-release
# wsl-kernel
# wsl-package-count
# wsl-ip
# wsl-systemd-status
# 'wsl-version' will be always ignored since it is builtin in wslfetch.
# WSLFETCH_INFO_SECTION="windows-build,windows-rel-branch,wsl-release,wsl-kernel,windows-uptime"

# wslfetch: whether you want to display colorbar in wslfetch. This will override `-c/--colorbar` param.
# WSLFETCH_COLORBAR=false

# wslfetch: This allows you to use your own customized theme.
# WSLFETCH_THEME_PATH=

# wslusc: Default GUI type. Default type is 'legacy'. Use 'native' for Native GUI generation by default
# WSLUSC_GUITYPE="legacy"

# wslusc: Smart Icon Detection. Requires wslpy (Requires Python 3.5).
# WSLUSC_SMART_ICON_DETECTION=false

# wslusc: Converter engine. You can choose either `ffmpeg` or `imagemagick`. By default it is `imagemagick`.
# - `ffmpeg` engine supports .png and .svg; However, svg support is usually not included by default;
# - `imagemagick` engine supports .png, .svg, .ico, and .xpm.
# WSLUSC_BASE_CONVERTER_ENGINE=imagemagick

# wslvar: Default Type of variable to get when not specifying option. Default type is 1.
# Available Types:
# 1: User Shell Folders
# 2: Windows Environment Variables
# WSLVAR_DEFAULT_VARTYPE=1

# wslview: default method to start websites/folders/files. Default type is "powershell".
# Available options:
# 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"
20 changes: 18 additions & 2 deletions src/wslsys.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# shellcheck shell=bash
help_short="wslsys [-VIbBFUWRKPSltT] [-s]\nwslsys [-hv] [-n NAME]"
help_short="wslsys [-VIbBFUWRKPSltTd] [-s]\nwslsys [-hv] [-n NAME]"

## Windows 10 information
function get_branch() {
Expand Down Expand Up @@ -124,6 +124,19 @@ function get_win_system_type() {
esac
}

function get_systemd() {
debug_echo "get_systemd: called"
if [ "$(get_wsl_version)" == "2" ]; then
if __wsl_conf_read boot systemd | grep "true" >/dev/null; then
echo "enabled"
else
echo "disabled"
fi
else
echo "N/A"
fi
}

## Simple printer defined for fetching information
function printer() {
debug_echo "printer: called with \"$1\" \"$2\""
Expand Down Expand Up @@ -200,6 +213,9 @@ function dict_finder() {
15|-T|--win-system-type|win-system-type)
printer "System Type (Windows)" "$(get_win_system_type)"
return;;
16|-d|--systemd-status|wsl-systemd-status)
printer "SystemD Status" "$(get_systemd)"
return;;
*) return 1;;
esac
}
Expand All @@ -210,7 +226,7 @@ function wslsys_main() {
# If input is empty, print everything available
if [[ "$*" == "" ]]; then
debug_echo "wslsys_main: printing everything"
for i in {1..15}; do
for i in {1..16}; do
dict_finder "$i"
done
exit
Expand Down
Loading

0 comments on commit 664e123

Please sign in to comment.