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
a67ff66e
Verified
Commit
a67ff66e
authored
Mar 24, 2026
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
volume: auto-show per-app and device selector, remove config options
parent
113863fd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
103 deletions
+34
-103
volume.scss
data/style/widgets/volume.scss
+11
-11
configSchema.json
src/configSchema.json
+0
-56
sinkInputRow.vala
src/controlCenter/widgets/volume/sinkInputRow.vala
+23
-36
volume.vala
src/controlCenter/widgets/volume/volume.vala
+0
-0
No files found.
data/style/widgets/volume.scss
View file @
a67ff66e
.widget-volume
{
.widget-volume
{
padding
:
0
px
10px
;
padding
:
0
;
margin
:
5px
15px
;
margin
:
5px
15px
;
border-radius
:
var
(
--
window-radius
);
border-radius
:
var
(
--
window-radius
);
...
@@ -8,26 +8,22 @@
...
@@ -8,26 +8,22 @@
box-shadow
:
0px
0px
10px
var
(
--
headerbar-shade-color
);
box-shadow
:
0px
0px
10px
var
(
--
headerbar-shade-color
);
border
:
1px
solid
var
(
--
border-color
);
border
:
1px
solid
var
(
--
border-color
);
}
}
&
>
box
{
padding
:
0
10px
;
margin
:
0
0
0
3px
;
}
}
}
.widget-volume
.image-button
{
.widget-volume
.image-button
{
background
:
transparent
;
background
:
transparent
;
}
}
.widget-volume
>
box
{
margin
:
0
0
0
3px
;
}
.widget-volume
>
box
>
button
{}
.widget-volume
>
box
>
button
{}
.widget-volume
revealer
{
padding
:
0
;
margin
:
0
;
}
.per-app-volume
{
.per-app-volume
{
background
:
transparent
;
background
:
transparent
;
padding
:
0
;
padding
:
0
10px
;
margin
:
0
;
margin
:
0
;
border-radius
:
var
(
--
border-radius
);
border-radius
:
var
(
--
border-radius
);
}
}
...
@@ -35,3 +31,7 @@
...
@@ -35,3 +31,7 @@
.per-app-volume
row
{
.per-app-volume
row
{
background
:
transparent
;
background
:
transparent
;
}
}
.sink-selector
{
padding
:
0
;
}
src/configSchema.json
View file @
a67ff66e
...
@@ -339,9 +339,6 @@
...
@@ -339,9 +339,6 @@
"^slider(#[a-zA-Z0-9_-]{1,}){0,1}?$"
:
{
"^slider(#[a-zA-Z0-9_-]{1,}){0,1}?$"
:
{
"$ref"
:
"#/widgets/slider"
"$ref"
:
"#/widgets/slider"
},
},
"^volume(#[a-zA-Z0-9_-]{1,}){0,1}?$"
:
{
"$ref"
:
"#/widgets/volume"
},
"^backlight(#[a-zA-Z0-9_-]{1,}){0,1}?$"
:
{
"^backlight(#[a-zA-Z0-9_-]{1,}){0,1}?$"
:
{
"$ref"
:
"#/widgets/backlight"
"$ref"
:
"#/widgets/backlight"
},
},
...
@@ -484,59 +481,6 @@
...
@@ -484,59 +481,6 @@
}
}
}
}
},
},
"volume"
:
{
"type"
:
"object"
,
"description"
:
"Slider to control pulse volume"
,
"additionalProperties"
:
false
,
"properties"
:
{
"show-per-app"
:
{
"type"
:
"boolean"
,
"default"
:
false
,
"description"
:
"Show per app volume control"
},
"show-per-app-icon"
:
{
"type"
:
"boolean"
,
"default"
:
true
,
"description"
:
"Show application icon in per app control"
},
"show-per-app-label"
:
{
"type"
:
"boolean"
,
"default"
:
false
,
"description"
:
"Show application name in per app control"
},
"expand-per-app"
:
{
"type"
:
"boolean"
,
"default"
:
false
,
"description"
:
"If the per app section should start expanded"
},
"empty-list-label"
:
{
"type"
:
"string"
,
"default"
:
"No active sink input"
,
"description"
:
"Text displayed when there are not active sink inputs"
},
"expand-button-label"
:
{
"type"
:
"string"
,
"default"
:
"⇧"
,
"description"
:
"Label displayed on button to show per app volume control"
},
"collapse-button-label"
:
{
"type"
:
"string"
,
"default"
:
"⇩"
,
"description"
:
"Label displayed on button to hide per app volume control"
},
"animation-type"
:
{
"type"
:
"string"
,
"default"
:
"slide_down"
,
"description"
:
"Animation type for menu"
,
"enum"
:
[
"slide_down"
,
"slide_up"
,
"none"
]
},
"animation-duration"
:
{
"type"
:
"integer"
,
"default"
:
250
,
"description"
:
"Duration of animation in milliseconds"
}
}
},
"backlight"
:
{
"backlight"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"description"
:
"Unified brightness control widget. Auto-detects display backlights (/sys/class/backlight), DDC/CI monitors, and keyboard backlights (/sys/class/leds/*kbd*)."
,
"description"
:
"Unified brightness control widget. Auto-detects display backlights (/sys/class/backlight), DDC/CI monitors, and keyboard backlights (/sys/class/leds/*kbd*)."
,
...
...
src/controlCenter/widgets/volume/sinkInputRow.vala
View file @
a67ff66e
...
@@ -2,21 +2,16 @@ namespace XimperShellNotificationCenter.Widgets {
...
@@ -2,21 +2,16 @@ namespace XimperShellNotificationCenter.Widgets {
public
class
SinkInputRow
:
Gtk
.
ListBoxRow
{
public
class
SinkInputRow
:
Gtk
.
ListBoxRow
{
Gtk
.
Box
container
;
Gtk
.
Box
container
;
Gtk
.
Image
icon
=
new
Gtk
.
Image
();
Gtk
.
Image
icon
=
new
Gtk
.
Image
();
Gtk
.
Label
label
=
new
Gtk
.
Label
(
null
);
Gtk
.
Scale
scale
=
new
Gtk
.
Scale
.
with_range
(
Gtk
.
Scale
scale
=
new
Gtk
.
Scale
.
with_range
(
Gtk
.
Orientation
.
HORIZONTAL
,
0
,
100
,
1
);
Gtk
.
Orientation
.
HORIZONTAL
,
0
,
100
,
1
);
public
unowned
PulseSinkInput
sink_input
;
public
unowned
PulseSinkInput
sink_input
;
private
unowned
PulseDaemon
client
;
private
unowned
PulseDaemon
client
;
private
bool
show_per_app_icon
;
public
SinkInputRow
(
PulseSinkInput
sink_input
,
private
bool
show_per_app_label
;
PulseDaemon
client
)
{
public
SinkInputRow
(
PulseSinkInput
sink_input
,
PulseDaemon
client
,
bool
show_per_app_icon
,
bool
show_per_app_label
)
{
this
.
client
=
client
;
this
.
client
=
client
;
this
.
show_per_app_icon
=
show_per_app_icon
;
this
.
show_per_app_label
=
show_per_app_label
;
set_activatable
(
false
);
set_activatable
(
false
);
...
@@ -25,49 +20,41 @@ namespace XimperShellNotificationCenter.Widgets {
...
@@ -25,49 +20,41 @@ namespace XimperShellNotificationCenter.Widgets {
scale
.
draw_value
=
false
;
scale
.
draw_value
=
false
;
scale
.
set_hexpand
(
true
);
scale
.
set_hexpand
(
true
);
container
=
new
Gtk
.
Box
(
Gtk
.
Orientation
.
HORIZONTAL
,
0
);
container
=
new
Gtk
.
Box
(
Gtk
.
Orientation
.
HORIZONTAL
,
0
);
if
(
show_per_app_icon
)
{
container
.
append
(
icon
);
container
.
append
(
icon
);
}
if
(
show_per_app_label
)
{
container
.
append
(
label
);
}
container
.
append
(
scale
);
container
.
append
(
scale
);
set_child
(
container
);
set_child
(
container
);
scale
.
value_changed
.
connect
(()
=>
{
scale
.
value_changed
.
connect
(()
=>
{
client
.
set_sink_input_volume
(
sink_input
,
(
float
)
scale
.
get_value
());
client
.
set_sink_input_volume
(
scale
.
tooltip_text
=
((
int
)
scale
.
get_value
()).
to_string
();
sink_input
,
(
float
)
scale
.
get_value
());
scale
.
tooltip_text
=
((
int
)
scale
.
get_value
()).
to_string
();
});
});
}
}
public
void
update
(
PulseSinkInput
sink_input
)
{
public
void
update
(
PulseSinkInput
sink_input
)
{
this
.
sink_input
=
sink_input
;
this
.
sink_input
=
sink_input
;
if
(
show_per_app_icon
)
{
string
icon_name
=
"application-x-executable"
;
string
icon_name
;
if
(
sink_input
.
application_icon_name
!=
null
)
{
if
(
sink_input
.
application_icon_name
!=
null
)
{
icon_name
=
sink_input
.
application_icon_name
;
icon_name
=
sink_input
.
application_icon_name
;
}
else
if
(
sink_input
.
application_binary
!=
null
)
{
}
else
{
var
theme
=
Gtk
.
IconTheme
.
get_for_display
(
Gdk
.
Display
.
get_default
());
if
(
theme
.
has_icon
(
sink_input
.
application_binary
))
{
icon_name
=
sink_input
.
application_binary
;
icon_name
=
sink_input
.
application_binary
;
}
}
var
theme
=
Gtk
.
IconTheme
.
get_for_display
(
Gdk
.
Display
.
get_default
());
if
(
theme
.
has_icon
(
icon_name
))
{
icon
.
set_from_icon_name
(
icon_name
);
}
else
{
icon
.
set_from_icon_name
(
"application-x-executable"
);
}
}
if
(
show_per_app_label
)
{
label
.
set_text
(
this
.
sink_input
.
name
);
}
}
icon
.
set_from_icon_name
(
icon_name
);
icon
.
set_tooltip_text
(
sink_input
.
name
);
scale
.
set_value
(
sink_input
.
volume
);
scale
.
set_value
(
sink_input
.
volume
);
scale
.
tooltip_text
=
((
int
)
scale
.
get_value
()).
to_string
();
scale
.
tooltip_text
=
((
int
)
scale
.
get_value
()).
to_string
();
}
}
}
}
}
}
src/controlCenter/widgets/volume/volume.vala
View file @
a67ff66e
This diff is collapsed.
Click to expand it.
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