mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-04 14:04:56 +00:00
show recent profiles in jump lists & dock menu - fixes #2587
This commit is contained in:
@@ -23,6 +23,10 @@ export class ProfileCLIHandler extends CLIHandler {
|
||||
this.handleOpenProfile(event.argv.profileName)
|
||||
return true
|
||||
}
|
||||
if (op === 'recent') {
|
||||
this.handleOpenRecentProfile(event.argv.profileNumber)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -35,6 +39,15 @@ export class ProfileCLIHandler extends CLIHandler {
|
||||
this.profiles.openNewTabForProfile(profile)
|
||||
this.hostWindow.bringToFront()
|
||||
}
|
||||
|
||||
private async handleOpenRecentProfile (profileNumber: number) {
|
||||
const profiles = this.profiles.getRecentProfiles()
|
||||
if (profileNumber >= profiles.length) {
|
||||
return
|
||||
}
|
||||
this.profiles.openNewTabForProfile(profiles[profileNumber])
|
||||
this.hostWindow.bringToFront()
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
|
Reference in New Issue
Block a user