Skip to content

Commit

Permalink
Merge pull request #16 from xTrayambak/rewrite
Browse files Browse the repository at this point in the history
V2 - Rewrite
  • Loading branch information
xTrayambak authored Nov 22, 2024
2 parents 79a3ffc + 45e518d commit 0e3cef1
Show file tree
Hide file tree
Showing 20 changed files with 543 additions and 337 deletions.
20 changes: 9 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# Lucem 1.1.2 is here!
# Lucem 2.0.0 is here!
Yay.

This release brings the `lucem explain` command to help people who prefer the TOML configuration file to understand what the options do.
**NOTICE**: Please run `lucem init` upon installing this release!

# What's Changed?
Lucem now stands at around 2.3K lines of code. This update did a whole lot of housekeeping to make Lucem more maintainable in the future since the original program was very silly and fixed some problems very weirdly.
This release rewrites a huge part of Lucem by splitting it up into three components - the lucem CLI you all know (and love? hate? I don't know!) to be more modular.

## Bug Fixes
* Serialization issue, this might've been causing Sober to be rendered unusable until it is force resetted in some very specific scenarios, see issue #8
* We no longer spam `flatpak ps` to check if Sober is running, which'd cause the system to run out of memory if you played for long durations (4-5 hours), depending on how much RAM you have.
* Temporarily disabled the loading screen for everyone as the new Sober update seems to completely break it.
# What's Changed?
Lucem stands at 2.4K lines of code.

## New Features
* You can now directly force Sober to use either X11 or Wayland with the `client:backend` TOML configuration entry.
* You can now list all compatible GPUs with `lucem list-gpus`.
* Lucem now verifies that you have a GPU that supports Vulkan upon startup. This can be bypassed with the `--dont-check-vulkan` flag.
* Lucem now allows you to change the renderer with the `client:renderer` backend. Correct values for this are `opengl` or `vulkan`.
* Lucem now has an overlay on platforms that support it (KDE, Hyprland, Sway, Cosmic, or basically anything that isn't GNOME)
* Lucem now defaults to using Sober's RPC implementation as it is better. `lucem:discord_rpc` still works as intended.

# Thank you to all of these people :3
* The Sober team for creating Sober (plox open source it so that I can rewrite it in Nim :3)
* AshtakaOof for beta-testing the early rewrite builds

# Installation
Run `nimble install https://github.com/xTrayambak/lucem` in your terminal. Remember, this requires a Nim toolchain with version 2.0 or higher.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If you really cheat on Roblox, I'd say you should reconsider your life decisions
- GTK4-based FFlag editor that is easy to use
- Rich presence
- Server region notifier
- If you're not a fan of GUIs, we provide a nifty configuration file that does the same thing! (located at `~/.config/lucem/config.toml`)
- If you're not a fan of GUIs, we provide a nifty configuration file that does the same thing! (located at `~/.config/lucem/config.toml`, or you can run `lucem edit-config`!)
- Managing Sober

Whilst not a feature you use directly, Lucem also caches API calls whenever it can in order to save bandwidth and resources.
Expand Down Expand Up @@ -114,6 +114,16 @@ $ lucem meta
$ lucem clear-cache
```

## Installing Desktop File
```command
$ lucem install-desktop-file
```

## Installing Systemd Service (run as user, not root!)
```command
$ lucem install-systemd-service
```

# Troubleshooting

## It says `lucem: command not found` after compiling!
Expand Down
11 changes: 8 additions & 3 deletions lucem.nimble
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Package

version = "1.1.3"
version = "2.0.0"
author = "xTrayambak"
description = "A small wrapper over Sober that provides quality of life improvements"
license = "MIT"
srcDir = "src"
bin = @["lucem"]
backend = "c"
bin = @["lucem", "lucemd", "lucem_overlay"]

# Dependencies

Expand All @@ -14,6 +15,10 @@ requires "colored_logger >= 0.1.0"
requires "jsony >= 1.1.5"
requires "toml_serialization >= 0.2.12"
requires "pretty >= 0.1.0"
requires "discord_rpc >= 0.2.0"
requires "owlkettle >= 3.0.0"
requires "nimgl >= 1.3.2"
requires "netty >= 0.2.1"
requires "curly >= 1.1.1"
requires "nanovg >= 0.4.0"
requires "siwin#9ce9aa3efa84f55bbf3d29ef0517b2411d08a357"
requires "opengl >= 1.2.9"
2 changes: 2 additions & 0 deletions nim.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--define:ssl
--define:adwMinor=4
--define:nvgGLES3
--deepCopy:on
--panics:on
11 changes: 11 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,23 @@ mkShell {
libadwaita.dev
pkg-config
openssl.dev
curl.dev
xorg.libX11
xorg.libXcursor.dev
xorg.libXrender
xorg.libXext
libxkbcommon
libGL.dev
wayland
wayland-protocols
wayland-scanner.dev
];

LD_LIBRARY_PATH = lib.makeLibraryPath [
gtk4.dev
libadwaita.dev
pkg-config
curl.dev
openssl.dev
];
}
Binary file added src/IBMPlexSans-Regular.ttf
Binary file not shown.
4 changes: 2 additions & 2 deletions src/argparser.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Argument parser for Lucem, based on `std/parseopt`
## Copyright (C) 2024 Trayambak Rai
import std/[os, parseopt, logging, tables]
import std/[os, parseopt, logging, tables, strutils]
import ./[sugar]

type Input* = object
Expand Down Expand Up @@ -51,7 +51,7 @@ proc parseInput*(): Input {.inline.} =
debug "argparser: found argument: " & parser.key
input.arguments &= parser.key

if input.command.len < 1:
if input.command.len < 1 and not getAppFilename().contains("lucemd") and not getAppFilename().contains("lucem_overlay"): # lucemd and lucem_overlay don't need a command
error "lucem: expected command, got none. Run `lucem help` for more information."
quit(1)

Expand Down
Loading

0 comments on commit 0e3cef1

Please sign in to comment.