Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Devcontainer and action #25

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
688f2f3
QoL changes
Furfx Jan 22, 2018
8b8d2e9
Add files via upload
Furfx Jan 22, 2018
e773dc0
Add files via upload
Furfx Jan 22, 2018
0b2822d
Delete percentage.exe
Furfx Jan 22, 2018
9ae7066
Delete percentage.exe.config
Furfx Jan 22, 2018
dbdf336
Delete percentage.pdb
Furfx Jan 22, 2018
fea28af
Delete percentage.vshost.exe
Furfx Jan 22, 2018
29c0a26
Delete percentage.vshost.exe.config
Furfx Jan 22, 2018
e3061ff
Delete percentage.vshost.exe.manifest
Furfx Jan 22, 2018
f7a4d14
Delete DesignTimeResolveAssemblyReferencesInput.cache
Furfx Jan 22, 2018
d1d6c5e
Delete percentage.Properties.Resources.resources
Furfx Jan 22, 2018
53e5c83
Delete percentage.csproj.CoreCompileInputs.cache
Furfx Jan 22, 2018
f38abdb
Delete percentage.csproj.FileListAbsolute.txt
Furfx Jan 22, 2018
f2dc2c8
Delete percentage.csproj.GenerateResource.Cache
Furfx Jan 22, 2018
5050fea
Delete percentage.csprojResolveAssemblyReference.cache
Furfx Jan 22, 2018
f8afe51
Delete percentage.exe
Furfx Jan 22, 2018
1c02b0d
Delete percentage.pdb
Furfx Jan 22, 2018
6fbbf25
Changed to cleartype and displaying green text when charging
Jan 24, 2018
a3c0c8f
Remaining time now shown in tooltip
Jan 24, 2018
8b092ca
Better charging behaviour
Feb 19, 2018
38902c4
Pull in updates (#2)
thumperward Oct 27, 2019
bad7964
Merge branch 'master' of https://github.com/Furfx/percentage into Fur…
thumperward Oct 27, 2019
e625722
Merge branch 'Furfx-master'
thumperward Oct 27, 2019
fdbe919
Merge branch 'derlorenz' of https://github.com/stangier/percentage in…
thumperward Oct 27, 2019
d383844
Merge branch 'stangier-derlorenz'
thumperward Oct 27, 2019
917a464
Cszucko tooltip info (#6)
thumperward Oct 27, 2019
02d71b5
Revert "Cszucko tooltip info (#6)" (#7)
thumperward Oct 27, 2019
05db907
Cszucko tooltip info (#8)
thumperward Oct 27, 2019
99b9de0
Add Github Action for continuous integration, and compiling notes
thumperward Oct 27, 2019
244f082
remove signing from csproj so CI works
thumperward Oct 27, 2019
394f368
Merge remote-tracking branch 'origin/feat/action-and-readme'
thumperward Oct 27, 2019
303ada2
add artifact upload to CI (#9)
thumperward Oct 27, 2019
672e98e
add CI status badge
thumperward Apr 12, 2020
ee13327
add devcontainer and markdown config
thumperward Aug 20, 2021
ac7ac4f
add ssh to devcontainer
thumperward Aug 20, 2021
c1eea29
fix windows github action
thumperward Aug 20, 2021
f96f362
Add mono action (#10)
thumperward Aug 21, 2021
0a34003
merge from upstream
thumperward Aug 21, 2021
11c0cac
add vscode devcontainer, github action, update readme, fix manifests
thumperward Aug 21, 2021
b4653ab
rm commented old content from devcontainer setup
thumperward Aug 21, 2021
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
16 changes: 16 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM mono
# Install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
ssh \
git \
sudo

# Add the vscode user.
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME -s /bin/bash \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
11 changes: 11 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "Mono (.NET)",
"build": {
"dockerfile": "Dockerfile"
},
"extensions": [
"ms-dotnettools.csharp",
"redhat.vscode-yaml"
],
"remoteUser": "vscode"
}
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on: [push]

jobs:
windows-build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
- name: MSBuild
working-directory: percentage
run: msbuild percentage.sln /property:Configuration=Release
# - name: Artifact upload
# uses: actions/upload-artifact@master
# with:
# name: percentage
# path: percentage\percentage\bin\Release\percentage.exe
linux-build:
runs-on: ubuntu-latest
container:
image: mono
steps:
- name: Prerequisites
run: apt update && apt install -y --no-install-recommends ssh git
- name: Checkout
uses: actions/checkout@master
- name: MSBuild
working-directory: percentage
run: msbuild percentage.sln -p:Configuration=Release
# - name: Artifact upload
# uses: actions/upload-artifact@master
# with:
# name: percentage
# path: percentage\percentage\bin\Release\percentage.exe
16 changes: 16 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
MD007:
indent: 4
MD013:
line_length: 80
tables: false
code_blocks: false
MD030:
ul_single: 3
ol_single: 2
ul_multi: 3
ol_multi: 2
MD033:
allowed_elements:
- pre
- br
35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,41 @@
# percentage

![](https://raw.githubusercontent.com/kas/percentage/master/percentage.png)
![CI](https://github.com/kas/percentage/workflows/CI/badge.svg)

See your battery percentage in the Windows 10 system tray
![Screenshot](percentage.png)

See your battery percentage in the Windows 10 system tray.

## Installing

1. [Download the latest release](https://github.com/kas/percentage/releases)
1. Put percentage.exe in your startup folder
1. To get to your startup folder, press Windows+R, type "shell:startup", then press enter
- [Download the latest release](https://github.com/kas/percentage/releases).
- Put `percentage.exe` in your startup folder (to get to your startup folder,
press `Windows + R`, type `shell:startup`, and press enter).

## Compiling

This project was compiled with Visual Studio Community 2019.

Select ".NET desktop development" when setting up Visual Studio.

To build the project
1. Open the percentage/percentage.sln file with Visual Studio
1. Click "Build > Build Solution"
1. percentage.exe can be found at percentage\percentage\percentage\bin\Debug\percentage.exe
To compile using a Windows Docker image with this pre-installed, first install
Docker Desktop and configure it to run Windows containers, then change to the
root directory of the repository and run the following:

```powershell
docker run -v "$(pwd)\:C:\Build\" nugardt/msbuild:15.5 msbuild \
C:\Build\percentage\percentage.sln /property:Configuration=Release
```

Alternatively, simply open the project in the provided devcontainer and run:

```sh
msbuild percentage/percentage.sln -p:Configuration=Release
```

The output binary is in `percentage/percentage/bin/release`.

## Contributions

My goal for this project is to keep it as simple as possible. I welcome suggestions, but for complicated features I'd recommend forking the project.
My goal for this project is to keep it as simple as possible. I welcome
suggestions, but for complicated features I'd recommend forking the project.
2 changes: 1 addition & 1 deletion percentage/percentage/percentage.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<ManifestKeyFile>percentage_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
<GenerateManifests>false</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
Expand Down