forked from Shinonome/dots-hyprland
Add left sidebar translation
This commit is contained in:
@@ -12,6 +12,7 @@ import { setupCursorHover } from '../../.widgetutils/cursorhover.js';
|
||||
|
||||
import { ColorPickerSelection, hslToHex, hslToRgbValues, hexToHSL } from './color.js';
|
||||
import { clamp } from '../../.miscutils/mathfuncs.js';
|
||||
import { getString } from '../../../i18n/i18n.js';
|
||||
|
||||
export default () => {
|
||||
const selectedColor = new ColorPickerSelection();
|
||||
@@ -174,7 +175,7 @@ export default () => {
|
||||
css: `background-color: ${hslToHex(selectedColor.hue, selectedColor.xAxis, selectedColor.yAxis / (1 + selectedColor.xAxis / 100))};`,
|
||||
children: [Label({
|
||||
className: 'txt txt-small',
|
||||
label: 'Result',
|
||||
label: getString('Result'),
|
||||
}),],
|
||||
attribute: {
|
||||
update: (self) => {
|
||||
@@ -269,7 +270,7 @@ export default () => {
|
||||
})
|
||||
return SidebarModule({
|
||||
icon: MaterialIcon('colorize', 'norm'),
|
||||
name: '<span strikethrough="true">Inaccurate</span> Color picker',
|
||||
name: getString('<span strikethrough="true">Inaccurate</span> Color picker'),
|
||||
revealChild: false,
|
||||
child: Box({
|
||||
className: 'spacing-h-5',
|
||||
|
||||
@@ -3,6 +3,7 @@ import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
import { setupCursorHover } from '../../.widgetutils/cursorhover.js';
|
||||
import { getString } from '../../../i18n/i18n.js';
|
||||
const { execAsync, exec } = Utils;
|
||||
const { Box, Button, CenterBox, EventBox, Icon, Label, Scrollable } = Widget;
|
||||
|
||||
@@ -10,7 +11,7 @@ export default () => Box({
|
||||
className: 'txt sidebar-module techfont',
|
||||
children: [
|
||||
Label({
|
||||
label: 'illogical-impulse'
|
||||
label: getString('illogical-impulse')
|
||||
}),
|
||||
Box({ hexpand: true }),
|
||||
Button({
|
||||
|
||||
@@ -9,53 +9,54 @@ import { MaterialIcon } from '../../.commonwidgets/materialicon.js';
|
||||
import { setupCursorHover } from '../../.widgetutils/cursorhover.js';
|
||||
|
||||
import { distroID, isArchDistro, isDebianDistro, hasFlatpak } from '../../.miscutils/system.js';
|
||||
import { getString } from '../../../i18n/i18n.js';
|
||||
|
||||
const scripts = [
|
||||
{
|
||||
icon: 'desktop-symbolic',
|
||||
name: 'Change screen resolution',
|
||||
command: `bash ${App.configDir}/modules/sideleft/tools/changeres.sh`,
|
||||
enabled: true,
|
||||
},
|
||||
icon: 'desktop-symbolic',
|
||||
name: getString('Change screen resolution'),
|
||||
command: `bash ${App.configDir}/modules/sideleft/tools/changeres.sh`,
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
icon: 'nixos-symbolic',
|
||||
name: 'Trim system generations to 5',
|
||||
name: getString('Trim system generations to 5'),
|
||||
command: `sudo ${App.configDir}/scripts/quickscripts/nixos-trim-generations.sh 5 0 system`,
|
||||
enabled: distroID == 'nixos',
|
||||
},
|
||||
{
|
||||
icon: 'nixos-symbolic',
|
||||
name: 'Trim home manager generations to 5',
|
||||
name: getString('Trim home manager generations to 5'),
|
||||
command: `${App.configDir}/scripts/quickscripts/nixos-trim-generations.sh 5 0 home-manager`,
|
||||
enabled: distroID == 'nixos',
|
||||
},
|
||||
{
|
||||
icon: 'ubuntu-symbolic',
|
||||
name: 'Update packages',
|
||||
name: getString('Update packages'),
|
||||
command: `sudo apt update && sudo apt upgrade -y`,
|
||||
enabled: isDebianDistro,
|
||||
},
|
||||
{
|
||||
icon: 'fedora-symbolic',
|
||||
name: 'Update packages',
|
||||
name: getString('Update packages'),
|
||||
command: `sudo dnf upgrade -y`,
|
||||
enabled: distroID == 'fedora',
|
||||
},
|
||||
{
|
||||
icon: 'arch-symbolic',
|
||||
name: 'Update packages',
|
||||
name: getString('Update packages'),
|
||||
command: `sudo pacman -Syyu`,
|
||||
enabled: isArchDistro,
|
||||
},
|
||||
{
|
||||
icon: 'arch-symbolic',
|
||||
name: 'Remove orphan packages',
|
||||
name: getString('Remove orphan packages'),
|
||||
command: `sudo pacman -R $(pacman -Qdtq)`,
|
||||
enabled: isArchDistro,
|
||||
},
|
||||
{
|
||||
icon: 'flatpak-symbolic',
|
||||
name: 'Uninstall unused flatpak packages',
|
||||
name: getString('Uninstall unused flatpak packages'),
|
||||
command: `flatpak uninstall --unused`,
|
||||
enabled: hasFlatpak,
|
||||
},
|
||||
@@ -63,7 +64,7 @@ const scripts = [
|
||||
|
||||
export default () => SidebarModule({
|
||||
icon: MaterialIcon('code', 'norm'),
|
||||
name: 'Quick scripts',
|
||||
name: getString('Quick scripts'),
|
||||
child: Box({
|
||||
vertical: true,
|
||||
className: 'spacing-v-5',
|
||||
|
||||
Reference in New Issue
Block a user