Merge pull request #3932 from RKBoss6/tagLaunchUpdates

[Tag Launcher] Add haptic feedback in menu when selecting
master
Rob Pilling 2025-07-14 18:08:16 +01:00 committed by GitHub
commit 4309e0023d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 36 additions and 13 deletions

View File

@ -6,3 +6,4 @@
0.05: Make the "App source not found" warning less buggy 0.05: Make the "App source not found" warning less buggy
0.06: Fixed a crash if an app has no tags (app.tags is undefined) 0.06: Fixed a crash if an app has no tags (app.tags is undefined)
0.07: Clear cached app list when updating showClocks setting 0.07: Clear cached app list when updating showClocks setting
0.08: Add haptic feedback option when selecting app or category in menu, increase vector size limit in settings

View File

@ -11,6 +11,7 @@ Settings
- `Font` - The font used (`4x6`, `6x8`, `12x20`, `6x15` or `Vector`). Default `12x20`. - `Font` - The font used (`4x6`, `6x8`, `12x20`, `6x15` or `Vector`). Default `12x20`.
- `Vector Font Size` - The size of the font if `Font` is set to `Vector`. Default `10`. - `Vector Font Size` - The size of the font if `Font` is set to `Vector`. Default `10`.
- `Haptic Feedback` - Whether or not to vibrate slightly when selecting an app or category in the launcher. Default `No`.
- `Show Clocks` - If set to `No` then clocks won't appear in the app list. Default `Yes`. - `Show Clocks` - If set to `No` then clocks won't appear in the app list. Default `Yes`.
- `Fullscreen` - If set to `Yes` then widgets won't be loaded. Default `No`. - `Fullscreen` - If set to `Yes` then widgets won't be loaded. Default `No`.
@ -28,3 +29,4 @@ Contributors
- [atjn](https://github.com/atjn) - [atjn](https://github.com/atjn)
- [BlueFox4](https://github.com/BlueFox4) - [BlueFox4](https://github.com/BlueFox4)
- [RKBoss6](https://github.com/RKBoss6)

View File

@ -17,7 +17,8 @@ let vectorval = 20;
let font = g.getFonts().includes("12x20") ? "12x20" : "6x8:2"; let font = g.getFonts().includes("12x20") ? "12x20" : "6x8:2";
let settings = Object.assign({ let settings = Object.assign({
showClocks: true, showClocks: true,
fullscreen: false fullscreen: false,
buzz:false
}, s.readJSON("taglaunch.json", true) || {}); }, s.readJSON("taglaunch.json", true) || {});
if ("vectorsize" in settings) if ("vectorsize" in settings)
vectorval = parseInt(settings.vectorsize); vectorval = parseInt(settings.vectorsize);
@ -108,6 +109,7 @@ let showTagMenu = (tag) => {
} }
}, },
select : i => { select : i => {
const loadApp = () => {
let app = appsByTag[tag][i]; let app = appsByTag[tag][i];
if (!app) return; if (!app) return;
if (!app.src || require("Storage").read(app.src)===undefined) { if (!app.src || require("Storage").read(app.src)===undefined) {
@ -117,6 +119,15 @@ let showTagMenu = (tag) => {
} else { } else {
load(app.src); load(app.src);
} }
};
if(settings.buzz){
Bangle.buzz(25);
//let the buzz have effect
setTimeout(loadApp,27);
}else{
loadApp();
}
}, },
back : showMainMenu, back : showMainMenu,
remove: unload remove: unload
@ -138,6 +149,7 @@ let showMainMenu = () => {
} }
}, },
select : i => { select : i => {
if(settings.buzz)Bangle.buzz(25);
let tag = tagKeys[i]; let tag = tagKeys[i];
showTagMenu(tag); showTagMenu(tag);
}, },

View File

@ -2,8 +2,8 @@
"id": "taglaunch", "id": "taglaunch",
"name": "Tag Launcher", "name": "Tag Launcher",
"shortName": "Taglauncher", "shortName": "Taglauncher",
"version": "0.07", "version": "0.08",
"description": "Launcher that puts all applications into submenus based on their tag. With many applications installed this can result in a faster application selection than the linear access of the default launcher.", "description": "Launcher that puts all applications into submenus based on their tag. With many applications installed this can result in a faster application selection than the linear access from the default launcher.",
"readme": "README.md", "readme": "README.md",
"icon": "app.png", "icon": "app.png",
"type": "launch", "type": "launch",

View File

@ -2,7 +2,8 @@
(function(back) { (function(back) {
let settings = Object.assign({ let settings = Object.assign({
showClocks: true, showClocks: true,
fullscreen: false fullscreen: false,
buzz:false
}, require("Storage").readJSON("taglaunch.json", true) || {}); }, require("Storage").readJSON("taglaunch.json", true) || {});
let fonts = g.getFonts(); let fonts = g.getFonts();
@ -21,9 +22,16 @@
}, },
/*LANG*/"Vector Font Size": { /*LANG*/"Vector Font Size": {
value: settings.vectorsize || 10, value: settings.vectorsize || 10,
min:10, max: 20,step:1,wrap:true, min:10, max: 25,step:1,wrap:true,
onchange: (m) => {save("vectorsize", m)} onchange: (m) => {save("vectorsize", m)}
}, },
/*LANG*/"Haptic Feedback": {
value: settings.buzz == true,
onchange: (m) => {
save("buzz", m);
}
},
/*LANG*/"Show Clocks": { /*LANG*/"Show Clocks": {
value: settings.showClocks == true, value: settings.showClocks == true,
onchange: (m) => { onchange: (m) => {