init illogical-impulse

This commit is contained in:
end-4
2023-12-25 18:17:47 +07:00
parent 16b0d77075
commit 9b2460c12b
55 changed files with 3575 additions and 902 deletions
+3 -3
View File
@@ -56,9 +56,9 @@ export default {
};
// We don't want context menus of the bar's tray go under the rounded corner below,
// So bar is returned after 1ms, making it get spawned after the corner
// And having an Utils.timeout in that window array just gives an error
// so bar is returned after default export, making it get spawned after the corner
// (having an Utils.timeout in that window array just gives an error)
// Not having it in default export is fine since we don't need to toggle it
Bar();
// uwu
// uwu
+1 -1
View File
@@ -29,7 +29,7 @@
<style name="current-line" background="#3E3D32"/>
<style name="current-line-number" background="#eeeeec"/>
<style name="draw-spaces" foreground="#babdb6"/>
<style name="background-pattern" background="#rgba(0,0,0,0)"/>
<style name="background-pattern" background="#000000"/>
<!-- Bracket Matching -->
<!-- <style name="bracket-match" foreground="white" background="grey"/> -->
+74 -12
View File
@@ -4,7 +4,7 @@ import { MaterialIcon } from './materialicon.js';
import { setupCursorHover } from './cursorhover.js';
const { Box, Button, Entry, EventBox, Icon, Label, Revealer, Scrollable, Stack } = Widget;
export const ConfigToggle = ({ icon, name, desc = '', initValue, onChange, ...props }) => {
export const ConfigToggle = ({ icon, name, desc = '', initValue, onChange, ...rest }) => {
let value = initValue;
const toggleIcon = Label({
className: `icon-material txt-bold ${value ? '' : 'txt-poof'}`,
@@ -37,25 +37,87 @@ export const ConfigToggle = ({ icon, name, desc = '', initValue, onChange, ...pr
]
});
const interactionWrapper = Button({
...props,
child: widgetContent,
setup: setupCursorHover,
onClicked: () => { // mouse up/kb press
value = !value;
toggleIcon.toggleClassName('switch-fg-toggling-false', false);
toggleIcon.label = `${value ? 'check' : ''}`;
toggleIcon.toggleClassName('txt-poof', !value);
if (!value) {
toggleIcon.label = '';
toggleIcon.toggleClassName('txt-poof', true);
}
toggleButtonIndicator.toggleClassName('switch-fg-true', value);
toggleButton.toggleClassName('switch-bg-true', value);
if(value) Utils.timeout(1, () => {
toggleIcon.label = 'check';
toggleIcon.toggleClassName('txt-poof', false);
})
onChange(interactionWrapper, value);
},
setup: (button) => {
button.connect('pressed', () => { // mouse down
toggleIcon.toggleClassName('txt-poof', true);
toggleIcon.toggleClassName('switch-fg-true', false);
if(!value) toggleIcon.toggleClassName('switch-fg-toggling-false', true);
});
}
setupCursorHover(button),
button.connect('pressed', () => { // mouse down
toggleIcon.toggleClassName('txt-poof', true);
toggleIcon.toggleClassName('switch-fg-true', false);
if (!value) toggleIcon.toggleClassName('switch-fg-toggling-false', true);
});
},
...rest,
});
return interactionWrapper;
}
}
export const ConfigSegmentedSelection = ({
icon, name, desc = '',
options = [{ name: 'Option 1', value: 0 }, { name: 'Option 2', value: 1 }],
initIndex = 0,
onChange,
...rest
}) => {
let lastSelected = initIndex;
let value = options[initIndex].value;
const widget = Box({
tooltipText: desc,
className: 'segment-container',
// homogeneous: true,
children: options.map((option, id) => {
const selectedIcon = Revealer({
revealChild: id == initIndex,
transition: 'slide_right',
transitionDuration: 150,
child: MaterialIcon('check', 'norm')
});
return Button({
setup: setupCursorHover,
className: `segment-btn ${id == initIndex ? 'segment-btn-enabled' : ''}`,
child: Box({
hpack: 'center',
className: 'spacing-h-5',
children: [
selectedIcon,
Label({
label: option.name,
})
]
}),
onClicked: (self) => {
value = option.value;
const kids = widget.get_children();
kids[lastSelected].toggleClassName('segment-btn-enabled', false);
kids[lastSelected].get_children()[0].get_children()[0].revealChild = false;
lastSelected = id;
self.toggleClassName('segment-btn-enabled', true);
selectedIcon.revealChild = true;
onChange(option.value, option.name);
}
})
}),
...rest,
});
return widget;
}
export const ConfigGap = ({ vertical = true, size = 5, ...rest }) => Box({
className: `gap-${vertical ? 'v' : 'h'}-${size}`,
...rest,
})
+10 -7
View File
@@ -12,12 +12,11 @@ let sub_h1, sub_h2, sub_h3, sub_h4, sub_h5
// m2p_sections defines how to detect special markdown sections.
// These expressions scan the full line to detect headings, lists, and code.
const m2p_sections = [
// h1 is actually 210% on github, but it's unecessary large imo
sub_h1 = { name: H1, re: /^(#\s+)(.*)(\s*)$/, sub: "<span font_weight='bold' size='150%'>$2</span>" },
sub_h2 = { name: H2, re: /^(##\s+)(.*)(\s*)$/, sub: "<span font_weight='bold' size='125%'>$2</span>" },
sub_h3 = { name: H3, re: /^(###\s+)(.*)(\s*)$/, sub: "<span font_weight='bold' size='100%'>$2</span>" },
sub_h4 = { name: H4, re: /^(####\s+)(.*)(\s*)$/, sub: "<span font_weight='bold' size='90%'>$2</span>" },
sub_h5 = { name: H5, re: /^(#####\s+)(.*)(\s*)$/, sub: "<span font_weight='bold' size='80%'>$2</span>" },
sub_h1 = { name: H1, re: /^(#\s+)(.*)(\s*)$/, sub: "<span font_weight='bold' size='170%'>$2</span>" },
sub_h2 = { name: H2, re: /^(##\s+)(.*)(\s*)$/, sub: "<span font_weight='bold' size='150%'>$2</span>" },
sub_h3 = { name: H3, re: /^(###\s+)(.*)(\s*)$/, sub: "<span font_weight='bold' size='125%'>$2</span>" },
sub_h4 = { name: H4, re: /^(####\s+)(.*)(\s*)$/, sub: "<span font_weight='bold' size='100%'>$2</span>" },
sub_h5 = { name: H5, re: /^(#####\s+)(.*)(\s*)$/, sub: "<span font_weight='bold' size='90%'>$2</span>" },
{ name: BULLET, re: /^(\s*)([\*\-]\s)(.*)(\s*)$/, sub: "$1• $3" },
{ name: NUMBERING, re: /^(\s*[0-9]+\.\s)(.*)(\s*)$/, sub: " $1$2" },
]
@@ -226,7 +225,11 @@ if (__is_nodejs_main) {
console.log(`Usage: ${process.argv[1]} FILE [FILE...]`)
process.exit(0)
}
args.forEach((f) => process.stdout.write(convert(readFile(f))))
for (let i = 0; i < args.length; i++) {
const f = args[i];
process.stdout.write(convert(readFile(f)));
}
}
export const markdownTest = `# Heading 1
@@ -50,7 +50,9 @@ else:
# exit()
colorscheme=0
darkmode = True
if("-l" in sys.argv):
darkmode = False
colorscheme = newtheme.get('schemes').get('light')
print('$darkmode: false;')
else:
@@ -85,8 +87,9 @@ inverseSurface = hexFromArgb(colorscheme.get_inverseSurface())
inverseOnSurface = hexFromArgb(colorscheme.get_inverseOnSurface())
inversePrimary = hexFromArgb(colorscheme.get_inversePrimary())
# post proccessing
background = darken(background, 0.6)
# make material less boring
if darkmode:
background = darken(background, 0.6)
print('$primary: ' + primary + ';')
print('$onPrimary: ' + onPrimary + ';')
@@ -87,34 +87,34 @@
"BLACK_500": "#393634",
"BLACK_700": "#33302F",
"BLACK_900": "#2B2928",
"accent_bg_color": "#c4c0ff",
"accent_fg_color": "#251a8c",
"accent_color": "#c4c0ff",
"destructive_bg_color": "#ffb4a9",
"destructive_fg_color": "#680003",
"destructive_color": "#ffb4a9",
"accent_bg_color": "#e2e2e2",
"accent_fg_color": "#000000",
"accent_color": "#e2e2e2",
"destructive_bg_color": "#e2e2e2",
"destructive_fg_color": "#000000",
"destructive_color": "#e2e2e2",
"success_bg_color": "#81C995",
"success_fg_color": "rgba(0, 0, 0, 0.87)",
"warning_bg_color": "#FDD633",
"warning_fg_color": "rgba(0, 0, 0, 0.87)",
"error_bg_color": "#ffb4a9",
"error_fg_color": "#680003",
"window_bg_color": "#101012",
"window_fg_color": "#e5e1e6",
"view_bg_color": "#1c1b1f",
"view_fg_color": "#e5e1e6",
"error_bg_color": "#e2e2e2",
"error_fg_color": "#000000",
"window_bg_color": "#000000",
"window_fg_color": "#e2e2e2",
"view_bg_color": "#000000",
"view_fg_color": "#e2e2e2",
"headerbar_bg_color": "mix(@dialog_bg_color, @window_bg_color, 0.5)",
"headerbar_fg_color": "#e3dff9",
"headerbar_border_color": "#464559",
"headerbar_fg_color": "#e2e2e2",
"headerbar_border_color": "#313131",
"headerbar_backdrop_color": "@headerbar_bg_color",
"headerbar_shade_color": "rgba(0, 0, 0, 0.09)",
"card_bg_color": "#101012",
"card_fg_color": "#e3dff9",
"card_bg_color": "#000000",
"card_fg_color": "#e2e2e2",
"card_shade_color": "rgba(0, 0, 0, 0.09)",
"dialog_bg_color": "#464559",
"dialog_fg_color": "#e3dff9",
"popover_bg_color": "#464559",
"popover_fg_color": "#e3dff9",
"dialog_bg_color": "#313131",
"dialog_fg_color": "#e2e2e2",
"popover_bg_color": "#313131",
"popover_fg_color": "#e2e2e2",
"thumbnail_bg_color": "#1a1b26",
"thumbnail_fg_color": "#AEE5FA",
"shade_color": "rgba(0, 0, 0, 0.36)",
+68 -3
View File
@@ -42,7 +42,7 @@ menu {
-gtk-outline-radius: 1.159rem;
animation-name: appear;
animation-duration: 100ms;
animation-duration: 40ms;
animation-timing-function: ease-out;
animation-iteration-count: 1;
}
@@ -81,12 +81,11 @@ tooltip {
}
.configtoggle-box {
padding: 0.205rem;
padding: 0.205rem 0.341rem;
border: 0.136rem solid transparent;
}
.configtoggle-box:focus {
padding: 0.205rem;
border: 0.136rem solid mix($onSurface, $surface, 40%);
}
@@ -126,4 +125,70 @@ tooltip {
@include menu_decel;
min-width: 1.636rem;
min-height: 0.819rem;
}
.segment-container {
@include full-rounding;
border: 0.068rem solid $outline;
}
.segment-container>*:first-child {
border-top-left-radius: 9999px;
border-bottom-left-radius: 9999px;
}
.segment-container>* {
border-right: 0.068rem solid $outline;
padding: 0.341rem 0.682rem;
}
.segment-container>*:last-child {
border-right: 0rem solid transparent;
border-top-right-radius: 9999px;
border-bottom-right-radius: 9999px;
}
.segment-btn {
color: $onSurface;
}
.segment-btn:focus,
.segment-btn:hover {
background-color: $surfaceVariant;
color: $onSurfaceVariant;
}
.segment-btn-enabled {
background-color: $secondaryContainer;
color: $onSecondaryContainer;
}
.segment-btn-enabled:hover,
.segment-btn-enabled:focus {
background-color: $secondaryContainer;
color: $onSecondaryContainer;
}
.gap-v-5 {
min-height: 0.341rem;
}
.gap-h-5 {
min-width: 0.341rem;
}
.gap-v-10 {
min-height: 0.682rem;
}
.gap-h-10 {
min-width: 0.682rem;
}
.gap-v-15 {
min-height: 1.023rem;
}
.gap-h-15 {
min-width: 1.023rem;
}
+28 -27
View File
@@ -1,29 +1,30 @@
$darkmode: true;
$primary: #c4c0ff;
$onPrimary: #251a8c;
$primaryContainer: #3d36a2;
$onPrimaryContainer: #e3dfff;
$secondary: #c7c4dd;
$onSecondary: #2f2e42;
$secondaryContainer: #464559;
$onSecondaryContainer: #e3dff9;
$tertiary: #eab9d1;
$onTertiary: #472639;
$tertiaryContainer: #603c50;
$onTertiaryContainer: #ffd8eb;
$error: #ffb4a9;
$onError: #680003;
$errorContainer: #930006;
$onErrorContainer: #ffb4a9;
$colorbarbg: #101012;
$background: #101012;
$onBackground: #e5e1e6;
$surface: #1c1b1f;
$onSurface: #e5e1e6;
$surfaceVariant: #47464f;
$onSurfaceVariant: #c8c5d0;
$outline: #928f9a;
$primary: #e2e2e2;
$onPrimary: #000000;
$primaryContainer: #6b6b6b;
$onPrimaryContainer: #e2e2e2;
$secondary: #e2e2e2;
$onSecondary: #000000;
$secondaryContainer: #313131;
$onSecondaryContainer: #e2e2e2;
$tertiary: #e2e2e2;
$onTertiary: #000000;
$tertiaryContainer: #000000;
$onTertiaryContainer: #e2e2e2;
$error: #e2e2e2;
$onError: #000000;
$errorContainer: #000000;
$onErrorContainer: #e2e2e2;
$colorbarbg: #000000;
$background: #000000;
$onBackground: #e2e2e2;
$surface: #000000;
$onSurface: #e2e2e2;
$surfaceVariant: #202020;
$onSurfaceVariant: #e2e2e2;
$outline: #a1a1a1;
$shadow: #000000;
$inverseSurface: #e5e1e6;
$inverseOnSurface: #313033;
$inversePrimary: #5550bb;
$inverseSurface: #e2e2e2;
$inverseOnSurface: #000000;
$inversePrimary: #e2e2e2;
+3 -3
View File
@@ -12,7 +12,7 @@ $onChatgpt: $onPrimary;
@include menu_decel;
@include elevation-border;
@include elevation2;
border-radius: $rounding_large - $elevation_margin;
border-radius: $rounding_large - $elevation_margin + 0.068rem;
min-width: 27.818rem; // COMMENT THIS LATER IF TEXT WRAP IS USED
// min-height: 29.591rem;
background-color: $t_background;
@@ -33,7 +33,7 @@ $onChatgpt: $onPrimary;
@include menu_decel;
@include elevation-border;
@include elevation2;
border-radius: $rounding_large - $elevation_margin;
border-radius: $rounding_large - $elevation_margin + 0.068rem;
min-width: 27.818rem; // COMMENT THIS LATER IF TEXT WRAP IS USED
// min-height: 29.591rem;
background-color: $t_background;
@@ -645,7 +645,7 @@ $onChatgpt: $onPrimary;
margin: 0rem 3.409rem;
}
.sidebar-chat-settings {
.sidebar-chat-settings-toggles {
margin: 0rem 5.455rem;
}
+6
View File
@@ -121,6 +121,7 @@ class ChatGPTService extends Service {
_assistantPrompt = false;
_messages = [];
_cycleModels = true;
_temperature = 0.5;
_requestCount = 0;
_modelIndex = 0;
_key = '';
@@ -159,6 +160,9 @@ class ChatGPTService extends Service {
}
}
get temperature() { return this._temperature }
set temperature(value) { this._temperature = value; }
get messages() { return this._messages }
get lastMessage() { return this._messages[this._messages.length - 1] }
@@ -218,6 +222,8 @@ class ChatGPTService extends Service {
const body = {
model: CHAT_MODELS[this._modelIndex],
messages: this._messages.map(msg => { let m = { role: msg.role, content: msg.content }; return m; }),
temperature: this._temperature,
// temperature: 2, // <- Nuts
stream: true,
};
+409 -357
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -123,7 +123,7 @@ const BarBattery = () => {
['fallback', memUsage],
['battery', batteryWidget],
],
setup: (stack) => Utils.timeout(1, () => {
setup: (stack) => Utils.timeout(1, () => { // On desktops systems with no battery, show memory usage instead
if (Battery.available) stack.shown = 'battery';
else stack.shown = 'fallback';
})
@@ -134,6 +134,7 @@ const BarBattery = () => {
export const ModuleSystem = () => Widget.EventBox({
onScrollUp: () => execAsync('hyprctl dispatch workspace -1'),
onScrollDown: () => execAsync('hyprctl dispatch workspace +1'),
onPrimaryClick: () => App.toggleWindow('sideright'),
child: Widget.Box({
className: 'bar-group-margin bar-sides',
children: [
+4 -2
View File
@@ -74,12 +74,14 @@ export const ModuleWorkspaces = () => Widget.EventBox({
[Hyprland, (box) => {
// console.log('update');
const kids = box.children;
kids.forEach((child, i) => {
for (let i = 0; i < kids.length; i++) {
const child = kids[i];
child.child.toggleClassName('bar-ws-occupied', false);
child.child.toggleClassName('bar-ws-occupied-left', false);
child.child.toggleClassName('bar-ws-occupied-right', false);
child.child.toggleClassName('bar-ws-occupied-left-right', false);
});
}
const occupied = Array.from({ length: NUM_OF_WORKSPACES }, (_, i) => Hyprland.getWorkspace(i + 1)?.windows > 0);
for (let i = 0; i < occupied.length; i++) {
if (!occupied[i]) continue;
@@ -138,10 +138,12 @@ export default () => Box({
}),
onPrimaryClickRelease: () => {
const kids = resources.get_children();
kids.forEach((child, i) => {
child.get_children()[0].revealChild = !child.get_children()[0].revealChild;
});
for (let i = 0; i < kids.length; i++) {
const child = kids[i];
const firstChild = child.get_children()[0];
firstChild.revealChild = !firstChild.revealChild;
}
},
})
],
+3 -2
View File
@@ -86,7 +86,8 @@ const Taskbar = () => Widget.Box({
return a._workspace > b._workspace;
}],
['update', (box) => {
Hyprland.clients.forEach(client => {
for (let i = 0; i < Hyprland.clients.length; i++) {
const client = Hyprland.clients[i];
if (client["pid"] == -1) return;
const appClass = substitute(client.class);
for (const appName of pinnedApps) {
@@ -101,7 +102,7 @@ const Taskbar = () => Widget.Box({
newButton._workspace = client.workspace.id;
newButton.revealChild = true;
box._map.set(client.address, newButton);
})
}
box.children = Array.from(box._map.values());
}],
['add', (box, address) => {
@@ -360,7 +360,11 @@ export default () => Widget.Revealer({
if (!foundPlayer) {
box._player = null;
box.get_children().forEach(ch => ch.destroy());
const children = box.get_children();
for (let i = 0; i < children.length; i++) {
const child = children[i];
child.destroy();
}
return;
}
}, 'notify::players']],
+28 -6
View File
@@ -257,7 +257,7 @@ const workspace = index => {
child: fixed,
})],
});
widget.update = clients => {
widget.update = (clients) => {
clients = clients.filter(({ workspace: { id } }) => id === index);
// this is for my monitor layout
@@ -269,9 +269,22 @@ const workspace = index => {
return client;
});
fixed.get_children().forEach(ch => ch.destroy());
const children = fixed.get_children();
for (let i = 0; i < children.length; i++) {
const child = children[i];
child.destroy();
}
fixed.put(WorkspaceNumber(index), 0, 0);
clients.forEach(c => c.mapped && fixed.put(client(c), c.at[0] * OVERVIEW_SCALE, c.at[1] * OVERVIEW_SCALE));
for (let i = 0; i < clients.length; i++) {
const c = clients[i];
if (c.mapped) {
fixed.put(client(c), c.at[0] * OVERVIEW_SCALE, c.at[1] * OVERVIEW_SCALE);
}
}
fixed.show_all();
};
return widget;
@@ -290,7 +303,12 @@ const OverviewRow = ({ startWorkspace, workspaces, windowName = 'overview' }) =>
properties: [['update', box => {
execAsync('hyprctl -j clients').then(clients => {
const json = JSON.parse(clients);
box.get_children().forEach(ch => ch.update(json));
const children = box.get_children();
for (let i = 0; i < children.length; i++) {
const ch = children[i];
ch.update(json)
}
}).catch(print);
}]],
setup: (box) => box._update(box),
@@ -375,7 +393,7 @@ export const SearchAndWindows = () => {
hpack: 'center',
onAccept: (self) => { // This is when you hit Enter
const text = self.text;
if(text.length == 0) return;
if (text.length == 0) return;
const isAction = text.startsWith('>');
const isDir = (entry.text[0] == '/' || entry.text[0] == '~');
@@ -423,7 +441,11 @@ export const SearchAndWindows = () => {
['notify::text', (entry) => { // This is when you type
const isAction = entry.text[0] == '>';
const isDir = (entry.text[0] == '/' || entry.text[0] == '~');
resultsBox.get_children().forEach(ch => ch.destroy());
const children = resultsBox.get_children();
for (let i = 0; i < children.length; i++) {
const child = children[i];
child.destroy();
}
// check empty if so then dont do stuff
if (entry.text == '') {
resultsRevealer.set_reveal_child(false);
+77 -41
View File
@@ -6,7 +6,7 @@ import ChatGPT from '../../../services/chatgpt.js';
import { MaterialIcon } from "../../../lib/materialicon.js";
import { setupCursorHover, setupCursorHoverInfo } from "../../../lib/cursorhover.js";
import { SystemMessage, ChatMessage } from "./chatgpt_chatmessage.js";
import { ConfigToggle } from '../../../lib/configwidgets.js';
import { ConfigToggle, ConfigSegmentedSelection, ConfigGap } from '../../../lib/configwidgets.js';
import { markdownTest } from '../../../lib/md2pango.js';
const chatGPTTabIcon = Icon({
@@ -68,36 +68,58 @@ export const chatGPTSettings = Revealer({
transitionDuration: 150,
revealChild: true,
connections: [
[ChatGPT, (self) => {
[ChatGPT, (self) => Utils.timeout(200, () => {
self.revealChild = false;
}, 'newMsg'],
[ChatGPT, (self) => {
}), 'newMsg'],
[ChatGPT, (self) => Utils.timeout(200, () => {
self.revealChild = true;
}, 'clear'],
}), 'clear'],
],
child: Box({
vertical: true,
hpack: 'fill',
className: 'sidebar-chat-settings',
children: [
ConfigToggle({
icon: 'cycle',
name: 'Cycle models',
desc: 'Helps avoid exceeding the API rate of 3 messages per minute.\nTurn this on if you message rapidly.',
initValue: ChatGPT.cycleModels,
onChange: (self, newValue) => {
ChatGPT.cycleModels = newValue;
},
}),
ConfigToggle({
icon: 'description',
name: 'Assistant prompt',
desc: 'Tells ChatGPT\n 1. It\'s a sidebar assistant on Linux\n 2. Be short and concise\n 3. Use markdown features extensively\nLeave this off for a vanilla ChatGPT experience.',
initValue: ChatGPT.assistantPrompt,
onChange: (self, newValue) => {
ChatGPT.assistantPrompt = newValue;
ConfigSegmentedSelection({
hpack: 'center',
icon: 'casino',
name: 'Randomness',
desc: 'ChatGPT\'s temperature value.\n Precise = 0\n Balanced = 0.5\n Creative = 1',
options: [
{ value: 0.00, name: 'Precise', },
{ value: 0.50, name: 'Balanced', },
{ value: 1.00, name: 'Creative', },
],
initIndex: 1,
onChange: (value, name) => {
ChatGPT.temperature = value;
},
}),
ConfigGap({ vertical: true, size: 10 }), // Note: size can only be 5, 10, or 15
Box({
vertical: true,
hpack: 'fill',
className: 'sidebar-chat-settings-toggles',
children: [
ConfigToggle({
icon: 'cycle',
name: 'Cycle models',
desc: 'Helps avoid exceeding the API rate of 3 messages per minute.\nTurn this on if you message rapidly.',
initValue: ChatGPT.cycleModels,
onChange: (self, newValue) => {
ChatGPT.cycleModels = newValue;
},
}),
ConfigToggle({
icon: 'description',
name: 'Assistant prompt',
desc: 'Tells ChatGPT\n 1. It\'s a sidebar assistant on Linux\n 2. Be short and concise\n 3. Use markdown features extensively\nLeave this off for a vanilla ChatGPT experience.',
initValue: ChatGPT.assistantPrompt,
onChange: (self, newValue) => {
ChatGPT.assistantPrompt = newValue;
},
}),
]
})
]
})
});
@@ -136,7 +158,7 @@ export const chatGPTWelcome = Box({
children: [
chatGPTInfo,
openaiApiKeyInstructions,
chatGPTSettings,
chatGPTSettings, ``
]
})
});
@@ -148,21 +170,30 @@ export const chatContent = Box({
[ChatGPT, (box, id) => {
const message = ChatGPT.messages[id];
if (!message) return;
box.add(ChatMessage(message))
box.add(ChatMessage(message, chatGPTView))
}, 'newMsg'],
[ChatGPT, (box) => {
box.children = [chatGPTWelcome];
}, 'clear'],
[ChatGPT, (box) => {
box.children = [chatGPTWelcome];
}, 'initialized'],
]
});
const clearChat = () => {
ChatGPT.clear();
const children = chatContent.get_children();
for (let i = 0; i < children.length; i++) {
const child = children[i];
child.destroy();
}
}
export const chatGPTView = Scrollable({
className: 'sidebar-chat-viewport',
vexpand: true,
child: chatContent,
child: Box({
vertical: true,
children: [
chatGPTWelcome,
chatContent,
]
}),
setup: (scrolledWindow) => {
scrolledWindow.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
const vScrollbar = scrolledWindow.get_vscrollbar();
@@ -183,7 +214,8 @@ export const chatGPTCommands = Box({
className: 'sidebar-chat-chip sidebar-chat-chip-action txt txt-small',
onClicked: () => chatContent.add(SystemMessage(
`Key stored in:\n\`${ChatGPT.keyPath}\`\nTo update this key, type \`/key YOUR_API_KEY\``,
'/key')),
'/key',
chatGPTView)),
setup: setupCursorHover,
label: '/key',
}),
@@ -191,14 +223,15 @@ export const chatGPTCommands = Box({
className: 'sidebar-chat-chip sidebar-chat-chip-action txt txt-small',
onClicked: () => chatContent.add(SystemMessage(
`Currently using \`${ChatGPT.modelName}\``,
'/model'
'/model',
chatGPTView
)),
setup: setupCursorHover,
label: '/model',
}),
Button({
className: 'sidebar-chat-chip sidebar-chat-chip-action txt txt-small',
onClicked: () => ChatGPT.clear(),
onClicked: () => clearChat(),
setup: setupCursorHover,
label: '/clear',
}),
@@ -210,26 +243,29 @@ export const chatGPTSendMessage = (text) => {
if (text.length == 0) return;
if (ChatGPT.key.length == 0) {
ChatGPT.key = text;
chatContent.add(SystemMessage(`Key saved to\n\`${ChatGPT.keyPath}\``, 'API Key'));
chatContent.add(SystemMessage(`Key saved to\n\`${ChatGPT.keyPath}\``, 'API Key', chatGPTView));
text = '';
return;
}
// Commands
if (text.startsWith('/')) {
if (text.startsWith('/clear')) ChatGPT.clear();
else if (text.startsWith('/model')) chatContent.add(SystemMessage(`Currently using \`${ChatGPT.modelName}\``, '/model'))
if (text.startsWith('/clear')) clearChat();
else if (text.startsWith('/model')) chatContent.add(SystemMessage(`Currently using \`${ChatGPT.modelName}\``, '/model', chatGPTView))
else if (text.startsWith('/key')) {
const parts = text.split(' ');
if (parts.length == 1) chatContent.add(SystemMessage(`Key stored in:\n\`${ChatGPT.keyPath}\`\nTo update this key, type \`/key YOUR_API_KEY\``, '/key'));
if (parts.length == 1) chatContent.add(SystemMessage(
`Key stored in:\n\`${ChatGPT.keyPath}\`\nTo update this key, type \`/key YOUR_API_KEY\``,
'/key',
chatGPTView));
else {
ChatGPT.key = parts[1];
chatContent.add(SystemMessage(`Updated API Key at\n\`${ChatGPT.keyPath}\``, '/key'));
chatContent.add(SystemMessage(`Updated API Key at\n\`${ChatGPT.keyPath}\``, '/key', chatGPTView));
}
}
else if (text.startsWith('/test'))
chatContent.add(SystemMessage(markdownTest, `Markdown test`));
chatContent.add(SystemMessage(markdownTest, `Markdown test`, chatGPTView));
else
chatContent.add(SystemMessage(`Invalid command.`, 'Error'))
chatContent.add(SystemMessage(`Invalid command.`, 'Error', chatGPTView))
}
else {
ChatGPT.send(text);
@@ -148,7 +148,11 @@ const MessageContent = (content) => {
properties: [
['fullUpdate', (self, content, useCursor = false) => {
// Clear and add first text widget
contentBox.get_children().forEach(ch => ch.destroy());
const children = contentBox.get_children();
for (let i = 0; i < children.length; i++) {
const child = children[i];
child.destroy();
}
contentBox.add(TextBlock())
// Loop lines. Put normal text in markdown parser
// and put code into code highlighter (TODO)
@@ -214,7 +218,7 @@ const MessageContent = (content) => {
return contentBox;
}
export const ChatMessage = (message) => {
export const ChatMessage = (message, scrolledWindow) => {
const messageContentBox = MessageContent(message.content);
const thisMessage = Box({
className: 'sidebar-chat-message',
@@ -243,7 +247,7 @@ export const ChatMessage = (message) => {
[message, (self) => { // Message update
messageContentBox._fullUpdate(messageContentBox, message.content, message.role != 'user');
Utils.timeout(MESSAGE_SCROLL_DELAY, () => {
const scrolledWindow = thisMessage.get_parent().get_parent();
if (!scrolledWindow) return;
var adjustment = scrolledWindow.get_vadjustment();
adjustment.set_value(adjustment.get_upper() - adjustment.get_page_size());
});
@@ -258,7 +262,7 @@ export const ChatMessage = (message) => {
return thisMessage;
}
export const SystemMessage = (content, commandName) => {
export const SystemMessage = (content, commandName, scrolledWindow) => {
const messageContentBox = MessageContent(content);
const thisMessage = Box({
className: 'sidebar-chat-message',
@@ -282,7 +286,7 @@ export const SystemMessage = (content, commandName) => {
})
],
setup: (self) => Utils.timeout(MESSAGE_SCROLL_DELAY, () => {
const scrolledWindow = thisMessage.get_parent().get_parent();
if (!scrolledWindow) return;
var adjustment = scrolledWindow.get_vadjustment();
adjustment.set_value(adjustment.get_upper() - adjustment.get_page_size());
})
+3
View File
@@ -18,6 +18,9 @@ export const SidebarModule = ({
className: 'txt-small txt',
label: `${name}`,
}),
Box({
hexpand: true,
}),
Label({
className: 'sidebar-module-btn-arrow',
})
@@ -7,6 +7,5 @@ import { SidebarModule } from './module.js';
export const QuickScripts = () => SidebarModule({
name: 'Quick scripts',
child: Box({
})
})
@@ -65,6 +65,11 @@ const CalendarWidget = () => {
}
});
const addCalendarChildren = (box, calendarJson) => {
const children = box.get_children();
for (let i = 0; i < children.length; i++) {
const child = children[i];
child.destroy();
}
box.children = calendarJson.map((row, i) => Widget.Box({
// homogeneous: true,
className: 'spacing-h-5',
+7 -7
View File
@@ -41,18 +41,18 @@ import { ModuleCalendar } from "./calendar.js";
const timeRow = Box({
className: 'spacing-h-5 sidebar-group-invisible-morehorizpad',
children: [
Widget.Label({
className: 'txt-title txt',
connections: [[5000, label => {
label.label = GLib.DateTime.new_now_local().format("%H:%M");
}]],
}),
// Widget.Label({
// className: 'txt-title txt',
// connections: [[5000, label => {
// label.label = GLib.DateTime.new_now_local().format("%H:%M");
// }]],
// }),
Widget.Label({
hpack: 'center',
className: 'txt-small txt',
connections: [[5000, label => {
execAsync(['bash', '-c', `uptime -p | sed -e 's/up //;s/ hours,/h/;s/ minutes/m/'`]).then(upTimeString => {
label.label = `• up: ${upTimeString}`;
label.label = `System uptime: ${upTimeString}`;
}).catch(print);
}]],
}),
-36
View File
@@ -1,36 +0,0 @@
# TokyoNight Color Palette
set -l foreground 3760bf
set -l selection 99a7df
set -l comment 848cb5
set -l red f52a65
set -l orange b15c00
set -l yellow 8c6c3e
set -l green 587539
set -l purple 7847bd
set -l cyan 007197
set -l pink 9854f1
# Syntax Highlighting Colors
set -g fish_color_normal $foreground
set -g fish_color_command $cyan
set -g fish_color_keyword $pink
set -g fish_color_quote $yellow
set -g fish_color_redirection $foreground
set -g fish_color_end $orange
set -g fish_color_error $red
set -g fish_color_param $purple
set -g fish_color_comment $comment
set -g fish_color_selection --background=$selection
set -g fish_color_search_match --background=$selection
set -g fish_color_operator $green
set -g fish_color_escape $pink
set -g fish_color_autosuggestion $comment
# Completion Pager Colors
set -g fish_pager_color_progress $comment
set -g fish_pager_color_prefix $cyan
set -g fish_pager_color_completion $foreground
set -g fish_pager_color_description $comment
set -g fish_pager_color_selected_background --background=$selection
-36
View File
@@ -1,36 +0,0 @@
# TokyoNight Color Palette
set -l foreground c8d3f5
set -l selection 3654a7
set -l comment 7a88cf
set -l red ff757f
set -l orange ff966c
set -l yellow ffc777
set -l green c3e88d
set -l purple fca7ea
set -l cyan 86e1fc
set -l pink c099ff
# Syntax Highlighting Colors
set -g fish_color_normal $foreground
set -g fish_color_command $cyan
set -g fish_color_keyword $pink
set -g fish_color_quote $yellow
set -g fish_color_redirection $foreground
set -g fish_color_end $orange
set -g fish_color_error $red
set -g fish_color_param $purple
set -g fish_color_comment $comment
set -g fish_color_selection --background=$selection
set -g fish_color_search_match --background=$selection
set -g fish_color_operator $green
set -g fish_color_escape $pink
set -g fish_color_autosuggestion $comment
# Completion Pager Colors
set -g fish_pager_color_progress $comment
set -g fish_pager_color_prefix $cyan
set -g fish_pager_color_completion $foreground
set -g fish_pager_color_description $comment
set -g fish_pager_color_selected_background --background=$selection
-36
View File
@@ -1,36 +0,0 @@
# TokyoNight Color Palette
set -l foreground c0caf5
set -l selection 33467c
set -l comment 565f89
set -l red f7768e
set -l orange ff9e64
set -l yellow e0af68
set -l green 9ece6a
set -l purple 9d7cd8
set -l cyan 7dcfff
set -l pink bb9af7
# Syntax Highlighting Colors
set -g fish_color_normal $foreground
set -g fish_color_command $cyan
set -g fish_color_keyword $pink
set -g fish_color_quote $yellow
set -g fish_color_redirection $foreground
set -g fish_color_end $orange
set -g fish_color_error $red
set -g fish_color_param $purple
set -g fish_color_comment $comment
set -g fish_color_selection --background=$selection
set -g fish_color_search_match --background=$selection
set -g fish_color_operator $green
set -g fish_color_escape $pink
set -g fish_color_autosuggestion $comment
# Completion Pager Colors
set -g fish_pager_color_progress $comment
set -g fish_pager_color_prefix $cyan
set -g fish_pager_color_completion $foreground
set -g fish_pager_color_description $comment
set -g fish_pager_color_selected_background --background=$selection
-36
View File
@@ -1,36 +0,0 @@
# TokyoNight Color Palette
set -l foreground c0caf5
set -l selection 364a82
set -l comment 565f89
set -l red f7768e
set -l orange ff9e64
set -l yellow e0af68
set -l green 9ece6a
set -l purple 9d7cd8
set -l cyan 7dcfff
set -l pink bb9af7
# Syntax Highlighting Colors
set -g fish_color_normal $foreground
set -g fish_color_command $cyan
set -g fish_color_keyword $pink
set -g fish_color_quote $yellow
set -g fish_color_redirection $foreground
set -g fish_color_end $orange
set -g fish_color_error $red
set -g fish_color_param $purple
set -g fish_color_comment $comment
set -g fish_color_selection --background=$selection
set -g fish_color_search_match --background=$selection
set -g fish_color_operator $green
set -g fish_color_escape $pink
set -g fish_color_autosuggestion $comment
# Completion Pager Colors
set -g fish_pager_color_progress $comment
set -g fish_pager_color_prefix $cyan
set -g fish_pager_color_completion $foreground
set -g fish_pager_color_description $comment
set -g fish_pager_color_selected_background --background=$selection
+18 -18
View File
@@ -9,7 +9,7 @@ term=xterm-256color
title=foot
# locked-title=no
font=JetBrainsMono Nerd Font:size=12
font=SpaceMono Nerd Font:size=11
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
@@ -56,7 +56,7 @@ lines=10000
[cursor]
style=beam
# color=111111 dcdccc
color=1d1b1f e6e1e5
color=1b1b1f e4e1e6
# blink=no
beam-thickness=1.5
# underline-thickness=<font underline thickness>
@@ -67,24 +67,24 @@ beam-thickness=1.5
[colors]
alpha=1
background=1d1b1f
foreground=e6e1e5
regular0=1d1b1f
background=1b1b1f
foreground=e4e1e6
regular0=1b1b1f
regular1=ffb4a9
regular2=6e45bf
regular3=ebdcff
regular4=ebdcff
regular5=e9def8
regular6=d3bbff
regular7=cbc4cf
bright0=1d1b1f
regular2=4f52b8
regular3=e0e0ff
regular4=e0e0ff
regular5=e2e0f9
regular6=bfc2ff
regular7=c7c5d0
bright0=1b1b1f
bright1=ffb4a9
bright2=6e45bf
bright3=ebdcff
bright4=ebdcff
bright5=e9def8
bright6=d3bbff
bright7=cbc4cf
bright2=4f52b8
bright3=e0e0ff
bright4=e0e0ff
bright5=e2e0f9
bright6=bfc2ff
bright7=c7c5d0
[csd]
# preferred=server
+8 -8
View File
@@ -1,16 +1,16 @@
font=Gabarito
font=Lexend
terminal=foot -e
prompt=">> "
layer=overlay
[colors]
background=1d1b1fff
text=e6e1e5ff
selection=49454fff
selection-text=cbc4cfff
border=49454fff
match=d3bbffff
selection-match=d3bbffff
background=191c1ecc
text=e1e2e5ff
selection=41484dff
selection-text=c0c7cdff
border=41484dff
match=79d0ffff
selection-match=79d0ffff
[border]
+10 -10
View File
@@ -1,24 +1,24 @@
# Auto generated color theme for image at: [Local wallpaper]
general {
col.active_border = rgba(5529a5FF)
col.inactive_border = rgba(4b4358AA)
col.active_border = rgba(36399fFF)
col.inactive_border = rgba(454559AA)
}
plugin {
droidbars {
# example config
bar_height = 30
background_color = rgba(1d1b1fFF)
# background_color_active = rgba(49454fFF) # Not added yet
text_color = rgba(e9def8FF)
background_color = rgba(1b1b1fFF)
# background_color_active = rgba(47464fFF) # Not added yet
text_color = rgba(e2e0f9FF)
font_family = Lexend
button_font_fmily = JetBrainsMono Nerd Font
button_font_fmily = JetBrainsMono NF
# example buttons (R -> L)
# droidbars-button = [0]isLeft(0/1), [1]color, [2]color2, [3]width, [4]height, [5]icon, [6]buttonType, [7]on-click
droidbars-button = 0, rgba(e9def8FF), rgba(d3bbffFF), 42, 16, 󰖭, normal, hyprctl dispatch killactive
droidbars-button = 0, rgba(e9def8FF), rgba(d3bbffFF), 42, 16, , normal, hyprctl dispatch fullscreen 1
droidbars-button = 1, rgba(e9def8FF), rgba(d3bbffFF), 16, 16,‎󰐃, pin, hyprctl dispatch pin
droidbars-button = 1, rgba(e9def8FF), rgba(d3bbffFF), 16, 16,󰗘, float, hyprctl dispatch togglefloating
droidbars-button = 0, rgba(e2e0f9FF), rgba(bfc2ffFF), 42, 16, 󰖭, normal, hyprctl dispatch killactive
droidbars-button = 0, rgba(e2e0f9FF), rgba(bfc2ffFF), 42, 16, , normal, hyprctl dispatch fullscreen 1
droidbars-button = 1, rgba(e2e0f9FF), rgba(bfc2ffFF), 16, 16,‎󰐃, pin, hyprctl dispatch pin
droidbars-button = 1, rgba(e2e0f9FF), rgba(bfc2ffFF), 16, 16,󰗘, float, hyprctl dispatch togglefloating
}
}
+4 -1
View File
@@ -14,7 +14,7 @@ exec-once = fcitx5
exec-once = dbus-update-activation-environment --all &
exec-once = /usr/bin/gnome-keyring-daemon --start --components=secrets &
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
exec-once = swayidle -w timeout 300 'gtklock' before-sleep 'gtklock' &
exec-once = swayidle -w timeout 300 'swaylock' before-sleep 'swaylock' &
exec-once = swayidle -w timeout 450 'pidof java || systemctl suspend' & # dont sleep if playing minecraft, else nvidia will fuck up
exec-once = sleep 1 && dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # Some fix idk
@@ -26,3 +26,6 @@ exec-once = hyprctl setcursor Bibata-Modern-Classic 24
# Plugins
# are a good way to crash Hyprland
# so nothing here
+22 -18
View File
@@ -26,7 +26,10 @@ input {
#sensitivity = 0
# Keyboard
# Add a layout and comment kb_options for Win+Space switching shortcut
kb_layout = us
# kb_options = grp:win_space_toggle
follow_mouse = 1
numlock_by_default = true
repeat_delay = 250
@@ -66,7 +69,7 @@ general {
# Gaps and border
gaps_in = 4
gaps_out = 5
gaps_workspace = 50
gaps_workspaces = 50
border_size = 1
# Fallback colors
@@ -98,7 +101,7 @@ decoration {
special = false
new_optimizations = on
size = 10
size = 5
passes = 4
brightness = 1
noise = 0.01
@@ -111,10 +114,10 @@ decoration {
# Shadow
drop_shadow = true
shadow_ignore_window = true
shadow_range = 15
shadow_range = 20
shadow_offset = 0 2
shadow_render_power = 6
col.shadow = rgba(00000044)
shadow_render_power = 2
col.shadow = rgba(0000001A)
# Shader
# screen_shader = ~/.config/hypr/shaders/nothing.frag
@@ -146,14 +149,14 @@ animations {
animation = border, 1, 10, default
animation = fade, 1, 2.5, md3_decel
# animation = workspaces, 1, 3.5, md3_decel, slide
animation = workspaces, 1, 3.5, easeOutExpo, slide
animation = workspaces, 1, 7, fluent_decel, slide
# animation = workspaces, 1, 7, fluent_decel, slidefade 15%
# animation = specialWorkspace, 1, 3, md3_decel, slidefadevert 15%
animation = specialWorkspace, 1, 3, md3_decel, slidevert
}
misc {
vfr = true
vfr = 1
vrr = 1
focus_on_activate = true
animate_manual_resizes = false
@@ -170,7 +173,7 @@ debug {
#overlay = true
#damage_tracking = 0
#damage_blink = yes
#damage_blink = yes
}
#misc {
@@ -186,6 +189,8 @@ decoration {
}
######## Window rules ########
windowrule = noblur,.*
#windowrule = opacity 0.94 override 0.94 override, .*
windowrule = float, ^(steam)$
windowrule = float, ^(guifetch)$ # FlafyDev/guifetch
@@ -206,6 +211,7 @@ layerrule = xray 1, .*
#layerrule = noanim, .*
layerrule = noanim, selection
layerrule = noanim, overview
layerrule = blur, swaylock
layerrule = blur, eww
layerrule = ignorealpha 0.8, eww
@@ -219,14 +225,18 @@ layerrule = blur, notifications
layerrule = ignorealpha 0.69, notifications
# ags
layerrule = blur, session
layerrule = noanim, sideright
layerrule = noanim, sideleft
#layerrule = blur, bar
#layerrule = ignorealpha 0.64, bar
#layerrule = blur, corner.*
#layerrule = ignorealpha 0.69, corner.*
#layerrule = blur, dock
#layerrule = ignorealpha 0.69, dock
# layerrule = blur, indicator.*
# layerrule = ignorealpha 0.69, indicator.*
#layerrule = blur, indicator.*
#layerrule = ignorealpha 0.69, indicator.*
#layerrule = blur, overview
#layerrule = ignorealpha 0.69, overview
#layerrule = blur, cheatsheet
@@ -235,17 +245,11 @@ layerrule = ignorealpha 0.69, notifications
#layerrule = ignorealpha 0.69, sideright
#layerrule = blur, sideleft
#layerrule = ignorealpha 0.69, sideleft
#layerrule = blur, indicatorundefined
#layerrule = ignorealpha 0.69, indicatorundefined
#layerrule = blur, indicator*
#layerrule = ignorealpha 0.69, indicator*
#layerrule = blur, osk
#layerrule = ignorealpha 0.69, osk
layerrule = blur, session
# Dynamic colors
source=~/.config/hypr/colors.conf
bind=,248,exec,notify-send deez nuts
bindr=,248,exec,eww close bar
+27 -32
View File
@@ -5,21 +5,15 @@ bindle=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindle=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
# Brightness
# bindle=, XF86MonBrightnessUp, exec, light -A 5
# bindle=, XF86MonBrightnessDown, exec, light -U 5
# bindle=, XF86MonBrightnessUp, exec, brightnessctl set '12.75+'
# bindle=, XF86MonBrightnessDown, exec, brightnessctl set '12.75-'
bindle=, XF86MonBrightnessUp, exec, ags run-js 'brightness.screen_value += 0.05;'
bindle=, XF86MonBrightnessDown, exec, ags run-js 'brightness.screen_value -= 0.05;'
######################################## Applications ########################################
#################################### Applications ###################################
# Apps: just normal apps
# bind = Super, C, exec, code --password-store=gnome --enable-features=UseOzonePlatform --ozone-platform=wayland
bind = Super, C, exec, code --enable-features=UseOzonePlatform --ozone-platform=wayland
# bind = Super, C, exec, code --password-store=gnome
bind = ControlShiftAlt, Y, exec, yuzu
bind = Super, C, exec, code --password-store=gnome --enable-features=UseOzonePlatform --ozone-platform=wayland
bind = Super, T, exec, foot --override shell=fish
bind = SuperShiftAlt, T, exec, foot sleep 0.01 && nmtui
#bind = SuperAlt, T, exec, wezterm
#bind = Super, Return, exec, wezterm
bind = Super, E, exec, nautilus --new-window
bind = SuperAlt, E, exec, thunar
bind = Super, W, exec, firefox
@@ -31,62 +25,60 @@ bind = SuperShift, W, exec, wps
bind = Super, I, exec, XDG_CURRENT_DESKTOP="gnome" gnome-control-center
bind = ControlSuper, V, exec, pavucontrol
bind = ControlShift, Escape, exec, gnome-system-monitor
bind = ControlAltShift, Escape, exec, foot -T 'btop' btop
bind = SuperShift, I, exec, ~/.local/bin/guifetch
# Actions
bind = SuperShift, Period, exec, pkill wofi || wofi-emoji
# Actions
bind = Super, Period, exec, pkill fuzzel || ~/.local/bin/fuzzel-emoji
bind = Super, Q, killactive,
bind = SuperAlt, Space, togglefloating,
bind = ShiftSuperAlt, Q, exec, hyprctl kill
bind = ControlShiftAlt, Delete, exec, pkill wlogout || wlogout -p layer-shell
bind = ControlShiftAltSuper, Delete, exec, systemctl poweroff
#bind = ShiftAlt,mouse_up, exec, wtype -M ctrl -k Prior
#bind = ShiftAlt,mouse_down, exec, wtype -M ctrl -k Next
# Screenshot, Record, OCR (Optical Character Recognition), Color picker, Clipboard history
bind = SuperShift, D, exec,~/.local/bin/rubyshot | wl-copy
# Screenshot, Record, OCR, Color picker, Clipboard history
bind = SuperShiftAlt, S, exec, grim -g "$(slurp -d -c D1E5F4BB -b 1B232866 -s 00000000)" - | swappy -f -
bindl =,Print,exec,grim - | wl-copy
bindl=,Print,exec,grim - | wl-copy
bind = SuperShift, S, exec, grim -g "$(slurp -d -c D1E5F4BB -b 1B232866 -s 00000000)" - | wl-copy
bind = SuperAlt, R, exec, ~/.local/bin/record-script.sh
bind = ControlAlt, R, exec, ~/.local/bin/record-script.sh --sound
bind = SuperShiftAlt, R, exec, ~/.local/bin/record-script-fullscreen.sh
bind = SuperAlt, R, exec, ~/.config/ags/scripts/record-script.sh
bind = ControlAlt, R, exec, ~/.config/ags/scripts/record-script.sh --sound
bind = SuperShiftAlt, R, exec, ~/.config/ags/scripts/record-script.sh --fullscreen-sound
bind = SuperShift, C, exec, hyprpicker -a
bind = Super, V, exec, pkill fuzzel || cliphist list | fuzzel --no-fuzzy --dmenu | cliphist decode | wl-copy
# Text-to-image
# Normal
# Normal
bind = ControlSuperShift,S,exec,grim -g "$(slurp -d -c D1E5F4BB -b 1B232866 -s 00000000)" "tmp.png" && tesseract "tmp.png" - | wl-copy && rm "tmp.png"
# English
# English
bind = SuperShift,T,exec,grim -g "$(slurp -d -c D1E5F4BB -b 1B232866 -s 00000000)" "tmp.png" && tesseract -l eng "tmp.png" - | wl-copy && rm "tmp.png"
# Japanese
# Japanese
bind = SuperShift,J,exec,grim -g "$(slurp -d -c D1E5F4BB -b 1B232866 -s 00000000)" "tmp.png" && tesseract -l jpn "tmp.png" - | wl-copy && rm "tmp.png"
# Media
bind = SuperShift, N, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"`
bindl = , XF86AudioNext, exec, ags run-js "Mpris.getPlayer()?.next()"
bindl= ,XF86AudioNext, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"`
bind = SuperShift, B, exec, playerctl previous
bind = SuperShift, P, exec, playerctl play-pause
bind = ,XF86AudioPlay, exec, playerctl play-pause
#Lock screen | blur: --effect-blur=20x202
bind = Super, L, exec, gtklock
bind = SuperShift, L, exec, gtklock
bind = Super, L, exec, swaylock
bind = SuperShift, L, exec, swaylock
bindl = SuperShift, L, exec, sleep 0.1 && systemctl suspend
# App launcher
bind = ControlSuper, Slash, exec, pkill anyrun || anyrun
###################################### AGS keybinds #####################################
bindr = ControlSuper, R, exec, hyprctl reload; killall ags activewin.sh activews.sh gohypr bash ydotool; ags &
bindr = ControlSuper, R, exec, killall ags activewin.sh activews.sh gohypr bash ydotool; ags &
bindr = ControlSuperAlt, R, exec, hyprctl reload; killall ags activewin.sh activews.sh gohypr bash ydotool; ags &
bind = ControlSuper, T, exec, ~/.config/ags/scripts/color_generation/switchwall.sh
bindir = Super, Super_L, exec, ags -t 'overview'
bind = Super, Tab, exec, ags -t 'overview'
bind = Super, Slash, exec, ags -t 'cheatsheet'
# bind = Super, O, exec, ags -t 'sideleft'
bind = Super, B, exec, ags -t 'sideleft'
bind = Super, O, exec, ags -t 'sideleft' # blame osu for this keybinding
bind = Super, N, exec, ags -t 'sideright'
bind = Super, M, exec, ags run-js 'openMusicControls.value = (!Mpris.getPlayer() ? false : !openMusicControls.value);'
bind = Super, Comma, exec, ags run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);'
bind = Super, K, exec, ags -t 'osk'
bind = ControlAlt, Delete, exec, ags -t 'session'
bindr = Control, Control_R, exec, ags run-js 'indicator.popup(-1);'
@@ -100,10 +92,11 @@ bindr = Control, Control_R, exec, ags run-js 'App.closeWindow("cheatsheet");'
bindr = Control, Control_R, exec, ags run-js 'App.closeWindow("osk");'
bindr = Control, Control_R, exec, ags run-js 'App.closeWindow("session");'
bindr = Control, Control_R, exec, ags run-js 'openMusicControls.value = false'
bindr = Control, Control_R, exec, ags run-js 'openColorScheme.value = false'
###################################### Plugins #########################################
bind = ControlSuper, P, exec, hyprctl plugin load '/home/end/.config/hypr/plugins/droidbars.so'
bind = ControlSuper, O, exec, hyprctl plugin unload '/home/end/.config/hypr/plugins/droidbars.so'
bind = ControlSuper, P, exec, hyprctl plugin load "~/.config/hypr/plugins/droidbars.so"
bind = ControlSuper, O, exec, hyprctl plugin unload "~/.config/hypr/plugins/droidbars.so"
## Testing
# bind = SuperAlt, f12, exec, notify-send "Hyprland version: $(hyprctl version | head -2 | tail -1 | cut -f2 -d ' ')" "owo" -a 'Hyprland keybind'
@@ -200,3 +193,5 @@ bindm = Super, mouse:273, resizewindow
bindm = Super, Z, movewindow
bind = ControlSuper, Backslash, resizeactive, exact 640 480
bind = SuperAlt, J, exec, ydotool key 105:1 105:0
+13
View File
@@ -0,0 +1,13 @@
// vim: set ft=glsl:
// blue light filter shader
// values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
pixColor.rgb = 1.0 - pixColor.rgb;
gl_FragColor = pixColor;
}
+13 -11
View File
@@ -10,27 +10,29 @@ $cmd_duration
"""
format = """
$username$hostname$directory
$username$hostname $directory $git_branch
$character
"""
# Replace the "" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
success_symbol = "[🭧🭒](bold fg:blue)[ ➜ ](bold bg:blue fg:black)[](bold fg:blue)"
success_symbol = "[• ](bold fg:blue)"
error_symbol = "[🭧🭒](bold fg:red)[ ✗ ](bold bg:red fg:black)[](bold fg:red)"
error_symbol = "[• 󰅙](bold fg:red)"
# Disable the package module, hiding it from the prompt completely
[package]
disabled = true
[git_branch]
symbol = "🌱 "
style = "bg: green"
symbol = "󰘬"
truncation_length = 4
truncation_symbol = ""
format = "• [](bold fg:green)[$symbol $branch(:$remote_branch)](fg:black bg:green)[](bold fg:green)"
[git_commit]
commit_hash_length = 4
tag_symbol = "🔖 "
tag_symbol = " "
[git_state]
format = '[\($state( $progress_current of $progress_total)\)]($style) '
@@ -50,7 +52,7 @@ deleted = " 🗑 "
[hostname]
ssh_only = false
format = "[ ](bold bg:cyan fg:blue)[$hostname ](bg:cyan bold fg:black)[](bold fg:cyan bg:blue)"
format = "[$hostname](bg:cyan bold fg:black)[](bold fg:cyan )"
trim_at = ".companyname.com"
disabled = false
@@ -69,9 +71,9 @@ format = '🕙[\[ $time \]]($style) '
time_format = "%T"
[username]
style_user = "bold bg:blue fg:black"
style_user = "bold bg:cyan fg:black"
style_root = "red bold"
format = "[🭃](bold fg:blue)[$user ]($style)"
format = "[](bold fg:cyan)[$user]($style)"
disabled = false
show_always = true
@@ -81,16 +83,16 @@ read_only = "  "
style = "bg:blue fg:black"
truncation_length = 2
truncation_symbol = "./"
format = '[$path]($style)[🭞](fg:blue)'
format = '[](bold fg:blue)[$path]($style)[](bold fg:blue)'
[directory.substitutions]
"Documents" = " "
"/" = ""
"/" = "|"
"Downloads" = " "
"Music" = " "
"Pictures" = " "
[cmd_duration]
min_time = 0
format = '[🬈🬖🬥🬅 ](bold bg:yellow fg:black)[time:$duration](bold bg:yellow fg:black)[ 🬖🬥🬔🬗](bold bg:yellow fg:black)'
format = '[](bold fg:yellow)[$duration](bold bg:yellow fg:black)[](bold fg:yellow)'