Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-shell-notification-center
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-shell-notification-center
Commits
90cde83b
Unverified
Commit
90cde83b
authored
Jul 08, 2023
by
Erik Reider
Committed by
GitHub
Jul 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add meson_option to build without PulseAudio Widget (#297)
parent
9bac0d09
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
13 deletions
+63
-13
swaync.5.scd
man/swaync.5.scd
+7
-1
meson.build
meson.build
+34
-2
meson_options.txt
meson_options.txt
+1
-0
factory.vala
src/controlCenter/widgets/factory.vala
+2
-0
meson.build
src/meson.build
+19
-10
No files found.
man/swaync.5.scd
View file @
90cde83b
...
...
@@ -224,8 +224,10 @@ config file to be able to detect config errors
optional: true ++
*buttons-grid*++
optional: true ++
#START pulse-audio
*volume*++
optional: true ++
#END pulse-audio
*backlight*++
optional: true ++
*inhibitors*++
...
...
@@ -415,6 +417,7 @@ config file to be able to detect config errors
description: "Command to be executed on click" ++
description: A list of actions containing a label and a command ++
description: A grid of buttons that execute shell commands ++
#START pulse-audio
*volume*++
type: object ++
css class: ++
...
...
@@ -463,6 +466,7 @@ config file to be able to detect config errors
default: 250 ++
description: Duration of animation in milliseconds ++
description: Slider to control pulse volume ++
#END pulse-audio
*backlight*++
type: object ++
css class: widget-backlight ++
...
...
@@ -565,8 +569,9 @@ config file to be able to detect config errors
}
}
```
#START scripting
#
IF BUILT WITH SCRIPTING
#
Scripts
*script-fail-notify* ++
type: bool ++
...
...
@@ -646,3 +651,4 @@ SWAYNC_REPLACES_ID="ID of notification to replace"
SWAYNC_ID="SwayNC notification ID"
SWAYNC_SUMMARY="Notification summary"
```
#END scripting
meson.build
View file @
90cde83b
...
...
@@ -98,9 +98,22 @@ endif
# Man pages
if get_option('man-pages')
scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: true)
if scdoc.found()
sed = find_program(['sed', '/usr/bin/sed'], required : true)
if scdoc.found() and sed.found()
scdoc_prog = find_program(scdoc.get_variable(pkgconfig :'scdoc'), native: true)
# Remove parts of man page if necessary
sed_command = []
foreach option : ['pulse-audio', 'scripting']
if get_option(option) == false
# Removes all lines between the #START and #END lines (inclusive)
sed_command += ['-e', '/#START @0@/,/#END @0@/d'.format(option)]
else
# Removes the #START and #END lines
sed_command += ['-e', '/#START @0@/d;/#END @0@/d'.format(option)]
endif
endforeach
mandir = get_option('mandir')
man_files = [
'swaync.1.scd',
...
...
@@ -111,17 +124,36 @@ if get_option('man-pages')
foreach filename : man_files
topic = filename.split('.')[-3].split('/')[-1]
section = filename.split('.')[-2]
input = join_paths('man', filename)
output = '@0@.@1@'.format(topic, section)
message(mandir, section, '@0@/man@1@'.format(mandir, section))
# Remove parts of man page if necessary
if sed_command.length() > 0
output_stripped = '.stripped-@0@.@1@'.format(topic, section)
input = custom_target(
output_stripped,
input: input,
output: output_stripped,
command: [sed, sed_command],
install: false,
feed: true,
capture: true,
build_by_default: true,
build_always_stale: true
)
endif
custom_target(
output,
input:
join_paths('man', filename)
,
input:
input
,
output: output,
command: scdoc_prog,
install: true,
feed: true,
capture: true,
build_by_default: true,
build_always_stale: true,
install_dir: '@0@/man@1@'.format(mandir, section)
)
endforeach
...
...
meson_options.txt
View file @
90cde83b
option('systemd-service', type: 'boolean', value: true, description: 'Install systemd user service unit.')
option('scripting', type: 'boolean', value: true, description: 'Enable notification scripting.')
option('pulse-audio', type: 'boolean', value: true, description: 'Provide PulseAudio Widget.')
option('man-pages', type: 'boolean', value: true, description: 'Install all man pages.')
option('zsh-completions', type: 'boolean', value: true, description: 'Install zsh shell completions.')
option('bash-completions', type: 'boolean', value: true, description: 'Install bash shell completions.')
...
...
src/controlCenter/widgets/factory.vala
View file @
90cde83b
...
...
@@ -26,9 +26,11 @@ namespace SwayNotificationCenter.Widgets {
case
"buttons-grid"
:
widget
=
new
ButtonsGrid
(
suffix
,
swaync_daemon
,
noti_daemon
);
break
;
#if HAVE_PULSE_AUDIO
case
"volume"
:
widget
=
new
Volume
(
suffix
,
swaync_daemon
,
noti_daemon
);
break
;
#endif
case
"backlight"
:
widget
=
new
Backlight
(
suffix
,
swaync_daemon
,
noti_daemon
);
break
;
...
...
src/meson.build
View file @
90cde83b
...
...
@@ -40,12 +40,6 @@ widget_sources = [
'controlCenter/widgets/menubar/menubar.vala',
# Widget: Buttons Grid
'controlCenter/widgets/buttonsGrid/buttonsGrid.vala',
# Widget: Volume
'controlCenter/widgets/volume/volume.vala',
'controlCenter/widgets/volume/pulseDaemon.vala',
'controlCenter/widgets/volume/pulseDevice.vala',
'controlCenter/widgets/volume/pulseSinkInput.vala',
'controlCenter/widgets/volume/sinkInputRow.vala',
# Widget: Backlight Slider
'controlCenter/widgets/backlight/backlight.vala',
'controlCenter/widgets/backlight/backlightUtil.vala',
...
...
@@ -79,19 +73,34 @@ app_deps = [
meson.get_compiler('c').find_library('m', required : true),
meson.get_compiler('vala').find_library('posix'),
dependency('gee-0.8'),
dependency('libpulse'),
dependency('libpulse-mainloop-glib'),
]
# Checks if the user wants scripting enabled
if get_option('scripting')
add_project_arguments('-D', 'WANT_SCRIPTING', language: 'vala')
add_project_arguments('-D', 'WANT_SCRIPTING', language: 'vala')
endif
# Checks if the user wants to compile with the PulseAudio dependency
if get_option('pulse-audio')
add_project_arguments('-D', 'HAVE_PULSE_AUDIO', language: 'vala')
app_deps += [
dependency('libpulse'),
dependency('libpulse-mainloop-glib'),
]
app_sources += [
# Widget: Volume
'controlCenter/widgets/volume/volume.vala',
'controlCenter/widgets/volume/pulseDaemon.vala',
'controlCenter/widgets/volume/pulseDevice.vala',
'controlCenter/widgets/volume/pulseSinkInput.vala',
'controlCenter/widgets/volume/sinkInputRow.vala',
]
endif
# Detect libhandy version
libhandy = dependency('libhandy-1')
if libhandy.version() >= '1.3.9'
add_project_arguments('-D', 'HAVE_LATEST_LIBHANDY', language: 'vala')
add_project_arguments('-D', 'HAVE_LATEST_LIBHANDY', language: 'vala')
endif
# Detect gtk-layer-shell version
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment