Skip to content

Commit

Permalink
bar: custom module: add scroll (end-4#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
end-4 committed Feb 27, 2024
1 parent edabf40 commit b2e2882
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .config/ags/modules/bar/music.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { showMusicControls } from '../../variables.js';
const CUSTOM_MODULE_CONTENT_SCRIPT = `${GLib.get_home_dir()}/.cache/ags/user/scripts/custom-module-poll.sh`;
const CUSTOM_MODULE_LEFTCLICK_SCRIPT = `${GLib.get_home_dir()}/.cache/ags/user/scripts/custom-module-leftclick.sh`;
const CUSTOM_MODULE_RIGHTCLICK_SCRIPT = `${GLib.get_home_dir()}/.cache/ags/user/scripts/custom-module-rightclick.sh`;
const CUSTOM_MODULE_SCROLLUP_SCRIPT = `${GLib.get_home_dir()}/.cache/ags/user/scripts/custom-module-scrollup.sh`;
const CUSTOM_MODULE_SCROLLDOWN_SCRIPT = `${GLib.get_home_dir()}/.cache/ags/user/scripts/custom-module-scrolldown.sh`;

function trimTrackTitle(title) {
if (!title) return '';
Expand Down Expand Up @@ -165,6 +167,8 @@ export default () => {
}),
onPrimaryClickRelease: () => execAsync(CUSTOM_MODULE_LEFTCLICK_SCRIPT).catch(print),
onSecondaryClickRelease: () => execAsync(CUSTOM_MODULE_RIGHTCLICK_SCRIPT).catch(print),
onScrollUp: () => execAsync(CUSTOM_MODULE_SCROLLUP_SCRIPT).catch(print),
onScrollDown: () => execAsync(CUSTOM_MODULE_SCROLLDOWN_SCRIPT).catch(print),
})
});
} else {
Expand Down

0 comments on commit b2e2882

Please sign in to comment.