Skip to content

Commit

Permalink
version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lolrepeatlol committed Oct 12, 2024
0 parents commit df7713a
Show file tree
Hide file tree
Showing 18 changed files with 1,298 additions and 0 deletions.
52 changes: 52 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
cmake_minimum_required(VERSION 3.10)

project(Robinwaita LANGUAGES C)

set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)

find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
find_package(PkgConfig REQUIRED)

pkg_check_modules(GTK REQUIRED gtk4)
pkg_check_modules(ADWAITA REQUIRED libadwaita-1)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GIOUNIX REQUIRED gio-unix-2.0)
pkg_check_modules(GRAPHENE REQUIRED graphene-1.0)

include_directories(
${Python3_INCLUDE_DIRS}
${GIOUNIX_INCLUDE_DIRS}
${GTK_INCLUDE_DIRS}
${ADWAITA_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${GRAPHENE_INCLUDE_DIRS}
)

add_executable(robinwaita
main.c
process.c
process.h
scheduler.c
scheduler.h
main.h
)

target_link_libraries(robinwaita
${Python3_LIBRARIES}
${GTK_LIBRARIES}
${ADWAITA_LIBRARIES}
${GLIB_LIBRARIES}
${GIOUNIX_LIBRARIES}
${GRAPHENE_LIBRARIES}
)

link_directories(
${GTK_LIBRARY_DIRS}
${ADWAITA_LIBRARY_DIRS}
${GLIB_LIBRARY_DIRS}
${GRAPHENE_LIBRARY_DIRS}
${GIOUNIX_LIBRARY_DIRS}
)

target_compile_options(robinwaita PRIVATE ${GTK_CFLAGS_OTHER})
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Robinwaita
Robinwaita is user-friendly round-robin process scheduler for Linux written in C. It comes with a modern Libadwaita & GTK 4-based user interface.

## Screenshots
![A screenshot of Robinwaita having completed process scheduling](screenshots/img1.png "Robinwaita heading image")
![A screenshot of Robinwaita showing how processes are added to the scheduler](screenshots/scheduler.png "Adding processes to the scheduler")
![A screenshot of Robinwaita's statistics screen, showing context switches and average running time](screenshots/statistics.png "Robinwaita's statistics tab")
![A picture of the source code, showing a segment of the timerfd implementation](screenshots/timerfd.png "Robinwaita uses timerfd")

## Details
* Easily add processes to the scheduling queue
* Round-robin scheduling algorithm, with context switches initiated by `timerfd`
* See how processes get managed by the algorithm in real-time
* Modern GTK 4 interface with light and dark modes
* Check basic statistics like total context switches in a separate tab

## Motivation for this project
* Before we get into anything -- yes, this project is useless. I know.
* That being said, given the additional low-level programming experience I've been getting recently, as well as my growing experience with operating systems concepts, I wanted to challenge myself by programming a process scheduler from scratch.
* I've also loved GNOME and its technologies like GTK for several years. I've thought about making a GTK app for a while now, so combining the two seemed like a fun fit. Ultimately, while the user interface for this project is undeniably basic, I'm still really happy with how it turned out.

## Try Robinwaita for yourself
### Dependencies
* Robinwaita has been developed with the following versions of these packages:
* `libadwaita`/`libadwaita-devel` version 1.5
* `libgtk-4-dev`/`gtk4-devel` 4.14
* `libglib2.0-dev`/`glib2-devel`
* `libgio-unix-2.0-dev`/`gio-unix-devel` 2.0
* `libgraphene-1.0-dev`/`graphene-devel` 1.0
* `python3-dev`/`python3-devel` 3.12.6
* `gcc` 14.2.1
* `cmake` 3.28.2
* `pkg-config`/`pkgconf-pkg-config`
* Other versions may work, but I provide no guarantees.
* I provide an ARM64 build under Releases, but it's expected your system still satisfies dependencies above.
* My build environment was a Fedora 40 VM under Parallels on my M2 Pro MacBook Pro.

### Building the project
1. Clone the repository:
```
git clone https://
cd robinwaita
```
2. Install dependencies:
* Install the dependencies noted above. Keep in mind these instructions are different across distributions, so instructions aren't provided here.
3. Generate the build system using CMake, and build:
```
mkdir build
cd build
cmake ..
cmake --build .
```
4. Run the application:
```
chmod +x robinwaita # set file as executable
./robinwaita # run it! (you can also open it from your file manager)
```
9 changes: 9 additions & 0 deletions desktop_integration/robinwaita.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.0
Name=Robinwaita
Exec=/path/to/Robinwaita/build/robinwaita
Icon=robinwaita
Terminal=false
Type=Application
Categories=Utility;
Path=/path/to/Robinwaita/build/
22 changes: 22 additions & 0 deletions desktop_integration/robinwaita.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit df7713a

Please sign in to comment.