Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
# labwc-tweaks

[![CI]](https://github.com/labwc/labwc-tweaks/actions/workflows/build.yml)
<br />
<div align="center">
<h3 align="center">labwc-tweaks</h3>

<p align="center">
A GUI settings application for labwc
</p>
</div>

This is a GUI 'Settings' application for labwc.
# About the Project

<img src="data/screenshot.png"/>

### Description

1. GUI for managing settings in `~/.config/labwc{rc.xml,environment}`

# Getting Started

### dependencies

Runtime:
Expand Down
1 change: 1 addition & 0 deletions src/maindialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ QStringList MainDialog::findIconThemes(enum lab_icon_theme_type type)
// Iterate over paths and use any icon-theme which has more than just a
// "cursors" subdirectory (because that means it's for cursors only)
QStringList themes;
themes.push_front("");
themes.push_front("Adwaita");
for (const QString &path : std::as_const(paths)) {
QDir dir(path);
Expand Down
14 changes: 2 additions & 12 deletions src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ extern "C" {
#include "xml.h"
}

#define DEFAULT_XCURSOR_SIZE 24
int xcursor_size(void)
{
bool success = false;
int size = QString(qgetenv("XCURSOR_SIZE")).toInt(&success);
return success ? size : DEFAULT_XCURSOR_SIZE;
}
#undef DEFAULT_XCURSOR_SIZE

void initSettings(std::vector<std::shared_ptr<Setting>> &settings)
{
// Appearance
Expand All @@ -36,11 +27,10 @@ void initSettings(std::vector<std::shared_ptr<Setting>> &settings)

// Mouse & Touchpad
settings.push_back(std::make_shared<Setting>("XCURSOR_THEME", LAB_FILE_TYPE_ENVIRONMENT,
LAB_VALUE_TYPE_STRING,
getenv("XCURSOR_THEME") ?: (char *)"Adwaita"));
LAB_VALUE_TYPE_STRING, ""));

settings.push_back(std::make_shared<Setting>("XCURSOR_SIZE", LAB_FILE_TYPE_ENVIRONMENT,
LAB_VALUE_TYPE_INT, xcursor_size()));
LAB_VALUE_TYPE_INT, 24));

settings.push_back(std::make_shared<Setting>("/labwc_config/libinput/device/naturalScroll",
LAB_FILE_TYPE_RCXML, LAB_VALUE_TYPE_BOOL, 0));
Expand Down