Compare commits
7 Commits
175d72ee84
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
e8914c63fb
|
|||
|
529ad4a27b
|
|||
|
e137182417
|
|||
|
5ffdd26e59
|
|||
|
be98666db2
|
|||
|
197cd20d6c
|
|||
|
083f11965d
|
34
.clang-format
Normal file
34
.clang-format
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# clang-format is fairly limited, and these rules are approximate:
|
||||||
|
# - array initializers can get terribly mangled with clang-format 12.0,
|
||||||
|
# - sometimes it still aligns with space characters,
|
||||||
|
# - struct name NL { NL ... NL } NL name; is unachievable.
|
||||||
|
BasedOnStyle: GNU
|
||||||
|
ColumnLimit: 80
|
||||||
|
IndentWidth: 4
|
||||||
|
TabWidth: 4
|
||||||
|
UseTab: ForContinuationAndIndentation
|
||||||
|
BreakBeforeBraces: Allman
|
||||||
|
SpaceAfterCStyleCast: true
|
||||||
|
AlignAfterOpenBracket: DontAlign
|
||||||
|
AlignOperands: DontAlign
|
||||||
|
AlignConsecutiveMacros: Consecutive
|
||||||
|
AllowAllArgumentsOnNextLine: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
IndentGotoLabels: false
|
||||||
|
|
||||||
|
# IncludeCategories has some potential, but it may also break the build.
|
||||||
|
# Note that the documentation says the value should be "Never".
|
||||||
|
SortIncludes: false
|
||||||
|
|
||||||
|
# Must be kept synchronized with gi18n.h
|
||||||
|
WhitespaceSensitiveMacros: ['_', 'Q_', 'N_', 'C_', 'NC_']
|
||||||
|
|
||||||
|
# This is a compromise, it generally works out aesthetically better.
|
||||||
|
BinPackArguments: false
|
||||||
|
|
||||||
|
# Unfortunately, this can't be told to align to column 40 or so.
|
||||||
|
SpacesBeforeTrailingComments: 2
|
||||||
|
|
||||||
|
# GLib-specific macro body wrappers.
|
||||||
|
MacroBlockBegin: "G_STMT_START"
|
||||||
|
MacroBlockEnd: "G_STMT_END"
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
cmake_minimum_required (VERSION 2.8.5)
|
cmake_minimum_required (VERSION 3.0...3.27)
|
||||||
project (sensei-raw-ctl C)
|
project (sensei-raw-ctl VERSION 1.0 LANGUAGES C)
|
||||||
set (project_VERSION "1.0")
|
|
||||||
|
|
||||||
find_package (PkgConfig REQUIRED)
|
find_package (PkgConfig REQUIRED)
|
||||||
pkg_check_modules (dependencies REQUIRED libusb-1.0)
|
pkg_check_modules (dependencies REQUIRED libusb-1.0)
|
||||||
@@ -51,7 +50,7 @@ if (BUILD_GUI)
|
|||||||
target_link_libraries (${PROJECT_NAME}-gui ${gtk3_LIBRARIES})
|
target_link_libraries (${PROJECT_NAME}-gui ${gtk3_LIBRARIES})
|
||||||
install (TARGETS ${PROJECT_NAME}-gui
|
install (TARGETS ${PROJECT_NAME}-gui
|
||||||
DESTINATION ${CMAKE_INSTALL_BINDIR})
|
DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
endif (BUILD_GUI)
|
endif ()
|
||||||
|
|
||||||
find_program (HELP2MAN_EXECUTABLE help2man)
|
find_program (HELP2MAN_EXECUTABLE help2man)
|
||||||
if (NOT HELP2MAN_EXECUTABLE)
|
if (NOT HELP2MAN_EXECUTABLE)
|
||||||
@@ -77,18 +76,17 @@ foreach (page ${project_MAN_PAGES})
|
|||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "SteelSeries Sensei Raw control utility")
|
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "SteelSeries Sensei Raw control utility")
|
||||||
set (CPACK_PACKAGE_VERSION ${project_VERSION})
|
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
|
||||||
set (CPACK_PACKAGE_VENDOR "Premysl Janouch")
|
set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>")
|
||||||
set (CPACK_PACKAGE_CONTACT "Přemysl Janouch <p@janouch.name>")
|
|
||||||
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
|
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
|
||||||
|
|
||||||
set (CPACK_GENERATOR "TGZ;ZIP")
|
set (CPACK_GENERATOR "TGZ;ZIP")
|
||||||
set (CPACK_PACKAGE_FILE_NAME
|
set (CPACK_PACKAGE_FILE_NAME
|
||||||
"${PROJECT_NAME}-${project_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
"${PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
|
|
||||||
set (CPACK_SOURCE_GENERATOR "TGZ;ZIP")
|
set (CPACK_SOURCE_GENERATOR "TGZ;ZIP")
|
||||||
set (CPACK_SOURCE_IGNORE_FILES "/\\\\.git;/build;/CMakeLists.txt.user")
|
set (CPACK_SOURCE_IGNORE_FILES "/\\\\.git;/build;/CMakeLists.txt.user")
|
||||||
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${project_VERSION}")
|
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
|
||||||
|
|
||||||
set (CPACK_SET_DESTDIR TRUE)
|
set (CPACK_SET_DESTDIR TRUE)
|
||||||
include (CPack)
|
include (CPack)
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2013, Přemysl Janouch <p@janouch.name>
|
Copyright (c) 2013, Přemysl Eric Janouch <p@janouch.name>
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
purpose with or without fee is hereby granted.
|
purpose with or without fee is hereby granted.
|
||||||
|
|||||||
16
README.adoc
16
README.adoc
@@ -10,7 +10,10 @@ Run `sensei-raw-ctl --help` or `man sensei-raw-ctl` for usage information.
|
|||||||
|
|
||||||
If you don't fancy command line tools, there's also a basic GTK+ frontend
|
If you don't fancy command line tools, there's also a basic GTK+ frontend
|
||||||
available. On Ubuntu and its derivatives, you should be able to find it in your
|
available. On Ubuntu and its derivatives, you should be able to find it in your
|
||||||
System Settings.
|
System Settings, though this feature has disappeared completely with newer GNOME
|
||||||
|
versions.
|
||||||
|
|
||||||
|
image::sensei-raw-ctl-gui.png[align="center"]
|
||||||
|
|
||||||
Supported devices
|
Supported devices
|
||||||
-----------------
|
-----------------
|
||||||
@@ -20,12 +23,14 @@ Supported devices
|
|||||||
|
|
||||||
Packages
|
Packages
|
||||||
--------
|
--------
|
||||||
Regular releases are sporadic. git master should be stable enough. You can get
|
Regular releases are sporadic. git master should be stable enough.
|
||||||
a package with the latest development version from Archlinux's AUR.
|
You can get a package with the latest development version using Arch Linux's
|
||||||
|
https://aur.archlinux.org/packages/sensei-raw-ctl-git[AUR],
|
||||||
|
or as a https://git.janouch.name/p/nixexprs[Nix derivation].
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
Build dependencies: cmake >= 2.8.5, help2man +
|
Build dependencies: cmake >= 3.0, help2man +
|
||||||
Runtime dependencies: libusb >= 1.0, gtk+ >= 3.0 (optional)
|
Runtime dependencies: libusb >= 1.0, gtk+ >= 3.0 (optional)
|
||||||
|
|
||||||
$ git clone https://git.janouch.name/p/sensei-raw-ctl.git
|
$ git clone https://git.janouch.name/p/sensei-raw-ctl.git
|
||||||
@@ -46,9 +51,6 @@ For Debian-based distros, you can do the following instead of the last step:
|
|||||||
$ cpack -G DEB
|
$ cpack -G DEB
|
||||||
# dpkg -i sensei-raw-ctl-*.deb
|
# dpkg -i sensei-raw-ctl-*.deb
|
||||||
|
|
||||||
Note that for versions of CMake before 2.8.9, you need to prefix `cpack` with
|
|
||||||
`fakeroot` or file ownership will end up wrong.
|
|
||||||
|
|
||||||
Contributing and Support
|
Contributing and Support
|
||||||
------------------------
|
------------------------
|
||||||
Use https://git.janouch.name/p/sensei-raw-ctl to report bugs, request features,
|
Use https://git.janouch.name/p/sensei-raw-ctl to report bugs, request features,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#define CONFIG_H
|
#define CONFIG_H
|
||||||
|
|
||||||
#define PROJECT_NAME "${CMAKE_PROJECT_NAME}"
|
#define PROJECT_NAME "${CMAKE_PROJECT_NAME}"
|
||||||
#define PROJECT_VERSION "${project_VERSION}"
|
#define PROJECT_VERSION "${PROJECT_VERSION}"
|
||||||
|
|
||||||
#cmakedefine DEVELOPER_MODE
|
#cmakedefine DEVELOPER_MODE
|
||||||
#ifdef DEVELOPER_MODE
|
#ifdef DEVELOPER_MODE
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Very tightly coupled with the sensei-raw-ctl utility.
|
* Very tightly coupled with the sensei-raw-ctl utility.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013, Přemysl Janouch <p@janouch.name>
|
* Copyright (c) 2013, Přemysl Eric Janouch <p@janouch.name>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted.
|
* purpose with or without fee is hereby granted.
|
||||||
@@ -395,4 +395,3 @@ main (int argc, char *argv[])
|
|||||||
g_object_unref (builder);
|
g_object_unref (builder);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
sensei-raw-ctl-gui.png
Normal file
BIN
sensei-raw-ctl-gui.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -31,6 +31,7 @@
|
|||||||
<property name='border-width'>10</property>
|
<property name='border-width'>10</property>
|
||||||
<child><object class='GtkNotebook' id='notebook'>
|
<child><object class='GtkNotebook' id='notebook'>
|
||||||
<property name='show-tabs'>FALSE</property>
|
<property name='show-tabs'>FALSE</property>
|
||||||
|
<property name='show-border'>FALSE</property>
|
||||||
<child><object class='GtkHBox' id='probing_box'>
|
<child><object class='GtkHBox' id='probing_box'>
|
||||||
<property name='halign'>GTK_ALIGN_CENTER</property>
|
<property name='halign'>GTK_ALIGN_CENTER</property>
|
||||||
<property name='valign'>GTK_ALIGN_CENTER</property>
|
<property name='valign'>GTK_ALIGN_CENTER</property>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* The code might be a bit long but does very little; most of it is UI.
|
* The code might be a bit long but does very little; most of it is UI.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013 - 2016, Přemysl Janouch <p@janouch.name>
|
* Copyright (c) 2013 - 2016, Přemysl Eric Janouch <p@janouch.name>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted.
|
* purpose with or without fee is hereby granted.
|
||||||
@@ -73,7 +73,7 @@ find_device (int vendor, int product, int *error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
out_free:
|
out_free:
|
||||||
libusb_free_device_list(list, 1);
|
libusb_free_device_list (list, 1);
|
||||||
out:
|
out:
|
||||||
if (error != NULL && err != 0)
|
if (error != NULL && err != 0)
|
||||||
*error = err;
|
*error = err;
|
||||||
@@ -621,4 +621,3 @@ error_1:
|
|||||||
error_0:
|
error_0:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user