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
6d5edff4
Verified
Commit
6d5edff4
authored
Mar 22, 2026
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widgets: use symbolic icons for volume and backlight, add icon to clear button
parent
ae8344b7
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
48 additions
and
97 deletions
+48
-97
ximper-shell-notification-center.5.scd
man/ximper-shell-notification-center.5.scd
+1
-22
POTFILES
po/POTFILES
+0
-2
ru.po
po/ru.po
+0
-8
ximper-shell-notification-center.pot
po/ximper-shell-notification-center.pot
+0
-8
config.json.in
src/config.json.in
+1
-3
configSchema.json
src/configSchema.json
+0
-20
backlight.vala
src/controlCenter/widgets/backlight/backlight.vala
+15
-13
inhibitors.vala
src/controlCenter/widgets/inhibitors/inhibitors.vala
+6
-8
title.vala
src/controlCenter/widgets/title/title.vala
+6
-8
volume.vala
src/controlCenter/widgets/volume/volume.vala
+19
-5
No files found.
man/ximper-shell-notification-center.5.scd
View file @
6d5edff4
...
...
@@ -396,11 +396,6 @@ config file to be able to detect config errors
optional: true ++
default: true ++
description: Whether to display a "Clear All" button ++
button-text: ++
type: string ++
optional: true ++
default: "Clear All" ++
description: "Clear All" button text ++
description: The notification visibility state. ++
*dnd*++
type: object ++
...
...
@@ -659,11 +654,6 @@ config file to be able to detect config errors
widget-volume ++
per-app-volume ++
properties: ++
label: ++
type: string ++
optional: true ++
default: "Volume" ++
description: Text displayed in front of the volume slider ++
show-per-app: ++
type: bool ++
optional: true ++
...
...
@@ -716,11 +706,6 @@ config file to be able to detect config errors
type: object ++
css class: widget-backlight ++
properties: ++
label: ++
type: string ++
optional: true ++
default: "Brightness" ++
description: Text displayed in front of the backlight slider ++
device: ++
type: string ++
optional: true ++
...
...
@@ -752,11 +737,6 @@ config file to be able to detect config errors
optional: true ++
default: true ++
description: Whether to display a "Clear All" button ++
button-text: ++
type: string ++
optional: true ++
default: "Clear All" ++
description: "Clear All" button text ++
description: Displayed if notifications are inhibited.
example:
...
...
@@ -765,8 +745,7 @@ config file to be able to detect config errors
"widget-config": {
"title": {
"text": "Notifications",
"clear-all-button": true,
"button-text": "Clear All"
"clear-all-button": true
},
"dnd": {
"text": "Do Not Disturb"
...
...
po/POTFILES
View file @
6d5edff4
src/main.vala
src/notification/notification.vala
src/configModel/configModel.vala
src/controlCenter/widgets/title/title.vala
src/controlCenter/widgets/dnd/dnd.vala
src/controlCenter/widgets/inhibitors/inhibitors.vala
src/controlCenter/widgets/volume/volume.vala
src/controlCenter/widgets/backlight/backlight.vala
src/controlCenter/widgets/slider/slider.vala
src/controlCenter/widgets/menubar/menubar.vala
src/controlCenter/widgets/powerProfiles/powerProfiles.vala
...
...
po/ru.po
View file @
6d5edff4
...
...
@@ -79,14 +79,6 @@ msgstr "Блокировки"
msgid "No active sink input"
msgstr "Нет активного источника"
#: src/controlCenter/widgets/volume/volume.vala:58
msgid "Volume"
msgstr "Громкость"
#: src/controlCenter/widgets/backlight/backlight.vala:26
msgid "Brightness"
msgstr "Яркость"
#: src/controlCenter/widgets/slider/slider.vala:28
msgid "Slider"
msgstr "Ползунок"
...
...
po/ximper-shell-notification-center.pot
View file @
6d5edff4
...
...
@@ -77,14 +77,6 @@ msgstr ""
msgid "No active sink input"
msgstr ""
#: src/controlCenter/widgets/volume/volume.vala:58
msgid "Volume"
msgstr ""
#: src/controlCenter/widgets/backlight/backlight.vala:26
msgid "Brightness"
msgstr ""
#: src/controlCenter/widgets/slider/slider.vala:28
msgid "Slider"
msgstr ""
...
...
src/config.json.in
View file @
6d5edff4
...
...
@@ -50,13 +50,11 @@
},
"inhibitors": {
"text": "Inhibitors",
"button-text": "Clear All",
"clear-all-button": true
},
"title": {
"text": "Notifications",
"clear-all-button": true,
"button-text": "Clear All"
"clear-all-button": true
},
"dnd": {
"text": "Do Not Disturb"
...
...
src/configSchema.json
View file @
6d5edff4
...
...
@@ -389,11 +389,6 @@
"type"
:
"boolean"
,
"description"
:
"Whether to display a
\"
Clear All
\"
button"
,
"default"
:
true
},
"button-text"
:
{
"type"
:
"string"
,
"description"
:
"
\"
Clear All
\"
button text"
,
"default"
:
"Clear All"
}
}
},
...
...
@@ -652,11 +647,6 @@
"description"
:
"Slider to control pulse volume"
,
"additionalProperties"
:
false
,
"properties"
:
{
"label"
:
{
"type"
:
"string"
,
"description"
:
"Text displayed in front of the volume slider"
,
"default"
:
"Volume"
},
"show-per-app"
:
{
"type"
:
"boolean"
,
"default"
:
false
,
...
...
@@ -716,11 +706,6 @@
"description"
:
"Slider to control monitor brightness"
,
"additionalProperties"
:
false
,
"properties"
:
{
"label"
:
{
"type"
:
"string"
,
"description"
:
"Text displayed in front of the backlight slider"
,
"default"
:
"Brightness"
},
"device"
:
{
"type"
:
"string"
,
"description"
:
"Name of monitor (find possible devices using `ls /sys/class/backlight` or `ls /sys/class/leds`)"
,
...
...
@@ -758,11 +743,6 @@
"type"
:
"boolean"
,
"description"
:
"Whether to display a
\"
Clear All
\"
button"
,
"default"
:
true
},
"button-text"
:
{
"type"
:
"string"
,
"description"
:
"
\"
Clear All
\"
button text"
,
"default"
:
"Clear All"
}
}
}
...
...
src/controlCenter/widgets/backlight/backlight.vala
View file @
6d5edff4
...
...
@@ -14,7 +14,8 @@ namespace XimperShellNotificationCenter.Widgets {
bool
use_ddc
=
false
;
#endif
Gtk
.
Label
label_widget
=
new
Gtk
.
Label
(
null
);
Gtk
.
Image
icon_widget
=
new
Gtk
.
Image
.
from_icon_name
(
"display-brightness-symbolic"
);
Gtk
.
Scale
slider
=
new
Gtk
.
Scale
.
with_range
(
Gtk
.
Orientation
.
HORIZONTAL
,
0
,
100
,
1
);
public
Backlight
(
string
suffix
)
{
...
...
@@ -22,8 +23,6 @@ namespace XimperShellNotificationCenter.Widgets {
Json
.
Object
?
config
=
get_config
(
this
);
if
(
config
!=
null
)
{
string
?
label
=
get_prop
<
string
>
(
config
,
"label"
);
label_widget
.
set_label
(
label
??
_
(
"Brightness"
));
string
device
=
(
get_prop
<
string
>
(
config
,
"device"
)
??
"intel_backlight"
);
string
subsystem
=
(
get_prop
<
string
>
(
config
,
"subsystem"
)
??
"backlight"
);
int
min
=
int
.
max
(
0
,
get_prop
<
int
>
(
config
,
"min"
));
...
...
@@ -76,11 +75,9 @@ namespace XimperShellNotificationCenter.Widgets {
#if HAVE_DDC
if
(
use_ddc
)
{
if
(
ddc_clients
.
length
==
1
)
{
// Single DDC display — use the existing label + slider
if
(
label_widget
.
get_label
()
==
"Brightness"
)
{
label_widget
.
set_label
(
""
);
label_widget
.
set_tooltip_text
(
ddc_clients
[
0
].
get_display_name
());
}
// Single DDC display — use the existing icon + slider
icon_widget
.
set_tooltip_text
(
ddc_clients
[
0
].
get_display_name
());
ddc_clients
[
0
].
brightness_change
.
connect
((
percent
)
=>
{
if
(
percent
<
0
)
{
hide
();
...
...
@@ -95,15 +92,19 @@ namespace XimperShellNotificationCenter.Widgets {
ddc_clients
[
0
].
set_brightness
.
begin
((
float
)
slider
.
get_value
());
slider
.
tooltip_text
=
((
int
)
slider
.
get_value
()).
to_string
();
});
append
(
label
_widget
);
append
(
icon
_widget
);
append
(
slider
);
}
else
{
// Multiple DDC displays — create a row per display
set_orientation
(
Gtk
.
Orientation
.
VERTICAL
);
for
(
int
i
=
0
;
i
<
ddc_clients
.
length
;
i
++)
{
var
row
=
new
Gtk
.
Box
(
Gtk
.
Orientation
.
HORIZONTAL
,
0
);
var
lbl
=
new
Gtk
.
Label
(
" %d"
.
printf
(
i
+
1
));
lbl
.
set_tooltip_text
(
ddc_clients
[
i
].
get_display_name
());
var
icon
=
new
Gtk
.
Image
.
from_icon_name
(
"display-brightness-symbolic"
);
var
num_label
=
new
Gtk
.
Label
(
(
i
+
1
).
to_string
());
icon
.
set_tooltip_text
(
ddc_clients
[
i
].
get_display_name
());
var
scl
=
new
Gtk
.
Scale
.
with_range
(
Gtk
.
Orientation
.
HORIZONTAL
,
0
,
100
,
1
);
scl
.
set_draw_value
(
false
);
scl
.
set_round_digits
(
0
);
...
...
@@ -122,7 +123,8 @@ namespace XimperShellNotificationCenter.Widgets {
scl
.
tooltip_text
=
((
int
)
scl
.
get_value
()).
to_string
();
});
row
.
append
(
lbl
);
row
.
append
(
icon
);
row
.
append
(
num_label
);
row
.
append
(
scl
);
append
(
row
);
}
...
...
@@ -147,7 +149,7 @@ namespace XimperShellNotificationCenter.Widgets {
slider
.
tooltip_text
=
((
int
)
slider
.
get_value
()).
to_string
();
});
append
(
label
_widget
);
append
(
icon
_widget
);
append
(
slider
);
}
...
...
src/controlCenter/widgets/inhibitors/inhibitors.vala
View file @
6d5edff4
...
...
@@ -12,12 +12,10 @@ namespace XimperShellNotificationCenter.Widgets {
// Default config values
string
title
;
bool
has_clear_all_button
=
true
;
string
button_text
;
public
Inhibitors
(
string
suffix
)
{
base
(
suffix
);
title
=
_
(
"Inhibitors"
);
button_text
=
_
(
"Clear All"
);
ximper_shell_notification_center_daemon
.
inhibited_changed
.
connect
((
length
)
=>
{
if
(!
ximper_shell_notification_center_daemon
.
inhibited
)
{
...
...
@@ -42,11 +40,6 @@ namespace XimperShellNotificationCenter.Widgets {
if
(
found_clear_all
)
{
this
.
has_clear_all_button
=
has_clear_all_button
;
}
// Get button text
string
?
button_text
=
get_prop
<
string
>
(
config
,
"button-text"
);
if
(
button_text
!=
null
)
{
this
.
button_text
=
button_text
;
}
}
title_widget
=
new
Gtk
.
Label
(
title
);
...
...
@@ -56,7 +49,12 @@ namespace XimperShellNotificationCenter.Widgets {
append
(
title_widget
);
if
(
has_clear_all_button
)
{
clear_all_button
=
new
Gtk
.
Button
.
with_label
(
button_text
);
clear_all_button
=
new
Gtk
.
Button
();
var
btn_box
=
new
Gtk
.
Box
(
Gtk
.
Orientation
.
HORIZONTAL
,
10
);
btn_box
.
append
(
new
Gtk
.
Image
.
from_icon_name
(
"edit-clear-all-symbolic"
));
btn_box
.
append
(
new
Gtk
.
Label
(
_
(
"Clear All"
)));
clear_all_button
.
set_child
(
btn_box
);
clear_all_button
.
clicked
.
connect
(()
=>
{
try
{
ximper_shell_notification_center_daemon
.
clear_inhibitors
();
...
...
src/controlCenter/widgets/title/title.vala
View file @
6d5edff4
...
...
@@ -12,12 +12,10 @@ namespace XimperShellNotificationCenter.Widgets {
// Default config values
string
title
;
bool
has_clear_all_button
=
true
;
string
button_text
;
public
Title
(
string
suffix
)
{
base
(
suffix
);
title
=
_
(
"Notifications"
);
button_text
=
_
(
"Clear All"
);
Json
.
Object
?
config
=
get_config
(
this
);
if
(
config
!=
null
)
{
...
...
@@ -33,11 +31,6 @@ namespace XimperShellNotificationCenter.Widgets {
if
(
found_clear_all
)
{
this
.
has_clear_all_button
=
has_clear_all_button
;
}
// Get button text
string
?
button_text
=
get_prop
<
string
>
(
config
,
"button-text"
);
if
(
button_text
!=
null
)
{
this
.
button_text
=
button_text
;
}
}
title_widget
=
new
Gtk
.
Label
(
title
);
...
...
@@ -46,7 +39,12 @@ namespace XimperShellNotificationCenter.Widgets {
append
(
title_widget
);
if
(
has_clear_all_button
)
{
clear_all_button
=
new
Gtk
.
Button
.
with_label
(
button_text
);
clear_all_button
=
new
Gtk
.
Button
();
var
btn_box
=
new
Gtk
.
Box
(
Gtk
.
Orientation
.
HORIZONTAL
,
10
);
btn_box
.
append
(
new
Gtk
.
Image
.
from_icon_name
(
"edit-clear-all-symbolic"
));
btn_box
.
append
(
new
Gtk
.
Label
(
_
(
"Clear All"
)));
clear_all_button
.
set_child
(
btn_box
);
clear_all_button
.
clicked
.
connect
(()
=>
{
noti_daemon
.
request_dismiss_all_notifications
(
ClosedReasons
.
DISMISSED
);
});
...
...
src/controlCenter/widgets/volume/volume.vala
View file @
6d5edff4
...
...
@@ -7,7 +7,7 @@ namespace XimperShellNotificationCenter.Widgets {
}
Gtk
.
Box
main_volume_slider_container
=
new
Gtk
.
Box
(
Gtk
.
Orientation
.
HORIZONTAL
,
0
);
Gtk
.
Label
label_widget
=
new
Gtk
.
Label
(
null
);
Gtk
.
Image
icon_widget
=
new
Gtk
.
Image
(
);
Gtk
.
Scale
slider
=
new
Gtk
.
Scale
.
with_range
(
Gtk
.
Orientation
.
HORIZONTAL
,
0
,
100
,
1
);
// Per app volume control
...
...
@@ -38,6 +38,8 @@ namespace XimperShellNotificationCenter.Widgets {
construct
{
this
.
client
.
change_default_device
.
connect
(
default_device_changed
);
icon_widget
.
set_from_icon_name
(
"audio-volume-high-symbolic"
);
slider
.
value_changed
.
connect
(()
=>
{
if
(
default_sink
!=
null
)
{
this
.
client
.
set_device_volume
(
...
...
@@ -45,6 +47,7 @@ namespace XimperShellNotificationCenter.Widgets {
(
float
)
slider
.
get_value
());
slider
.
tooltip_text
=
((
int
)
slider
.
get_value
()).
to_string
();
}
update_volume_icon
((
int
)
slider
.
get_value
());
});
}
...
...
@@ -54,9 +57,6 @@ namespace XimperShellNotificationCenter.Widgets {
Json
.
Object
?
config
=
get_config
(
this
);
if
(
config
!=
null
)
{
string
?
label
=
get_prop
<
string
>
(
config
,
"label"
);
label_widget
.
set_label
(
label
??
_
(
"Volume"
));
bool
show_per_app_found
;
bool
?
show_per_app
=
get_prop
<
bool
>
(
config
,
"show-per-app"
,
out
show_per_app_found
);
...
...
@@ -131,7 +131,7 @@ namespace XimperShellNotificationCenter.Widgets {
slider
.
draw_value
=
false
;
slider
.
set_hexpand
(
true
);
main_volume_slider_container
.
append
(
label
_widget
);
main_volume_slider_container
.
append
(
icon
_widget
);
main_volume_slider_container
.
append
(
slider
);
append
(
main_volume_slider_container
);
...
...
@@ -177,6 +177,20 @@ namespace XimperShellNotificationCenter.Widgets {
}
}
private
void
update_volume_icon
(
int
volume
)
{
string
icon_name
;
if
(
volume
<=
0
)
{
icon_name
=
"audio-volume-muted-symbolic"
;
}
else
if
(
volume
<=
33
)
{
icon_name
=
"audio-volume-low-symbolic"
;
}
else
if
(
volume
<=
66
)
{
icon_name
=
"audio-volume-medium-symbolic"
;
}
else
{
icon_name
=
"audio-volume-high-symbolic"
;
}
icon_widget
.
set_from_icon_name
(
icon_name
);
}
private
void
set_button_icon
()
{
if
(!
reveal_button
.
active
)
{
if
(
expand_label
==
null
)
{
...
...
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