Skip to content

Commit

Permalink
Maintenance fixups as per your request :3 (#45)
Browse files Browse the repository at this point in the history
* Kinda rewrite the README

Lots of grammar and markdown improvements.

The inconsistency of markdown+HTML amalgamation should still be addressed.

* Add more details about the repo

As per the request upstream.

* Fix the address parsing and simplify some of the logic using GitHub CLI

* Improve the release logic

The previous logic used to depend on the VERSION file being pushed,
which causes a new release to fail to be generated if the new release
was deleted.

* Fix the removal of the URL and the divider after that

---------

Co-authored-by: Bahar Kurt <[email protected]>
  • Loading branch information
kurtbahartr and kurtbahartr authored Nov 3, 2024
1 parent 3520429 commit 23935f0
Show file tree
Hide file tree
Showing 3 changed files with 220 additions and 74 deletions.
34 changes: 29 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,50 @@ name: Create Release on Version Update

on:
push:
paths:
- VERSION
branches:
- 'main'

jobs:
create-release:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Compare current release with VERSION file
id: compare_versions
run: |
if [ "$(gh release view -q '.tagName' --json tagName)" == "$(cat VERSION)" ]; then
echo "No new release to generate!"
echo "NEW_RELEASE=0" >> $GITHUB_ENV
exit
fi
# Apparently the tag still exists when the release is deleted from GitHub web interface...
# Also mock the exit status so that it always returns with code 0.
git push --delete origin refs/tags/$(cat VERSION) || true
echo "NEW_RELEASE=1" >> $GITHUB_ENV
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run catalog script
id: run_script
if: ${{ env.NEW_RELEASE == '1' }}
run: |
# Execute the script and save the output
if [ -x scripts/GetCatalog.md ]; then
./scripts/GetCatalog.md > release_notes.md
if [ -x scripts/GetCatalog.sh ]; then
GH_TOKEN=$GH_TOKEN ./scripts/GetCatalog.sh > release_notes.md
else
echo "scripts/GetCatalog.md is not executable or not found"
echo "scripts/GetCatalog.sh is not executable or not found"
exit 1
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create tag
id: create_tag
if: ${{ env.NEW_RELEASE == '1' }}
run: |
# Generate a new tag based on the version
TAG_NAME=$(cat VERSION)
Expand All @@ -34,12 +55,14 @@ jobs:
- name: Output release notes
id: output_release_notes
if: ${{ env.NEW_RELEASE == '1' }}
run: |
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
cat release_notes.md >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create release
if: ${{ env.NEW_RELEASE == '1' }}
uses: actions/create-release@v1
with:
tag_name: ${{ env.TAG_NAME }}
Expand All @@ -49,3 +72,4 @@ jobs:
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

235 changes: 176 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,96 +15,213 @@
<hr />
<div align="center">
<p>
A linux desktop environment configuration using <a href='https://github.com/aylur/ags'>Aylur's Gtk Shell</a>.<br/>
Also, an automated post install installation script.<br/>
A Hyprland configuration set using <a href='https://github.com/aylur/ags'>AGS (Aylur's Gtk Shell)</a>.<br/>
Can also be used as an automated post-install configuration script.<br/>
</p>

<hr />
</div>

> [!WARNING]
> Laptop workarounds are based on community feedback, and Nvidia support is unofficial but supported with community help.
> Laptop workarounds are based on community feedback, and NVIDIA support is noted by Hyprland Wiki to be unofficial but supported with the help of the community.
## Showcase
Comming Soon!
Soon!
<!-- Put actual screenshots here as soon as possible! -->

## Featues

<details>
<summary>Dotfile Featues</summary>
<summary>Dotfiles</summary>
<br>

- Clean fastfetch, zsh, and oh-my-posh
- GTK Focus
- Ags login screen
- Ags status bar
- Great hypridle config (won't lock screen in full screen, pause all player media when locked)
- And more
Many More Featues comming soon
- Sane defaults for Pacman
- Clean and minimal configurations for fastfetch, ZSH and OMP (Oh-My-Posh)
- Focus on GTK
- Login skin by AGS
- Uses GreetD as the greeter.
- Material 3 design language
- Yes, this includes a replica of the Monet engine!
- Sane Hypridle configuration set
- Inhibits locking in full screen.
- Pauses all supported players when locked.
- Player support depends on the player of choice. Most major ones like Spotify and YouTube Music should support this.
- Basic OSDs (On-Screen Displays)
- Located on the right side of the screen by default for consistency with phones and tablets.
- Mild customizability, with even more tweaks possible inside the config files themselves
- Hey, at least it's the widest variety of configurations you can get from the GUI! It's like Good Lock on Samsung except it comes bundled out of the box.
- Keyboard shortcuts guide widget
- Similar to what Ubuntu Unity and Pardus have.
- Can be invoked with Super+/, much like on Discord.
- Full screen mobile-esque power menu
- This ain't like KDE but more like, again, Android devices.
- Cute defaults for images
- ...if you like anime style, that is. You can still change those in configurations, though.
- Many more available and to come!
</details>


<details>
<summary>Script Features</summary>
<summary>Scripts</summary>
<br>

- Fully Automated
- GPU Drivers Installation
- Configurable (e.g. cursor icons, chaotic_aur, shell, etc)
- Optimize Pacman (e.g parallel downloads, color, VerbosePkgLists)
- Laptop Workarounds (Framework autobrighness disbale only atm)
- KVM Setup w/ 3d Acceleration
- Set up gaming dependencies
- Simple hyprland config
- And more

Many more featues are comming soon

- Fully automated
- Granular configuration
<details>
<summary>Prepares the system for the configuration</summary>
<br>

- Updates the system before anything else.
- Makes sure preliminary dependencies are installed.
- Installs the AUR helper of choice.
- (Optional) Sets up Chaotic AUR - A pacman repo for prebuilt AUR packages.
- Generates mirror list using `rate-mirrors-bin` for fastest package installation experience possible.
- A backup of the previous mirror list is generated should you need to revert back.

</details>

## Supports
- VM detection - Hyprland needs extra configuration for virtual machines to enforce software rendering.
- Installs GPU drivers where supported.
- Config review before running is a must! (`group_vars/all.yml`)
- **__IF YOU HAVE AN NVIDIA GPU NOT SUPPORTED BY THE LATEST DRIVER, YOU MUST AVOID PROPRIETARY DRIVERS SERVED HERE AND FOLLOW ARCH WIKI FOR THE ONE THAT SUITS YOU!__**
- Laptop workarounds
- Currently only has auto-brightness blacklisting for Framework laptops - The board vendor is detected just in case.
- KVM configuration with 3D accelaration
- Required and optional dependencies for Linux gaming :D
- Full support for Arch Linux, with more on the roadmap.
- More of these! Check the config for most of them!
</details>

**Linux Distro**
## Supported Linux distros

- Arch Linux
- Arch Linux

## Requirements

1. Run this command

```
pacman -S curl
# Stable Release
bash <(curl -s https://raw.githubusercontent.com/dianaw353/dotfiles/main/dotfiles.sh) stable
# Rolling Release
bash <(curl -s https://raw.githubusercontent.com/dianaw353/dotfiles/main/dotfiles.sh) rolling
cd dotfiles
```

1. Edit the variables in `group_vars`
1. Get the release you want.
1.1. Stable release (Recommended for end users):
```
bash <(curl -s https://raw.githubusercontent.com/dianaw353/dotfiles/main/dotfiles.sh) stable
```
1.2. Rolling release (Recommended for developers and enthusiasts):
```
bash <(curl -s https://raw.githubusercontent.com/dianaw353/dotfiles/main/dotfiles.sh) rolling
```
2. Head into the `dotfiles` folder and edit the variables in `group_vars/all.yml`

> [!NOTE]
> This config is made for my setup so there may be a few things you want to change in group_vars/all.yml.
1. (Optional) Run the playbook in check mode to view potential changes
```
ansible-playbook main.yml --ask-become-pass --check
````
1. Run the playbook (enter your user's password when prompted)
```
ansible-playbook main.yml --ask-become-pass
```
1. (Optional) Run the playbook to run tasks with the value. (This will run the code needed for just that one application) PS. List of each task is in group_vars/all.yml under the default_roles flag :3
```
ansible-playbook main.yml --ask-become-pass -t <Name of roles>
```
## To do
For upcoming features, check [this page](https://github.com/dianaw353/dotfiles/issues?q=is%3Aissue+label%3AFeature+is%3Aopen).
## Acknowledgements
> These defaults were adjusted for my own setup, and there may be quite a few things you might want to change in there.
## Installation

(Optional) Do a dry-run to make sure things go smoothly:
```
ansible-playbook main.yml --ask-become-pass --check
```

The real deal:
```
ansible-playbook main.yml --ask-become-pass
```

You may also run a specific role instead of the entire playbook, which will install and configure only the packages and apps that role contains.
```
ansible-playbook main.yml --ask-become-pass -t role1 [role2 [...]]
```

> P.S. A list of the available roles can be found under the `default_roles` variable inside `group_vars/all.yml`. :3
## To-Do

- [ ] Add `noto-fonts` and `noto-fonts-emoji` to the list of packages to install.
- [ ] Add configuration to install additional optional fonts.
- [ ] Add autoEnable and Experimental configurations for Bluetooth in `/etc/bluetooth/main.conf`.
- [ ] Restart all network and Bluetooth services.
- [ ] Command to remove `pacman` lock file (`/var/lib/pacman/db.lck`) for failsafe cleanup in case of a power outage mid-transaction.

View [the relevant issues tag](https://github.com/dianaw353/dotfiles/issues?q=is%3Aissue+label%3AFeature+is%3Aopen) for a more comprehensive rough list of To-Dos and upcoming features.

## Layout of the repo

<details>
<summary>Click/Tap to reveal</summary>

- Pre-configuration Tasks
- Package manager
- Perform system upgrade if needed.
- Make sure preliminary dependencies are installed.
- Install the AUR helper of choice.
- (Optional) Set up Chaotic AUR.
- Generate mirror list using `rate-mirrors-bin`.
- A backup of the existing list will be generated in case you don't like the one generated by this repo.
- Update `pacman` configuration.
- VM detection
- Hyprland requires extra configuration for software rendering, which is a must for VMs.
- Drivers
- CPU detection to install the relevant `ucode` in case you skip it during system installation.
- GPU detection
- Core 64-bit, 32-bit and multiarch packages for all GPUs
- Required open-source multiarch graphics drivers and packages for AMD, Intel and NVIDIA
- Required proprietary multiarch graphics drivers and packages for AMD, Intel and NVIDIA
- Laptop workarounds
- Board vendor detection for appropriate workarounds to be applied.
- System
- Install required packages
- Enable SystemD services
- `systemd-timesyncd.service`
- `bluetooth.service`
- `pipewire.service`
- `pipewire-pulse.service`
- `wireplumber.service`
- Fixes
- GTK window buttons
- Screen locking
- Screen sharing using Pipewire
- Install packages
- Core system packages
- Audio server - May only choose either of these, not both.
- Pipewire
- PulseAudio
- Bluetooth
- Core packages
- PulseAudio companions
- Core roles
- AGS
- Install required packages
- Configuration
- Create configuration directories
- Copy over the configuration files - User profile images included.
- Enable required services
- Hyprland
- Install required packages
- Configuration
- Copy over the configuration files
- Update pre-made configuration files
- Enable dynamic cursors
- Install and configure core packages
- (Optional) Change the default shell
- Supports only ZSH. Also disables OMP warnings if my config is used.
- Install custom apps
- KVM
- Replace `iptables` with `iptables-nft`
- Install required packages
- Enable required services
- Add current user to `libvirt` group
- Update `libvirtd` settings
- Make sure virtual network is started and set it to automatically start on boot
- Install required packages and optimal gaming experience
- Post-configuration Tasks
- Clear AUR cache

</details>

## Credits

- TechDufus: https://github.com/TechDufus/dotfiles
- Logan Marchione: https://github.com/loganmarchione/ansible-arch-linux
- Dreams of Autonomy: https://github.com/dreamsofautonomy/zensh and https://github.com/dreamsofautonomy/zen-omp
- Aylur: https://github.com/Aylur/dotfiles
- Kotontrion: https://github.com/kotontrion/dotfiles
- Stephan Raabe: https://gitlab.com/stephan-raabe/dotfiles
and more that I have forgot to add
- And more that I might have forgotten to add...
25 changes: 15 additions & 10 deletions scripts/GetCatalog.md → scripts/GetCatalog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,34 @@ VERSION_HEADER="Version $VERSION"
CHANGELOG_FILE="CHANGELOG.md"

# Get the remote origin URL from git
REMOTE_URL=$(git config --get remote.origin.url)
REMOTE_URL=$(gh repo view -q '.url' --json url)

# Parse the website, owner, and repo from the remote URL
website=$(echo "$REMOTE_URL" | sed -n 's|.*\(https://[^/]*\).*|\1|p')
owner=$(echo "$REMOTE_URL" | sed -n 's|.*/\([^/]*\)/[^/]*\.git$|\1|p')
repo=$(echo "$REMOTE_URL" | sed -n 's|.*/[^/]*/\([^/]*\)\.git$|\1|p')
owner=$(gh repo view -q '.owner.login' --json owner)
repo=$(gh repo view -q '.name' --json name)

# Find the previous version by looking for the first version header that comes before the current version header
PREV_VERSION=$(awk -v header="$VERSION_HEADER" '
BEGIN {found=0}
$0 == header {found=1; next}
/^Version/ && found {print; exit}
' "$CHANGELOG_FILE" | sed 's/^Version //')
#
# NO you do NOT have to do it this way while GitHub-CLI is at your disposal, Diana. - Spring
#PREV_VERSION=$(awk -v header="$VERSION_HEADER" '
# BEGIN {found=0}
# $0 == header {found=1; next}
# /^Version/ && found {print; exit}
#' "$CHANGELOG_FILE" | sed 's/^Version //')

# Much cleaner and oneliner, you only need to set GH_TOKEN in Actions environment, which I did for you.
PREV_VERSION=$(gh release view -q '.tagName' --json tagName | sed 's/^V//')

# Extract the content between the specified version and the next version, excluding the release URL and dashes
awk -v header="$VERSION_HEADER" -v website="$website" -v owner="$owner" -v repo="$repo" '
BEGIN {found=0}
$0 == header {found=1; next}
/^Version/ && found {exit}
found && !($0 ~ website "/" owner "/" repo "/releases/tag/V" && $0 ~ /[0-9]+\.[0-9]+/) && !/^-----/ {print}
found && !($0 ~ website "/dianaw353/" repo "/releases/tag/V.*" && $0 ~ /[0-9]+\.[0-9]+/) && !/^-----.*/ {print}
' "$CHANGELOG_FILE"

# Add the "Full Changelog" line comparing the previous version with the current one only if a previous version exists
if [[ -n "$PREV_VERSION" ]]; then
echo "**Full Changelog**: $website/$owner/$repo/compare/V$PREV_VERSION...V$VERSION"
echo "**Full Changelog**: $REMOTE_URL/compare/V$PREV_VERSION...V$VERSION"
fi

0 comments on commit 23935f0

Please sign in to comment.