Arrrrgggg
|
|
@ -75,6 +75,12 @@ export LS_COLORS='no=00:fi=00:di=00;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40
|
||||||
# EG: the ls command is aliased, but to use the normal ls command you would type \ls
|
# EG: the ls command is aliased, but to use the normal ls command you would type \ls
|
||||||
|
|
||||||
# Add an "alert" alias for long running commands. Use like so:
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
|
# Stow
|
||||||
|
alias stowit='stow -v -t ~'
|
||||||
|
alias restow='stow -R'
|
||||||
|
alias unstow='stow -D'
|
||||||
|
alias stowlist='ls -d */'
|
||||||
|
alias stowclean='find . -type d -empty -delete' # delete empty directories
|
||||||
# sleep 10; alert
|
# sleep 10; alert
|
||||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ tab_pos_msgwin=0
|
||||||
tab_label_length=1000
|
tab_label_length=1000
|
||||||
show_indent_guide=false
|
show_indent_guide=false
|
||||||
show_white_space=false
|
show_white_space=false
|
||||||
show_line_endings=true
|
show_line_endings=false
|
||||||
show_line_endings_only_when_differ=false
|
show_line_endings_only_when_differ=false
|
||||||
show_markers_margin=true
|
show_markers_margin=true
|
||||||
show_linenumber_margin=true
|
show_linenumber_margin=true
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
[files]
|
[files]
|
||||||
recent_files=/home/matt/TCLI-Data-Repo/CMPFOR/Course-Documentation/CDD_COMFOR_Final_2016.txt;
|
recent_files=/home/matt/.config/hypr/hyprland.conf;/home/matt/.config/swaync/style.css;/home/matt/.config/swaync/config.json;/home/matt/.config/wlogout/style.css;/home/matt/.config/wpaperd/config.toml;/home/matt/.config/hypr/scripts/WallustSwww.sh;/home/matt/.config/wallust/wallust.toml;/home/matt/.config/wlogout/style2.css;/home/matt/.config/wlogout/layout2;/home/matt/.config/wlogout/layout;
|
||||||
recent_projects=
|
recent_projects=
|
||||||
current_page=0
|
current_page=-1
|
||||||
FILE_NAME_0=16572;None;0;EUTF-8;1;1;0;%2Fhome%2Fmatt%2FTCLI-Data-Repo%2FCMPFOR%2FCourse-Documentation%2FCDD_COMFOR_Final_2016.txt;0;4
|
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
session_file=
|
session_file=
|
||||||
|
|
@ -10,9 +9,9 @@ project_file_path=/home/matt/Projects
|
||||||
|
|
||||||
[geany]
|
[geany]
|
||||||
treeview_position=0
|
treeview_position=0
|
||||||
msgwindow_position=794
|
msgwindow_position=803
|
||||||
geometry=0;0;1906;1026;1;
|
geometry=0;0;1000;1026;1;
|
||||||
sidebar_page=0
|
sidebar_page=2
|
||||||
|
|
||||||
[VTE]
|
[VTE]
|
||||||
last_dir=/home/matt
|
last_dir=/home/matt
|
||||||
|
|
@ -20,12 +19,12 @@ last_dir=/home/matt
|
||||||
[search]
|
[search]
|
||||||
find_all_expanded=false
|
find_all_expanded=false
|
||||||
replace_all_expanded=false
|
replace_all_expanded=false
|
||||||
position_find_x=-1
|
position_find_x=0
|
||||||
position_find_y=-1
|
position_find_y=0
|
||||||
position_replace_x=-1
|
position_replace_x=-1
|
||||||
position_replace_y=-1
|
position_replace_y=-1
|
||||||
position_fif_x=-1
|
position_fif_x=0
|
||||||
position_fif_y=-1
|
position_fif_y=0
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
load_plugins=true
|
load_plugins=true
|
||||||
|
|
|
||||||
31
hypr/.config/ags/config.js
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
"use strict";
|
||||||
|
import GLib from 'gi://GLib';
|
||||||
|
import App from 'resource:///com/github/Aylur/ags/app.js'
|
||||||
|
import userOptions from './modules/.configuration/user_options.js';
|
||||||
|
import Overview from './modules/overview/main.js';
|
||||||
|
|
||||||
|
const COMPILED_STYLE_DIR = `${GLib.get_user_config_dir()}/ags/user/`
|
||||||
|
|
||||||
|
async function applyStyle() {
|
||||||
|
|
||||||
|
App.resetCss();
|
||||||
|
App.applyCss(`${COMPILED_STYLE_DIR}/style.css`);
|
||||||
|
console.log('[LOG] Styles loaded')
|
||||||
|
}
|
||||||
|
applyStyle().catch(print);
|
||||||
|
|
||||||
|
const Windows = () => [
|
||||||
|
Overview()
|
||||||
|
];
|
||||||
|
const CLOSE_ANIM_TIME = 210;
|
||||||
|
App.config({
|
||||||
|
css: `${COMPILED_STYLE_DIR}/style.css`,
|
||||||
|
stackTraceOnError: true,
|
||||||
|
closeWindowDelay: {
|
||||||
|
'sideright': CLOSE_ANIM_TIME,
|
||||||
|
'sideleft': CLOSE_ANIM_TIME,
|
||||||
|
'osk': CLOSE_ANIM_TIME,
|
||||||
|
},
|
||||||
|
windows: Windows().flat(1),
|
||||||
|
});
|
||||||
|
|
||||||
125
hypr/.config/ags/modules/.configuration/user_options.js
Normal file
|
|
@ -0,0 +1,125 @@
|
||||||
|
|
||||||
|
import userOverrides from '../../user_options.js';
|
||||||
|
|
||||||
|
// Defaults
|
||||||
|
let configOptions = {
|
||||||
|
// General stuff
|
||||||
|
'ai': {
|
||||||
|
'defaultGPTProvider': "openai",
|
||||||
|
'defaultTemperature': 0.9,
|
||||||
|
'enhancements': true,
|
||||||
|
'useHistory': true,
|
||||||
|
'writingCursor': " ...", // Warning: Using weird characters can mess up Markdown rendering
|
||||||
|
},
|
||||||
|
'animations': {
|
||||||
|
'choreographyDelay': 35,
|
||||||
|
'durationSmall': 110,
|
||||||
|
'durationLarge': 180,
|
||||||
|
},
|
||||||
|
'appearance': {
|
||||||
|
'keyboardUseFlag': false, // Use flag emoji instead of abbreviation letters
|
||||||
|
},
|
||||||
|
'apps': {
|
||||||
|
'imageViewer': "loupe",
|
||||||
|
'terminal': "foot", // This is only for shell actions
|
||||||
|
},
|
||||||
|
'battery': {
|
||||||
|
'low': 20,
|
||||||
|
'critical': 10,
|
||||||
|
},
|
||||||
|
'music': {
|
||||||
|
'preferredPlayer': "plasma-browser-integration",
|
||||||
|
},
|
||||||
|
'onScreenKeyboard': {
|
||||||
|
'layout': "qwerty_full", // See modules/onscreenkeyboard/onscreenkeyboard.js for available layouts
|
||||||
|
},
|
||||||
|
'overview': {
|
||||||
|
'scale': 0.18, // Relative to screen size
|
||||||
|
'numOfRows': 2,
|
||||||
|
'numOfCols': 5,
|
||||||
|
'wsNumScale': 0.09,
|
||||||
|
'wsNumMarginScale': 0.07,
|
||||||
|
},
|
||||||
|
'sidebar': {
|
||||||
|
'imageColumns': 2,
|
||||||
|
'imageBooruCount': 20,
|
||||||
|
'imageAllowNsfw': false,
|
||||||
|
},
|
||||||
|
'search': {
|
||||||
|
'engineBaseUrl': "https://www.google.com/search?q=",
|
||||||
|
'excludedSites': [], //add site to exclude from result. eg: "quora.com"
|
||||||
|
},
|
||||||
|
'time': {
|
||||||
|
// See https://docs.gtk.org/glib/method.DateTime.format.html
|
||||||
|
// Here's the 12h format: "%I:%M%P"
|
||||||
|
// For seconds, add "%S" and set interval to 1000
|
||||||
|
'format': "%H:%M",
|
||||||
|
'interval': 5000,
|
||||||
|
'dateFormatLong': "%A, %d/%m", // On bar
|
||||||
|
'dateInterval': 5000,
|
||||||
|
'dateFormat': "%d/%m", // On notif time
|
||||||
|
},
|
||||||
|
'weather': {
|
||||||
|
'city': "",
|
||||||
|
},
|
||||||
|
'workspaces': {
|
||||||
|
'shown': 10,
|
||||||
|
},
|
||||||
|
// Longer stuff
|
||||||
|
'icons': {
|
||||||
|
substitutions: {
|
||||||
|
'codium-url-handler': "vscodium",
|
||||||
|
'code-url-handler': "visual-studio-code",
|
||||||
|
'Code': "visual-studio-code",
|
||||||
|
'GitHub Desktop': "github-desktop",
|
||||||
|
'Minecraft* 1.20.1': "minecraft",
|
||||||
|
'gnome-tweaks': "org.gnome.tweaks",
|
||||||
|
'pavucontrol-qt': "pavucontrol",
|
||||||
|
'thunderbird-esr': "thunderbird",
|
||||||
|
'wps': "wps-office2019-kprometheus",
|
||||||
|
'wpsoffice': "wps-office2019-kprometheus",
|
||||||
|
'firefox-esr': "firefox",
|
||||||
|
'soffice' : "libreoffice",
|
||||||
|
'': "image-missing",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'keybinds': {
|
||||||
|
// Format: Mod1+Mod2+key. CaSe SeNsItIvE!
|
||||||
|
// Modifiers: Shift Ctrl Alt Hyper Meta
|
||||||
|
// See https://docs.gtk.org/gdk3/index.html#constants for the other keys (they are listed as KEY_key)
|
||||||
|
'overview': {
|
||||||
|
'altMoveLeft': "Ctrl+b",
|
||||||
|
'altMoveRight': "Ctrl+f",
|
||||||
|
'deleteToEnd': "Ctrl+k",
|
||||||
|
},
|
||||||
|
'sidebar': {
|
||||||
|
'apis': {
|
||||||
|
'nextTab': "Page_Down",
|
||||||
|
'prevTab': "Page_Up",
|
||||||
|
},
|
||||||
|
'options': { // Right sidebar
|
||||||
|
'nextTab': "Page_Down",
|
||||||
|
'prevTab': "Page_Up",
|
||||||
|
},
|
||||||
|
'pin': "Ctrl+p",
|
||||||
|
'cycleTab': "Ctrl+Tab",
|
||||||
|
'nextTab': "Ctrl+Page_Down",
|
||||||
|
'prevTab': "Ctrl+Page_Up",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// Override defaults with user's options
|
||||||
|
function overrideConfigRecursive(userOverrides, configOptions = {}) {
|
||||||
|
for (const [key, value] of Object.entries(userOverrides)) {
|
||||||
|
if (typeof value === 'object') {
|
||||||
|
overrideConfigRecursive(value, configOptions[key]);
|
||||||
|
} else {
|
||||||
|
configOptions[key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
overrideConfigRecursive(userOverrides, configOptions);
|
||||||
|
|
||||||
|
globalThis['userOptions'] = configOptions;
|
||||||
|
export default configOptions;
|
||||||
13
hypr/.config/ags/modules/.miscutils/icons.js
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
const { Gtk } = imports.gi;
|
||||||
|
|
||||||
|
export function iconExists(iconName) {
|
||||||
|
let iconTheme = Gtk.IconTheme.get_default();
|
||||||
|
return iconTheme.has_icon(iconName);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function substitute(str) {
|
||||||
|
if(userOptions.icons.substitutions[str]) return userOptions.icons.substitutions[str];
|
||||||
|
|
||||||
|
if (!iconExists(str)) str = str.toLowerCase().replace(/\s+/g, '-'); // Turn into kebab-case
|
||||||
|
return str;
|
||||||
|
}
|
||||||
4
hypr/.config/ags/modules/.miscutils/mathfuncs.js
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
export function clamp(x, min, max) {
|
||||||
|
return Math.min(Math.max(x, min), max);
|
||||||
|
}
|
||||||
54
hypr/.config/ags/modules/.miscutils/system.js
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
const { GLib } = imports.gi;
|
||||||
|
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||||
|
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
|
||||||
|
const { execAsync, exec } = Utils;
|
||||||
|
|
||||||
|
export const distroID = exec(`bash -c 'cat /etc/os-release | grep "^ID=" | cut -d "=" -f 2 | sed "s/\\"//g"'`).trim();
|
||||||
|
export const isDebianDistro = (distroID == 'linuxmint' || distroID == 'ubuntu' || distroID == 'debian' || distroID == 'zorin' || distroID == 'popos' || distroID == 'raspbian' || distroID == 'kali');
|
||||||
|
export const isArchDistro = (distroID == 'arch' || distroID == 'endeavouros' || distroID == 'cachyos');
|
||||||
|
export const hasFlatpak = !!exec(`bash -c 'command -v flatpak'`);
|
||||||
|
|
||||||
|
const LIGHTDARK_FILE_LOCATION = `${GLib.get_user_cache_dir()}/ags/user/colormode.txt`;
|
||||||
|
const colorMode = Utils.exec('bash -c "sed -n \'1p\' $HOME/.cache/ags/user/colormode.txt"');
|
||||||
|
export let darkMode = Variable(!(Utils.readFile(LIGHTDARK_FILE_LOCATION).split('\n')[0].trim() == 'light'));
|
||||||
|
export const hasPlasmaIntegration = !!Utils.exec('bash -c "command -v plasma-browser-integration-host"');
|
||||||
|
|
||||||
|
export const getDistroIcon = () => {
|
||||||
|
// Arches
|
||||||
|
if(distroID == 'arch') return 'arch-symbolic';
|
||||||
|
if(distroID == 'endeavouros') return 'endeavouros-symbolic';
|
||||||
|
if(distroID == 'cachyos') return 'cachyos-symbolic';
|
||||||
|
// Funny flake
|
||||||
|
if(distroID == 'nixos') return 'nixos-symbolic';
|
||||||
|
// Cool thing
|
||||||
|
if(distroID == 'fedora') return 'fedora-symbolic';
|
||||||
|
// Debians
|
||||||
|
if(distroID == 'linuxmint') return 'ubuntu-symbolic';
|
||||||
|
if(distroID == 'ubuntu') return 'ubuntu-symbolic';
|
||||||
|
if(distroID == 'debian') return 'debian-symbolic';
|
||||||
|
if(distroID == 'zorin') return 'ubuntu-symbolic';
|
||||||
|
if(distroID == 'popos') return 'ubuntu-symbolic';
|
||||||
|
if(distroID == 'raspbian') return 'debian-symbolic';
|
||||||
|
if(distroID == 'kali') return 'debian-symbolic';
|
||||||
|
return 'linux-symbolic';
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getDistroName = () => {
|
||||||
|
// Arches
|
||||||
|
if(distroID == 'arch') return 'Arch Linux';
|
||||||
|
if(distroID == 'endeavouros') return 'EndeavourOS';
|
||||||
|
if(distroID == 'cachyos') return 'CachyOS';
|
||||||
|
// Funny flake
|
||||||
|
if(distroID == 'nixos') return 'NixOS';
|
||||||
|
// Cool thing
|
||||||
|
if(distroID == 'fedora') return 'Fedora';
|
||||||
|
// Debians
|
||||||
|
if(distroID == 'linuxmint') return 'Linux Mint';
|
||||||
|
if(distroID == 'ubuntu') return 'Ubuntu';
|
||||||
|
if(distroID == 'debian') return 'Debian';
|
||||||
|
if(distroID == 'zorin') return 'Zorin';
|
||||||
|
if(distroID == 'popos') return 'Pop!_OS';
|
||||||
|
if(distroID == 'raspbian') return 'Raspbian';
|
||||||
|
if(distroID == 'kali') return 'Kali Linux';
|
||||||
|
return 'Linux';
|
||||||
|
}
|
||||||
86
hypr/.config/ags/modules/.widgethacks/advancedrevealers.js
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||||
|
|
||||||
|
const { Revealer, Scrollable } = Widget;
|
||||||
|
|
||||||
|
export const MarginRevealer = ({
|
||||||
|
transition = 'slide_down',
|
||||||
|
child,
|
||||||
|
revealChild,
|
||||||
|
showClass = 'element-show', // These are for animation curve, they don't really hide
|
||||||
|
hideClass = 'element-hide', // Don't put margins in these classes!
|
||||||
|
extraSetup = () => { },
|
||||||
|
...rest
|
||||||
|
}) => {
|
||||||
|
const widget = Scrollable({
|
||||||
|
...rest,
|
||||||
|
attribute: {
|
||||||
|
'revealChild': true, // It'll be set to false after init if it's supposed to hide
|
||||||
|
'transition': transition,
|
||||||
|
'show': () => {
|
||||||
|
if (widget.attribute.revealChild) return;
|
||||||
|
widget.hscroll = 'never';
|
||||||
|
widget.vscroll = 'never';
|
||||||
|
child.toggleClassName(hideClass, false);
|
||||||
|
child.toggleClassName(showClass, true);
|
||||||
|
widget.attribute.revealChild = true;
|
||||||
|
child.css = 'margin: 0px;';
|
||||||
|
},
|
||||||
|
'hide': () => {
|
||||||
|
if (!widget.attribute.revealChild) return;
|
||||||
|
child.toggleClassName(hideClass, true);
|
||||||
|
child.toggleClassName(showClass, false);
|
||||||
|
widget.attribute.revealChild = false;
|
||||||
|
if (widget.attribute.transition == 'slide_left')
|
||||||
|
child.css = `margin-right: -${child.get_allocated_width()}px;`;
|
||||||
|
else if (widget.attribute.transition == 'slide_right')
|
||||||
|
child.css = `margin-left: -${child.get_allocated_width()}px;`;
|
||||||
|
else if (widget.attribute.transition == 'slide_up')
|
||||||
|
child.css = `margin-bottom: -${child.get_allocated_height()}px;`;
|
||||||
|
else if (widget.attribute.transition == 'slide_down')
|
||||||
|
child.css = `margin-top: -${child.get_allocated_height()}px;`;
|
||||||
|
},
|
||||||
|
'toggle': () => {
|
||||||
|
if (widget.attribute.revealChild) widget.attribute.hide();
|
||||||
|
else widget.attribute.show();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
child: child,
|
||||||
|
hscroll: `${revealChild ? 'never' : 'always'}`,
|
||||||
|
vscroll: `${revealChild ? 'never' : 'always'}`,
|
||||||
|
setup: (self) => {
|
||||||
|
extraSetup(self);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
child.toggleClassName(`${revealChild ? showClass : hideClass}`, true);
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Allow reveal update. Currently this just helps at declaration
|
||||||
|
export const DoubleRevealer = ({
|
||||||
|
transition1 = 'slide_right',
|
||||||
|
transition2 = 'slide_left',
|
||||||
|
duration1 = 150,
|
||||||
|
duration2 = 150,
|
||||||
|
child,
|
||||||
|
revealChild,
|
||||||
|
...rest
|
||||||
|
}) => {
|
||||||
|
const r2 = Revealer({
|
||||||
|
transition: transition2,
|
||||||
|
transitionDuration: duration2,
|
||||||
|
revealChild: revealChild,
|
||||||
|
child: child,
|
||||||
|
});
|
||||||
|
const r1 = Revealer({
|
||||||
|
transition: transition1,
|
||||||
|
transitionDuration: duration1,
|
||||||
|
revealChild: revealChild,
|
||||||
|
child: r2,
|
||||||
|
...rest,
|
||||||
|
})
|
||||||
|
r1.toggleRevealChild = (value) => {
|
||||||
|
r1.revealChild = value;
|
||||||
|
r2.revealChild = value;
|
||||||
|
}
|
||||||
|
return r1;
|
||||||
|
}
|
||||||
32
hypr/.config/ags/modules/.widgethacks/popupwindow.js
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||||
|
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||||
|
const { Box, Window } = Widget;
|
||||||
|
|
||||||
|
|
||||||
|
export default ({
|
||||||
|
name,
|
||||||
|
child,
|
||||||
|
showClassName = "",
|
||||||
|
hideClassName = "",
|
||||||
|
...props
|
||||||
|
}) => {
|
||||||
|
return Window({
|
||||||
|
name,
|
||||||
|
visible: false,
|
||||||
|
layer: 'overlay',
|
||||||
|
...props,
|
||||||
|
|
||||||
|
child: Box({
|
||||||
|
setup: (self) => {
|
||||||
|
self.hook(App, (self, currentName, visible) => {
|
||||||
|
if (currentName === name) {
|
||||||
|
self.toggleClassName(hideClassName, !visible);
|
||||||
|
}
|
||||||
|
}).keybind("Escape", () => App.closeWindow(name))
|
||||||
|
if (showClassName !== "" && hideClassName !== "")
|
||||||
|
self.className = `${showClassName} ${hideClassName}`;
|
||||||
|
},
|
||||||
|
child: child,
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
4
hypr/.config/ags/modules/.widgetutils/clickthrough.js
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
import Cairo from 'gi://cairo?version=1.0';
|
||||||
|
|
||||||
|
export const dummyRegion = new Cairo.Region();
|
||||||
|
export const enableClickthrough = (self) => self.input_shape_combine_region(dummyRegion);
|
||||||
57
hypr/.config/ags/modules/.widgetutils/cursorhover.js
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
const { Gdk } = imports.gi;
|
||||||
|
|
||||||
|
export function setupCursorHover(button) { // Hand pointing cursor on hover
|
||||||
|
const display = Gdk.Display.get_default();
|
||||||
|
button.connect('enter-notify-event', () => {
|
||||||
|
const cursor = Gdk.Cursor.new_from_name(display, 'pointer');
|
||||||
|
button.get_window().set_cursor(cursor);
|
||||||
|
});
|
||||||
|
|
||||||
|
button.connect('leave-notify-event', () => {
|
||||||
|
const cursor = Gdk.Cursor.new_from_name(display, 'default');
|
||||||
|
button.get_window().set_cursor(cursor);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setupCursorHoverAim(button) { // Crosshair cursor on hover
|
||||||
|
button.connect('enter-notify-event', () => {
|
||||||
|
const display = Gdk.Display.get_default();
|
||||||
|
const cursor = Gdk.Cursor.new_from_name(display, 'crosshair');
|
||||||
|
button.get_window().set_cursor(cursor);
|
||||||
|
});
|
||||||
|
|
||||||
|
button.connect('leave-notify-event', () => {
|
||||||
|
const display = Gdk.Display.get_default();
|
||||||
|
const cursor = Gdk.Cursor.new_from_name(display, 'default');
|
||||||
|
button.get_window().set_cursor(cursor);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setupCursorHoverGrab(button) { // Hand ready to grab on hover
|
||||||
|
button.connect('enter-notify-event', () => {
|
||||||
|
const display = Gdk.Display.get_default();
|
||||||
|
const cursor = Gdk.Cursor.new_from_name(display, 'grab');
|
||||||
|
button.get_window().set_cursor(cursor);
|
||||||
|
});
|
||||||
|
|
||||||
|
button.connect('leave-notify-event', () => {
|
||||||
|
const display = Gdk.Display.get_default();
|
||||||
|
const cursor = Gdk.Cursor.new_from_name(display, 'default');
|
||||||
|
button.get_window().set_cursor(cursor);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setupCursorHoverInfo(button) { // "?" mark cursor on hover
|
||||||
|
const display = Gdk.Display.get_default();
|
||||||
|
button.connect('enter-notify-event', () => {
|
||||||
|
const cursor = Gdk.Cursor.new_from_name(display, 'help');
|
||||||
|
button.get_window().set_cursor(cursor);
|
||||||
|
});
|
||||||
|
|
||||||
|
button.connect('leave-notify-event', () => {
|
||||||
|
const cursor = Gdk.Cursor.new_from_name(display, 'default');
|
||||||
|
button.get_window().set_cursor(cursor);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
25
hypr/.config/ags/modules/.widgetutils/keybind.js
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
const { Gdk } = imports.gi;
|
||||||
|
|
||||||
|
const MODS = {
|
||||||
|
'Shift': Gdk.ModifierType.SHIFT_MASK,
|
||||||
|
'Ctrl': Gdk.ModifierType.CONTROL_MASK,
|
||||||
|
'Alt': Gdk.ModifierType.ALT_MASK,
|
||||||
|
'Hyper': Gdk.ModifierType.HYPER_MASK,
|
||||||
|
'Meta': Gdk.ModifierType.META_MASK
|
||||||
|
}
|
||||||
|
|
||||||
|
export const checkKeybind = (event, keybind) => {
|
||||||
|
const pressedModMask = event.get_state()[1];
|
||||||
|
const pressedKey = event.get_keyval()[1];
|
||||||
|
const keys = keybind.split('+');
|
||||||
|
for (let i = 0; i < keys.length; i++) {
|
||||||
|
if (keys[i] in MODS) {
|
||||||
|
if (!(pressedModMask & MODS[keys[i]])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else if (pressedKey !== Gdk[`KEY_${keys[i]}`]) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
28
hypr/.config/ags/modules/overview/actions.js
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
|
||||||
|
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||||
|
|
||||||
|
function moveClientToWorkspace(address, workspace) {
|
||||||
|
Utils.execAsync(['bash', '-c', `hyprctl dispatch movetoworkspacesilent ${workspace},address:${address} &`]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function dumpToWorkspace(from, to) {
|
||||||
|
if (from == to) return;
|
||||||
|
Hyprland.clients.forEach(client => {
|
||||||
|
if (client.workspace.id == from) {
|
||||||
|
moveClientToWorkspace(client.address, to);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function swapWorkspace(workspaceA, workspaceB) {
|
||||||
|
if (workspaceA == workspaceB) return;
|
||||||
|
const clientsA = [];
|
||||||
|
const clientsB = [];
|
||||||
|
Hyprland.clients.forEach(client => {
|
||||||
|
if (client.workspace.id == workspaceA) clientsA.push(client.address);
|
||||||
|
if (client.workspace.id == workspaceB) clientsB.push(client.address);
|
||||||
|
});
|
||||||
|
|
||||||
|
clientsA.forEach((address) => moveClientToWorkspace(address, workspaceB));
|
||||||
|
clientsB.forEach((address) => moveClientToWorkspace(address, workspaceA));
|
||||||
|
}
|
||||||
18
hypr/.config/ags/modules/overview/main.js
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||||
|
import { SearchAndWindows } from "./windowcontent.js";
|
||||||
|
import PopupWindow from '../.widgethacks/popupwindow.js';
|
||||||
|
|
||||||
|
export default (id = '') => PopupWindow({
|
||||||
|
name: `overview${id}`,
|
||||||
|
exclusivity: 'ignore',
|
||||||
|
keymode: 'exclusive',
|
||||||
|
visible: false,
|
||||||
|
// anchor: ['middle'],
|
||||||
|
layer: 'overlay',
|
||||||
|
child: Widget.Box({
|
||||||
|
vertical: true,
|
||||||
|
children: [
|
||||||
|
SearchAndWindows(),
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
})
|
||||||
155
hypr/.config/ags/modules/overview/miscfunctions.js
Normal file
|
|
@ -0,0 +1,155 @@
|
||||||
|
const { Gio, GLib } = imports.gi;
|
||||||
|
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||||
|
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
|
||||||
|
const { execAsync, exec } = Utils;
|
||||||
|
// import Todo from "../../services/todo.js";
|
||||||
|
import { darkMode } from '../.miscutils/system.js';
|
||||||
|
|
||||||
|
export function hasUnterminatedBackslash(inputString) {
|
||||||
|
// Use a regular expression to match a trailing odd number of backslashes
|
||||||
|
const regex = /\\+$/;
|
||||||
|
return regex.test(inputString);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function launchCustomCommand(command) {
|
||||||
|
const args = command.toLowerCase().split(' ');
|
||||||
|
if (args[0] == '>raw') { // Mouse raw input
|
||||||
|
Utils.execAsync('hyprctl -j getoption input:accel_profile')
|
||||||
|
.then((output) => {
|
||||||
|
const value = JSON.parse(output)["str"].trim();
|
||||||
|
if (value != "[[EMPTY]]" && value != "") {
|
||||||
|
execAsync(['bash', '-c', `hyprctl keyword input:accel_profile '[[EMPTY]]'`]).catch(print);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
execAsync(['bash', '-c', `hyprctl keyword input:accel_profile flat`]).catch(print);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else if (args[0] == '>img') { // Change wallpaper
|
||||||
|
execAsync([`bash`, `-c`, `${App.configDir}/scripts/color_generation/switchwall.sh`, `&`]).catch(print);
|
||||||
|
}
|
||||||
|
else if (args[0] == '>color') { // Generate colorscheme from color picker
|
||||||
|
execAsync([`bash`, `-c`, `${App.configDir}/scripts/color_generation/switchcolor.sh --pick`, `&`]).catch(print);
|
||||||
|
}
|
||||||
|
else if (args[0] == '>light') { // Light mode
|
||||||
|
darkMode.value = false;
|
||||||
|
execAsync([`bash`, `-c`, `mkdir -p ${GLib.get_user_cache_dir()}/ags/user && sed -i "1s/.*/light/" ${GLib.get_user_cache_dir()}/ags/user/colormode.txt`])
|
||||||
|
.then(execAsync(['bash', '-c', `${App.configDir}/scripts/color_generation/switchcolor.sh`]))
|
||||||
|
.catch(print);
|
||||||
|
}
|
||||||
|
else if (args[0] == '>dark') { // Dark mode
|
||||||
|
darkMode.value = true;
|
||||||
|
execAsync([`bash`, `-c`, `mkdir -p ${GLib.get_user_cache_dir()}/ags/user && sed -i "1s/.*/dark/" ${GLib.get_user_cache_dir()}/ags/user/colormode.txt`])
|
||||||
|
.then(execAsync(['bash', '-c', `${App.configDir}/scripts/color_generation/switchcolor.sh`]))
|
||||||
|
.catch(print);
|
||||||
|
}
|
||||||
|
else if (args[0] == '>badapple') { // Black and white
|
||||||
|
execAsync([`bash`, `-c`, `mkdir -p ${GLib.get_user_cache_dir()}/ags/user && sed -i "3s/.*/monochrome/" ${GLib.get_user_cache_dir()}/ags/user/colormode.txt`])
|
||||||
|
.then(execAsync(['bash', '-c', `${App.configDir}/scripts/color_generation/switchcolor.sh`]))
|
||||||
|
.catch(print);
|
||||||
|
}
|
||||||
|
else if (args[0] == '>material') { // Use material colors
|
||||||
|
execAsync([`bash`, `-c`, `mkdir -p ${GLib.get_user_cache_dir()}/ags/user && echo "material" > ${GLib.get_user_cache_dir()}/ags/user/colorbackend.txt`]).catch(print)
|
||||||
|
.then(execAsync(['bash', '-c', `${App.configDir}/scripts/color_generation/switchwall.sh --noswitch`]).catch(print))
|
||||||
|
.catch(print);
|
||||||
|
}
|
||||||
|
else if (args[0] == '>pywal') { // Use Pywal (ik it looks shit but I'm not removing)
|
||||||
|
execAsync([`bash`, `-c`, `mkdir -p ${GLib.get_user_cache_dir()}/ags/user && echo "pywal" > ${GLib.get_user_cache_dir()}/ags/user/colorbackend.txt`]).catch(print)
|
||||||
|
.then(execAsync(['bash', '-c', `${App.configDir}/scripts/color_generation/switchwall.sh --noswitch`]).catch(print))
|
||||||
|
.catch(print);
|
||||||
|
}
|
||||||
|
else if (args[0] == '>todo') { // Todo
|
||||||
|
Todo.add(args.slice(1).join(' '));
|
||||||
|
}
|
||||||
|
else if (args[0] == '>shutdown') { // Shut down
|
||||||
|
execAsync([`bash`, `-c`, `systemctl poweroff || loginctl poweroff`]).catch(print);
|
||||||
|
}
|
||||||
|
else if (args[0] == '>reboot') { // Reboot
|
||||||
|
execAsync([`bash`, `-c`, `systemctl reboot || loginctl reboot`]).catch(print);
|
||||||
|
}
|
||||||
|
else if (args[0] == '>sleep') { // Sleep
|
||||||
|
execAsync([`bash`, `-c`, `systemctl suspend || loginctl suspend`]).catch(print);
|
||||||
|
}
|
||||||
|
else if (args[0] == '>logout') { // Log out
|
||||||
|
execAsync([`bash`, `-c`, `pkill Hyprland || pkill sway`]).catch(print);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function execAndClose(command, terminal) {
|
||||||
|
App.closeWindow('overview');
|
||||||
|
if (terminal) {
|
||||||
|
execAsync([`bash`, `-c`, `${userOptions.apps.terminal} fish -C "${command}"`, `&`]).catch(print);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
execAsync(command).catch(print);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function couldBeMath(str) {
|
||||||
|
const regex = /^[0-9.+*/-]/;
|
||||||
|
return regex.test(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function expandTilde(path) {
|
||||||
|
if (path.startsWith('~')) {
|
||||||
|
return GLib.get_home_dir() + path.slice(1);
|
||||||
|
} else {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFileIcon(fileInfo) {
|
||||||
|
let icon = fileInfo.get_icon();
|
||||||
|
if (icon) {
|
||||||
|
// Get the icon's name
|
||||||
|
return icon.get_names()[0];
|
||||||
|
} else {
|
||||||
|
// Default icon for files
|
||||||
|
return 'text-x-generic';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function ls({ path = '~', silent = false }) {
|
||||||
|
let contents = [];
|
||||||
|
try {
|
||||||
|
let expandedPath = expandTilde(path);
|
||||||
|
if (expandedPath.endsWith('/'))
|
||||||
|
expandedPath = expandedPath.slice(0, -1);
|
||||||
|
let folder = Gio.File.new_for_path(expandedPath);
|
||||||
|
|
||||||
|
let enumerator = folder.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null);
|
||||||
|
let fileInfo;
|
||||||
|
while ((fileInfo = enumerator.next_file(null)) !== null) {
|
||||||
|
let fileName = fileInfo.get_display_name();
|
||||||
|
let fileType = fileInfo.get_file_type();
|
||||||
|
|
||||||
|
let item = {
|
||||||
|
parentPath: expandedPath,
|
||||||
|
name: fileName,
|
||||||
|
type: fileType === Gio.FileType.DIRECTORY ? 'folder' : 'file',
|
||||||
|
icon: getFileIcon(fileInfo),
|
||||||
|
};
|
||||||
|
|
||||||
|
// Add file extension for files
|
||||||
|
if (fileType === Gio.FileType.REGULAR) {
|
||||||
|
let fileExtension = fileName.split('.').pop();
|
||||||
|
item.type = `${fileExtension}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
contents.push(item);
|
||||||
|
contents.sort((a, b) => {
|
||||||
|
const aIsFolder = a.type.startsWith('folder');
|
||||||
|
const bIsFolder = b.type.startsWith('folder');
|
||||||
|
if (aIsFolder && !bIsFolder) {
|
||||||
|
return -1;
|
||||||
|
} else if (!aIsFolder && bIsFolder) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return a.name.localeCompare(b.name); // Sort alphabetically within folders and files
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (!silent) console.log(e);
|
||||||
|
}
|
||||||
|
return contents;
|
||||||
|
}
|
||||||
423
hypr/.config/ags/modules/overview/overview_hyprland.js
Normal file
|
|
@ -0,0 +1,423 @@
|
||||||
|
// TODO
|
||||||
|
// - Make client destroy/create not destroy and recreate the whole thing
|
||||||
|
// - Active ws hook optimization: only update when moving to next group
|
||||||
|
//
|
||||||
|
const { Gdk, Gtk } = imports.gi;
|
||||||
|
const { Gravity } = imports.gi.Gdk;
|
||||||
|
import { SCREEN_HEIGHT, SCREEN_WIDTH } from '../../variables.js';
|
||||||
|
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||||
|
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||||
|
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||||
|
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
|
||||||
|
|
||||||
|
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||||
|
const { execAsync, exec } = Utils;
|
||||||
|
import { setupCursorHoverGrab } from '../.widgetutils/cursorhover.js';
|
||||||
|
import { dumpToWorkspace, swapWorkspace } from "./actions.js";
|
||||||
|
import { substitute } from "../.miscutils/icons.js";
|
||||||
|
|
||||||
|
const NUM_OF_WORKSPACES_SHOWN = userOptions.overview.numOfCols * userOptions.overview.numOfRows;
|
||||||
|
const TARGET = [Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 0)];
|
||||||
|
const POPUP_CLOSE_TIME = 100; // ms
|
||||||
|
|
||||||
|
const overviewTick = Variable(false);
|
||||||
|
|
||||||
|
export default () => {
|
||||||
|
const clientMap = new Map();
|
||||||
|
let workspaceGroup = 0;
|
||||||
|
const ContextMenuWorkspaceArray = ({ label, actionFunc, thisWorkspace }) => Widget.MenuItem({
|
||||||
|
label: `${label}`,
|
||||||
|
setup: (menuItem) => {
|
||||||
|
let submenu = new Gtk.Menu();
|
||||||
|
submenu.className = 'menu';
|
||||||
|
|
||||||
|
const offset = Math.floor((Hyprland.active.workspace.id - 1) / NUM_OF_WORKSPACES_SHOWN) * NUM_OF_WORKSPACES_SHOWN;
|
||||||
|
const startWorkspace = offset + 1;
|
||||||
|
const endWorkspace = startWorkspace + NUM_OF_WORKSPACES_SHOWN - 1;
|
||||||
|
for (let i = startWorkspace; i <= endWorkspace; i++) {
|
||||||
|
let button = new Gtk.MenuItem({
|
||||||
|
label: `Workspace ${i}`
|
||||||
|
});
|
||||||
|
button.connect("activate", () => {
|
||||||
|
// execAsync([`${onClickBinary}`, `${thisWorkspace}`, `${i}`]).catch(print);
|
||||||
|
actionFunc(thisWorkspace, i);
|
||||||
|
overviewTick.setValue(!overviewTick.value);
|
||||||
|
});
|
||||||
|
submenu.append(button);
|
||||||
|
}
|
||||||
|
menuItem.set_reserve_indicator(true);
|
||||||
|
menuItem.set_submenu(submenu);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const Window = ({ address, at: [x, y], size: [w, h], workspace: { id, name }, class: c, title, xwayland }, screenCoords) => {
|
||||||
|
const revealInfoCondition = (Math.min(w, h) * userOptions.overview.scale > 70);
|
||||||
|
if (w <= 0 || h <= 0 || (c === '' && title === '') || c.endsWith('-dropterm')) return null;
|
||||||
|
// Non-primary monitors
|
||||||
|
if (screenCoords.x != 0) x -= screenCoords.x;
|
||||||
|
if (screenCoords.y != 0) y -= screenCoords.y;
|
||||||
|
// Other offscreen adjustments
|
||||||
|
if (x + w <= 0) x += (Math.floor(x / SCREEN_WIDTH) * SCREEN_WIDTH);
|
||||||
|
else if (x < 0) { w = x + w; x = 0; }
|
||||||
|
if (y + h <= 0) x += (Math.floor(y / SCREEN_HEIGHT) * SCREEN_HEIGHT);
|
||||||
|
else if (y < 0) { h = y + h; y = 0; }
|
||||||
|
// Truncate if offscreen
|
||||||
|
if (x + w > SCREEN_WIDTH) w = SCREEN_WIDTH - x;
|
||||||
|
if (y + h > SCREEN_HEIGHT) h = SCREEN_HEIGHT - y;
|
||||||
|
|
||||||
|
const appIcon = Widget.Icon({
|
||||||
|
icon: substitute(c),
|
||||||
|
size: Math.min(w, h) * userOptions.overview.scale / 2.5,
|
||||||
|
});
|
||||||
|
return Widget.Button({
|
||||||
|
attribute: {
|
||||||
|
address, x, y, w, h, ws: id,
|
||||||
|
updateIconSize: (self) => {
|
||||||
|
appIcon.size = Math.min(self.attribute.w, self.attribute.h) * userOptions.overview.scale / 2.5;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
className: 'overview-tasks-window',
|
||||||
|
hpack: 'start',
|
||||||
|
vpack: 'start',
|
||||||
|
css: `
|
||||||
|
margin-left: ${Math.round(x * userOptions.overview.scale)}px;
|
||||||
|
margin-top: ${Math.round(y * userOptions.overview.scale)}px;
|
||||||
|
margin-right: -${Math.round((x + w) * userOptions.overview.scale)}px;
|
||||||
|
margin-bottom: -${Math.round((y + h) * userOptions.overview.scale)}px;
|
||||||
|
`,
|
||||||
|
onClicked: (self) => {
|
||||||
|
App.closeWindow('overview');
|
||||||
|
Utils.timeout(POPUP_CLOSE_TIME, () => Hyprland.messageAsync(`dispatch focuswindow address:${address}`));
|
||||||
|
},
|
||||||
|
onMiddleClickRelease: () => Hyprland.messageAsync(`dispatch closewindow address:${address}`),
|
||||||
|
onSecondaryClick: (button) => {
|
||||||
|
button.toggleClassName('overview-tasks-window-selected', true);
|
||||||
|
const menu = Widget.Menu({
|
||||||
|
className: 'menu',
|
||||||
|
children: [
|
||||||
|
Widget.MenuItem({
|
||||||
|
child: Widget.Label({
|
||||||
|
xalign: 0,
|
||||||
|
label: "Close (Middle-click)",
|
||||||
|
}),
|
||||||
|
onActivate: () => Hyprland.messageAsync(`dispatch closewindow address:${address}`),
|
||||||
|
}),
|
||||||
|
ContextMenuWorkspaceArray({
|
||||||
|
label: "Dump windows to workspace",
|
||||||
|
actionFunc: dumpToWorkspace,
|
||||||
|
thisWorkspace: Number(id)
|
||||||
|
}),
|
||||||
|
ContextMenuWorkspaceArray({
|
||||||
|
label: "Swap windows with workspace",
|
||||||
|
actionFunc: swapWorkspace,
|
||||||
|
thisWorkspace: Number(id)
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
||||||
|
menu.connect("deactivate", () => {
|
||||||
|
button.toggleClassName('overview-tasks-window-selected', false);
|
||||||
|
})
|
||||||
|
menu.connect("selection-done", () => {
|
||||||
|
button.toggleClassName('overview-tasks-window-selected', false);
|
||||||
|
})
|
||||||
|
menu.popup_at_widget(button.get_parent(), Gravity.SOUTH, Gravity.NORTH, null); // Show menu below the button
|
||||||
|
button.connect("destroy", () => menu.destroy());
|
||||||
|
},
|
||||||
|
child: Widget.Box({
|
||||||
|
homogeneous: true,
|
||||||
|
child: Widget.Box({
|
||||||
|
vertical: true,
|
||||||
|
vpack: 'center',
|
||||||
|
className: 'spacing-v-5',
|
||||||
|
children: [
|
||||||
|
appIcon,
|
||||||
|
// TODO: Add xwayland tag instead of just having italics
|
||||||
|
Widget.Revealer({
|
||||||
|
transition: 'slide_down',
|
||||||
|
revealChild: revealInfoCondition,
|
||||||
|
child: Widget.Label({
|
||||||
|
maxWidthChars: 10, // Doesn't matter what number
|
||||||
|
truncate: 'end',
|
||||||
|
className: `${xwayland ? 'txt txt-italic' : 'txt'}`,
|
||||||
|
css: `
|
||||||
|
font-size: ${Math.min(SCREEN_WIDTH, SCREEN_HEIGHT) * userOptions.overview.scale / 14.6}px;
|
||||||
|
margin: 0px ${Math.min(SCREEN_WIDTH, SCREEN_HEIGHT) * userOptions.overview.scale / 10}px;
|
||||||
|
`,
|
||||||
|
// If the title is too short, include the class
|
||||||
|
label: (title.length <= 1 ? `${c}: ${title}` : title),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
tooltipText: `${c}: ${title}`,
|
||||||
|
setup: (button) => {
|
||||||
|
setupCursorHoverGrab(button);
|
||||||
|
|
||||||
|
button.drag_source_set(Gdk.ModifierType.BUTTON1_MASK, TARGET, Gdk.DragAction.MOVE);
|
||||||
|
button.drag_source_set_icon_name(substitute(c));
|
||||||
|
// button.drag_source_set_icon_gicon(icon);
|
||||||
|
|
||||||
|
button.connect('drag-begin', (button) => { // On drag start, add the dragging class
|
||||||
|
button.toggleClassName('overview-tasks-window-dragging', true);
|
||||||
|
});
|
||||||
|
button.connect('drag-data-get', (_w, _c, data) => { // On drag finish, give address
|
||||||
|
data.set_text(address, address.length);
|
||||||
|
button.toggleClassName('overview-tasks-window-dragging', false);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const Workspace = (index) => {
|
||||||
|
// const fixed = Widget.Fixed({
|
||||||
|
// attribute: {
|
||||||
|
// put: (widget, x, y) => {
|
||||||
|
// fixed.put(widget, x, y);
|
||||||
|
// },
|
||||||
|
// move: (widget, x, y) => {
|
||||||
|
// fixed.move(widget, x, y);
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
const fixed = Widget.Box({
|
||||||
|
attribute: {
|
||||||
|
put: (widget, x, y) => {
|
||||||
|
if (!widget.attribute) return;
|
||||||
|
// Note: x and y are already multiplied by userOptions.overview.scale
|
||||||
|
const newCss = `
|
||||||
|
margin-left: ${Math.round(x)}px;
|
||||||
|
margin-top: ${Math.round(y)}px;
|
||||||
|
margin-right: -${Math.round(x + (widget.attribute.w * userOptions.overview.scale))}px;
|
||||||
|
margin-bottom: -${Math.round(y + (widget.attribute.h * userOptions.overview.scale))}px;
|
||||||
|
`;
|
||||||
|
widget.css = newCss;
|
||||||
|
fixed.pack_start(widget, false, false, 0);
|
||||||
|
},
|
||||||
|
move: (widget, x, y) => {
|
||||||
|
if (!widget) return;
|
||||||
|
if (!widget.attribute) return;
|
||||||
|
// Note: x and y are already multiplied by userOptions.overview.scale
|
||||||
|
const newCss = `
|
||||||
|
margin-left: ${Math.round(x)}px;
|
||||||
|
margin-top: ${Math.round(y)}px;
|
||||||
|
margin-right: -${Math.round(x + (widget.attribute.w * userOptions.overview.scale))}px;
|
||||||
|
margin-bottom: -${Math.round(y + (widget.attribute.h * userOptions.overview.scale))}px;
|
||||||
|
`;
|
||||||
|
widget.css = newCss;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const WorkspaceNumber = ({ index, ...rest }) => Widget.Label({
|
||||||
|
className: 'overview-tasks-workspace-number',
|
||||||
|
label: `${index}`,
|
||||||
|
css: `
|
||||||
|
margin: ${Math.min(SCREEN_WIDTH, SCREEN_HEIGHT) * userOptions.overview.scale * userOptions.overview.wsNumMarginScale}px;
|
||||||
|
font-size: ${SCREEN_HEIGHT * userOptions.overview.scale * userOptions.overview.wsNumScale}px;
|
||||||
|
`,
|
||||||
|
setup: (self) => self.hook(Hyprland.active.workspace, (self) => {
|
||||||
|
// Update when going to new ws group
|
||||||
|
const currentGroup = Math.floor((Hyprland.active.workspace.id - 1) / NUM_OF_WORKSPACES_SHOWN);
|
||||||
|
self.label = `${currentGroup * NUM_OF_WORKSPACES_SHOWN + index}`;
|
||||||
|
}),
|
||||||
|
...rest,
|
||||||
|
})
|
||||||
|
const widget = Widget.Box({
|
||||||
|
className: 'overview-tasks-workspace',
|
||||||
|
vpack: 'center',
|
||||||
|
css: `
|
||||||
|
min-width: ${SCREEN_WIDTH * userOptions.overview.scale}px;
|
||||||
|
min-height: ${SCREEN_HEIGHT * userOptions.overview.scale}px;
|
||||||
|
`,
|
||||||
|
children: [Widget.EventBox({
|
||||||
|
hexpand: true,
|
||||||
|
vexpand: true,
|
||||||
|
onPrimaryClick: () => {
|
||||||
|
App.closeWindow('overview');
|
||||||
|
Utils.timeout(POPUP_CLOSE_TIME, () => Hyprland.messageAsync(`dispatch workspace ${index}`));
|
||||||
|
},
|
||||||
|
setup: (eventbox) => {
|
||||||
|
eventbox.drag_dest_set(Gtk.DestDefaults.ALL, TARGET, Gdk.DragAction.COPY);
|
||||||
|
eventbox.connect('drag-data-received', (_w, _c, _x, _y, data) => {
|
||||||
|
const offset = Math.floor((Hyprland.active.workspace.id - 1) / NUM_OF_WORKSPACES_SHOWN) * NUM_OF_WORKSPACES_SHOWN;
|
||||||
|
Hyprland.messageAsync(`dispatch movetoworkspacesilent ${index + offset},address:${data.get_text()}`)
|
||||||
|
overviewTick.setValue(!overviewTick.value);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Widget.Overlay({
|
||||||
|
child: Widget.Box({}),
|
||||||
|
overlays: [
|
||||||
|
WorkspaceNumber({ index: index, hpack: 'start', vpack: 'start' }),
|
||||||
|
fixed
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
})],
|
||||||
|
});
|
||||||
|
const offset = Math.floor((Hyprland.active.workspace.id - 1) / NUM_OF_WORKSPACES_SHOWN) * NUM_OF_WORKSPACES_SHOWN;
|
||||||
|
fixed.attribute.put(WorkspaceNumber(offset + index), 0, 0);
|
||||||
|
widget.clear = () => {
|
||||||
|
const offset = Math.floor((Hyprland.active.workspace.id - 1) / NUM_OF_WORKSPACES_SHOWN) * NUM_OF_WORKSPACES_SHOWN;
|
||||||
|
clientMap.forEach((client, address) => {
|
||||||
|
if (!client) return;
|
||||||
|
if ((client.attribute.ws <= offset || client.attribute.ws > offset + NUM_OF_WORKSPACES_SHOWN) ||
|
||||||
|
(client.attribute.ws == offset + index)) {
|
||||||
|
client.destroy();
|
||||||
|
client = null;
|
||||||
|
clientMap.delete(address);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
widget.set = (clientJson, screenCoords) => {
|
||||||
|
let c = clientMap.get(clientJson.address);
|
||||||
|
if (c) {
|
||||||
|
if (c.attribute?.ws !== clientJson.workspace.id) {
|
||||||
|
c.destroy();
|
||||||
|
c = null;
|
||||||
|
clientMap.delete(clientJson.address);
|
||||||
|
}
|
||||||
|
else if (c) {
|
||||||
|
c.attribute.w = clientJson.size[0];
|
||||||
|
c.attribute.h = clientJson.size[1];
|
||||||
|
c.attribute.updateIconSize(c);
|
||||||
|
fixed.attribute.move(c,
|
||||||
|
Math.max(0, clientJson.at[0] * userOptions.overview.scale),
|
||||||
|
Math.max(0, clientJson.at[1] * userOptions.overview.scale)
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const newWindow = Window(clientJson, screenCoords);
|
||||||
|
if (newWindow === null) return;
|
||||||
|
// clientMap.set(clientJson.address, newWindow);
|
||||||
|
fixed.attribute.put(newWindow,
|
||||||
|
Math.max(0, newWindow.attribute.x * userOptions.overview.scale),
|
||||||
|
Math.max(0, newWindow.attribute.y * userOptions.overview.scale)
|
||||||
|
);
|
||||||
|
clientMap.set(clientJson.address, newWindow);
|
||||||
|
};
|
||||||
|
widget.unset = (clientAddress) => {
|
||||||
|
const offset = Math.floor((Hyprland.active.workspace.id - 1) / NUM_OF_WORKSPACES_SHOWN) * NUM_OF_WORKSPACES_SHOWN;
|
||||||
|
let c = clientMap.get(clientAddress);
|
||||||
|
if (!c) return;
|
||||||
|
c.destroy();
|
||||||
|
c = null;
|
||||||
|
clientMap.delete(clientAddress);
|
||||||
|
};
|
||||||
|
widget.show = () => {
|
||||||
|
fixed.show_all();
|
||||||
|
}
|
||||||
|
return widget;
|
||||||
|
};
|
||||||
|
|
||||||
|
const arr = (s, n) => {
|
||||||
|
const array = [];
|
||||||
|
for (let i = 0; i < n; i++)
|
||||||
|
array.push(s + i);
|
||||||
|
|
||||||
|
return array;
|
||||||
|
};
|
||||||
|
|
||||||
|
const OverviewRow = ({ startWorkspace, workspaces, windowName = 'overview' }) => Widget.Box({
|
||||||
|
children: arr(startWorkspace, workspaces).map(Workspace),
|
||||||
|
attribute: {
|
||||||
|
monitorMap: [],
|
||||||
|
getMonitorMap: (box) => {
|
||||||
|
execAsync('hyprctl -j monitors').then(monitors => {
|
||||||
|
box.attribute.monitorMap = JSON.parse(monitors).reduce((acc, item) => {
|
||||||
|
acc[item.id] = { x: item.x, y: item.y };
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
update: (box) => {
|
||||||
|
const offset = Math.floor((Hyprland.active.workspace.id - 1) / NUM_OF_WORKSPACES_SHOWN) * NUM_OF_WORKSPACES_SHOWN;
|
||||||
|
if (!App.getWindow(windowName).visible) return;
|
||||||
|
Hyprland.messageAsync('j/clients').then(clients => {
|
||||||
|
const allClients = JSON.parse(clients);
|
||||||
|
const kids = box.get_children();
|
||||||
|
kids.forEach(kid => kid.clear());
|
||||||
|
for (let i = 0; i < allClients.length; i++) {
|
||||||
|
const client = allClients[i];
|
||||||
|
const childID = client.workspace.id - (offset + startWorkspace);
|
||||||
|
if (offset + startWorkspace <= client.workspace.id &&
|
||||||
|
client.workspace.id <= offset + startWorkspace + workspaces) {
|
||||||
|
const screenCoords = box.attribute.monitorMap[client.monitor];
|
||||||
|
if (kids[childID]) {
|
||||||
|
kids[childID].set(client, screenCoords);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
kids.forEach(kid => kid.show());
|
||||||
|
}).catch(print);
|
||||||
|
},
|
||||||
|
updateWorkspace: (box, id) => {
|
||||||
|
const offset = Math.floor((Hyprland.active.workspace.id - 1) / NUM_OF_WORKSPACES_SHOWN) * NUM_OF_WORKSPACES_SHOWN;
|
||||||
|
if (!( // Not in range, ignore
|
||||||
|
offset + startWorkspace <= id &&
|
||||||
|
id <= offset + startWorkspace + workspaces
|
||||||
|
)) return;
|
||||||
|
// if (!App.getWindow(windowName).visible) return;
|
||||||
|
Hyprland.messageAsync('j/clients').then(clients => {
|
||||||
|
const allClients = JSON.parse(clients);
|
||||||
|
const kids = box.get_children();
|
||||||
|
for (let i = 0; i < allClients.length; i++) {
|
||||||
|
const client = allClients[i];
|
||||||
|
if (client.workspace.id != id) continue;
|
||||||
|
const screenCoords = box.attribute.monitorMap[client.monitor];
|
||||||
|
kids[id - (offset + startWorkspace)]?.set(client, screenCoords);
|
||||||
|
}
|
||||||
|
kids[id - (offset + startWorkspace)]?.show();
|
||||||
|
}).catch(print);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
setup: (box) => {
|
||||||
|
box.attribute.getMonitorMap(box);
|
||||||
|
box
|
||||||
|
.hook(overviewTick, (box) => box.attribute.update(box))
|
||||||
|
.hook(Hyprland, (box, clientAddress) => {
|
||||||
|
const offset = Math.floor((Hyprland.active.workspace.id - 1) / NUM_OF_WORKSPACES_SHOWN) * NUM_OF_WORKSPACES_SHOWN;
|
||||||
|
const kids = box.get_children();
|
||||||
|
const client = Hyprland.getClient(clientAddress);
|
||||||
|
if (!client) return;
|
||||||
|
const id = client.workspace.id;
|
||||||
|
|
||||||
|
box.attribute.updateWorkspace(box, id);
|
||||||
|
kids[id - (offset + startWorkspace)]?.unset(clientAddress);
|
||||||
|
}, 'client-removed')
|
||||||
|
.hook(Hyprland, (box, clientAddress) => {
|
||||||
|
const client = Hyprland.getClient(clientAddress);
|
||||||
|
if (!client) return;
|
||||||
|
box.attribute.updateWorkspace(box, client.workspace.id);
|
||||||
|
}, 'client-added')
|
||||||
|
.hook(Hyprland.active.workspace, (box) => {
|
||||||
|
// Full update when going to new ws group
|
||||||
|
const previousGroup = box.attribute.workspaceGroup;
|
||||||
|
const currentGroup = Math.floor((Hyprland.active.workspace.id - 1) / NUM_OF_WORKSPACES_SHOWN);
|
||||||
|
if (currentGroup !== previousGroup) {
|
||||||
|
box.attribute.update(box);
|
||||||
|
box.attribute.workspaceGroup = currentGroup;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.hook(App, (box, name, visible) => { // Update on open
|
||||||
|
if (name == 'overview' && visible) box.attribute.update(box);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return Widget.Revealer({
|
||||||
|
revealChild: true,
|
||||||
|
transition: 'slide_down',
|
||||||
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
|
child: Widget.Box({
|
||||||
|
vertical: true,
|
||||||
|
className: 'overview-tasks',
|
||||||
|
children: Array.from({ length: userOptions.overview.numOfRows }, (_, index) =>
|
||||||
|
OverviewRow({
|
||||||
|
startWorkspace: 1 + index * userOptions.overview.numOfCols,
|
||||||
|
workspaces: userOptions.overview.numOfCols,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
163
hypr/.config/ags/modules/overview/searchbuttons.js
Normal file
|
|
@ -0,0 +1,163 @@
|
||||||
|
const { Gtk } = imports.gi;
|
||||||
|
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';
|
||||||
|
const { execAsync, exec } = Utils;
|
||||||
|
import { searchItem } from './searchitem.js';
|
||||||
|
import { execAndClose, couldBeMath, launchCustomCommand } from './miscfunctions.js';
|
||||||
|
|
||||||
|
export const DirectoryButton = ({ parentPath, name, type, icon }) => {
|
||||||
|
const actionText = Widget.Revealer({
|
||||||
|
revealChild: false,
|
||||||
|
transition: "crossfade",
|
||||||
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
|
child: Widget.Label({
|
||||||
|
className: 'overview-search-results-txt txt txt-small txt-action',
|
||||||
|
label: 'Open',
|
||||||
|
})
|
||||||
|
});
|
||||||
|
const actionTextRevealer = Widget.Revealer({
|
||||||
|
revealChild: false,
|
||||||
|
transition: "slide_left",
|
||||||
|
transitionDuration: userOptions.animations.durationSmall,
|
||||||
|
child: actionText,
|
||||||
|
});
|
||||||
|
return Widget.Button({
|
||||||
|
className: 'overview-search-result-btn',
|
||||||
|
onClicked: () => {
|
||||||
|
App.closeWindow('overview');
|
||||||
|
execAsync(['bash', '-c', `xdg-open '${parentPath}/${name}'`, `&`]).catch(print);
|
||||||
|
},
|
||||||
|
child: Widget.Box({
|
||||||
|
children: [
|
||||||
|
Widget.Box({
|
||||||
|
vertical: false,
|
||||||
|
children: [
|
||||||
|
Widget.Box({
|
||||||
|
className: 'overview-search-results-icon',
|
||||||
|
homogeneous: true,
|
||||||
|
child: Widget.Icon({
|
||||||
|
icon: icon,
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
Widget.Label({
|
||||||
|
className: 'overview-search-results-txt txt txt-norm',
|
||||||
|
label: name,
|
||||||
|
}),
|
||||||
|
Widget.Box({ hexpand: true }),
|
||||||
|
actionTextRevealer,
|
||||||
|
]
|
||||||
|
})
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
setup: (self) => self
|
||||||
|
.on('focus-in-event', (button) => {
|
||||||
|
actionText.revealChild = true;
|
||||||
|
actionTextRevealer.revealChild = true;
|
||||||
|
})
|
||||||
|
.on('focus-out-event', (button) => {
|
||||||
|
actionText.revealChild = false;
|
||||||
|
actionTextRevealer.revealChild = false;
|
||||||
|
})
|
||||||
|
,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const CalculationResultButton = ({ result, text }) => searchItem({
|
||||||
|
materialIconName: ' ',
|
||||||
|
name: `Math result`,
|
||||||
|
actionName: "Copy",
|
||||||
|
content: `${result}`,
|
||||||
|
onActivate: () => {
|
||||||
|
App.closeWindow('overview');
|
||||||
|
execAsync(['wl-copy', `${result}`]).catch(print);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export const DesktopEntryButton = (app) => {
|
||||||
|
const actionText = Widget.Revealer({
|
||||||
|
revealChild: false,
|
||||||
|
transition: "crossfade",
|
||||||
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
|
child: Widget.Label({
|
||||||
|
className: 'overview-search-results-txt txt txt-small txt-action',
|
||||||
|
label: 'Launch',
|
||||||
|
})
|
||||||
|
});
|
||||||
|
const actionTextRevealer = Widget.Revealer({
|
||||||
|
revealChild: false,
|
||||||
|
transition: "slide_left",
|
||||||
|
transitionDuration: userOptions.animations.durationSmall,
|
||||||
|
child: actionText,
|
||||||
|
});
|
||||||
|
return Widget.Button({
|
||||||
|
className: 'overview-search-result-btn',
|
||||||
|
onClicked: () => {
|
||||||
|
App.closeWindow('overview');
|
||||||
|
app.launch();
|
||||||
|
},
|
||||||
|
child: Widget.Box({
|
||||||
|
children: [
|
||||||
|
Widget.Box({
|
||||||
|
vertical: false,
|
||||||
|
children: [
|
||||||
|
Widget.Box({
|
||||||
|
className: 'overview-search-results-icon',
|
||||||
|
homogeneous: true,
|
||||||
|
child: Widget.Icon({
|
||||||
|
icon: app.iconName,
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
Widget.Label({
|
||||||
|
className: 'overview-search-results-txt txt txt-norm',
|
||||||
|
label: app.name,
|
||||||
|
}),
|
||||||
|
Widget.Box({ hexpand: true }),
|
||||||
|
actionTextRevealer,
|
||||||
|
]
|
||||||
|
})
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
setup: (self) => self
|
||||||
|
.on('focus-in-event', (button) => {
|
||||||
|
actionText.revealChild = true;
|
||||||
|
actionTextRevealer.revealChild = true;
|
||||||
|
})
|
||||||
|
.on('focus-out-event', (button) => {
|
||||||
|
actionText.revealChild = false;
|
||||||
|
actionTextRevealer.revealChild = false;
|
||||||
|
})
|
||||||
|
,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ExecuteCommandButton = ({ command, terminal = false }) => searchItem({
|
||||||
|
materialIconName: `${terminal ? 'terminal' : ' '}`,
|
||||||
|
name: `Run command`,
|
||||||
|
actionName: `Execute ${terminal ? 'in terminal' : ''}`,
|
||||||
|
content: `${command}`,
|
||||||
|
onActivate: () => execAndClose(command, terminal),
|
||||||
|
extraClassName: 'techfont',
|
||||||
|
})
|
||||||
|
|
||||||
|
export const CustomCommandButton = ({ text = '' }) => searchItem({
|
||||||
|
materialIconName: ' ',
|
||||||
|
name: 'Action',
|
||||||
|
actionName: 'Run',
|
||||||
|
content: `${text}`,
|
||||||
|
onActivate: () => {
|
||||||
|
App.closeWindow('overview');
|
||||||
|
launchCustomCommand(text);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export const SearchButton = ({ text = '' }) => searchItem({
|
||||||
|
materialIconName: ' ',
|
||||||
|
name: 'Search the web',
|
||||||
|
actionName: 'Go',
|
||||||
|
content: `${text}`,
|
||||||
|
onActivate: () => {
|
||||||
|
App.closeWindow('overview');
|
||||||
|
execAsync(['bash', '-c', `xdg-open '${userOptions.search.engineBaseUrl}${text} ${['', ...userOptions.search.excludedSites].join(' -site:')}' &`]).catch(print);
|
||||||
|
},
|
||||||
|
});
|
||||||
65
hypr/.config/ags/modules/overview/searchitem.js
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||||
|
|
||||||
|
export const searchItem = ({ materialIconName, name, actionName, content, onActivate, extraClassName = '', ...rest }) => {
|
||||||
|
const actionText = Widget.Revealer({
|
||||||
|
revealChild: false,
|
||||||
|
transition: "crossfade",
|
||||||
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
|
child: Widget.Label({
|
||||||
|
className: 'overview-search-results-txt txt txt-small txt-action',
|
||||||
|
label: `${actionName}`,
|
||||||
|
})
|
||||||
|
});
|
||||||
|
const actionTextRevealer = Widget.Revealer({
|
||||||
|
revealChild: false,
|
||||||
|
transition: "slide_left",
|
||||||
|
transitionDuration: userOptions.animations.durationSmall,
|
||||||
|
child: actionText,
|
||||||
|
})
|
||||||
|
return Widget.Button({
|
||||||
|
className: `overview-search-result-btn txt ${extraClassName}`,
|
||||||
|
onClicked: onActivate,
|
||||||
|
child: Widget.Box({
|
||||||
|
children: [
|
||||||
|
Widget.Box({
|
||||||
|
vertical: false,
|
||||||
|
children: [
|
||||||
|
Widget.Label({
|
||||||
|
className: `icon-material overview-search-results-icon`,
|
||||||
|
label: `${materialIconName}`,
|
||||||
|
}),
|
||||||
|
Widget.Box({
|
||||||
|
vertical: true,
|
||||||
|
children: [
|
||||||
|
Widget.Label({
|
||||||
|
hpack: 'start',
|
||||||
|
className: 'overview-search-results-txt txt-smallie txt-subtext',
|
||||||
|
label: `${name}`,
|
||||||
|
truncate: "end",
|
||||||
|
}),
|
||||||
|
Widget.Label({
|
||||||
|
hpack: 'start',
|
||||||
|
className: 'overview-search-results-txt txt-norm',
|
||||||
|
label: `${content}`,
|
||||||
|
truncate: "end",
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
Widget.Box({ hexpand: true }),
|
||||||
|
actionTextRevealer,
|
||||||
|
],
|
||||||
|
})
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
setup: (self) => self
|
||||||
|
.on('focus-in-event', (button) => {
|
||||||
|
actionText.revealChild = true;
|
||||||
|
actionTextRevealer.revealChild = true;
|
||||||
|
})
|
||||||
|
.on('focus-out-event', (button) => {
|
||||||
|
actionText.revealChild = false;
|
||||||
|
actionTextRevealer.revealChild = false;
|
||||||
|
})
|
||||||
|
,
|
||||||
|
});
|
||||||
|
}
|
||||||
262
hypr/.config/ags/modules/overview/windowcontent.js
Normal file
|
|
@ -0,0 +1,262 @@
|
||||||
|
const { Gdk, Gtk } = imports.gi;
|
||||||
|
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 Applications from 'resource:///com/github/Aylur/ags/service/applications.js';
|
||||||
|
const { execAsync, exec } = Utils;
|
||||||
|
import { execAndClose, expandTilde, hasUnterminatedBackslash, couldBeMath, launchCustomCommand, ls } from './miscfunctions.js';
|
||||||
|
import {
|
||||||
|
CalculationResultButton, CustomCommandButton, DirectoryButton,
|
||||||
|
DesktopEntryButton, ExecuteCommandButton, SearchButton
|
||||||
|
} from './searchbuttons.js';
|
||||||
|
import { checkKeybind } from '../.widgetutils/keybind.js';
|
||||||
|
|
||||||
|
// Add math funcs
|
||||||
|
const { abs, sin, cos, tan, cot, asin, acos, atan, acot } = Math;
|
||||||
|
const pi = Math.PI;
|
||||||
|
// trigonometric funcs for deg
|
||||||
|
const sind = x => sin(x * pi / 180);
|
||||||
|
const cosd = x => cos(x * pi / 180);
|
||||||
|
const tand = x => tan(x * pi / 180);
|
||||||
|
const cotd = x => cot(x * pi / 180);
|
||||||
|
const asind = x => asin(x) * 180 / pi;
|
||||||
|
const acosd = x => acos(x) * 180 / pi;
|
||||||
|
const atand = x => atan(x) * 180 / pi;
|
||||||
|
const acotd = x => acot(x) * 180 / pi;
|
||||||
|
|
||||||
|
const MAX_RESULTS = 10;
|
||||||
|
const OVERVIEW_SCALE = 0.18; // = overview workspace box / screen size
|
||||||
|
const OVERVIEW_WS_NUM_SCALE = 0.0;
|
||||||
|
const OVERVIEW_WS_NUM_MARGIN_SCALE = 0.07;
|
||||||
|
const TARGET = [Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 0)];
|
||||||
|
|
||||||
|
function iconExists(iconName) {
|
||||||
|
let iconTheme = Gtk.IconTheme.get_default();
|
||||||
|
return iconTheme.has_icon(iconName);
|
||||||
|
}
|
||||||
|
|
||||||
|
const OptionalOverview = async () => {
|
||||||
|
try {
|
||||||
|
return (await import('./overview_hyprland.js')).default();
|
||||||
|
} catch {
|
||||||
|
return Widget.Box({});
|
||||||
|
// return (await import('./overview_hyprland.js')).default();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const overviewContent = await OptionalOverview();
|
||||||
|
|
||||||
|
export const SearchAndWindows = () => {
|
||||||
|
var _appSearchResults = [];
|
||||||
|
|
||||||
|
const ClickToClose = ({ ...props }) => Widget.EventBox({
|
||||||
|
...props,
|
||||||
|
onPrimaryClick: () => App.closeWindow('overview'),
|
||||||
|
onSecondaryClick: () => App.closeWindow('overview'),
|
||||||
|
onMiddleClick: () => App.closeWindow('overview'),
|
||||||
|
});
|
||||||
|
const resultsBox = Widget.Box({
|
||||||
|
className: 'overview-search-results',
|
||||||
|
vertical: true,
|
||||||
|
vexpand: true,
|
||||||
|
});
|
||||||
|
const resultsRevealer = Widget.Revealer({
|
||||||
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
|
revealChild: false,
|
||||||
|
transition: 'slide_down',
|
||||||
|
// duration: 200,
|
||||||
|
hpack: 'center',
|
||||||
|
child: resultsBox,
|
||||||
|
});
|
||||||
|
const entryPromptRevealer = Widget.Revealer({
|
||||||
|
transition: 'crossfade',
|
||||||
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
|
revealChild: true,
|
||||||
|
hpack: 'center',
|
||||||
|
child: Widget.Label({
|
||||||
|
className: 'overview-search-prompt txt-small txt',
|
||||||
|
label: 'Type to search'
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
const entryIconRevealer = Widget.Revealer({
|
||||||
|
transition: 'crossfade',
|
||||||
|
transitionDuration: userOptions.animations.durationLarge,
|
||||||
|
revealChild: false,
|
||||||
|
hpack: 'end',
|
||||||
|
child: Widget.Label({
|
||||||
|
className: 'txt txt-large icon-material overview-search-icon',
|
||||||
|
label: ' ',
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
const entryIcon = Widget.Box({
|
||||||
|
className: 'overview-search-prompt-box',
|
||||||
|
setup: box => box.pack_start(entryIconRevealer, true, true, 0),
|
||||||
|
});
|
||||||
|
|
||||||
|
const entry = Widget.Entry({
|
||||||
|
className: 'overview-search-box txt-small txt',
|
||||||
|
hpack: 'center',
|
||||||
|
onAccept: (self) => { // This is when you hit Enter
|
||||||
|
const text = self.text;
|
||||||
|
if (text.length == 0) return;
|
||||||
|
const isAction = text.startsWith('>');
|
||||||
|
const isDir = (['/', '~'].includes(entry.text[0]));
|
||||||
|
|
||||||
|
if (couldBeMath(text)) { // Eval on typing is dangerous, this is a workaround
|
||||||
|
try {
|
||||||
|
const fullResult = eval(text.replace(/\^/g, "**"));
|
||||||
|
// copy
|
||||||
|
execAsync(['wl-copy', `${fullResult}`]).catch(print);
|
||||||
|
App.closeWindow('overview');
|
||||||
|
return;
|
||||||
|
} catch (e) {
|
||||||
|
// console.log(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isDir) {
|
||||||
|
App.closeWindow('overview');
|
||||||
|
execAsync(['bash', '-c', `xdg-open "${expandTilde(text)}"`, `&`]).catch(print);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (_appSearchResults.length > 0) {
|
||||||
|
App.closeWindow('overview');
|
||||||
|
_appSearchResults[0].launch();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (text[0] == '>') { // Custom commands
|
||||||
|
App.closeWindow('overview');
|
||||||
|
launchCustomCommand(text);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Fallback: Execute command
|
||||||
|
if (!isAction && exec(`bash -c "command -v ${text.split(' ')[0]}"`) != '') {
|
||||||
|
if (text.startsWith('sudo'))
|
||||||
|
execAndClose(text, true);
|
||||||
|
else
|
||||||
|
execAndClose(text, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
App.closeWindow('overview');
|
||||||
|
execAsync(['bash', '-c', `xdg-open '${userOptions.search.engineBaseUrl}${text} ${['', ...userOptions.search.excludedSites].join(' -site:')}' &`]).catch(print);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onChange: (entry) => { // this is when you type
|
||||||
|
const isAction = entry.text[0] == '>';
|
||||||
|
const isDir = (['/', '~'].includes(entry.text[0]));
|
||||||
|
resultsBox.get_children().forEach(ch => ch.destroy());
|
||||||
|
|
||||||
|
// check empty if so then dont do stuff
|
||||||
|
if (entry.text == '') {
|
||||||
|
resultsRevealer.revealChild = false;
|
||||||
|
overviewContent.revealChild = true;
|
||||||
|
entryPromptRevealer.revealChild = true;
|
||||||
|
entryIconRevealer.revealChild = false;
|
||||||
|
entry.toggleClassName('overview-search-box-extended', false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const text = entry.text;
|
||||||
|
resultsRevealer.revealChild = true;
|
||||||
|
overviewContent.revealChild = false;
|
||||||
|
entryPromptRevealer.revealChild = false;
|
||||||
|
entryIconRevealer.revealChild = true;
|
||||||
|
entry.toggleClassName('overview-search-box-extended', true);
|
||||||
|
_appSearchResults = Applications.query(text);
|
||||||
|
|
||||||
|
// Calculate
|
||||||
|
if (couldBeMath(text)) { // Eval on typing is dangerous; this is a small workaround.
|
||||||
|
try {
|
||||||
|
const fullResult = eval(text.replace(/\^/g, "**"));
|
||||||
|
resultsBox.add(CalculationResultButton({ result: fullResult, text: text }));
|
||||||
|
} catch (e) {
|
||||||
|
// console.log(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isDir) {
|
||||||
|
var contents = [];
|
||||||
|
contents = ls({ path: text, silent: true });
|
||||||
|
contents.forEach((item) => {
|
||||||
|
resultsBox.add(DirectoryButton(item));
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (isAction) { // Eval on typing is dangerous, this is a workaround.
|
||||||
|
resultsBox.add(CustomCommandButton({ text: entry.text }));
|
||||||
|
}
|
||||||
|
// Add application entries
|
||||||
|
let appsToAdd = MAX_RESULTS;
|
||||||
|
_appSearchResults.forEach(app => {
|
||||||
|
if (appsToAdd == 0) return;
|
||||||
|
resultsBox.add(DesktopEntryButton(app));
|
||||||
|
appsToAdd--;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Fallbacks
|
||||||
|
// if the first word is an actual command
|
||||||
|
if (!isAction && !hasUnterminatedBackslash(text) && exec(`bash -c "command -v ${text.split(' ')[0]}"`) != '') {
|
||||||
|
resultsBox.add(ExecuteCommandButton({ command: entry.text, terminal: entry.text.startsWith('sudo') }));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add fallback: search
|
||||||
|
resultsBox.add(SearchButton({ text: entry.text }));
|
||||||
|
resultsBox.show_all();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return Widget.Box({
|
||||||
|
vertical: true,
|
||||||
|
children: [
|
||||||
|
ClickToClose({ // Top margin. Also works as a click-outside-to-close thing
|
||||||
|
child: Widget.Box({
|
||||||
|
className: 'bar-height',
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
Widget.Box({
|
||||||
|
hpack: 'center',
|
||||||
|
children: [
|
||||||
|
entry,
|
||||||
|
Widget.Box({
|
||||||
|
className: 'overview-search-icon-box',
|
||||||
|
setup: (box) => {
|
||||||
|
box.pack_start(entryPromptRevealer, true, true, 0)
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
entryIcon,
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
overviewContent,
|
||||||
|
resultsRevealer,
|
||||||
|
],
|
||||||
|
setup: (self) => self
|
||||||
|
.hook(App, (_b, name, visible) => {
|
||||||
|
if (name == 'overview' && !visible) {
|
||||||
|
resultsBox.children = [];
|
||||||
|
entry.set_text('');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.on('key-press-event', (widget, event) => { // Typing
|
||||||
|
const keyval = event.get_keyval()[1];
|
||||||
|
const modstate = event.get_state()[1];
|
||||||
|
if (checkKeybind(event, userOptions.keybinds.overview.altMoveLeft))
|
||||||
|
entry.set_position(Math.max(entry.get_position() - 1, 0));
|
||||||
|
else if (checkKeybind(event, userOptions.keybinds.overview.altMoveRight))
|
||||||
|
entry.set_position(Math.min(entry.get_position() + 1, entry.get_text().length));
|
||||||
|
else if (checkKeybind(event, userOptions.keybinds.overview.deleteToEnd)) {
|
||||||
|
const text = entry.get_text();
|
||||||
|
const pos = entry.get_position();
|
||||||
|
const newText = text.slice(0, pos);
|
||||||
|
entry.set_text(newText);
|
||||||
|
entry.set_position(newText.length);
|
||||||
|
}
|
||||||
|
else if (!(modstate & Gdk.ModifierType.CONTROL_MASK)) { // Ctrl not held
|
||||||
|
if (keyval >= 32 && keyval <= 126 && widget != entry) {
|
||||||
|
Utils.timeout(1, () => entry.grab_focus());
|
||||||
|
entry.set_text(entry.text + String.fromCharCode(keyval));
|
||||||
|
entry.set_position(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
,
|
||||||
|
});
|
||||||
|
};
|
||||||
197
hypr/.config/ags/user/style.css
Normal file
|
|
@ -0,0 +1,197 @@
|
||||||
|
*:not(popover) {
|
||||||
|
all: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
@import '../../../.config/waybar/wallust/colors-waybar.css';
|
||||||
|
|
||||||
|
/* define some colors */
|
||||||
|
@define-color border-color @color12;
|
||||||
|
@define-color border-color-alt @color1;
|
||||||
|
@define-color text-color rgba(255, 255, 255, 0.7);
|
||||||
|
@define-color noti-bg rgba(0, 0, 0, 0.4);
|
||||||
|
@define-color noti-bg-alt #111111;
|
||||||
|
|
||||||
|
widget {
|
||||||
|
border-radius: 0.818rem;
|
||||||
|
-gtk-outline-radius: 0.818rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-window {
|
||||||
|
margin-top: 2.727rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-box {
|
||||||
|
transition: 300ms cubic-bezier(0, 0.55, 0.45, 1);
|
||||||
|
border-radius: 1.705rem;
|
||||||
|
-gtk-outline-radius: 1.705rem;
|
||||||
|
border-top: 2px solid @border-color;
|
||||||
|
border-left: 1px solid @border-color-alt;
|
||||||
|
border-right: 1px solid @border-color-alt;
|
||||||
|
border-bottom: 2px solid @border-color;
|
||||||
|
/*box-shadow: 0px 2px 3px alpha(@color0, 0.45); */
|
||||||
|
margin: 0.476rem;
|
||||||
|
min-width: 13.636rem;
|
||||||
|
min-height: 3.409rem;
|
||||||
|
padding: 0rem 1.364rem;
|
||||||
|
padding-right: 2.864rem;
|
||||||
|
background-color: @noti-bg;
|
||||||
|
color: @text-color;
|
||||||
|
caret-color: inherit;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
.overview-search-box selection {
|
||||||
|
background-color: @noti-bg;
|
||||||
|
color: @text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-box-extended {
|
||||||
|
min-width: 25.909rem;
|
||||||
|
caret-color: #FDD9FD;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-prompt {
|
||||||
|
color: @text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-icon {
|
||||||
|
margin: 0rem 1.023rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-prompt-box {
|
||||||
|
margin-left: -18.545rem;
|
||||||
|
margin-right: 0.544rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-icon-box {
|
||||||
|
margin-left: -18.545rem;
|
||||||
|
margin-right: 0.544rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-results {
|
||||||
|
border-radius: 1.705rem;
|
||||||
|
-gtk-outline-radius: 1.705rem;
|
||||||
|
border-top: 2px solid @border-color;
|
||||||
|
border-left: 1px solid @border-color-alt;
|
||||||
|
border-right: 1px solid @border-color-alt;
|
||||||
|
border-bottom: 2px solid @border-color;
|
||||||
|
box-shadow: 0px 2px 3px @color9;
|
||||||
|
margin: 0.476rem;
|
||||||
|
min-width: 28.773rem;
|
||||||
|
padding: 0.682rem;
|
||||||
|
background-color: @noti-bg;
|
||||||
|
color: @text-color;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-results-icon {
|
||||||
|
margin: 0rem 0.682rem;
|
||||||
|
font-size: 2.386rem;
|
||||||
|
min-width: 2.386rem;
|
||||||
|
min-height: 2.386rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-results-txt {
|
||||||
|
margin-right: 0.682rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-results-txt-cmd {
|
||||||
|
margin-right: 0.682rem;
|
||||||
|
font-family: "JetBrains Mono NF", "JetBrains Mono Nerd Font", "JetBrains Mono NL", "SpaceMono NF", "SpaceMono Nerd Font", monospace;
|
||||||
|
font-size: 1.227rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-result-btn {
|
||||||
|
border-radius: 1.159rem;
|
||||||
|
-gtk-outline-radius: 1.159rem;
|
||||||
|
padding: 0.341rem;
|
||||||
|
min-width: 2.386rem;
|
||||||
|
min-height: 2.386rem;
|
||||||
|
caret-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-result-btn:hover,
|
||||||
|
.overview-search-result-btn:focus {
|
||||||
|
background-color: alpha(@color7, 0.9);
|
||||||
|
color: alpha(@color0, 0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-search-result-btn:active {
|
||||||
|
background-color: alpha(@color7, 0.9);
|
||||||
|
color: @color4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-tasks {
|
||||||
|
border-radius: 1.705rem;
|
||||||
|
-gtk-outline-radius: 1.705rem;
|
||||||
|
border-top: 2px solid @border-color;
|
||||||
|
border-left: 1px solid @border-color-alt;
|
||||||
|
border-right: 1px solid @border-color-alt;
|
||||||
|
border-bottom: 2px solid @border-color;
|
||||||
|
box-shadow: 0px 2px 3px @color5;
|
||||||
|
margin: 0.476rem;
|
||||||
|
padding: 0.341rem;
|
||||||
|
/* background-color: rgba(49, 50, 68, 0.8); */
|
||||||
|
background-color: @noti-bg;
|
||||||
|
color: #EBDFED;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-tasks-workspace {
|
||||||
|
border-radius: 1.159rem;
|
||||||
|
-gtk-outline-radius: 1.159rem;
|
||||||
|
margin: 0.341rem;
|
||||||
|
/* background-color: #26233A; */
|
||||||
|
background-image: url('../../rofi/.current_wallpaper');
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
border: 0.068rem solid alpha(@color4, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-tasks-workspace-number {
|
||||||
|
font-family: "Open Sans", "Noto Sans", sans-serif;
|
||||||
|
color: #CFC2D3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-tasks-window {
|
||||||
|
border-radius: 1.159rem;
|
||||||
|
-gtk-outline-radius: 1.159rem;
|
||||||
|
transition: 300ms cubic-bezier(0.1, 1, 0, 1);
|
||||||
|
background-color: alpha(@color3, .7);
|
||||||
|
/* background-color: @color_a3; */
|
||||||
|
/* background-color: rgba(46, 40, 50, 0.8); */
|
||||||
|
color: #EBDFED;
|
||||||
|
border: 0.068rem solid @color7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-tasks-window:hover,
|
||||||
|
.overview-tasks-window:focus {
|
||||||
|
background-color: alpha(@color9, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-tasks-window:active {
|
||||||
|
background-color: alpha(@color9, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-tasks-window-selected {
|
||||||
|
background-color: alpha(@color9, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview-tasks-window-dragging {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.growingRadial {
|
||||||
|
transition: 300ms cubic-bezier(0.2, 0, 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fadingRadial {
|
||||||
|
transition: 50ms cubic-bezier(0.2, 0, 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-pinned {
|
||||||
|
margin: 0rem;
|
||||||
|
border-radius: 0rem;
|
||||||
|
border-bottom-right-radius: 1.705rem;
|
||||||
|
border: 0rem solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*# sourceMappingURL=style.css.map */
|
||||||
21
hypr/.config/ags/user_options.js
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
const userConfigOptions = {
|
||||||
|
// For every option, see ~/.config/ags/modules/.configuration/user_options.js
|
||||||
|
// (vscode users ctrl+click this: file://./modules/.configuration/user_options.js)
|
||||||
|
// (vim users: `:vsp` to split window, move cursor to this path, press `gf`. `Ctrl-w` twice to switch between)
|
||||||
|
// options listed in this file will override the default ones in the above file
|
||||||
|
// Here's an example
|
||||||
|
'overview':{
|
||||||
|
'scale': 0.15,
|
||||||
|
'numOfRows': 2
|
||||||
|
},
|
||||||
|
'keybinds': {
|
||||||
|
'sidebar': {
|
||||||
|
'pin': "Ctrl+p",
|
||||||
|
'nextTab': "Ctrl+Page_Down",
|
||||||
|
'prevTab': "Ctrl+Page_Up",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
export default userConfigOptions;
|
||||||
21
hypr/.config/ags/variables.js
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
const { Gtk } = imports.gi;
|
||||||
|
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||||
|
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
|
||||||
|
const { exec, execAsync } = Utils;
|
||||||
|
|
||||||
|
Gtk.IconTheme.get_default().append_search_path(`${App.configDir}/assets/icons`);
|
||||||
|
|
||||||
|
// Screen size
|
||||||
|
export const SCREEN_WIDTH = Number(exec(`bash -c "hyprctl monitors -j | jq '.[0].width / .[0].scale'"`));
|
||||||
|
export const SCREEN_HEIGHT = Number(exec(`bash -c "hyprctl monitors -j | jq '.[0].height / .[0].scale'"`));
|
||||||
|
|
||||||
|
// Mode switching
|
||||||
|
export const currentShellMode = Variable('normal', {}) // normal, focus
|
||||||
|
globalThis['currentMode'] = currentShellMode;
|
||||||
|
globalThis['cycleMode'] = () => {
|
||||||
|
if (currentShellMode.value === 'normal') {
|
||||||
|
currentShellMode.value = 'focus';
|
||||||
|
} else {
|
||||||
|
currentShellMode.value = 'normal';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -20,7 +20,6 @@ $fileManager = dolphin
|
||||||
$emoji = rofi -mode emoji -show emoji -kb-secondary-copy '' -kb-custom-1 Ctrl+c
|
$emoji = rofi -mode emoji -show emoji -kb-secondary-copy '' -kb-custom-1 Ctrl+c
|
||||||
$menu = ~/.config/rofi/launcher.sh
|
$menu = ~/.config/rofi/launcher.sh
|
||||||
#$menu = ~/.config/rofi/launchers/type-2/launcher.sh
|
#$menu = ~/.config/rofi/launchers/type-2/launcher.sh
|
||||||
#$menu = wofi --show drun
|
|
||||||
#$menu = tofi-drun -c ~/.config/tofi/configA --drun-launch=true
|
#$menu = tofi-drun -c ~/.config/tofi/configA --drun-launch=true
|
||||||
$browser = librewolf
|
$browser = librewolf
|
||||||
$editor = code
|
$editor = code
|
||||||
|
|
@ -42,12 +41,16 @@ exec-once=swaync
|
||||||
#exec-once=dbus-launch --sh-syntax --exit-with-session dunst -conf ~/.config/dunst/dunstrc
|
#exec-once=dbus-launch --sh-syntax --exit-with-session dunst -conf ~/.config/dunst/dunstrc
|
||||||
exec-once=/usr/lib/kdeconnectd
|
exec-once=/usr/lib/kdeconnectd
|
||||||
exec-once=kdeconnect-indicator
|
exec-once=kdeconnect-indicator
|
||||||
exec-once=wl-paste --type text --watch cliphist store # clipboard
|
|
||||||
|
# clipboard
|
||||||
|
exec-once=wl-paste --type text --watch cliphist store
|
||||||
exec-once=wl-paste --type image --watch cliphist store
|
exec-once=wl-paste --type image --watch cliphist store
|
||||||
|
|
||||||
# exec-once=hyprpaper
|
# exec-once=hyprpaper
|
||||||
# exec-once=~/.local/bin/hyprpaperchanger
|
# exec-once=~/.local/bin/hyprpaperchanger
|
||||||
exec-once=wpaperd
|
#exec-once=wpaperd
|
||||||
#exec-once=hypridle
|
#exec-once=hypridle
|
||||||
|
exec-once=sww-daemon --format xrgb
|
||||||
exec-once=hyprshade auto
|
exec-once=hyprshade auto
|
||||||
exec-once=waybar
|
exec-once=waybar
|
||||||
exec-once=./xdg-desktop-portal.sh
|
exec-once=./xdg-desktop-portal.sh
|
||||||
|
|
@ -58,6 +61,9 @@ exec-once=kdeconnect-indicator
|
||||||
exec-once=blueman-applet
|
exec-once=blueman-applet
|
||||||
exec-once=systemctl --user restart sunshine.service
|
exec-once=systemctl --user restart sunshine.service
|
||||||
##exec-once=nwg-dock-hyprland -i 32 -w 5 -mb 10 -ml 10 -mr 10 -x -c "tofi-drun --drun-launch=true" -lp start -f -a start
|
##exec-once=nwg-dock-hyprland -i 32 -w 5 -mb 10 -ml 10 -mr 10 -x -c "tofi-drun --drun-launch=true" -lp start -f -a start
|
||||||
|
exec-once=pypr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### ENVIRONMENT VARIABLES ###
|
### ENVIRONMENT VARIABLES ###
|
||||||
|
|
||||||
|
|
@ -213,31 +219,41 @@ device {
|
||||||
|
|
||||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||||
|
|
||||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
bind = $mainMod, return, exec, $terminal # Launch a terminal
|
||||||
#bindd = $mainMod, return, Launch a terminal, exec, $terminal bash --rcfile ~/.dotfiles/bash/.bashrc
|
bind = $mainMod, B, exec, $browser # Launch the default browser
|
||||||
bindd = $mainMod, return, Launch a terminal, exec, $terminal
|
bind = $mainMod, C, exec, $editor # Launch Visual Studio Code
|
||||||
bindd = $mainMod, B, Launch the default browser, exec, $browser
|
bind = $mainMod, N, exec, $editor-alt # Launch Neovim
|
||||||
bindd = $mainMod, C, Launch Visual Studio Code, exec, $editor
|
bind = $mainMod, Q, killactive, # Kill active window
|
||||||
bindd = $mainMod, N, Launch Neovim, exec, $editor-alt
|
bind = $mainMod SHIFT, Q, exec, "$HOME/.config/hypr/scripts/KillActiveProcess.sh # Kill active window
|
||||||
bindd = $mainMod, Q, Kill active window, killactive,
|
bind = CTRL ALT, Delete, exec, hyprctl dispatch exit 0, # Exit Hyprland
|
||||||
bindd = $mainMod, M, Exit Hyprland, exit,
|
bind = $mainMod, E, exec, XDG_CURRENT_DESKTOP=kde $fileManager # Launch the file manager
|
||||||
bindd = $mainMod, E, Launch the file manager, exec, XDG_CURRENT_DESKTOP=kde $fileManager
|
bind = $mainMod SHIFT, F, togglefloating, # Toggle floating
|
||||||
bindd = $mainMod, W, Toggle floating, togglefloating,
|
bind = $mainMod ALT, F, exec, hyprctl dispatch workspace allfloat
|
||||||
bindd = $mainMod, space, Launch menu, exec, $menu
|
bind = $mainMod, space, exec, $menu # Launch menu
|
||||||
bindd = $mainMod, F, Toggle fullscreen, fullscreen
|
bind = $mainMod, F, fullscreen # Toggle fullscreen
|
||||||
bind = $mainMod, O, layoutmsg, swapwithmaster
|
bind = $mainMod ALT, L, exec, $HOME/.config/hypr/scripts/ChangeLayout.sh # Toggle Master of Dwindle Layout
|
||||||
bind = $mainMod, P, pseudo, # dwindle
|
|
||||||
bind = $mainMod, J, togglesplit, # dwindle
|
|
||||||
|
|
||||||
bindd = $mainMod, period, Emoji selector, exec, $emoji
|
# Dwindle Layout
|
||||||
bindd = $mainMod, I, Switch between master/dwingle, exec, $HOME/.config/hypr/switchlayout.sh
|
bind = $mainMod SHIFT, I, togglesplit # only works on dwingle layout
|
||||||
bindd = $mainMod, S, Launch menu to modify/create script, exec, autoscriptmenu
|
bind = $mainMod, P, pseudo, # dwindle
|
||||||
|
|
||||||
bindd = $mainMod, period, Launch the Emoji Picker, exec, jome -d | wl-copy #Emojipicker + clipboard copy
|
# Master Layout
|
||||||
|
bind = $mainMod CTRL, D, layoutmsg, removemaster
|
||||||
|
bind = $mainMod, I, layoutmsg, addmaster
|
||||||
|
bind = $mainMod, J, layoutmsg, cyclenext
|
||||||
|
bind = $mainMod, K, layoutmsg, cycleprev
|
||||||
|
bind = $mainMod CTRL, Return, layoutmsg, swapwithmaster
|
||||||
|
|
||||||
# bindd = $mainMod, V, Clipboard History, exec, cliphist list | tofi -c ~/.config/tofi/configV | cliphist decode | wl-copy
|
# Works on either layout (Master of Dwindle)
|
||||||
bindd = $mainMod, V, Clipboard History, exec, "$HOME/.config/rofi/clipboard.sh"
|
bind = $mainMod, M, exec, hyprctl dispatch splitration 0.25
|
||||||
bindd = $mainMod, R, Launch Remmina, exec, [floating] remmina
|
|
||||||
|
|
||||||
|
bind = $mainMod, period, exec, $emoji # Emoji selector
|
||||||
|
bind = $mainMod, S, exec, autoscriptmenu # Launch menu to modify/create script
|
||||||
|
|
||||||
|
##bindd = $mainMod, V, Clipboard History, exec, "$HOME/.config/rofi/clipboard.sh"
|
||||||
|
bind = $mainMod, V, exec, "$HOME/.config/hypr/scripts/ClipManager.sh" # Clipboard History
|
||||||
|
bind = $mainMod, R, exec, [floating] remmina # Launch Remmina
|
||||||
|
|
||||||
# Move focus with mainMod + arrow keys
|
# Move focus with mainMod + arrow keys
|
||||||
bind = $mainMod, left, movefocus, l
|
bind = $mainMod, left, movefocus, l
|
||||||
|
|
@ -257,29 +273,29 @@ bind = $mainMod, 8, workspace, 8
|
||||||
bind = $mainMod, 9, workspace, 9
|
bind = $mainMod, 9, workspace, 9
|
||||||
bind = $mainMod, 0, workspace, 10
|
bind = $mainMod, 0, workspace, 10
|
||||||
|
|
||||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
# Move and follow active window to a workspace with mainMod + SHIFT + [0-9]
|
||||||
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
|
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||||
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
|
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||||
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
|
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||||
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
|
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||||
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
|
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||||
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
|
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||||
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
|
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||||
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
|
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||||
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
|
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||||
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10
|
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||||
bind = $mainMod CTRL, 1, movetoworkspace, 1
|
bind = $mainMod CTRL, 1, movetoworkspacesilent, 1
|
||||||
bind = $mainMod CTRL, 2, movetoworkspace, 2
|
bind = $mainMod CTRL, 2, movetoworkspacesilent, 2
|
||||||
bind = $mainMod CTRL, 3, movetoworkspace, 3
|
bind = $mainMod CTRL, 3, movetoworkspacesilent, 3
|
||||||
bind = $mainMod CTRL, 4, movetoworkspace, 4
|
bind = $mainMod CTRL, 4, movetoworkspacesilent, 4
|
||||||
bind = $mainMod CTRL, 5, movetoworkspace, 5
|
bind = $mainMod CTRL, 5, movetoworkspacesilent, 5
|
||||||
bind = $mainMod CTRL, 6, movetoworkspace, 6
|
bind = $mainMod CTRL, 6, movetoworkspacesilent, 6
|
||||||
bind = $mainMod CTRL, 7, movetoworkspace, 7
|
bind = $mainMod CTRL, 7, movetoworkspacesilent, 7
|
||||||
bind = $mainMod CTRL, 8, movetoworkspace, 8
|
bind = $mainMod CTRL, 8, movetoworkspacesilent, 8
|
||||||
bind = $mainMod CTRL, 9, movetoworkspace, 9
|
bind = $mainMod CTRL, 9, movetoworkspacesilent, 9
|
||||||
bind = $mainMod CTRL, 0, movetoworkspace, 10
|
bind = $mainMod CTRL, 0, movetoworkspacesilent, 10
|
||||||
|
|
||||||
# Example special workspace (scratchpad)
|
# Example special workspace (scratchpad)
|
||||||
#bind = $mainMod, S, togglespecialworkspace, magic
|
#bind = $mainMod, S, togglespecialworkspace, magic
|
||||||
|
|
@ -297,19 +313,20 @@ bindm = $mainMod, mouse:273, resizewindow
|
||||||
#bindd = $mainMod, P, Color Picker, exec, $colorPicker | wl-copy
|
#bindd = $mainMod, P, Color Picker, exec, $colorPicker | wl-copy
|
||||||
|
|
||||||
# Screen locking
|
# Screen locking
|
||||||
bindd = $mainMod, L, Lock the screen, exec, hyprlock
|
bind = $mainMod, L, exec, pidof hyprlock || hyprlock -q # Lock the screen
|
||||||
|
|
||||||
# Logout
|
# Logout
|
||||||
bindd = $mainMod, Escape, Session logout, exec, wlogout
|
bind = $mainMod, Escape, exec, wlogout # Session logout
|
||||||
|
bind = CTRL ALT, P, exec, "$HOME/.config/hypr/scripts/Wlogout.sh" # Session logout
|
||||||
|
|
||||||
# Waybar
|
# Waybar
|
||||||
bindd = CTRL, Escape, Toggle waybar, exec, killall waybar || waybar
|
bind = CTRL, Escape, exec, killall waybar || waybar # Toggle waybar
|
||||||
|
|
||||||
# Screenshot
|
# Screenshot
|
||||||
|
|
||||||
bindd = , Print, Screenshot entire screen, exec, grimblast --notify copysave screen
|
bind = , Print, exec, grimblast --notify copysave screen # Screenshot entire screen
|
||||||
bindd = $mainMod, Print, Screenshot active window, exec, grimblast --notify copysave active
|
bind = $mainMod, Print, exec, grimblast --notify copysave active # Screenshot active window
|
||||||
bindd = $mainMod Alt, Print, Screenshot selected area, exec, grimblast --notify copysave area
|
bind = $mainMod Alt, Print, exec, grimblast --notify copysave area # Screenshot selected area
|
||||||
|
|
||||||
# Laptop multimedia keys for volume and LCD brightness
|
# Laptop multimedia keys for volume and LCD brightness
|
||||||
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||||
|
|
|
||||||
24
hypr/.config/hypr/scripts/ChangeLayout.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
LAYOUT=$(hyprctl -j getoption general:layout | jq '.str' | sed 's/"//g')
|
||||||
|
|
||||||
|
case "$LAYOUT" in
|
||||||
|
"master")
|
||||||
|
hyprctl keyword general:layout dwindle
|
||||||
|
hyprctl keyword unbind SUPER,J
|
||||||
|
hyprctl keyword unbind SUPER,K
|
||||||
|
hyprctl keyword bind SUPER,J,cyclenext
|
||||||
|
hyprctl keyword bind SUPER,K,cyclenext,prev
|
||||||
|
hyprctl keyword bind SUPER,O,togglesplit
|
||||||
|
notify-send -e -u low "Switch to DWINDLE layout"
|
||||||
|
;;
|
||||||
|
"dwindle")
|
||||||
|
hyprctl keyword general:layout master
|
||||||
|
hyprctl keyword unbind SUPER,J
|
||||||
|
hyprctl keyword unbind SUPER,K
|
||||||
|
hyprctl keyword unbind SUPER,O
|
||||||
|
hyprctl keyword bind SUPER,J,layoutmsg,cyclenext
|
||||||
|
hyprctl keyword bind SUPER,K,layoutmsg,cycleprev
|
||||||
|
notify-send -e -u low "Switched to MASTER layout"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
40
hypr/.config/hypr/scripts/ClipManager.sh
Executable file
|
|
@ -0,0 +1,40 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Clipboard Manager. This script uses cliphist, rofi, and wl-copy.
|
||||||
|
|
||||||
|
# Actions:
|
||||||
|
# CTRL Del to delete an entry
|
||||||
|
# ALT Del to wipe clipboard contents
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
result=$(
|
||||||
|
rofi -i -dmenu \
|
||||||
|
-kb-custom-1 "Control-Delete" \
|
||||||
|
-kb-custom-2 "Alt-Delete" \
|
||||||
|
-config ~/.config/rofi/config-clipboard.rasi < <(cliphist list)
|
||||||
|
)
|
||||||
|
|
||||||
|
case "$?" in
|
||||||
|
1)
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
0)
|
||||||
|
case "$result" in
|
||||||
|
"")
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
cliphist decode <<<"$result" | wl-copy
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
10)
|
||||||
|
cliphist delete <<<"$result"
|
||||||
|
;;
|
||||||
|
11)
|
||||||
|
cliphist wipe
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
11
hypr/.config/hypr/scripts/KillActiveProcess.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
|
||||||
|
# Copied from Discord post. Thanks to @Zorg
|
||||||
|
|
||||||
|
|
||||||
|
# Get id of an active window
|
||||||
|
active_pid=$(hyprctl activewindow | grep -o 'pid: [0-9]*' | cut -d' ' -f2)
|
||||||
|
|
||||||
|
# Close active window
|
||||||
|
kill $active_pid
|
||||||
4975
hypr/.config/hypr/scripts/RofiEmoji.sh
Executable file
39
hypr/.config/hypr/scripts/WallustSwww.sh
Executable file
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Wallust Colors for current wallpaper
|
||||||
|
|
||||||
|
# Define the path to the swww cache directory
|
||||||
|
cache_dir="$HOME/.cache/swww/"
|
||||||
|
|
||||||
|
# Get a list of monitor outputs
|
||||||
|
monitor_outputs=($(ls "$cache_dir"))
|
||||||
|
|
||||||
|
# Initialize a flag to determine if the ln command was executed
|
||||||
|
ln_success=false
|
||||||
|
|
||||||
|
# Get current focused monitor
|
||||||
|
current_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}')
|
||||||
|
echo $current_monitor
|
||||||
|
# Construct the full path to the cache file
|
||||||
|
cache_file="$cache_dir$current_monitor"
|
||||||
|
echo $cache_file
|
||||||
|
# Check if the cache file exists for the current monitor output
|
||||||
|
if [ -f "$cache_file" ]; then
|
||||||
|
# Get the wallpaper path from the cache file
|
||||||
|
wallpaper_path=$(grep -v 'Lanczos3' "$cache_file" | head -n 1)
|
||||||
|
echo $wallpaper_path
|
||||||
|
# symlink the wallpaper to the location Rofi can access
|
||||||
|
if ln -sf "$wallpaper_path" "$HOME/.config/rofi/.current_wallpaper"; then
|
||||||
|
ln_success=true # Set the flag to true upon successful execution
|
||||||
|
fi
|
||||||
|
# copy the wallpaper for wallpaper effects
|
||||||
|
cp -r "$wallpaper_path" "$HOME/.config/hypr/wallpaper_effects/.wallpaper_current"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check the flag before executing further commands
|
||||||
|
if [ "$ln_success" = true ]; then
|
||||||
|
# execute wallust
|
||||||
|
echo 'about to execute wallust'
|
||||||
|
# execute wallust skipping tty and terminal changes
|
||||||
|
wallust run "$wallpaper_path" -s &
|
||||||
|
fi
|
||||||
57
hypr/.config/hypr/scripts/Wlogout.sh
Executable file
|
|
@ -0,0 +1,57 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# wlogout (Power, Screen Lock, Suspend, etc)
|
||||||
|
|
||||||
|
# Set variables for parameters. First numbers corresponts to Monitor Resolution
|
||||||
|
# i.e 2160 means 2160p
|
||||||
|
A_2160=700
|
||||||
|
B_2160=700
|
||||||
|
A_1600=480
|
||||||
|
B_1600=480
|
||||||
|
A_1440=450
|
||||||
|
B_1440=450
|
||||||
|
A_1080=350
|
||||||
|
B_1080=350
|
||||||
|
A_720=50
|
||||||
|
B_720=50
|
||||||
|
|
||||||
|
# Check if wlogout is already running
|
||||||
|
if pgrep -x "wlogout" > /dev/null; then
|
||||||
|
pkill -x "wlogout"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Detect monitor resolution and scaling factor
|
||||||
|
resolution=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .height / .scale' | awk -F'.' '{print $1}')
|
||||||
|
hypr_scale=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .scale')
|
||||||
|
|
||||||
|
# Set parameters based on screen resolution and scaling factor
|
||||||
|
if ((resolution >= 2160)); then
|
||||||
|
T_val=$(awk "BEGIN {printf \"%.0f\", $A_2160 * 2160 * $hypr_scale / $resolution}")
|
||||||
|
B_val=$(awk "BEGIN {printf \"%.0f\", $B_2160 * 2160 * $hypr_scale / $resolution}")
|
||||||
|
echo "Setting parameters for resolution >= 4k"
|
||||||
|
wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
|
||||||
|
elif ((resolution >= 1600 && resolution < 2160)); then
|
||||||
|
T_val=$(awk "BEGIN {printf \"%.0f\", $A_1600 * 1600 * $hypr_scale / $resolution}")
|
||||||
|
B_val=$(awk "BEGIN {printf \"%.0f\", $B_1600 * 1600 * $hypr_scale / $resolution}")
|
||||||
|
echo "Setting parameters for resolution >= 2.5k and < 4k"
|
||||||
|
wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
|
||||||
|
elif ((resolution >= 1440 && resolution < 1600)); then
|
||||||
|
T_val=$(awk "BEGIN {printf \"%.0f\", $A_1440 * 1440 * $hypr_scale / $resolution}")
|
||||||
|
B_val=$(awk "BEGIN {printf \"%.0f\", $B_1440 * 1440 * $hypr_scale / $resolution}")
|
||||||
|
echo "Setting parameters for resolution >= 2k and < 2.5k"
|
||||||
|
wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
|
||||||
|
elif ((resolution >= 1080 && resolution < 1440)); then
|
||||||
|
T_val=$(awk "BEGIN {printf \"%.0f\", $A_1080 * 1080 * $hypr_scale / $resolution}")
|
||||||
|
B_val=$(awk "BEGIN {printf \"%.0f\", $B_1080 * 1080 * $hypr_scale / $resolution}")
|
||||||
|
echo "Setting parameters for resolution >= 1080p and < 2k"
|
||||||
|
wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
|
||||||
|
elif ((resolution >= 720 && resolution < 1080)); then
|
||||||
|
T_val=$(awk "BEGIN {printf \"%.0f\", $A_720 * 720 * $hypr_scale / $resolution}")
|
||||||
|
B_val=$(awk "BEGIN {printf \"%.0f\", $B_720 * 720 * $hypr_scale / $resolution}")
|
||||||
|
echo "Setting parameters for resolution >= 720p and < 1080p"
|
||||||
|
wlogout --protocol layer-shell -b 3 -T $T_val -B $B_val &
|
||||||
|
else
|
||||||
|
echo "Setting default parameters"
|
||||||
|
wlogout &
|
||||||
|
fi
|
||||||
21
hypr/.config/hypr/wallust/wallust-hyprland.conf
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */
|
||||||
|
# /* wallust template - colors-hyprland */
|
||||||
|
|
||||||
|
$background = rgb(000004)
|
||||||
|
$foreground = rgb(F7F8FA)
|
||||||
|
$color0 = rgb(000004)
|
||||||
|
$color1 = rgb(262B35)
|
||||||
|
$color2 = rgb(3F5266)
|
||||||
|
$color3 = rgb(506C87)
|
||||||
|
$color4 = rgb(90625F)
|
||||||
|
$color5 = rgb(B09868)
|
||||||
|
$color6 = rgb(AEB1B5)
|
||||||
|
$color7 = rgb(EBEDF0)
|
||||||
|
$color8 = rgb(A5A6A8)
|
||||||
|
$color9 = rgb(333A47)
|
||||||
|
$color10 = rgb(546E88)
|
||||||
|
$color11 = rgb(6A90B4)
|
||||||
|
$color12 = rgb(C0827F)
|
||||||
|
$color13 = rgb(EBCB8B)
|
||||||
|
$color14 = rgb(E8EBF2)
|
||||||
|
$color15 = rgb(EBEDF0)
|
||||||
1
hypr/.config/rofi/.current_wallpaper
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
/home/matt/Pictures/wallpapers/50.png
|
||||||
16
hypr/.config/rofi/config-clipboard.rasi
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
/* ---- 💫 https://github.com/JaKooLit 💫 ---- */
|
||||||
|
/* Clipboard Config - Clipboard */
|
||||||
|
|
||||||
|
@import "~/.config/rofi/master-config.rasi"
|
||||||
|
|
||||||
|
/* ---- Entry ---- */
|
||||||
|
entry {
|
||||||
|
width: 37%;
|
||||||
|
placeholder: "📋 Search Clipboard **note** 👀 CTRL Del - Cliphist del or Alt Del - cliphist wipe";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Listview ---- */
|
||||||
|
listview {
|
||||||
|
columns: 1;
|
||||||
|
lines: 8;
|
||||||
|
}
|
||||||
45
hypr/.config/rofi/config-compact.rasi
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
/* ---- 💫 https://github.com/JaKooLit 💫 ---- */
|
||||||
|
/* Main Config (compact) */
|
||||||
|
|
||||||
|
@import "~/.config/rofi/master-config.rasi"
|
||||||
|
|
||||||
|
/* ---- Configuration ---- */
|
||||||
|
configuration {
|
||||||
|
modi: "drun";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Window ---- */
|
||||||
|
window {
|
||||||
|
width: 50%;
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Inputbar ---- */
|
||||||
|
inputbar {
|
||||||
|
background-image: url("~/.config/rofi/.current_wallpaper", width);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Imagebox ---- */
|
||||||
|
imagebox {
|
||||||
|
orientation: vertical;
|
||||||
|
children: [ "entry", "listview"];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Entry input ---- */
|
||||||
|
entry {
|
||||||
|
width: 23%;
|
||||||
|
placeholder: "👀 View / Edit Hyprland Configs";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Listview ---- */
|
||||||
|
listview {
|
||||||
|
columns: 2;
|
||||||
|
lines: 6;
|
||||||
|
spacing: 4px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Element ---- */
|
||||||
|
element {
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
16
hypr/.config/rofi/config-emoji.rasi
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
/* ---- 💫 https://github.com/JaKooLit 💫 ---- */
|
||||||
|
/* Main Config - emoji */
|
||||||
|
|
||||||
|
@import "~/.config/rofi/master-config.rasi"
|
||||||
|
|
||||||
|
/* ---- Entry ---- */
|
||||||
|
entry {
|
||||||
|
width: 37%;
|
||||||
|
placeholder: "💫 Search Emoji's **note** 👀 Click or Return to choose | Ctrl V to Paste";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Listview ---- */
|
||||||
|
listview {
|
||||||
|
columns: 1;
|
||||||
|
lines: 8;
|
||||||
|
}
|
||||||
51
hypr/.config/rofi/config-wallpaper.rasi
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
/* ---- 💫 https://github.com/JaKooLit 💫 ---- */
|
||||||
|
/* Main Config (wallpaper) */
|
||||||
|
|
||||||
|
@import "~/.config/rofi/master-config.rasi"
|
||||||
|
|
||||||
|
/* ---- Configuration ---- */
|
||||||
|
configuration {
|
||||||
|
modi: "drun";
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Imagebox ---- */
|
||||||
|
imagebox {
|
||||||
|
orientation: vertical;
|
||||||
|
children:
|
||||||
|
[ "entry", "listbox"];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
entry {
|
||||||
|
expand: false;
|
||||||
|
placeholder: "🎞️ Choose Wallpaper";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Listview ---- */
|
||||||
|
listview {
|
||||||
|
columns: 4;
|
||||||
|
lines: 3;
|
||||||
|
flow: horizontal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Element ---- */
|
||||||
|
element {
|
||||||
|
orientation: vertical;
|
||||||
|
padding: 0px;
|
||||||
|
spacing: 0px;
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-icon {
|
||||||
|
size: 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text {
|
||||||
|
font: "Fira Code SemiBold 12";
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.5;
|
||||||
|
}
|
||||||
239
hypr/.config/rofi/master-config.rasi
Normal file
|
|
@ -0,0 +1,239 @@
|
||||||
|
/* ---- 💫 https://github.com/JaKooLit 💫 ---- */
|
||||||
|
/* Master Config 1080p*/
|
||||||
|
|
||||||
|
/* ---- Configuration ---- */
|
||||||
|
|
||||||
|
configuration {
|
||||||
|
font: "Fira Code SemiBold 12";
|
||||||
|
modi: "drun,run,filebrowser";
|
||||||
|
show-icons: true;
|
||||||
|
display-drun: "Apps";
|
||||||
|
display-run: "Run";
|
||||||
|
display-filebrowser: "Files";
|
||||||
|
display-window: "Windows";
|
||||||
|
drun-display-format: "{name}";
|
||||||
|
hover-select: true;
|
||||||
|
me-select-entry: "MouseSecondary";
|
||||||
|
me-accept-entry: "MousePrimary";
|
||||||
|
window-format: "{w} · {c} · {t}";
|
||||||
|
dpi: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Load wallust colors ---- */
|
||||||
|
@theme "~/.config/rofi/wallust/colors-rofi.rasi"
|
||||||
|
|
||||||
|
/* ---- Global Properties ---- */
|
||||||
|
* {
|
||||||
|
|
||||||
|
background-alt: @selected-active-background; // Buttons background
|
||||||
|
selected: @selected-urgent-background; // Button selected
|
||||||
|
active: @selected-normal-background; // Window activated
|
||||||
|
urgent: @selected; // When hovering the activated window (maybe more?)
|
||||||
|
|
||||||
|
text-selected: @background;
|
||||||
|
text-color: @foreground;
|
||||||
|
border-color: @selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Window ---- */
|
||||||
|
window {
|
||||||
|
// Default
|
||||||
|
enabled: true;
|
||||||
|
fullscreen: false;
|
||||||
|
transparency: "real";
|
||||||
|
cursor: "default";
|
||||||
|
spacing: 0px;
|
||||||
|
border: 4px 0px 4px 0px;
|
||||||
|
border-radius: 30px;
|
||||||
|
location: center;
|
||||||
|
anchor: center;
|
||||||
|
|
||||||
|
// Style Values
|
||||||
|
width: 50%;
|
||||||
|
background-color: @background;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----- Main Box ----- */
|
||||||
|
mainbox {
|
||||||
|
padding: 15px;
|
||||||
|
enabled: true;
|
||||||
|
orientation: vertical;
|
||||||
|
children: [ "inputbar", "listbox" ];
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ---- Inputbar ---- */
|
||||||
|
inputbar {
|
||||||
|
enabled: true;
|
||||||
|
padding: 10px 10px 100px 10px;
|
||||||
|
margin: 10px;
|
||||||
|
background-color: transparent;
|
||||||
|
border-radius: 25px;
|
||||||
|
orientation: horizontal;
|
||||||
|
children: ["entry", "dummy", "mode-switcher" ];
|
||||||
|
background-image: url("~/.config/rofi/.current_wallpaper", width);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Entry input ---- */
|
||||||
|
entry {
|
||||||
|
enabled: true;
|
||||||
|
expand: false;
|
||||||
|
width: 20%;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 12px;
|
||||||
|
background-color: @selected;
|
||||||
|
text-color: @text-selected;
|
||||||
|
cursor: text;
|
||||||
|
placeholder: "🖥️ Search "; // << Search symbol
|
||||||
|
placeholder-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Listbox ---- */
|
||||||
|
listbox {
|
||||||
|
spacing: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: transparent;
|
||||||
|
orientation: vertical;
|
||||||
|
children: [ "message", "listview" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Listview ---- */
|
||||||
|
listview {
|
||||||
|
enabled: true;
|
||||||
|
columns: 2;
|
||||||
|
lines: 6;
|
||||||
|
cycle: true;
|
||||||
|
dynamic: true;
|
||||||
|
scrollbar: true;
|
||||||
|
layout: vertical;
|
||||||
|
reverse: false;
|
||||||
|
fixed-height: false;
|
||||||
|
fixed-columns: true;
|
||||||
|
spacing: 10px;
|
||||||
|
background-color: transparent;
|
||||||
|
|
||||||
|
// Adapt rofi theme
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Dummy ---- */
|
||||||
|
dummy {
|
||||||
|
expand: true;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Mode Switcher ---- */
|
||||||
|
mode-switcher{
|
||||||
|
enabled: true;
|
||||||
|
spacing: 10px;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
width: 5%;
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 12px;
|
||||||
|
background-color: @text-selected;
|
||||||
|
text-color: @text-color;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
button selected {
|
||||||
|
background-color: @selected;
|
||||||
|
text-color: @text-selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Scrollbar ---- */
|
||||||
|
scrollbar {
|
||||||
|
width: 4px ;
|
||||||
|
border: 0;
|
||||||
|
handle-color: @border-color;
|
||||||
|
handle-width: 8px ;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Elements ---- */
|
||||||
|
element {
|
||||||
|
enabled: true;
|
||||||
|
spacing: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 12px;
|
||||||
|
background-color: transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
element normal.normal {
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
element normal.urgent {
|
||||||
|
background-color: @urgent;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
element normal.active {
|
||||||
|
background-color: @active;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected.normal {
|
||||||
|
border: 1px 6px 1px 6px;
|
||||||
|
border-radius: 16px;
|
||||||
|
border-color: @selected;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected.urgent {
|
||||||
|
background-color: @urgent;
|
||||||
|
text-color: @text-selected;
|
||||||
|
}
|
||||||
|
element selected.active {
|
||||||
|
background-color: @urgent;
|
||||||
|
text-color: @text-selected;
|
||||||
|
}
|
||||||
|
// Adapt rofi theme
|
||||||
|
element alternate.normal {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
element alternate.urgent {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
element alternate.active {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
element-icon {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
cursor: inherit;
|
||||||
|
}
|
||||||
|
element-text {
|
||||||
|
font: "Fira Code SemiBold 12";
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
cursor: inherit;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- Message ---- */
|
||||||
|
message {
|
||||||
|
background-color: transparent;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
textbox {
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: @background;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.0;
|
||||||
|
}
|
||||||
|
error-message {
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background-color: @background-alt;
|
||||||
|
text-color: @background;
|
||||||
|
}
|
||||||
|
|
||||||
30
hypr/.config/rofi/wallust/colors-rofi.rasi
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
/* ---- 💫 https://github.com/JaKooLit 💫 ---- */
|
||||||
|
/* wallust template - colors-rofi */
|
||||||
|
|
||||||
|
* {
|
||||||
|
active-background: #333A47;
|
||||||
|
active-foreground: #F7F8FA;
|
||||||
|
normal-background: #000004;
|
||||||
|
normal-foreground: #F7F8FA;
|
||||||
|
urgent-background: #C0827F;
|
||||||
|
urgent-foreground: #F7F8FA;
|
||||||
|
|
||||||
|
alternate-active-background: #B09868;
|
||||||
|
alternate-active-foreground: #F7F8FA;
|
||||||
|
alternate-normal-background: #000004;
|
||||||
|
alternate-normal-foreground: #F7F8FA;
|
||||||
|
alternate-urgent-background: #000004;
|
||||||
|
alternate-urgent-foreground: #F7F8FA;
|
||||||
|
|
||||||
|
selected-active-background: #333A47;
|
||||||
|
selected-active-foreground: #F7F8FA;
|
||||||
|
selected-normal-background: #EBEDF0;
|
||||||
|
selected-normal-foreground: #F7F8FA;
|
||||||
|
selected-urgent-background: #C0827F;
|
||||||
|
selected-urgent-foreground: #F7F8FA;
|
||||||
|
|
||||||
|
background-color: #000004;
|
||||||
|
background: rgba(0,0,0,0.7);
|
||||||
|
foreground: #EBEDF0;
|
||||||
|
border-color: #333A47;
|
||||||
|
}
|
||||||
92
hypr/.config/swaync/config.json
Normal file
|
|
@ -0,0 +1,92 @@
|
||||||
|
{
|
||||||
|
"$schema": "/etc/xdg/swaync/configSchema.json",
|
||||||
|
"positionX": "center",
|
||||||
|
"positionY": "top",
|
||||||
|
"layer": "overlay",
|
||||||
|
"control-center-layer": "top",
|
||||||
|
"layer-shell": true,
|
||||||
|
"cssPriority": "application",
|
||||||
|
"control-center-margin-top": 5,
|
||||||
|
"control-center-margin-bottom": 0,
|
||||||
|
"control-center-margin-right": 0,
|
||||||
|
"control-center-margin-left": 0,
|
||||||
|
"notification-2fa-action": true,
|
||||||
|
"notification-inline-replies": false,
|
||||||
|
"notification-icon-size": 24,
|
||||||
|
"notification-body-image-height": 100,
|
||||||
|
"notification-body-image-width": 200,
|
||||||
|
"timeout": 6,
|
||||||
|
"timeout-low": 3,
|
||||||
|
"timeout-critical": 0,
|
||||||
|
"fit-to-screen": false,
|
||||||
|
"control-center-width": 400,
|
||||||
|
"control-center-height": 720,
|
||||||
|
"notification-window-width": 400,
|
||||||
|
"keyboard-shortcuts": true,
|
||||||
|
"image-visibility": "when available",
|
||||||
|
"transition-time": 200,
|
||||||
|
"hide-on-clear": false,
|
||||||
|
"hide-on-action": true,
|
||||||
|
"script-fail-notify": true,
|
||||||
|
"widgets": [
|
||||||
|
"dnd",
|
||||||
|
"buttons-grid",
|
||||||
|
"mpris",
|
||||||
|
"volume",
|
||||||
|
"backlight",
|
||||||
|
"title",
|
||||||
|
"notifications"
|
||||||
|
],
|
||||||
|
"widget-config": {
|
||||||
|
"title": {
|
||||||
|
"text": "Notifications",
|
||||||
|
"clear-all-button": true,
|
||||||
|
"button-text": "Clear"
|
||||||
|
},
|
||||||
|
"dnd": {
|
||||||
|
"text": "Do Not Disturb"
|
||||||
|
},
|
||||||
|
"label": {
|
||||||
|
"max-lines": 1,
|
||||||
|
"text": "Notification"
|
||||||
|
},
|
||||||
|
"mpris": {
|
||||||
|
"image-size": 10,
|
||||||
|
"image-radius": 0
|
||||||
|
},
|
||||||
|
"volume": {
|
||||||
|
"label": ""
|
||||||
|
},
|
||||||
|
"backlight": {
|
||||||
|
"label": ""
|
||||||
|
},
|
||||||
|
"buttons-grid": {
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"label": "",
|
||||||
|
"command": "bash -c $HOME/.config/hypr/scripts/Wlogout.sh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "",
|
||||||
|
"command": "bash -c $HOME/.config/hypr/scripts/LockScreen.sh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "",
|
||||||
|
"command": "hyprctl dispatch exit"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "",
|
||||||
|
"command": "bash -c $HOME/.config/hypr/scripts/AirplaneMode.sh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "",
|
||||||
|
"command": "pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "",
|
||||||
|
"command": "blueman-manager"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
hypr/.config/swaync/icons/backup.png
Executable file
|
After Width: | Height: | Size: 19 KiB |
1
hypr/.config/swaync/icons/battery-quarter-solid.svg
Executable file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M0 176c0-44.2 35.8-80 80-80H464c44.2 0 80 35.8 80 80v16c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32v16c0 44.2-35.8 80-80 80H80c-44.2 0-80-35.8-80-80V176zm80-16c-8.8 0-16 7.2-16 16V336c0 8.8 7.2 16 16 16H464c8.8 0 16-7.2 16-16V176c0-8.8-7.2-16-16-16H80zm112 32V320H96V192h96z"/></svg>
|
||||||
|
After Width: | Height: | Size: 523 B |
BIN
hypr/.config/swaync/icons/battery-status.png
Executable file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
hypr/.config/swaync/icons/brightness-100.png
Executable file
|
After Width: | Height: | Size: 32 KiB |
BIN
hypr/.config/swaync/icons/brightness-20.png
Executable file
|
After Width: | Height: | Size: 20 KiB |
BIN
hypr/.config/swaync/icons/brightness-40.png
Executable file
|
After Width: | Height: | Size: 23 KiB |
BIN
hypr/.config/swaync/icons/brightness-60.png
Executable file
|
After Width: | Height: | Size: 28 KiB |
BIN
hypr/.config/swaync/icons/brightness-80.png
Executable file
|
After Width: | Height: | Size: 32 KiB |
BIN
hypr/.config/swaync/icons/dropper.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
hypr/.config/swaync/icons/microphone-mute.png
Executable file
|
After Width: | Height: | Size: 27 KiB |
BIN
hypr/.config/swaync/icons/microphone.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
hypr/.config/swaync/icons/music.png
Executable file
|
After Width: | Height: | Size: 26 KiB |
BIN
hypr/.config/swaync/icons/palette.png
Executable file
|
After Width: | Height: | Size: 34 KiB |
BIN
hypr/.config/swaync/icons/picture.png
Executable file
|
After Width: | Height: | Size: 29 KiB |
BIN
hypr/.config/swaync/icons/timer.png
Executable file
|
After Width: | Height: | Size: 33 KiB |
BIN
hypr/.config/swaync/icons/uptime.png
Executable file
|
After Width: | Height: | Size: 17 KiB |
BIN
hypr/.config/swaync/icons/volume-high.png
Executable file
|
After Width: | Height: | Size: 27 KiB |
BIN
hypr/.config/swaync/icons/volume-low.png
Executable file
|
After Width: | Height: | Size: 22 KiB |
BIN
hypr/.config/swaync/icons/volume-mid.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
hypr/.config/swaync/icons/volume-mute.png
Executable file
|
After Width: | Height: | Size: 23 KiB |
BIN
hypr/.config/swaync/icons/vpn.png
Executable file
|
After Width: | Height: | Size: 42 KiB |
BIN
hypr/.config/swaync/images/bell.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
350
hypr/.config/swaync/style.css
Normal file
|
|
@ -0,0 +1,350 @@
|
||||||
|
/* ----------- 💫 https://github.com/JaKooLit 💫 -------- */
|
||||||
|
/* swaync colors - wallust from waybar.css */
|
||||||
|
|
||||||
|
@import '../../.config/waybar/wallust/colors-waybar.css';
|
||||||
|
|
||||||
|
@define-color noti-border-color @color12;
|
||||||
|
@define-color noti-bg rgba(0, 0, 0, 0.8);
|
||||||
|
@define-color noti-bg-alt #111111;
|
||||||
|
@define-color noti-bg-hover @color9;
|
||||||
|
@define-color text-color @foreground;
|
||||||
|
@define-color text-color-alt @foreground;
|
||||||
|
@define-color text-color-disabled rgba(150, 150, 150, 0.8);
|
||||||
|
* {
|
||||||
|
font-family: "JetBrains Mono Nerd Font";
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-center .notification-row:focus,
|
||||||
|
.control-center .notification-row:hover {
|
||||||
|
opacity: 1;
|
||||||
|
background: @noti-bg;
|
||||||
|
border-radius: 10px
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row {
|
||||||
|
outline: none;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification {
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-content{
|
||||||
|
color: @text-color;
|
||||||
|
background: @noti-bg;
|
||||||
|
padding: 3px 10px 3px 6px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid @noti-border-color;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-default-action {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-button {
|
||||||
|
background: #f7768e;
|
||||||
|
color: @noti-bg;
|
||||||
|
text-shadow: none;
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-button:hover {
|
||||||
|
box-shadow: none;
|
||||||
|
background: #f7768e;
|
||||||
|
transition: all .15s ease-in-out;
|
||||||
|
border: none
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.notification-action {
|
||||||
|
border: 1px solid @noti-border-color;
|
||||||
|
border-top: none;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.notification-default-action:hover,
|
||||||
|
.notification-action:hover {
|
||||||
|
color: @text-color;
|
||||||
|
background: @color1
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-default-action {
|
||||||
|
border-radius: 10px;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-default-action:not(:only-child) {
|
||||||
|
border-bottom-left-radius: 7px;
|
||||||
|
border-bottom-right-radius: 7px
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-action:first-child {
|
||||||
|
border-bottom-left-radius: 10px;
|
||||||
|
background: @noti-bg
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-action:last-child {
|
||||||
|
border-bottom-right-radius: 10px;
|
||||||
|
background: @noti-bg-alt
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-reply {
|
||||||
|
margin-top: 8px
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-reply-entry {
|
||||||
|
background: @noti-bg;
|
||||||
|
color: @text-color;
|
||||||
|
caret-color: @text-color;
|
||||||
|
border: 1px solid @noti-border-color;
|
||||||
|
border-radius: 10px
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-reply-button {
|
||||||
|
font-size: 0.5rem;
|
||||||
|
margin-left: 4px;
|
||||||
|
background: @noti-bg;
|
||||||
|
border: 1px solid @noti-border-color;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: @text-color
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-reply-button:disabled {
|
||||||
|
background: initial;
|
||||||
|
color: @text-color-disabled;
|
||||||
|
border: 1px solid transparent
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-reply-button:hover {
|
||||||
|
background: @noti-bg-hover
|
||||||
|
}
|
||||||
|
|
||||||
|
.body-image {
|
||||||
|
margin-top: 6px;
|
||||||
|
color: @text-color-alt;
|
||||||
|
border-radius: 10px
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: bold;
|
||||||
|
background: transparent;
|
||||||
|
color: @text-color-alt;
|
||||||
|
text-shadow: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: bold;
|
||||||
|
background: transparent;
|
||||||
|
color: @text-color;
|
||||||
|
text-shadow: none;
|
||||||
|
margin-right: 18px
|
||||||
|
}
|
||||||
|
|
||||||
|
.body {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: bold;
|
||||||
|
background: transparent;
|
||||||
|
color: @text-color;
|
||||||
|
text-shadow: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-center {
|
||||||
|
background: @noti-bg;
|
||||||
|
border: 1.5px solid @noti-border-color;
|
||||||
|
color: @text-color;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-center-list {
|
||||||
|
background: transparent
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-center-list-placeholder {
|
||||||
|
opacity: 0.5
|
||||||
|
}
|
||||||
|
|
||||||
|
.floating-notifications {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blank-window {
|
||||||
|
background: alpha(black, 0.1)
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-title {
|
||||||
|
color: @noti-border-color;
|
||||||
|
background: @noti-bg-alt;
|
||||||
|
padding: 3px 6px;
|
||||||
|
margin: 5px;
|
||||||
|
font-size: 1rem;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-title>button {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
color: @text-color;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: transparent;
|
||||||
|
border: 0.5px solid @noti-border-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-title>button:hover {
|
||||||
|
background: #f7768e;
|
||||||
|
color: @noti-border-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-dnd {
|
||||||
|
background: @noti-bg-alt;
|
||||||
|
padding: 3px 6px;
|
||||||
|
margin: 5px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 1rem;
|
||||||
|
color: @noti-border-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-dnd>switch {
|
||||||
|
border-radius: 10px;
|
||||||
|
/* border: 1px solid #7aa2f7; */
|
||||||
|
background: @noti-border-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-dnd>switch:checked {
|
||||||
|
background: #f7768e;
|
||||||
|
border: 1px solid #f7768e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-dnd>switch slider {
|
||||||
|
background: @noti-bg;
|
||||||
|
border-radius: 10px
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-dnd>switch:checked slider {
|
||||||
|
background: @noti-bg;
|
||||||
|
border-radius: 10px
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-label {
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-label>label {
|
||||||
|
font-size: 1rem;
|
||||||
|
color: @text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris {
|
||||||
|
color: @text-color;
|
||||||
|
background: @noti-bg-alt;
|
||||||
|
padding: 3px 6px;
|
||||||
|
margin: 5px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris > box > button {
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris-player {
|
||||||
|
padding: 3px 6px;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris-title {
|
||||||
|
font-weight: 100;
|
||||||
|
font-size: 1rem
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris-subtitle {
|
||||||
|
font-size: 0.75rem
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-buttons-grid {
|
||||||
|
font-size: large;
|
||||||
|
color: @noti-border-color;
|
||||||
|
padding: 2px;
|
||||||
|
margin: 5px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: @noti-bg-alt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-buttons-grid>flowbox>flowboxchild>button {
|
||||||
|
margin: 1px;
|
||||||
|
background: @noti-bg;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: @text-color
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-buttons-grid>flowbox>flowboxchild>button:hover {
|
||||||
|
background: @noti-border-color;
|
||||||
|
color: @noti-bg-hover
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-menubar>box>.menu-button-bar>button {
|
||||||
|
border: none;
|
||||||
|
background: transparent
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar-buttons>button {
|
||||||
|
border: none;
|
||||||
|
background: transparent
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-volume {
|
||||||
|
background: @noti-bg-alt;
|
||||||
|
padding: 2px;
|
||||||
|
margin: 10px 10px 5px 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: x-large;
|
||||||
|
color: @text-color
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-volume>box>button {
|
||||||
|
background: @noti-border-color;
|
||||||
|
border: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.per-app-volume {
|
||||||
|
background-color: @noti-bg;
|
||||||
|
padding: 4px 8px 8px;
|
||||||
|
margin: 0 8px 8px;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: @text-color
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-backlight {
|
||||||
|
background: @noti-bg-alt;
|
||||||
|
padding: 5px;
|
||||||
|
margin: 10px 10px 5px 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: x-large;
|
||||||
|
color: @text-color
|
||||||
|
}
|
||||||
|
|
||||||
|
.low {
|
||||||
|
background: @text-color;
|
||||||
|
padding: 0px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.normal {
|
||||||
|
background: @text-color;
|
||||||
|
padding: 0px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.critical {
|
||||||
|
background: red;
|
||||||
|
padding: 0px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
21
hypr/.config/wallust/templates/colors-hyprland.conf
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */
|
||||||
|
# /* wallust template - colors-hyprland */
|
||||||
|
|
||||||
|
$background = rgb({{background | strip}})
|
||||||
|
$foreground = rgb({{foreground | strip}})
|
||||||
|
$color0 = rgb({{color0 | strip}})
|
||||||
|
$color1 = rgb({{color1 | strip}})
|
||||||
|
$color2 = rgb({{color2 | strip}})
|
||||||
|
$color3 = rgb({{color3 | strip}})
|
||||||
|
$color4 = rgb({{color4 | strip}})
|
||||||
|
$color5 = rgb({{color5 | strip}})
|
||||||
|
$color6 = rgb({{color6 | strip}})
|
||||||
|
$color7 = rgb({{color7 | strip}})
|
||||||
|
$color8 = rgb({{color8 | strip}})
|
||||||
|
$color9 = rgb({{color9 | strip}})
|
||||||
|
$color10 = rgb({{color10 | strip}})
|
||||||
|
$color11 = rgb({{color11 | strip}})
|
||||||
|
$color12 = rgb({{color12 | strip}})
|
||||||
|
$color13 = rgb({{color13 | strip}})
|
||||||
|
$color14 = rgb({{color14 | strip}})
|
||||||
|
$color15 = rgb({{color15 | strip}})
|
||||||
32
hypr/.config/wallust/templates/colors-kitty.conf
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
|
||||||
|
# /* wallust template - colors-kitty */
|
||||||
|
|
||||||
|
foreground {{foreground}}
|
||||||
|
background {{background}}
|
||||||
|
cursor {{cursor}}
|
||||||
|
|
||||||
|
active_tab_foreground {{background}}
|
||||||
|
active_tab_background {{foreground}}
|
||||||
|
inactive_tab_foreground {{foreground}}
|
||||||
|
inactive_tab_background {{background}}
|
||||||
|
|
||||||
|
active_border_color {{foreground}}
|
||||||
|
inactive_border_color {{background}}
|
||||||
|
bell_border_color {{color1}}
|
||||||
|
|
||||||
|
color0 {{color0}}
|
||||||
|
color1 {{color1}}
|
||||||
|
color2 {{color2}}
|
||||||
|
color3 {{color3}}
|
||||||
|
color4 {{color4}}
|
||||||
|
color5 {{color5}}
|
||||||
|
color6 {{color6}}
|
||||||
|
color7 {{color7}}
|
||||||
|
color8 {{color8}}
|
||||||
|
color9 {{color9}}
|
||||||
|
color10 {{color10}}
|
||||||
|
color11 {{color11}}
|
||||||
|
color12 {{color12}}
|
||||||
|
color13 {{color13}}
|
||||||
|
color14 {{color14}}
|
||||||
|
color15 {{color15}}
|
||||||
30
hypr/.config/wallust/templates/colors-rofi.rasi
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
/* ---- 💫 https://github.com/JaKooLit 💫 ---- */
|
||||||
|
/* wallust template - colors-rofi */
|
||||||
|
|
||||||
|
* {
|
||||||
|
active-background: {{color9}};
|
||||||
|
active-foreground: {{foreground}};
|
||||||
|
normal-background: {{background}};
|
||||||
|
normal-foreground: {{foreground}};
|
||||||
|
urgent-background: {{color12}};
|
||||||
|
urgent-foreground: {{foreground}};
|
||||||
|
|
||||||
|
alternate-active-background: {{color5}};
|
||||||
|
alternate-active-foreground: {{foreground}};
|
||||||
|
alternate-normal-background: {{background}};
|
||||||
|
alternate-normal-foreground: {{foreground}};
|
||||||
|
alternate-urgent-background: {{background}};
|
||||||
|
alternate-urgent-foreground: {{foreground}};
|
||||||
|
|
||||||
|
selected-active-background: {{color9}};
|
||||||
|
selected-active-foreground: {{foreground}};
|
||||||
|
selected-normal-background: {{color7}};
|
||||||
|
selected-normal-foreground: {{foreground}};
|
||||||
|
selected-urgent-background: {{color12}};
|
||||||
|
selected-urgent-foreground: {{foreground}};
|
||||||
|
|
||||||
|
background-color: {{background}};
|
||||||
|
background: rgba(0,0,0,0.7);
|
||||||
|
foreground: {{color15}};
|
||||||
|
border-color: {{color9}};
|
||||||
|
}
|
||||||
23
hypr/.config/wallust/templates/colors-waybar.css
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
/* ---- 💫 https://github.com/JaKooLit 💫 ---- */
|
||||||
|
/* wallust template - colors-waybar */
|
||||||
|
|
||||||
|
@define-color foreground {{foreground}};
|
||||||
|
@define-color background rgba({{background | rgb}},0.25);
|
||||||
|
@define-color cursor {{cursor}};
|
||||||
|
|
||||||
|
@define-color color0 {{color0}};
|
||||||
|
@define-color color1 {{color1}};
|
||||||
|
@define-color color2 {{color2}};
|
||||||
|
@define-color color3 {{color3}};
|
||||||
|
@define-color color4 {{color4}};
|
||||||
|
@define-color color5 {{color5}};
|
||||||
|
@define-color color6 {{color6}};
|
||||||
|
@define-color color7 {{color7}};
|
||||||
|
@define-color color8 {{color8}};
|
||||||
|
@define-color color9 {{color9}};
|
||||||
|
@define-color color10 {{color10}};
|
||||||
|
@define-color color11 {{color11}};
|
||||||
|
@define-color color12 {{color12}};
|
||||||
|
@define-color color13 {{color13}};
|
||||||
|
@define-color color14 {{color14}};
|
||||||
|
@define-color color15 {{color15}};
|
||||||
36
hypr/.config/wallust/wallust.toml
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
# How the image is parse, in order to get the colors:
|
||||||
|
# full - resized - wal - thumb - fastresize - kmeans
|
||||||
|
backend = "kmeans"
|
||||||
|
|
||||||
|
# What color space to use to produce and select the most prominent colors:
|
||||||
|
# lab - labmixed - lch - lchmixed
|
||||||
|
color_space = "labmixed"
|
||||||
|
|
||||||
|
# Use the most prominent colors in a way that makes sense, a scheme color palette:
|
||||||
|
# dark - dark16 - darkcomp - darkcomp16
|
||||||
|
# light - light16 - lightcomp - lightcomp16
|
||||||
|
# harddark - harddark16 - harddarkcomp - harddarkcomp16
|
||||||
|
# softdark - softdark16 - softdarkcomp - softdarkcomp16
|
||||||
|
# softlight - softlight16 - softlightcomp - softlightcomp16
|
||||||
|
palette = "dark16"
|
||||||
|
|
||||||
|
# Difference between similar colors, used by the colorspace:
|
||||||
|
# 1 Not perceptible by human eyes.
|
||||||
|
# 1 - 2 Perceptible through close observation.
|
||||||
|
# 2 - 10 Perceptible at a glance.
|
||||||
|
# 11 - 49 Colors are more similar than opposite
|
||||||
|
# 100 Colors are exact opposite
|
||||||
|
threshold = 11
|
||||||
|
|
||||||
|
[templates]
|
||||||
|
hypr.template = 'colors-hyprland.conf'
|
||||||
|
hypr.target = '~/.config/hypr/wallust/wallust-hyprland.conf'
|
||||||
|
|
||||||
|
rofi.template = 'colors-rofi.rasi'
|
||||||
|
rofi.target = '~/.config/rofi/wallust/colors-rofi.rasi'
|
||||||
|
|
||||||
|
waybar.template = 'colors-waybar.css'
|
||||||
|
waybar.target = '~/.config/waybar/wallust/colors-waybar.css'
|
||||||
|
|
||||||
|
kitty.template = 'colors-kitty.conf'
|
||||||
|
kitty.target = '~/.config/kitty/kitty-colors.conf'
|
||||||
23
hypr/.config/waybar/wallust/colors-waybar.css
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
/* ---- 💫 https://github.com/JaKooLit 💫 ---- */
|
||||||
|
/* wallust template - colors-waybar */
|
||||||
|
|
||||||
|
@define-color foreground #F7F8FA;
|
||||||
|
@define-color background rgba(0,0,4,0.25);
|
||||||
|
@define-color cursor #F7F8FA;
|
||||||
|
|
||||||
|
@define-color color0 #000004;
|
||||||
|
@define-color color1 #262B35;
|
||||||
|
@define-color color2 #3F5266;
|
||||||
|
@define-color color3 #506C87;
|
||||||
|
@define-color color4 #90625F;
|
||||||
|
@define-color color5 #B09868;
|
||||||
|
@define-color color6 #AEB1B5;
|
||||||
|
@define-color color7 #EBEDF0;
|
||||||
|
@define-color color8 #A5A6A8;
|
||||||
|
@define-color color9 #333A47;
|
||||||
|
@define-color color10 #546E88;
|
||||||
|
@define-color color11 #6A90B4;
|
||||||
|
@define-color color12 #C0827F;
|
||||||
|
@define-color color13 #EBCB8B;
|
||||||
|
@define-color color14 #E8EBF2;
|
||||||
|
@define-color color15 #EBEDF0;
|
||||||
BIN
hypr/.config/wlogout/icons/hibernate-hover.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
hypr/.config/wlogout/icons/hibernate.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
hypr/.config/wlogout/icons/lock-hover.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
hypr/.config/wlogout/icons/lock.png
Executable file
|
After Width: | Height: | Size: 19 KiB |
BIN
hypr/.config/wlogout/icons/logout-hover.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
hypr/.config/wlogout/icons/logout.png
Executable file
|
After Width: | Height: | Size: 21 KiB |
BIN
hypr/.config/wlogout/icons/moon_865813.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
hypr/.config/wlogout/icons/power-hover.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
hypr/.config/wlogout/icons/power.png
Executable file
|
After Width: | Height: | Size: 59 KiB |
BIN
hypr/.config/wlogout/icons/restart-hover.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
hypr/.config/wlogout/icons/restart.png
Executable file
|
After Width: | Height: | Size: 50 KiB |
BIN
hypr/.config/wlogout/icons/sleep-hover.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
hypr/.config/wlogout/icons/sleep.png
Executable file
|
After Width: | Height: | Size: 25 KiB |
|
|
@ -1,37 +1,36 @@
|
||||||
{
|
|
||||||
"label" : "exit",
|
|
||||||
"action" : "",
|
|
||||||
"text" : "Exit",
|
|
||||||
"keybind" : "h"
|
|
||||||
}
|
|
||||||
{
|
|
||||||
"label" : "shutdown",
|
|
||||||
"action" : "systemctl poweroff",
|
|
||||||
"text" : "Shutdown",
|
|
||||||
"keybind" : "s"
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
"label" : "suspend",
|
|
||||||
"action" : "systemctl suspend-then-hibernate",
|
|
||||||
"text" : "Suspend",
|
|
||||||
"keybind" : "u"
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
"label" : "lock",
|
"label" : "lock",
|
||||||
"action" : "hyprlock",
|
"action" : "$HOME/.config/hypr/scripts/LockScreen.sh",
|
||||||
"text" : "Lock",
|
"text" : "Lock",
|
||||||
"keybind" : "l"
|
"keybind" : "l"
|
||||||
}
|
}
|
||||||
{
|
|
||||||
"label" : "logout",
|
|
||||||
"action" : "hyprctl dispatch exit",
|
|
||||||
"text" : "Logout",
|
|
||||||
"keybind" : "e"
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
"label" : "reboot",
|
"label" : "reboot",
|
||||||
"action" : "systemctl reboot",
|
"action" : "systemctl reboot",
|
||||||
"text" : "Reboot",
|
"text" : "Reboot",
|
||||||
"keybind" : "r"
|
"keybind" : "r"
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
"label" : "shutdown",
|
||||||
|
"action" : "systemctl poweroff",
|
||||||
|
"text" : "Shutdown",
|
||||||
|
"keybind" : "s"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "logout",
|
||||||
|
"action" : "loginctl kill-session $XDG_SESSION_ID",
|
||||||
|
"text" : "Logout",
|
||||||
|
"keybind" : "e"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "suspend",
|
||||||
|
"action" : "systemctl suspend",
|
||||||
|
"text" : "Suspend",
|
||||||
|
"keybind" : "u"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "hibernate",
|
||||||
|
"action" : "systemctl hibernate",
|
||||||
|
"text" : "Hibernate",
|
||||||
|
"keybind" : "h"
|
||||||
|
}
|
||||||
|
|
|
||||||
37
hypr/.config/wlogout/layout.bak
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
"label" : "exit",
|
||||||
|
"action" : "",
|
||||||
|
"text" : "Exit",
|
||||||
|
"keybind" : "h"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "shutdown",
|
||||||
|
"action" : "systemctl poweroff",
|
||||||
|
"text" : "Shutdown",
|
||||||
|
"keybind" : "s"
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
"label" : "suspend",
|
||||||
|
"action" : "systemctl suspend-then-hibernate",
|
||||||
|
"text" : "Suspend",
|
||||||
|
"keybind" : "u"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "lock",
|
||||||
|
"action" : "hyprlock",
|
||||||
|
"text" : "Lock",
|
||||||
|
"keybind" : "l"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "logout",
|
||||||
|
"action" : "hyprctl dispatch exit",
|
||||||
|
"text" : "Logout",
|
||||||
|
"keybind" : "e"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "reboot",
|
||||||
|
"action" : "systemctl reboot",
|
||||||
|
"text" : "Reboot",
|
||||||
|
"keybind" : "r"
|
||||||
|
}
|
||||||
|
|
@ -1,88 +1,86 @@
|
||||||
* {
|
/* ----------- 💫 https://github.com/JaKooLit 💫 -------- */
|
||||||
font-family: JetBrains Mono, Symbols Nerd Font;
|
/* wallust-wlogout */
|
||||||
font-size: 24px;
|
|
||||||
transition-property: background-color;
|
/* Importing wallust colors */
|
||||||
transition-duration: 0.7s;
|
@import '../../.config/waybar/wallust/colors-waybar.css';
|
||||||
}
|
|
||||||
|
|
||||||
window {
|
window {
|
||||||
background-color: #11111b;
|
font-family: Fira Code Medium;
|
||||||
/* border-radius: 10px; */
|
font-size: 16pt;
|
||||||
|
color: #cdd6f4; /* text */
|
||||||
|
background-color: rgba(30, 30, 46, 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
background-color: #11111b;
|
|
||||||
border-style: solid;
|
|
||||||
/* border-width: 2px; */
|
|
||||||
border-radius: 50px;
|
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: 15%;
|
background-size: 20%;
|
||||||
margin: 15px;
|
background-color: rgba(200, 220, 255, 0);
|
||||||
}
|
animation: gradient_f 20s ease-in infinite;
|
||||||
|
border-radius: 80px; /* Increased border radius for a more rounded look */
|
||||||
button:active,
|
|
||||||
button:hover {
|
|
||||||
background-color: #cdd6f4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button:focus {
|
button:focus {
|
||||||
background-color: #cdd6f4;
|
background-size: 25%;
|
||||||
|
border: 0px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background-color: @color12;
|
||||||
|
color: #1e1e2e;
|
||||||
|
background-size: 50%;
|
||||||
|
margin: 30px;
|
||||||
|
border-radius: 80px;
|
||||||
|
transition: all 0.3s cubic-bezier(.55, 0.0, .28, 1.682), box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
|
||||||
|
box-shadow: 0 0 50px @color7;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Adjust the size of the icon or content inside the button */
|
||||||
|
button span {
|
||||||
|
font-size: 1.2em; /* Increase the font size */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#lock {
|
#lock {
|
||||||
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/lock.png"), url("/usr/share/wlogout/icons/lock.png"));
|
background-image: image(url("./icons/lock.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#lock:hover {
|
#lock:hover {
|
||||||
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/lock-hover.png"), url("/usr/share/wlogout/icons/lock.png"));
|
background-image: image(url("./icons/lock-hover.png"));
|
||||||
color: #11111b;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#logout {
|
#logout {
|
||||||
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/logout.png"), url("/usr/share/wlogout/icons/logout.png"));
|
background-image: image(url("./icons/logout.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#logout:hover {
|
#logout:hover {
|
||||||
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/logout-hover.png"), url("/usr/share/wlogout/icons/logout.png"));
|
background-image: image(url("./icons/logout-hover.png"));
|
||||||
color: #11111b;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#suspend {
|
#suspend {
|
||||||
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/sleep.png"), url("/usr/share/wlogout/icons/suspend.png"));
|
background-image: image(url("./icons/sleep.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#suspend:hover {
|
#suspend:hover {
|
||||||
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/sleep-hover.png"), url("/usr/share/wlogout/icons/suspend.png"));
|
background-image: image(url("./icons/sleep-hover.png"));
|
||||||
color: #11111b;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#shutdown {
|
#shutdown {
|
||||||
background-image: image(url("/home/mfortin/.config/assets/logout/assets/power.png"), url("/usr/share/wlogout/icons/shutdown.png"));
|
background-image: image(url("./icons/power.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#shutdown:hover {
|
#shutdown:hover {
|
||||||
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/power-hover.png"), url("/usr/share/wlogout/icons/shutdown.png"));
|
background-image: image(url("./icons/power-hover.png"));
|
||||||
color: #11111b;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#reboot {
|
#reboot {
|
||||||
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/restart.png"), url("/usr/share/wlogout/icons/reboot.png"));
|
background-image: image(url("./icons/restart.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#reboot:hover {
|
#reboot:hover {
|
||||||
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/restart-hover.png"), url("/usr/share/wlogout/icons/reboot.png"));
|
background-image: image(url("./icons/restart-hover.png"));
|
||||||
color: #11111b;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#exit {
|
#hibernate {
|
||||||
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/restart.png"), url("/usr/share/wlogout/icons/reboot.png"));
|
background-image: image(url("./icons/hibernate.png"));
|
||||||
background-color: #11111b;
|
}
|
||||||
|
#hibernate:hover {
|
||||||
|
background-image: image(url("./icons/hibernate-hover.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#exit:hover {
|
|
||||||
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/restart-hover.png"), url("/usr/share/wlogout/icons/reboot.png"));
|
|
||||||
color: #11111b;
|
|
||||||
background-color: #cdd6f4;
|
|
||||||
}
|
|
||||||
88
hypr/.config/wlogout/style.css.bak
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
* {
|
||||||
|
font-family: JetBrains Mono, Symbols Nerd Font;
|
||||||
|
font-size: 24px;
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-duration: 0.7s;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
background-color: #11111b;
|
||||||
|
/* border-radius: 10px; */
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
background-color: #11111b;
|
||||||
|
border-style: solid;
|
||||||
|
/* border-width: 2px; */
|
||||||
|
border-radius: 50px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-size: 15%;
|
||||||
|
margin: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:active,
|
||||||
|
button:hover {
|
||||||
|
background-color: #cdd6f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:focus {
|
||||||
|
background-color: #cdd6f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
#lock {
|
||||||
|
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/lock.png"), url("/usr/share/wlogout/icons/lock.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#lock:hover {
|
||||||
|
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/lock-hover.png"), url("/usr/share/wlogout/icons/lock.png"));
|
||||||
|
color: #11111b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#logout {
|
||||||
|
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/logout.png"), url("/usr/share/wlogout/icons/logout.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#logout:hover {
|
||||||
|
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/logout-hover.png"), url("/usr/share/wlogout/icons/logout.png"));
|
||||||
|
color: #11111b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#suspend {
|
||||||
|
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/sleep.png"), url("/usr/share/wlogout/icons/suspend.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#suspend:hover {
|
||||||
|
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/sleep-hover.png"), url("/usr/share/wlogout/icons/suspend.png"));
|
||||||
|
color: #11111b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#shutdown {
|
||||||
|
background-image: image(url("/home/mfortin/.config/assets/logout/assets/power.png"), url("/usr/share/wlogout/icons/shutdown.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#shutdown:hover {
|
||||||
|
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/power-hover.png"), url("/usr/share/wlogout/icons/shutdown.png"));
|
||||||
|
color: #11111b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#reboot {
|
||||||
|
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/restart.png"), url("/usr/share/wlogout/icons/reboot.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#reboot:hover {
|
||||||
|
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/restart-hover.png"), url("/usr/share/wlogout/icons/reboot.png"));
|
||||||
|
color: #11111b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#exit {
|
||||||
|
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/restart.png"), url("/usr/share/wlogout/icons/reboot.png"));
|
||||||
|
background-color: #11111b;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#exit:hover {
|
||||||
|
background-image: image(url("/home/mfortin/.config/assets/wlogout/assets/restart-hover.png"), url("/usr/share/wlogout/icons/reboot.png"));
|
||||||
|
color: #11111b;
|
||||||
|
background-color: #cdd6f4;
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
[any]
|
[default]
|
||||||
path = "/home/mfortin/.cache/images/wallpaper.png"
|
|
||||||
|
|
||||||
|
[any]
|
||||||
|
path = "$HOME/.cache/images/wallpaper.png"
|
||||||
|
|
||||||
|
#[eDP-1]
|
||||||
|
#path = "$HOME/.cache/images/wallpaper.png"
|
||||||
|
|
|
||||||
32
kitty/.config/kitty/kitty-colors.conf
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
|
||||||
|
# /* wallust template - colors-kitty */
|
||||||
|
|
||||||
|
foreground #F7F8FA
|
||||||
|
background #000004
|
||||||
|
cursor #F7F8FA
|
||||||
|
|
||||||
|
active_tab_foreground #000004
|
||||||
|
active_tab_background #F7F8FA
|
||||||
|
inactive_tab_foreground #F7F8FA
|
||||||
|
inactive_tab_background #000004
|
||||||
|
|
||||||
|
active_border_color #F7F8FA
|
||||||
|
inactive_border_color #000004
|
||||||
|
bell_border_color #262B35
|
||||||
|
|
||||||
|
color0 #000004
|
||||||
|
color1 #262B35
|
||||||
|
color2 #3F5266
|
||||||
|
color3 #506C87
|
||||||
|
color4 #90625F
|
||||||
|
color5 #B09868
|
||||||
|
color6 #AEB1B5
|
||||||
|
color7 #EBEDF0
|
||||||
|
color8 #A5A6A8
|
||||||
|
color9 #333A47
|
||||||
|
color10 #546E88
|
||||||
|
color11 #6A90B4
|
||||||
|
color12 #C0827F
|
||||||
|
color13 #EBCB8B
|
||||||
|
color14 #E8EBF2
|
||||||
|
color15 #EBEDF0
|
||||||