-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from jeroentvb/dev
Allow overwriting power bar colors - closes #28
- Loading branch information
Showing
9 changed files
with
879 additions
and
844 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
const CHANGE_NOTES = ` | ||
* Remove 'play immediately' setting in favour of 'add to queue' | ||
- Default behaviour is navigating to the selected suggestion | ||
- To just play and not navigate, hold \`ctrl\` (windows/linux) or \`cmd\` (mac) when selecting it | ||
- To add to queue instad of playing the item, enable 'add to queue' and hold hold \`ctrl\` (windows/linux) or \`cmd\` (mac) | ||
Make it easier to change to colors of the power bar using css. See the readme for more details: [https://github.com/jeroentvb/spicetify-power-bar/blob/master/README.md](https://github.com/jeroentvb/spicetify-power-bar/blob/master/README.md#theme) | ||
`; | ||
|
||
export default CHANGE_NOTES; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { SettingsSection } from 'spcr-settings'; | ||
import PowerBar from '../components/PowerBar'; | ||
import { ADD_TO_QUEUE, KEY_COMBO, RESULTS_PER_CATEGORY } from '../constants'; | ||
|
||
export default function getSettings(powerBar: PowerBar) { | ||
return new SettingsSection('Power bar', 'power-bar-settings', { | ||
[RESULTS_PER_CATEGORY]: { | ||
type: 'dropdown', | ||
description: 'Show amount of suggestions per category', | ||
defaultValue: '3', | ||
options: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'], | ||
}, | ||
[KEY_COMBO]: { | ||
type: 'input', | ||
description: 'Activation key combo. First key needs to be a modifier (shift, ctrl, alt or cmd/windows key).', | ||
defaultValue: [powerBar.isMac ? 'altKey' : 'ctrlKey', 'Space'], | ||
events: { | ||
onKeyDown: powerBar.handleSettingsInput, | ||
onBlur: (e) => { | ||
const currentKeyCombo: string[] = powerBar.settings.getFieldValue(KEY_COMBO); | ||
if (currentKeyCombo.length === 0) { | ||
e.currentTarget.placeholder = 'Please set a valid key combo'; | ||
Spicetify.showNotification('Please set a valid key combo for the power bar'); | ||
} | ||
} | ||
} | ||
}, | ||
[ADD_TO_QUEUE]: { | ||
type: 'toggle', | ||
description: 'Add suggestion to queue instead of playing it when holding ctrl (windows/linux) or cmd (mac)', | ||
defaultValue: false, | ||
}, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters