diff --git a/bash/.bashrc b/bash/.bashrc index 51db458..bf31eda 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -1,7 +1,7 @@ #!/bin/bash iatest=$(expr index "$-" i) -[ -f /usr/bin/fastfetch ] && fastfetch +[ -f /usr/bin/fastfetch ] && fastfetch -c ~/.config/fastfetch/config-compact.jsonc [ -f /etc/bashrc ] && . /etc/bashrc [ -f /usr/share/bash-completion/bash-completion ] && . /usr/share/bash-completion/bash-completion [ -f /etc/bash_completion ] && . /etc/bash_completion diff --git a/fastfetch/.config/fastfetch/config-compact.jsonc b/fastfetch/.config/fastfetch/config-compact.jsonc new file mode 100644 index 0000000..f8b1e12 --- /dev/null +++ b/fastfetch/.config/fastfetch/config-compact.jsonc @@ -0,0 +1,72 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "padding": { + "top": 2 + }, + "type": "small" + }, + "display": { + "separator": " -> " + }, + "modules": [ + "break", + { + "type": "title", + "keyWidth": 10, + "format": " {6}{7}{8}" + }, + { + "type": "custom", + "format": " ╭───────────────────────╮" + }, + { + "type": "kernel", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "wm", + "key": " ", + "keyColor": "blue" + }, + { + "type": "shell", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "terminal", + "key": " ", + "keyColor": "blue" + }, + /* + { + "type": "packages", + "key": "󰏖 ", + "keyColor": "yellow" + }, + */ + { + "type": "memory", + "key": "󰍛 ", + "keyColor": "magenta", + // format: used / total + "format": "{1} / {2}" + }, + { + "type": "uptime", + "key": "󰔛 ", + "keyColor": "green" + }, + { + "type": "custom", + "format": " ╰───────────────────────╯" + }, + { + "type": "custom", + "format": " \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m \u001b[90m " + }, + "break", + ] +} diff --git a/fastfetch/.config/fastfetch/config-orignal.jsonc b/fastfetch/.config/fastfetch/config-orignal.jsonc new file mode 100644 index 0000000..0433d6e --- /dev/null +++ b/fastfetch/.config/fastfetch/config-orignal.jsonc @@ -0,0 +1,27 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": "arch_small", + "modules": [ + "title", + "separator", + "os", + "host", + "kernel", + "uptime", + "packages", + "shell", + "display", + "de", + "wm", + "terminal", + "cpu", + "gpu", + "memory", + "swap", + "disk", + "localip", + "poweradapter", + "break", + "colors" + ] +} diff --git a/fastfetch/.config/fastfetch/config-v2.jsonc b/fastfetch/.config/fastfetch/config-v2.jsonc new file mode 100644 index 0000000..cee27fd --- /dev/null +++ b/fastfetch/.config/fastfetch/config-v2.jsonc @@ -0,0 +1,112 @@ +{ +"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", +"logo": { + //"source": "~/.config/fastfetch/nixos.png", + //"type": "kitty-direct", + "height": 15, + "width": 30, + "padding": { + "top": 1 + } + }, +"display": { + "separator": " ➜ " +}, + +"modules": [ + "break", + { + "type": "os", + "key": " DISTRO", + "keyColor": "31", + }, + { + "type": "kernel", + "key": " ├  ", + "keyColor": "31", + }, + { + "type": "packages", + "key": " ├ 󰏖 ", + "keyColor": "31", + }, + { + "type": "shell", + "key": " └  ", + "keyColor": "31", + }, + "break", + { + "type": "wm", + "key": " DE/WM", + "keyColor": "32", + }, + { + "type": "wmtheme", + "key": " ├ 󰉼 ", + "keyColor": "32", + }, + { + "type": "icons", + "key": " ├ 󰀻 ", + "keyColor": "32", + }, + { + "type": "cursor", + "key": " ├  ", + "keyColor": "32", + }, + { + "type": "terminal", + "key": " ├  ", + "keyColor": "32", + }, + { + "type": "terminalfont", + "key": " └  ", + "keyColor": "32", + }, + "break", + { + "type": "host", + "format": "{2}", + "key": "󰌢 SYSTEM", + "keyColor": "33", + }, + { + "type": "cpu", + "format": "{1} ({3}) @ {7} GHz", + "key": " ├  ", + "keyColor": "33", + }, + { + "type": "gpu", + "format": "{2}", + "key": " ├ 󰢮 ", + "keyColor": "33", + }, + { + "type": "memory", + "key": " ├  ", + "keyColor": "33", + }, + { + "type": "swap", + "key": " ├ 󰓡 ", + "keyColor": "33", + }, + { + "type": "disk", + "key": " ├ 󰋊 ", + "keyColor": "33", + }, + { + "type": "display", + "key": " └  ", + "compactType": "original-with-refresh-rate", + "keyColor": "33", + }, + "break", + "break", +] +} diff --git a/fastfetch/.config/fastfetch/config.jsonc b/fastfetch/.config/fastfetch/config.jsonc new file mode 100644 index 0000000..dfbe1c8 --- /dev/null +++ b/fastfetch/.config/fastfetch/config.jsonc @@ -0,0 +1,128 @@ + +{ +"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", +"logo": { +"padding": { +"top": 1 +} +}, +"display": { +"separator": " 󰑃 " +}, +"modules": [ + "break", + { + "type": "os", + "key": " DISTRO", + "keyColor": "yellow" + }, + { + "type": "kernel", + "key": "│ ├", + "keyColor": "yellow" + }, + { + "type": "packages", + "key": "│ ├󰏖", + "keyColor": "yellow" + }, + { + "type": "shell", + "key": "│ └", + "keyColor": "yellow" + }, + { + "type": "wm", + "key": " DE/WM", + "keyColor": "blue" + }, + { + "type": "wmtheme", + "key": "│ ├󰉼", + "keyColor": "blue" + }, + { + "type": "icons", + "key": "│ ├󰀻", + "keyColor": "blue" + }, + { + "type": "cursor", + "key": "│ ├", + "keyColor": "blue", + }, + { + "type": "terminalfont", + "key": "│ ├", + "keyColor": "blue", + }, + { + "type": "terminal", + "key": "│ └", + "keyColor": "blue" + }, + { + "type": "host", + "key": "󰌢 SYSTEM", + "keyColor": "green" + }, + { + "type": "cpu", + "key": "│ ├󰻠", + "keyColor": "green" + }, + { + "type": "gpu", + "key": "│ ├󰻑", + "format": "{2}", + "keyColor": "green" + }, + { + "type": "display", + "key": "│ ├󰍹", + "keyColor": "green", + "compactType": "original-with-refresh-rate" + }, + { + "type": "memory", + "key": "│ ├󰾆", + "keyColor": "green" + }, + { + "type": "swap", + "key": "│ ├󰓡", + "keyColor": "green" + }, + { + "type": "uptime", + "key": "│ ├󰅐", + "keyColor": "green" + }, + { + "type": "display", + "key": "│ └󰍹", + "keyColor": "green" + }, + { + "type": "sound", + "key": " AUDIO", + "format": "{2}", + "keyColor": "magenta" + }, + { + "type": "player", + "key": "│ ├󰥠", + "keyColor": "magenta" + }, + { + "type": "media", + "key": "│ └󰝚", + "keyColor": "magenta" + }, + { + "type": "custom", + "format": "\u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m \u001b[38m \u001b[39m \u001b[39m  \u001b[38m \u001b[37m \u001b[36m \u001b[35m \u001b[34m \u001b[33m \u001b[32m \u001b[31m \u001b[90m " + }, + "break", + ] +} diff --git a/fastfetch/.config/fastfetch/nixos.png b/fastfetch/.config/fastfetch/nixos.png new file mode 100644 index 0000000..11593f6 Binary files /dev/null and b/fastfetch/.config/fastfetch/nixos.png differ diff --git a/hyprland/.config/ags/config.js b/hyprland/.config/ags/config.js new file mode 100644 index 0000000..278bf35 --- /dev/null +++ b/hyprland/.config/ags/config.js @@ -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), +}); + diff --git a/hyprland/.config/ags/modules/.configuration/user_options.js b/hyprland/.config/ags/modules/.configuration/user_options.js new file mode 100644 index 0000000..db19439 --- /dev/null +++ b/hyprland/.config/ags/modules/.configuration/user_options.js @@ -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; \ No newline at end of file diff --git a/hyprland/.config/ags/modules/.miscutils/icons.js b/hyprland/.config/ags/modules/.miscutils/icons.js new file mode 100644 index 0000000..fb1e20d --- /dev/null +++ b/hyprland/.config/ags/modules/.miscutils/icons.js @@ -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; +} \ No newline at end of file diff --git a/hyprland/.config/ags/modules/.miscutils/mathfuncs.js b/hyprland/.config/ags/modules/.miscutils/mathfuncs.js new file mode 100644 index 0000000..ba1c0b5 --- /dev/null +++ b/hyprland/.config/ags/modules/.miscutils/mathfuncs.js @@ -0,0 +1,4 @@ + +export function clamp(x, min, max) { + return Math.min(Math.max(x, min), max); +} \ No newline at end of file diff --git a/hyprland/.config/ags/modules/.miscutils/system.js b/hyprland/.config/ags/modules/.miscutils/system.js new file mode 100644 index 0000000..ef7d15c --- /dev/null +++ b/hyprland/.config/ags/modules/.miscutils/system.js @@ -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'; +} diff --git a/hyprland/.config/ags/modules/.widgethacks/advancedrevealers.js b/hyprland/.config/ags/modules/.widgethacks/advancedrevealers.js new file mode 100644 index 0000000..3f12793 --- /dev/null +++ b/hyprland/.config/ags/modules/.widgethacks/advancedrevealers.js @@ -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; +} diff --git a/hyprland/.config/ags/modules/.widgethacks/popupwindow.js b/hyprland/.config/ags/modules/.widgethacks/popupwindow.js new file mode 100644 index 0000000..26dad59 --- /dev/null +++ b/hyprland/.config/ags/modules/.widgethacks/popupwindow.js @@ -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, + }), + }); +} \ No newline at end of file diff --git a/hyprland/.config/ags/modules/.widgetutils/clickthrough.js b/hyprland/.config/ags/modules/.widgetutils/clickthrough.js new file mode 100644 index 0000000..505f141 --- /dev/null +++ b/hyprland/.config/ags/modules/.widgetutils/clickthrough.js @@ -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); \ No newline at end of file diff --git a/hyprland/.config/ags/modules/.widgetutils/cursorhover.js b/hyprland/.config/ags/modules/.widgetutils/cursorhover.js new file mode 100644 index 0000000..89be913 --- /dev/null +++ b/hyprland/.config/ags/modules/.widgetutils/cursorhover.js @@ -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); + }); +} + diff --git a/hyprland/.config/ags/modules/.widgetutils/keybind.js b/hyprland/.config/ags/modules/.widgetutils/keybind.js new file mode 100644 index 0000000..eda7877 --- /dev/null +++ b/hyprland/.config/ags/modules/.widgetutils/keybind.js @@ -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; +} diff --git a/hyprland/.config/ags/modules/overview/actions.js b/hyprland/.config/ags/modules/overview/actions.js new file mode 100644 index 0000000..766cf45 --- /dev/null +++ b/hyprland/.config/ags/modules/overview/actions.js @@ -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)); +} \ No newline at end of file diff --git a/hyprland/.config/ags/modules/overview/main.js b/hyprland/.config/ags/modules/overview/main.js new file mode 100644 index 0000000..1f5348d --- /dev/null +++ b/hyprland/.config/ags/modules/overview/main.js @@ -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(), + ] + }), +}) diff --git a/hyprland/.config/ags/modules/overview/miscfunctions.js b/hyprland/.config/ags/modules/overview/miscfunctions.js new file mode 100644 index 0000000..187ee6e --- /dev/null +++ b/hyprland/.config/ags/modules/overview/miscfunctions.js @@ -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; +} diff --git a/hyprland/.config/ags/modules/overview/overview_hyprland.js b/hyprland/.config/ags/modules/overview/overview_hyprland.js new file mode 100644 index 0000000..034d6c8 --- /dev/null +++ b/hyprland/.config/ags/modules/overview/overview_hyprland.js @@ -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, + }) + ) + }), + }); +} \ No newline at end of file diff --git a/hyprland/.config/ags/modules/overview/searchbuttons.js b/hyprland/.config/ags/modules/overview/searchbuttons.js new file mode 100644 index 0000000..f5892f3 --- /dev/null +++ b/hyprland/.config/ags/modules/overview/searchbuttons.js @@ -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); + }, +}); \ No newline at end of file diff --git a/hyprland/.config/ags/modules/overview/searchitem.js b/hyprland/.config/ags/modules/overview/searchitem.js new file mode 100644 index 0000000..2a3303a --- /dev/null +++ b/hyprland/.config/ags/modules/overview/searchitem.js @@ -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; + }) + , + }); +} diff --git a/hyprland/.config/ags/modules/overview/windowcontent.js b/hyprland/.config/ags/modules/overview/windowcontent.js new file mode 100644 index 0000000..7a19dd3 --- /dev/null +++ b/hyprland/.config/ags/modules/overview/windowcontent.js @@ -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); + } + } + }) + , + }); +}; diff --git a/hyprland/.config/ags/user/style.css b/hyprland/.config/ags/user/style.css new file mode 100644 index 0000000..49d44ad --- /dev/null +++ b/hyprland/.config/ags/user/style.css @@ -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 */ diff --git a/hyprland/.config/ags/user_options.js b/hyprland/.config/ags/user_options.js new file mode 100644 index 0000000..9105dec --- /dev/null +++ b/hyprland/.config/ags/user_options.js @@ -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; diff --git a/hyprland/.config/ags/variables.js b/hyprland/.config/ags/variables.js new file mode 100644 index 0000000..645a580 --- /dev/null +++ b/hyprland/.config/ags/variables.js @@ -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'; + } +} diff --git a/hyprland/.config/cava/config b/hyprland/.config/cava/config new file mode 100644 index 0000000..a7867c8 --- /dev/null +++ b/hyprland/.config/cava/config @@ -0,0 +1,292 @@ +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# /* wallust template - colors-cava */ + +## Configuration file for CAVA. +# Remove the ; to change parameters. + +[general] + +# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0 +; mode = normal + +# Accepts only non-negative values. +; framerate = 60 + +# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off +# new as of 0.6.0 autosens of low values (dynamic range) +# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0 +; autosens = 1 +; overshoot = 20 + +# Manual sensitivity in %. If autosens is enabled, this will only be the initial value. +# 200 means double height. Accepts only non-negative values. +; sensitivity = 100 + +# The number of bars (0-512). 0 sets it to auto (fill up console). +# Bars' width and space between bars in number of characters. +; bars = 0 +; bar_width = 2 +; bar_spacing = 1 +# bar_height is only used for output in "noritake" format +; bar_height = 32 + +# For SDL width and space between bars is in pixels, defaults are: +; bar_width = 20 +; bar_spacing = 5 + +# sdl_glsl have these default values, they are only used to calulate max number of bars. +; bar_width = 1 +; bar_spacing = 0 + + +# Lower and higher cutoff frequencies for lowest and highest bars +# the bandwidth of the visualizer. +# Note: there is a minimum total bandwidth of 43Mhz x number of bars. +# Cava will automatically increase the higher cutoff if a too low band is specified. +; lower_cutoff_freq = 50 +; higher_cutoff_freq = 10000 + + +# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and +# only check for input once per second. Cava will wake up once input is detected. 0 = disable. +; sleep_timer = 0 + + +[input] + +# Audio capturing method. Possible methods are: 'fifo', 'portaudio', 'pipewire', 'alsa', 'pulse', 'sndio', 'oss', 'jack' or 'shmem' +# Defaults to 'oss', 'pipewire', 'sndio', 'jack', 'pulse', 'alsa', 'portaudio' or 'fifo', in that order, dependent on what support cava was built with. +# On Mac it defaults to 'portaudio' or 'fifo' +# On windows this is automatic and no input settings are needed. +# +# All input methods uses the same config variable 'source' +# to define where it should get the audio. +# +# For pulseaudio and pipewire 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink +# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them). +# +# For pipewire 'source' will be the object name or object.serial of the device to capture from. +# Both input and output devices are supported. +# +# For alsa 'source' will be the capture device. +# For fifo 'source' will be the path to fifo-file. +# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address +# +# For sndio 'source' will be a raw recording audio descriptor or a monitoring sub-device, e.g. 'rsnd/2' or 'snd/1'. Default: 'default'. +# README.md contains further information on how to setup CAVA for sndio. +# +# For oss 'source' will be the path to a audio device, e.g. '/dev/dsp2'. Default: '/dev/dsp', i.e. the default audio device. +# README.md contains further information on how to setup CAVA for OSS on FreeBSD. +# +# For jack 'source' will be the name of the JACK server to connect to, e.g. 'foobar'. Default: 'default'. +# README.md contains further information on how to setup CAVA for JACK. +# + method = pulse + source = auto + + method = pipewire + source = auto + +; method = alsa +; source = hw:Loopback,1 + +; method = fifo +; source = /tmp/mpd.fifo + +; method = shmem +; source = /squeezelite-AA:BB:CC:DD:EE:FF + +; method = portaudio +; source = auto + +; method = sndio +; source = default + +; method = oss +; source = /dev/dsp + +; method = jack +; source = default + +# The options 'sample_rate', 'sample_bits', 'channels' and 'autoconnect' can be configured for some input methods: +# sample_rate: fifo, pipewire, sndio, oss +# sample_bits: fifo, pipewire, sndio, oss +# channels: sndio, oss, jack +# autoconnect: jack +# Other methods ignore these settings. +# +# For 'sndio' and 'oss' they are only preferred values, i.e. if the values are not supported +# by the chosen audio device, the device will use other supported values instead. +# Example: 48000, 32 and 2, but the device only supports 44100, 16 and 1, then it +# will use 44100, 16 and 1. +# +; sample_rate = 44100 +; sample_bits = 16 +; channels = 2 +; autoconnect = 2 + + +[output] + +# Output method. Can be 'ncurses', 'noncurses', 'raw', 'noritake', 'sdl' +# or 'sdl_glsl'. +# 'noncurses' (default) uses a buffer and cursor movements to only print +# changes from frame to frame in the terminal. Uses less resources and is less +# prone to tearing (vsync issues) than 'ncurses'. +# +# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data +# stream of the bar heights that can be used to send to other applications. +# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above. +# +# 'noritake' outputs a bitmap in the format expected by a Noritake VFD display +# in graphic mode. It only support the 3000 series graphical VFDs for now. +# +# 'sdl' uses the Simple DirectMedia Layer to render in a graphical context. +# 'sdl_glsl' uses SDL to create an OpenGL context. Write your own shaders or +# use one of the predefined ones. +; method = noncurses + +# Orientation of the visualization. Can be 'bottom', 'top', 'left' or 'right'. +# Default is 'bottom'. Other orientations are only supported on sdl and ncruses +# output. Note: many fonts have weird glyphs for 'top' and 'right' characters, +# which can make ncurses not look right. +; orientation = bottom + +# Visual channels. Can be 'stereo' or 'mono'. +# 'stereo' mirrors both channels with low frequencies in center. +# 'mono' outputs left to right lowest to highest frequencies. +# 'mono_option' set mono to either take input from 'left', 'right' or 'average'. +# set 'reverse' to 1 to display frequencies the other way around. +; channels = stereo +; mono_option = average +; reverse = 0 + +# Raw output target. A fifo will be created if target does not exist. +; raw_target = /dev/stdout + +# Raw data format. Can be 'binary' or 'ascii'. +; data_format = binary + +# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530). +; bit_format = 16bit + +# Ascii max value. In 'ascii' mode range will run from 0 to value specified here +; ascii_max_range = 1000 + +# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters. +# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)). +; bar_delimiter = 59 +; frame_delimiter = 10 + +# sdl window size and position. -1,-1 is centered. +; sdl_width = 1000 +; sdl_height = 500 +; sdl_x = -1 +; sdl_y= -1 +; sdl_full_screen = 0 + +# set label on bars on the x-axis. Can be 'frequency' or 'none'. Default: 'none' +# 'frequency' displays the lower cut off frequency of the bar above. +# Only supported on ncurses and noncurses output. +; xaxis = none + +# enable alacritty synchronized updates. 1 = on, 0 = off +# removes flickering in alacritty terminal emulator. +# defaults to off since the behaviour in other terminal emulators is unknown +; alacritty_sync = 0 + +# Shaders for sdl_glsl, located in $HOME/.config/cava/shaders +; vertex_shader = pass_through.vert +; fragment_shader = bar_spectrum.frag + +; for glsl output mode, keep rendering even if no audio +; continuous_rendering = 0 + +# disable console blank (screen saver) in tty +# (Not supported on FreeBSD) +; disable_blanking = 0 + +# show a flat bar at the bottom of the screen when idle, 1 = on, 0 = off +; show_idle_bar_heads = 1 + +# show waveform instead of frequency spectrum, 1 = on, 0 = off +; waveform = 0 + +[color] + +# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow. +# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires +# a terminal that can change color definitions such as Gnome-terminal or rxvt. +# default is to keep current terminal color +; background = default +; foreground = default + +# SDL and sdl_glsl only support hex code colors, these are the default: +; background = '#111111' +; foreground = '#33ffff' + +# these are default +# Gradient mode, only hex defined colors are supported, +# background must also be defined in hex or remain commented out. 1 = on, 0 = off. +# You can define as many as 8 different colors. They range from bottom to top of screen +; gradient = 0 +; gradient_count = 8 +; gradient_color_1 = '#59cc33' +; gradient_color_2 = '#80cc33' +; gradient_color_3 = '#a6cc33' +; gradient_color_4 = '#cccc33' +; gradient_color_5 = '#cca633' +; gradient_color_6 = '#cc8033' +; gradient_color_7 = '#cc5933' +; gradient_color_8 = '#cc3333' + +# for wallust +gradient = 1 +gradient_count = 8 +gradient_color_1 = '#000004' +gradient_color_2 = '#523F41' +gradient_color_3 = '#49596E' +gradient_color_4 = '#905E56' +gradient_color_5 = '#DCD4CD' +gradient_color_6 = '#AE746D' +gradient_color_7 = '#C07D73' +gradient_color_8 = '#DCD4CD' + + +[smoothing] + +# Percentage value for integral smoothing. Takes values from 0 - 100. +# Higher values means smoother, but less precise. 0 to disable. +# DEPRECATED as of 0.8.0, use noise_reduction instead +; integral = 77 + +# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable. +; monstercat = 0 +; waves = 0 + +# Set gravity percentage for "drop off". Higher values means bars will drop faster. +# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off". +# DEPRECATED as of 0.8.0, use noise_reduction instead +; gravity = 100 + + +# In bar height, bars that would have been lower that this will not be drawn. +# DEPRECATED as of 0.8.0 +; ignore = 0 + +# Noise reduction, int 0 - 100. default 77 +# the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth +# 100 will be very slow and smooth, 0 will be fast but noisy. +; noise_reduction = 77 + + +[eq] + +# This one is tricky. You can have as much keys as you want. +# Remember to uncomment more than one key! More keys = more precision. +# Look at readme.md on github for further explanations and examples. +; 1 = 1 # bass +; 2 = 1 +; 3 = 1 # midtone +; 4 = 1 +; 5 = 1 # treble diff --git a/hyprland/.config/cava/shaders/bar_spectrum.frag b/hyprland/.config/cava/shaders/bar_spectrum.frag new file mode 100644 index 0000000..b078913 --- /dev/null +++ b/hyprland/.config/cava/shaders/bar_spectrum.frag @@ -0,0 +1,79 @@ +#version 330 + +in vec2 fragCoord; +out vec4 fragColor; + +// bar values. defaults to left channels first (low to high), then right (high to low). +uniform float bars[512]; + +uniform int bars_count; // number of bars (left + right) (configurable) +uniform int bar_width; // bar width (configurable), not used here +uniform int bar_spacing; // space bewteen bars (configurable) + +uniform vec3 u_resolution; // window resolution + +//colors, configurable in cava config file (r,g,b) (0.0 - 1.0) +uniform vec3 bg_color; // background color +uniform vec3 fg_color; // foreground color + +uniform int gradient_count; +uniform vec3 gradient_colors[8]; // gradient colors + +vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max) +{ + //create color based on fraction of this color and next color + float yr = (y - y_min) / (y_max - y_min); + return col_1 * (1.0 - yr) + col_2 * yr; +} + +void main() +{ + // find which bar to use based on where we are on the x axis + float x = u_resolution.x * fragCoord.x; + int bar = int(bars_count * fragCoord.x); + + //calculate a bar size + float bar_size = u_resolution.x / bars_count; + + //the y coordinate and bar values are the same + float y = bars[bar]; + + // make sure there is a thin line at bottom + if (y * u_resolution.y < 1.0) + { + y = 1.0 / u_resolution.y; + } + + //draw the bar up to current height + if (y > fragCoord.y) + { + //make some space between bars basen on settings + if (x > (bar + 1) * (bar_size) - bar_spacing) + { + fragColor = vec4(bg_color,1.0); + } + else + { + if (gradient_count == 0) + { + fragColor = vec4(fg_color,1.0); + } + else + { + //find which color in the configured gradient we are at + int color = int((gradient_count - 1) * fragCoord.y); + + //find where on y this and next color is supposed to be + float y_min = color / (gradient_count - 1.0); + float y_max = (color + 1.0) / (gradient_count - 1.0); + + //make color + fragColor = vec4(normalize_C(fragCoord.y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0); + } + } + } + else + { + fragColor = vec4(bg_color,1.0); + } +} \ No newline at end of file diff --git a/hyprland/.config/cava/shaders/normalized_bars.frag b/hyprland/.config/cava/shaders/normalized_bars.frag new file mode 100644 index 0000000..81a27e2 --- /dev/null +++ b/hyprland/.config/cava/shaders/normalized_bars.frag @@ -0,0 +1,38 @@ +#version 330 + +in vec2 fragCoord; +out vec4 fragColor; + +// bar values. defaults to left channels first (low to high), then right (high to low). +uniform float bars[512]; + +uniform int bars_count; // number of bars (left + right) (configurable) + +uniform vec3 u_resolution; // window resolution, not used here + +//colors, configurable in cava config file +uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here +uniform vec3 fg_color; // foreground color, not used here + +float normalize_C(float x, float x_min, float x_max, float r_min, float r_max ) +{ + float xr; + xr = (r_max-r_min) * (x - x_min) / (x_max - x_min) + r_min; + return xr; +} + +void main() +{ + // find which bar to use based on where we are on the x axis + int bar = int(bars_count * fragCoord.x); + + // create a normal along the y axis based on the bar height + float x = normalize_C(fragCoord.y, 1.0, 0.0, 0.0, bars[bar]); + + // set color + fragColor.r=fg_color.x*x; + fragColor.g=fg_color.y*x; + fragColor.b=fg_color.z*x; + fragColor.a=1.0; + +} diff --git a/hyprland/.config/cava/shaders/northern_lights.frag b/hyprland/.config/cava/shaders/northern_lights.frag new file mode 100644 index 0000000..ecd859a --- /dev/null +++ b/hyprland/.config/cava/shaders/northern_lights.frag @@ -0,0 +1,34 @@ +#version 330 + +in vec2 fragCoord; +out vec4 fragColor; + +// bar values. defaults to left channels first (low to high), then right (high to low). +uniform float bars[512]; + +uniform int bars_count; // number of bars (left + right) (configurable) + +uniform vec3 u_resolution; // window resolution, not used here + +//colors, configurable in cava config file +uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here +uniform vec3 fg_color; // foreground color, not used here + +void main() +{ + // find which bar to use based on where we are on the x axis + int bar = int(bars_count * fragCoord.x); + + float bar_y = 1.0 - abs((fragCoord.y - 0.5)) * 2.0; + float y = (bars[bar]) * bar_y; + + float bar_x = (fragCoord.x - float(bar) / float(bars_count)) * bars_count; + float bar_r = 1.0 - abs((bar_x - 0.5)) * 2; + + bar_r = bar_r * bar_r * 2; + + // set color + fragColor.r = fg_color.x * y * bar_r; + fragColor.g = fg_color.y * y * bar_r; + fragColor.b = fg_color.z * y * bar_r; +} diff --git a/hyprland/.config/cava/shaders/pass_through.vert b/hyprland/.config/cava/shaders/pass_through.vert new file mode 100644 index 0000000..a4f20e5 --- /dev/null +++ b/hyprland/.config/cava/shaders/pass_through.vert @@ -0,0 +1,14 @@ +#version 330 + + +// Input vertex data, different for all executions of this shader. +layout(location = 0) in vec3 vertexPosition_modelspace; + +// Output data ; will be interpolated for each fragment. +out vec2 fragCoord; + +void main() +{ + gl_Position = vec4(vertexPosition_modelspace,1); + fragCoord = (vertexPosition_modelspace.xy+vec2(1,1))/2.0; +} diff --git a/hyprland/.config/hypr/UserConfigs/ENVariables.conf b/hyprland/.config/hypr/UserConfigs/ENVariables.conf new file mode 100644 index 0000000..6cb01c2 --- /dev/null +++ b/hyprland/.config/hypr/UserConfigs/ENVariables.conf @@ -0,0 +1,53 @@ +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# Environment variables. See https://wiki.hyprland.org/Configuring/Environment-variables/ + +# Set your defaults here +env = EDITOR,nvim #default editor + +#environment-variables +env = CLUTTER_BACKEND,wayland +env = GDK_BACKEND,wayland,x11 +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +env = QT_QPA_PLATFORM,wayland;xcb +env = QT_QPA_PLATFORMTHEME,qt5ct +env = QT_QPA_PLATFORMTHEME,qt6ct +env = QT_SCALE_FACTOR,1 +env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 +env = XDG_CURRENT_DESKTOP,Hyprland +env = XDG_SESSION_DESKTOP,Hyprland +env = XDG_SESSION_TYPE,wayland + +# xwayland apps scale fix (useful if you are use monitor scaling) +# see https://wiki.hyprland.org/Configuring/XWayland/ +# toolkit-specific scale +env = GDK_SCALE,1 + +# firefox +env = MOZ_ENABLE_WAYLAND,1 + +# electron >28 apps (may help) +env = ELECTRON_OZONE_PLATFORM_HINT,auto + +# NVIDIA +# This is from Hyprland Wiki. Below will be activated nvidia gpu detected +# See hyprland wiki https://wiki.hyprland.org/Nvidia/#environment-variables +env = LIBVA_DRIVER_NAME,nvidia +env = __GLX_VENDOR_LIBRARY_NAME,nvidia +env = NVD_BACKEND,direct + +# additional ENV's for nvidia. Caution, activate with care +#env = GBM_BACKEND,nvidia-drm + +#env = __NV_PRIME_RENDER_OFFLOAD,1 +#env = __VK_LAYER_NV_optimus,NVIDIA_only +#env = WLR_DRM_NO_ATOMIC,1 + +# FOR VM and POSSIBLY NVIDIA +# LIBGL_ALWAYS_SOFTWARE software mesa rendering +#env = LIBGL_ALWAYS_SOFTWARE,1 +#env = WLR_RENDERER_ALLOW_SOFTWARE,1 + +# nvidia firefox (for hardware acceleration on FF)? +# check this post https://github.com/elFarto/nvidia-vaapi-driver#configuration +env = MOZ_DISABLE_RDD_SANDBOX,1 +env = EGL_PLATFORM,wayland diff --git a/hyprland/.config/hypr/UserScripts/QuickEdit.sh b/hyprland/.config/hypr/UserScripts/QuickEdit.sh new file mode 100755 index 0000000..efe9600 --- /dev/null +++ b/hyprland/.config/hypr/UserScripts/QuickEdit.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# Rofi menu for Quick Edit/View of Settings (SUPER E) + +# Define preferred text editor and terminal +edit=${EDITOR:-nvim} +tty=kitty + +# Paths to configuration directories +configs="$HOME/.config/hypr/configs" +UserConfigs="$HOME/.config/hypr/UserConfigs" + +# Function to display the menu options +menu() { + cat <{calendar}", - "calendar": { - "mode": "year", - "mode-mon-col": 3, - "weeks-pos": "right", - "on-scroll": 1, - "format": { - "months": "{}", - "days": "{}", - "weeks": "W{}", - "weekdays": "{}", - "today": "{}" - } - } -}, -"actions": { - "on-click-right": "mode", - "on-click-forward": "tz_up", - "on-click-backward": "tz_down", - "on-scroll-up": "shift_up", - "on-scroll-down": "shift_down" -}, -"clock#2": { - //"format": " {:%I:%M %p}", // AM PM format - "format": " {:%H:%M}", // 24H - "format-alt": "{:%A | %H:%M | %e %B}", - "tooltip-format": "{:%Y %B}\n{calendar}" -}, -"clock#3": { - //"format": "{:%I:%M %p - %d/%b}", //for AM/PM - "format": "{:%H:%M - %d/%b}", // 24H - "tooltip": false -}, -"clock#4": { - "interval": 60, - //"format": "{:%B | %a %d, %Y | %I:%M %p}", // AM PM format - "format": "{:%B | %a %d, %Y | %H:%M}", // 24H - "format-alt": "{:%a %b %d, %G}", - "tooltip-format": "{:%B %Y}\n{calendar}", -}, -"clock#5": { - //"format": "{:%A, %I:%M %P}", // AM PM format - "format": "{:%a %d | %H:%M}", // 24H - "format-alt": "{:%A, %d %B, %Y (%R)}" -}, -"cpu": { - "format": "{usage}% 󰍛", - "interval": 1, - "min-length": 5, - "format-alt-click": "click", - "format-alt": "{icon0}{icon1}{icon2}{icon3} {usage:>2}% 󰍛", - "format-icons": [ - "▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" - ], - "on-click-right": "gnome-system-monitor", -}, -"disk": { - "interval": 30, - //"format": "󰋊", - "path": "/", - //"format-alt-click": "click", - "format": "{percentage_used}% 󰋊", - //"tooltip": true, - "tooltip-format": "{used} used out of {total} on {path} ({percentage_used}%)", -}, -"hyprland/language": { - "format": "Lang: {}", - "format-en": "US", - "format-tr": "Korea", - "keyboard-name": "at-translated-set-2-keyboard", - "on-click": "hyprctl switchxkblayout $SET_KB next" -}, -"hyprland/submap": { - "format": " {}", // Icon: expand-arrows-alt - "tooltip": false, -}, -"hyprland/window": { - "format": "{}", - "max-length": 20, - "separate-outputs": true, - "offscreen-css": true, - "offscreen-css-text": "(inactive)", - "rewrite": { - "(.*) — Mozilla Firefox": " $1", - "(.*) - fish": "> [$1]", - "(.*) - zsh": "> [$1]", - "(.*) - $term": "> [$1]", - }, -}, -"idle_inhibitor": { - "tooltip": true, - "tooltip-format-activated": "Idle_inhibitor active", - "tooltip-format-deactivated": "Idle_inhibitor not active", - "format": "{icon}", - "format-icons": { - "activated": " ", - "deactivated": " ", - } -}, -"keyboard-state": { - //"numlock": true, - "capslock": true, - "format": { - "numlock": "N {icon}", - "capslock": "󰪛 {icon}", - }, - "format-icons": { - "locked": "", - "unlocked": "" - }, -}, -"memory": { - "interval": 10, - "format": "{used:0.1f}G 󰾆", - "format-alt": "{percentage}% 󰾆", - "format-alt-click": "click", - "tooltip": true, - "tooltip-format": "{used:0.1f}GB/{total:0.1f}G", - "on-click-right": "kitty --title btop sh -c 'btop'" -}, -"mpris": { - "interval": 10, - "format": "{player_icon} ", - "format-paused": "{status_icon} {dynamic}", - "on-click-middle": "playerctl play-pause", - "on-click": "playerctl previous", - "on-click-right": "playerctl next", - "scroll-step": 5.0, - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "smooth-scrolling-threshold": 1, - "player-icons": { - "chromium": "", - "default": "", - "firefox": "", - "kdeconnect": "", - "mopidy": "", - "mpv": "󰐹", - "spotify": "", - "vlc": "󰕼", - }, - "status-icons": { - "paused": "󰐎", - "playing": "", - "stopped": "", - }, - // "ignored-players": ["firefox"] - "max-length": 30, -}, -"network": { - "format": "{ifname}", - "format-wifi": "{icon}", - "format-ethernet": "󰌘", - "format-disconnected": "󰌙", - "tooltip-format": "{ipaddr}  {bandwidthUpBits}  {bandwidthDownBits}", - "format-linked": "󰈁 {ifname} (No IP)", - "tooltip-format-wifi": "{essid} {icon} {signalStrength}%", - "tooltip-format-ethernet": "{ifname} 󰌘", - "tooltip-format-disconnected": "󰌙 Disconnected", - "max-length": 30, - "format-icons": [ - "󰤯", "󰤟", "󰤢", "󰤥", "󰤨" - ], - "on-click-right": "kitty nmtui" -}, -"network#speed": { - "interval": 1, - "format": "{ifname}", - "format-wifi": "{icon}  {bandwidthUpBytes}  {bandwidthDownBytes}", - "format-ethernet": "󰌘  {bandwidthUpBytes}  {bandwidthDownBytes}", - "format-disconnected": "󰌙", - "tooltip-format": "{ipaddr}", - "format-linked": "󰈁 {ifname} (No IP)", - "tooltip-format-wifi": "{essid} {icon} {signalStrength}%", - "tooltip-format-ethernet": "{ifname} 󰌘", - "tooltip-format-disconnected": "󰌙 Disconnected", - "min-length": 24, - "max-length": 24, - "format-icons": [ - "󰤯", "󰤟", "󰤢", "󰤥", "󰤨" - ] -}, -"power-profiles-daemon": { - "format": "{icon}", - "tooltip-format": "Power profile: {profile}\nDriver: {driver}", - "tooltip": true, - "format-icons": { - "default": "", - "performance": "", - "balanced": "", - "power-saver": "" - } -}, -"pulseaudio": { - "format": "{icon} {volume}%", - "format-bluetooth": "{icon} 󰂰 {volume}%", - "format-muted": "󰖁", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": [ - "", "", "󰕾", "" - ], - "ignored-sinks": [ - "Easy Effects Sink" - ], - }, - "scroll-step": 5.0, - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle", - "on-click-right": "pavucontrol -t 3", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "tooltip-format": "{icon} {desc} | {volume}%", - "smooth-scrolling-threshold": 1, -}, -"pulseaudio#1": { - "format": "{icon} {volume}%", - "format-bluetooth": "{icon} {volume}%", - "format-bluetooth-muted": " {icon}", - "format-muted": "󰸈", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": ["", "", ""] - }, - "on-click": "pamixer --toggle-mute", - "on-click-right": "pavucontrol -t 3", - "tooltip": true, - "tooltip-format": "{icon} {desc} | {volume}%", -}, -"pulseaudio#microphone": { - "format": "{format_source}", - "format-source": " {volume}%", - "format-source-muted": "", - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle-mic", - "on-click-right": "pavucontrol -t 4", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --mic-inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --mic-dec", - "tooltip-format": "{source_desc} | {source_volume}%", - "scroll-step": 5, -}, -"tray": { - "icon-size": 20, - "spacing": 4, -}, -"wireplumber": { - "format": "{icon} {volume} %", - "format-muted": " Mute", - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle", - "on-click-right": "pavucontrol -t 3", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "format-icons": [ - "", "", "󰕾", "" - ], -}, -"wlr/taskbar": { - "format": "{icon} {name}", - "icon-size": 16, - "all-outputs": false, - "tooltip-format": "{title}", - "on-click": "activate", - "on-click-middle": "close", - "ignore-list": [ - "wofi", - "rofi", - "kitty", - "kitty-dropterm" - ], -}, -"custom/cycle_wall": { - "format": " ", - "on-click": "$HOME/.config/hypr/UserScripts/WallpaperSelect.sh", - "on-click-right": "$HOME/.config/hypr/UserScripts/WallpaperRandom.sh", - "on-click-middle": "$HOME/.config/hypr/scripts/WaybarStyles.sh", - "tooltip": true, - "tooltip-format": "Left Click: Wallpaper Menu\nMiddle Click: Random wallpaper\nRight Click: Waybar Styles Menu", -}, -"custom/hint": { - "format": "󰺁 HINT!", - "on-click": "$HOME/.config/hypr/scripts/KeyHints.sh", - "tooltip": true, - "tooltip-format": "󱧣 Quick Tips", -}, -// Hypridle inhibitor -"custom/hypridle": { - "format": " 󱫗 ", - "return-type": "json", - "escape": true, - "exec-on-event": true, - "interval": 60, - "exec": "$HOME/.config/hypr/scripts/Hypridle.sh status", - "on-click": "$HOME/.config/hypr/scripts/Hypridle.sh toggle", - "on-click-right": "hyprlock" - }, -"custom/keyboard": { - "exec": "cat $HOME/.cache/kb_layout", - "interval": 1, - "format": " {}", - "on-click": "$HOME/.config/hypr/scripts/SwitchKeyboardLayout.sh", -}, -"custom/light_dark": { - "format": "󰔎", - "on-click": "$HOME/.config/hypr/scripts/DarkLight.sh", - "on-click-right": "$HOME/.config/hypr/scripts/WaybarStyles.sh", - "on-click-middle": "$HOME/.config/hypr/UserScripts/WallpaperSelect.sh", - "tooltip": true, - "tooltip-format": "Left Click: Switch Dark-Light Themes\nMiddle Click: Wallpaper Menu\nRight Click: Waybar Styles Menu", -}, -"custom/lock": { - "format": "󰌾", - "on-click": "$HOME/.config/hypr/scripts/LockScreen.sh", - "tooltip": true, - "tooltip-format": "󰷛 Screen Lock", - -}, -"custom/menu": { - "format": "", - "on-click": "pkill rofi || rofi -show drun -modi run,drun,filebrowser,window", - "on-click-middle": "$HOME/.config/hypr/UserScripts/WallpaperSelect.sh", - "on-click-right": "$HOME/.config/hypr/scripts/WaybarLayout.sh", - "tooltip": true, - "tooltip-format": "Left Click: Rofi Menu\nMiddle Click: Wallpaper Menu\nRight Click: Waybar Layout Menu", -}, -// This is a custom cava visualizer -"custom/cava_mviz": { - "exec": "$HOME/.config/hypr/scripts/WaybarCava.sh", - "format": "{}" -}, -"custom/playerctl": { - "format": "{}", - "return-type": "json", - "max-length": 35, - "exec": "playerctl -a metadata --format '{\"text\": \"{{artist}} $HOME {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F", - "on-click-middle": "playerctl play-pause", - "on-click": "playerctl previous", - "on-click-right": "playerctl next", - "scroll-step": 5.0, - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "smooth-scrolling-threshold": 1, -}, -"custom/power": { - "format": "⏻ ", - "on-click": "$HOME/.config/hypr/scripts/Wlogout.sh", - "on-click-right": "$HOME/.config/hypr/scripts/ChangeBlur.sh", - "tooltip": true, - "tooltip-format": "Left Click: Logout Menu\nRight Click: Change Blur", -}, -"custom/swaync": { - "tooltip": true, - "tooltip-format": "Left Click: Launch Notification Center\nRight Click: Do not Disturb", - "format": "{} {icon}", - "format-icons": { - "notification": "", - "none": "", - "dnd-notification": "", - "dnd-none": "", - "inhibited-notification": "", - "inhibited-none": "", - "dnd-inhibited-notification": "", - "dnd-inhibited-none": "" - }, - "return-type": "json", - "exec-if": "which swaync-client", - "exec": "swaync-client -swb", - "on-click": "sleep 0.1 && swaync-client -t -sw", - "on-click-right": "swaync-client -d -sw", - "escape": true, -}, -// NOTE:! This is only for Arch and Arch Based Distros depend: pacman-contrib -"custom/updater": { - "format": " {}", - "exec": "checkupdates | wc -l", - "exec-if": "[[ $(checkupdates | wc -l) ]]", - "interval": 15, - "on-click": "if command -v paru &> /dev/null; then kitty -T update paru -Syu; else kitty -T update yay -Syu; fi && notify-send 'The system has been updated'", - "tooltip": true, - "tooltip-format": "Left Click: Update System\nArch Linux Only", -}, - -// Separators -"custom/separator#dot": { - "format": "", - "interval": "once", - "tooltip": false -}, -"custom/separator#dot-line": { - "format": "", - "interval": "once", - "tooltip": false -}, -"custom/separator#line": { - "format": "|", - "interval": "once", - "tooltip": false -}, -"custom/separator#blank": { - "format": "", - "interval": "once", - "tooltip": false -}, -"custom/separator#blank_2": { - "format": " ", - "interval": "once", - "tooltip": false -}, -"custom/separator#blank_3": { - "format": " ", - "interval": "once", - "tooltip": false -}, -// Modules below are for vertical layout -"backlight#vertical": { - "interval": 2, - "align": 0.35, - "rotate": 1, - "format": "{icon}", - //"format-icons": ["󰃞", "󰃟", "󰃠"], - "format-icons": [ - "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - ], - "on-click": "", - "on-click-middle": "", - "on-click-right": "", - "on-update": "", - "on-scroll-up": "$HOME/.config/hypr/scripts/Brightness.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Brightness.sh --dec", - "smooth-scrolling-threshold": 1, - "tooltip-format": "{percent}%", -}, -"clock#vertical": { - "format": "\n{:%H\n%M\n%S\n\n \n%d\n%m\n%y}", - "interval": 1, - //"format": "\n{:%I\n%M\n%p\n\n \n%d\n%m\n%y}", - "tooltip": true, - "tooltip-format": "{calendar}", - "calendar": { - "mode": "year", - "mode-mon-col": 3, - "format": { - "today": "{}", - } - } -}, -"cpu#vertical": { - "format": "󰍛\n{usage}%", - "interval": 1, - "on-click-right": "gnome-system-monitor", -}, -"memory#vertical": { - "interval": 10, - "format": "󰾆\n{percentage}%", - "format-alt": "󰾆\n{used:0.1f}G", - "format-alt-click": "click", - "tooltip": true, - "tooltip-format": "{used:0.1f}GB/{total:0.1f}G", - "on-click-right": "kitty --title btop sh -c 'btop'", -}, -"pulseaudio#vertical": { - "format": "{icon}", - "format-bluetooth": "󰂰", - "format-muted": "󰖁", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": [ - "", "", "󰕾", "" - ], - "tooltip-format": "{icon} {desc} | {volume}%", - "ignored-sinks": [ - "Easy Effects Sink" - ], - }, - "scroll-step": 5.0, - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle", - "on-click-right": "pavucontrol -t 3", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "tooltip-format": "{icon} {desc} | {volume}%", - "smooth-scrolling-threshold": 1, -}, -"pulseaudio#microphone_vertical": { - "format": "{format_source}", - "format-source": "󰍬", - "format-source-muted": "󰍭", - "on-click-right": "pavucontrol", - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle-mic", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --mic-inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --mic-dec", - "max-volume": 100, - "tooltip": true, - "tooltip-format": "{source_desc} | {source_volume}%", -}, -"custom/power_vertical": { - "format": "⏻", - "exec": "echo ; echo 󰟡 power // blur", - "on-click": "$HOME/.config/hypr/scripts/Wlogout.sh", - "on-click-right": "$HOME/.config/hypr/scripts/ChangeBlur.sh", - "interval": 86400, // once every day - "tooltip": true, -}, -} diff --git a/hyprland/.config/waybar/Modules.2 b/hyprland/.config/waybar/Modules.2 deleted file mode 100644 index e825e53..0000000 --- a/hyprland/.config/waybar/Modules.2 +++ /dev/null @@ -1,696 +0,0 @@ -//* ---- 💫 https://github.com/JaKooLit 💫 ---- *// -/* Waybar Modules */ - -{ -/* NOTE: hyprland-workspaces on a separate file */ -// Weather and Temperature Modules as this is most like to change always. -// Result is of course easier to edit -"custom/weather": { - "format": "{}", - "format-alt": "{alt}: {}", - "format-alt-click": "click", - "interval": 3600, - "return-type": "json", - "exec": "$HOME/.config/hypr/UserScripts/Weather.sh", - //"exec": "$HOME/.config/hypr/UserScripts/Weather.py", - "exec-if": "ping wttr.in -c1", - "tooltip": true, -}, -"temperature": { - "interval": 10, - "tooltip": true, - "hwmon-path": [ - "/sys/class/hwmon/hwmon1/temp1_input", - "/sys/class/thermal/thermal_zone0/temp" - ], - //"thermal-zone": 0, - "critical-threshold": 82, - "format-critical": "{temperatureC}°C {icon}", - "format": "{temperatureC}°C {icon}", - "format-icons": [ - "󰈸" - ], - "on-click-right": "kitty --title nvtop sh -c 'nvtop'" -}, -"temperature#vertical": { - "interval": 10, - "tooltip": true, - "hwmon-path": [ - "/sys/class/hwmon/hwmon1/temp1_input", - "/sys/class/thermal/thermal_zone0/temp" - ], - //"thermal-zone": 0, - "critical-threshold": 80, - "format-critical": "{icon}\n{temperatureC}°C", - "format": " {icon}", - "format-icons": [ - "󰈸" - ], - "on-click-right": "kitty --title nvtop sh -c 'nvtop'" -}, - - -// GROUP -"group/motherboard": { - "orientation": "horizontal", - "modules": [ - "cpu", - "memory", - "temperature", - "disk", - ] -}, -"group/mobo_drawer": { - "orientation": "inherit", - "drawer": { - "transition-duration": 500, - "children-class": "cpu", - "transition-left-to-right": true - }, - "modules": [ - "temperature", - "cpu", - "memory", - "disk", - ] -}, -"group/laptop": { - "orientation": "inherit", - "modules": [ - "backlight", - "battery", - ] -}, -"group/audio": { - "orientation": "inherit", - "drawer": { - "transition-duration": 500, - "children-class": "pulseaudio", - "transition-left-to-right": true - }, - "modules": [ - "pulseaudio", - "pulseaudio#microphone", - ] -}, -"group/connections": { - "orientation": "inherit", - "drawer": { - "transition-duration": 500, - "children-class": "bluetooth", - "transition-left-to-right": true - }, - "modules": [ - "network", - "bluetooth", - ] -}, -"backlight": { - "interval": 2, - "align": 0, - "rotate": 0, - //"format": "{icon} {percent}%", - "format-icons": [ - " ", - " ", - " ", - "󰃝 ", - "󰃞 ", - "󰃟 ", - "󰃠 " - ], - "format": "{icon}", - //"format-icons": ["","","","","","","","","","","","","","",""], - "tooltip-format": "backlight {percent}%", - "icon-size": 10, - "on-click": "", - "on-click-middle": "", - "on-click-right": "", - "on-update": "", - "on-scroll-up": "$HOME/.config/hypr/scripts/Brightness.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Brightness.sh --dec", - "smooth-scrolling-threshold": 1, -}, -"backlight#2": { - "device": "intel_backlight", - "format": "{icon} {percent}%", - "format-icons": ["", ""] -}, -"battery": { - //"interval": 5, - "align": 0, - "rotate": 0, - //"bat": "BAT1", - //"adapter": "ACAD", - "full-at": 100, - "design-capacity": false, - "states": { - "good": 95, - "warning": 30, - "critical": 15 - }, - "format": "{icon} {capacity}%", - "format-charging": " {capacity}%", - "format-plugged": "󱘖 {capacity}%", - "format-alt-click": "click", - "format-full": "{icon} Full", - "format-alt": "{icon} {time}", - "format-icons": [ - "󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹" - ], - "format-time": "{H}h {M}min", - "tooltip": true, - "tooltip-format": "{timeTo} {power}w", - "on-click-middle": "$HOME/.config/hypr/scripts/ChangeBlur.sh", - "on-click-right": "$HOME/.config/hypr/scripts/Wlogout.sh", -}, -"bluetooth": { - "format": "", - "format-disabled": "󰂳", - "format-connected": "󰂱 {num_connections}", - "tooltip-format": " {device_alias}", - "tooltip-format-connected": "{device_enumerate}", - "tooltip-format-enumerate-connected": " {device_alias} 󰂄{device_battery_percentage}%", - "tooltip": true, - "on-click": "blueman-manager", -}, -"clock": { - "interval": 1, - //"format": " {:%I:%M %p}", // AM PM format - "format": " {:%H:%M:%S}", // 24H - "format-alt": " {:%H:%M  %Y, %d %B, %A}", - "tooltip-format": "{calendar}", - "calendar": { - "mode": "year", - "mode-mon-col": 3, - "weeks-pos": "right", - "on-scroll": 1, - "format": { - "months": "{}", - "days": "{}", - "weeks": "W{}", - "weekdays": "{}", - "today": "{}" - } - } -}, -"actions": { - "on-click-right": "mode", - "on-click-forward": "tz_up", - "on-click-backward": "tz_down", - "on-scroll-up": "shift_up", - "on-scroll-down": "shift_down" -}, -"clock#2": { - //"format": " {:%I:%M %p}", // AM PM format - "format": " {:%H:%M}", // 24H - "format-alt": "{:%A | %H:%M | %e %B}", - "tooltip-format": "{:%Y %B}\n{calendar}" -}, -"clock#3": { - //"format": "{:%I:%M %p - %d/%b}", //for AM/PM - "format": "{:%H:%M - %d/%b}", // 24H - "tooltip": false -}, -"clock#4": { - "interval": 60, - //"format": "{:%B | %a %d, %Y | %I:%M %p}", // AM PM format - "format": "{:%B | %a %d, %Y | %H:%M}", // 24H - "format-alt": "{:%a %b %d, %G}", - "tooltip-format": "{:%B %Y}\n{calendar}", -}, -"clock#5": { - //"format": "{:%A, %I:%M %P}", // AM PM format - "format": "{:%a %d | %H:%M}", // 24H - "format-alt": "{:%A, %d %B, %Y (%R)}" -}, -"cpu": { - "format": "{usage}% 󰍛", - "interval": 1, - "min-length": 5, - "format-alt-click": "click", - "format-alt": "{icon0}{icon1}{icon2}{icon3} {usage:>2}% 󰍛", - "format-icons": [ - "▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" - ], - "on-click-right": "gnome-system-monitor", -}, -"disk": { - "interval": 30, - //"format": "󰋊", - "path": "/", - //"format-alt-click": "click", - "format": "{percentage_used}% 󰋊", - //"tooltip": true, - "tooltip-format": "{used} used out of {total} on {path} ({percentage_used}%)", -}, -"hyprland/language": { - "format": "Lang: {}", - "format-en": "US", - "format-tr": "Korea", - "keyboard-name": "at-translated-set-2-keyboard", - "on-click": "hyprctl switchxkblayout $SET_KB next" -}, -"hyprland/submap": { - "format": " {}", // Icon: expand-arrows-alt - "tooltip": false, -}, -"hyprland/window": { - "format": "{}", - "max-length": 20, - "separate-outputs": true, - "offscreen-css": true, - "offscreen-css-text": "(inactive)", - "rewrite": { - "(.*) — Mozilla Firefox": " $1", - "(.*) - fish": "> [$1]", - "(.*) - zsh": "> [$1]", - "(.*) - $term": "> [$1]", - }, -}, -"idle_inhibitor": { - "tooltip": true, - "tooltip-format-activated": "Idle_inhibitor active", - "tooltip-format-deactivated": "Idle_inhibitor not active", - "format": "{icon}", - "format-icons": { - "activated": " ", - "deactivated": " ", - } -}, -"keyboard-state": { - //"numlock": true, - "capslock": true, - "format": { - "numlock": "N {icon}", - "capslock": "󰪛 {icon}", - }, - "format-icons": { - "locked": "", - "unlocked": "" - }, -}, -"memory": { - "interval": 10, - "format": "{used:0.1f}G 󰾆", - "format-alt": "{percentage}% 󰾆", - "format-alt-click": "click", - "tooltip": true, - "tooltip-format": "{used:0.1f}GB/{total:0.1f}G", - "on-click-right": "kitty --title btop sh -c 'btop'" -}, -"mpris": { - "interval": 10, - "format": "{player_icon} ", - "format-paused": "{status_icon} {dynamic}", - "on-click-middle": "playerctl play-pause", - "on-click": "playerctl previous", - "on-click-right": "playerctl next", - "scroll-step": 5.0, - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "smooth-scrolling-threshold": 1, - "player-icons": { - "chromium": "", - "default": "", - "firefox": "", - "kdeconnect": "", - "mopidy": "", - "mpv": "󰐹", - "spotify": "", - "vlc": "󰕼", - }, - "status-icons": { - "paused": "󰐎", - "playing": "", - "stopped": "", - }, - // "ignored-players": ["firefox"] - "max-length": 30, -}, -"network": { - "format": "{ifname}", - "format-wifi": "{icon}", - "format-ethernet": "󰌘", - "format-disconnected": "󰌙", - "tooltip-format": "{ipaddr}  {bandwidthUpBits}  {bandwidthDownBits}", - "format-linked": "󰈁 {ifname} (No IP)", - "tooltip-format-wifi": "{essid} {icon} {signalStrength}%", - "tooltip-format-ethernet": "{ifname} 󰌘", - "tooltip-format-disconnected": "󰌙 Disconnected", - "max-length": 30, - "format-icons": [ - "󰤯", "󰤟", "󰤢", "󰤥", "󰤨" - ], - "on-click-right": "kitty nmtui" -}, -"network#speed": { - "interval": 1, - "format": "{ifname}", - "format-wifi": "{icon}  {bandwidthUpBytes}  {bandwidthDownBytes}", - "format-ethernet": "󰌘  {bandwidthUpBytes}  {bandwidthDownBytes}", - "format-disconnected": "󰌙", - "tooltip-format": "{ipaddr}", - "format-linked": "󰈁 {ifname} (No IP)", - "tooltip-format-wifi": "{essid} {icon} {signalStrength}%", - "tooltip-format-ethernet": "{ifname} 󰌘", - "tooltip-format-disconnected": "󰌙 Disconnected", - "min-length": 24, - "max-length": 24, - "format-icons": [ - "󰤯", "󰤟", "󰤢", "󰤥", "󰤨" - ] -}, -"power-profiles-daemon": { - "format": "{icon}", - "tooltip-format": "Power profile: {profile}\nDriver: {driver}", - "tooltip": true, - "format-icons": { - "default": "", - "performance": "", - "balanced": "", - "power-saver": "" - } -}, -"pulseaudio": { - "format": "{icon} {volume}%", - "format-bluetooth": "{icon} 󰂰 {volume}%", - "format-muted": "󰖁", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": [ - "", "", "󰕾", "" - ], - "ignored-sinks": [ - "Easy Effects Sink" - ], - }, - "scroll-step": 5.0, - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle", - "on-click-right": "pavucontrol -t 3", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "tooltip-format": "{icon} {desc} | {volume}%", - "smooth-scrolling-threshold": 1, -}, -"pulseaudio#1": { - "format": "{icon} {volume}%", - "format-bluetooth": "{icon} {volume}%", - "format-bluetooth-muted": " {icon}", - "format-muted": "󰸈", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": ["", "", ""] - }, - "on-click": "pamixer --toggle-mute", - "on-click-right": "pavucontrol -t 3", - "tooltip": true, - "tooltip-format": "{icon} {desc} | {volume}%", -}, -"pulseaudio#microphone": { - "format": "{format_source}", - "format-source": " {volume}%", - "format-source-muted": "", - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle-mic", - "on-click-right": "pavucontrol -t 4", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --mic-inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --mic-dec", - "tooltip-format": "{source_desc} | {source_volume}%", - "scroll-step": 5, -}, -"tray": { - "icon-size": 20, - "spacing": 4, -}, -"wireplumber": { - "format": "{icon} {volume} %", - "format-muted": " Mute", - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle", - "on-click-right": "pavucontrol -t 3", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "format-icons": [ - "", "", "󰕾", "" - ], -}, -"wlr/taskbar": { - "format": "{icon} {name}", - "icon-size": 16, - "all-outputs": false, - "tooltip-format": "{title}", - "on-click": "activate", - "on-click-middle": "close", - "ignore-list": [ - "wofi", - "rofi", - "kitty", - "kitty-dropterm" - ], -}, -"custom/cycle_wall": { - "format": " ", - "on-click": "$HOME/.config/hypr/UserScripts/WallpaperSelect.sh", - "on-click-right": "$HOME/.config/hypr/UserScripts/WallpaperRandom.sh", - "on-click-middle": "$HOME/.config/hypr/scripts/WaybarStyles.sh", - "tooltip": true, - "tooltip-format": "Left Click: Wallpaper Menu\nMiddle Click: Random wallpaper\nRight Click: Waybar Styles Menu", -}, -"custom/hint": { - "format": "󰺁 HINT!", - "on-click": "$HOME/.config/hypr/scripts/KeyHints.sh", - "tooltip": true, - "tooltip-format": "󱧣 Quick Tips", -}, -// Hypridle inhibitor -"custom/hypridle": { - "format": " 󱫗 ", - "return-type": "json", - "escape": true, - "exec-on-event": true, - "interval": 60, - "exec": "$HOME/.config/hypr/scripts/Hypridle.sh status", - "on-click": "$HOME/.config/hypr/scripts/Hypridle.sh toggle", - "on-click-right": "hyprlock" - }, -"custom/keyboard": { - "exec": "cat $HOME/.cache/kb_layout", - "interval": 1, - "format": " {}", - "on-click": "$HOME/.config/hypr/scripts/SwitchKeyboardLayout.sh", -}, -"custom/light_dark": { - "format": "󰔎", - "on-click": "$HOME/.config/hypr/scripts/DarkLight.sh", - "on-click-right": "$HOME/.config/hypr/scripts/WaybarStyles.sh", - "on-click-middle": "$HOME/.config/hypr/UserScripts/WallpaperSelect.sh", - "tooltip": true, - "tooltip-format": "Left Click: Switch Dark-Light Themes\nMiddle Click: Wallpaper Menu\nRight Click: Waybar Styles Menu", -}, -"custom/lock": { - "format": "󰌾", - "on-click": "$HOME/.config/hypr/scripts/LockScreen.sh", - "tooltip": true, - "tooltip-format": "󰷛 Screen Lock", - -}, -"custom/menu": { - "format": "", - "on-click": "pkill rofi || rofi -show drun -modi run,drun,filebrowser,window", - "on-click-middle": "$HOME/.config/hypr/UserScripts/WallpaperSelect.sh", - "on-click-right": "$HOME/.config/hypr/scripts/WaybarLayout.sh", - "tooltip": true, - "tooltip-format": "Left Click: Rofi Menu\nMiddle Click: Wallpaper Menu\nRight Click: Waybar Layout Menu", -}, -// This is a custom cava visualizer -"custom/cava_mviz": { - "exec": "$HOME/.config/hypr/scripts/WaybarCava.sh", - "format": "{}" -}, -"custom/playerctl": { - "format": "{}", - "return-type": "json", - "max-length": 35, - "exec": "playerctl -a metadata --format '{\"text\": \"{{artist}} $HOME {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F", - "on-click-middle": "playerctl play-pause", - "on-click": "playerctl previous", - "on-click-right": "playerctl next", - "scroll-step": 5.0, - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "smooth-scrolling-threshold": 1, -}, -"custom/power": { - "format": "⏻ ", - "on-click": "$HOME/.config/hypr/scripts/Wlogout.sh", - "on-click-right": "$HOME/.config/hypr/scripts/ChangeBlur.sh", - "tooltip": true, - "tooltip-format": "Left Click: Logout Menu\nRight Click: Change Blur", -}, -"custom/swaync": { - "tooltip": true, - "tooltip-format": "Left Click: Launch Notification Center\nRight Click: Do not Disturb", - "format": "{} {icon}", - "format-icons": { - "notification": "", - "none": "", - "dnd-notification": "", - "dnd-none": "", - "inhibited-notification": "", - "inhibited-none": "", - "dnd-inhibited-notification": "", - "dnd-inhibited-none": "" - }, - "return-type": "json", - "exec-if": "which swaync-client", - "exec": "swaync-client -swb", - "on-click": "sleep 0.1 && swaync-client -t -sw", - "on-click-right": "swaync-client -d -sw", - "escape": true, -}, -// NOTE:! This is only for Arch and Arch Based Distros depend: pacman-contrib -"custom/updater": { - "format": " {}", - "exec": "checkupdates | wc -l", - "exec-if": "[[ $(checkupdates | wc -l) ]]", - "interval": 15, - "on-click": "if command -v paru &> /dev/null; then kitty -T update paru -Syu; else kitty -T update yay -Syu; fi && notify-send 'The system has been updated'", - "tooltip": true, - "tooltip-format": "Left Click: Update System\nArch Linux Only", -}, - -// Separators -"custom/separator#dot": { - "format": "", - "interval": "once", - "tooltip": false -}, -"custom/separator#dot-line": { - "format": "", - "interval": "once", - "tooltip": false -}, -"custom/separator#line": { - "format": "|", - "interval": "once", - "tooltip": false -}, -"custom/separator#blank": { - "format": "", - "interval": "once", - "tooltip": false -}, -"custom/separator#blank_2": { - "format": " ", - "interval": "once", - "tooltip": false -}, -"custom/separator#blank_3": { - "format": " ", - "interval": "once", - "tooltip": false -}, -// Modules below are for vertical layout -"backlight#vertical": { - "interval": 2, - "align": 0.35, - "rotate": 1, - "format": "{icon}", - //"format-icons": ["󰃞", "󰃟", "󰃠"], - "format-icons": [ - "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - ], - "on-click": "", - "on-click-middle": "", - "on-click-right": "", - "on-update": "", - "on-scroll-up": "$HOME/.config/hypr/scripts/Brightness.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Brightness.sh --dec", - "smooth-scrolling-threshold": 1, - "tooltip-format": "{percent}%", -}, -"clock#vertical": { - "format": "\n{:%H\n%M\n%S\n\n \n%d\n%m\n%y}", - "interval": 1, - //"format": "\n{:%I\n%M\n%p\n\n \n%d\n%m\n%y}", - "tooltip": true, - "tooltip-format": "{calendar}", - "calendar": { - "mode": "year", - "mode-mon-col": 3, - "format": { - "today": "{}", - } - } -}, -"cpu#vertical": { - "format": "󰍛\n{usage}%", - "interval": 1, - "on-click-right": "gnome-system-monitor", -}, -"memory#vertical": { - "interval": 10, - "format": "󰾆\n{percentage}%", - "format-alt": "󰾆\n{used:0.1f}G", - "format-alt-click": "click", - "tooltip": true, - "tooltip-format": "{used:0.1f}GB/{total:0.1f}G", - "on-click-right": "kitty --title btop sh -c 'btop'", -}, -"pulseaudio#vertical": { - "format": "{icon}", - "format-bluetooth": "󰂰", - "format-muted": "󰖁", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": [ - "", "", "󰕾", "" - ], - "tooltip-format": "{icon} {desc} | {volume}%", - "ignored-sinks": [ - "Easy Effects Sink" - ], - }, - "scroll-step": 5.0, - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle", - "on-click-right": "pavucontrol -t 3", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "tooltip-format": "{icon} {desc} | {volume}%", - "smooth-scrolling-threshold": 1, -}, -"pulseaudio#microphone_vertical": { - "format": "{format_source}", - "format-source": "󰍬", - "format-source-muted": "󰍭", - "on-click-right": "pavucontrol", - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle-mic", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --mic-inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --mic-dec", - "max-volume": 100, - "tooltip": true, - "tooltip-format": "{source_desc} | {source_volume}%", -}, -"custom/power_vertical": { - "format": "⏻", - "exec": "echo ; echo 󰟡 power // blur", - "on-click": "$HOME/.config/hypr/scripts/Wlogout.sh", - "on-click-right": "$HOME/.config/hypr/scripts/ChangeBlur.sh", - "interval": 86400, // once every day - "tooltip": true, -}, -} diff --git a/hyprland/.config/waybar/Modules.3 b/hyprland/.config/waybar/Modules.3 deleted file mode 100644 index e825e53..0000000 --- a/hyprland/.config/waybar/Modules.3 +++ /dev/null @@ -1,696 +0,0 @@ -//* ---- 💫 https://github.com/JaKooLit 💫 ---- *// -/* Waybar Modules */ - -{ -/* NOTE: hyprland-workspaces on a separate file */ -// Weather and Temperature Modules as this is most like to change always. -// Result is of course easier to edit -"custom/weather": { - "format": "{}", - "format-alt": "{alt}: {}", - "format-alt-click": "click", - "interval": 3600, - "return-type": "json", - "exec": "$HOME/.config/hypr/UserScripts/Weather.sh", - //"exec": "$HOME/.config/hypr/UserScripts/Weather.py", - "exec-if": "ping wttr.in -c1", - "tooltip": true, -}, -"temperature": { - "interval": 10, - "tooltip": true, - "hwmon-path": [ - "/sys/class/hwmon/hwmon1/temp1_input", - "/sys/class/thermal/thermal_zone0/temp" - ], - //"thermal-zone": 0, - "critical-threshold": 82, - "format-critical": "{temperatureC}°C {icon}", - "format": "{temperatureC}°C {icon}", - "format-icons": [ - "󰈸" - ], - "on-click-right": "kitty --title nvtop sh -c 'nvtop'" -}, -"temperature#vertical": { - "interval": 10, - "tooltip": true, - "hwmon-path": [ - "/sys/class/hwmon/hwmon1/temp1_input", - "/sys/class/thermal/thermal_zone0/temp" - ], - //"thermal-zone": 0, - "critical-threshold": 80, - "format-critical": "{icon}\n{temperatureC}°C", - "format": " {icon}", - "format-icons": [ - "󰈸" - ], - "on-click-right": "kitty --title nvtop sh -c 'nvtop'" -}, - - -// GROUP -"group/motherboard": { - "orientation": "horizontal", - "modules": [ - "cpu", - "memory", - "temperature", - "disk", - ] -}, -"group/mobo_drawer": { - "orientation": "inherit", - "drawer": { - "transition-duration": 500, - "children-class": "cpu", - "transition-left-to-right": true - }, - "modules": [ - "temperature", - "cpu", - "memory", - "disk", - ] -}, -"group/laptop": { - "orientation": "inherit", - "modules": [ - "backlight", - "battery", - ] -}, -"group/audio": { - "orientation": "inherit", - "drawer": { - "transition-duration": 500, - "children-class": "pulseaudio", - "transition-left-to-right": true - }, - "modules": [ - "pulseaudio", - "pulseaudio#microphone", - ] -}, -"group/connections": { - "orientation": "inherit", - "drawer": { - "transition-duration": 500, - "children-class": "bluetooth", - "transition-left-to-right": true - }, - "modules": [ - "network", - "bluetooth", - ] -}, -"backlight": { - "interval": 2, - "align": 0, - "rotate": 0, - //"format": "{icon} {percent}%", - "format-icons": [ - " ", - " ", - " ", - "󰃝 ", - "󰃞 ", - "󰃟 ", - "󰃠 " - ], - "format": "{icon}", - //"format-icons": ["","","","","","","","","","","","","","",""], - "tooltip-format": "backlight {percent}%", - "icon-size": 10, - "on-click": "", - "on-click-middle": "", - "on-click-right": "", - "on-update": "", - "on-scroll-up": "$HOME/.config/hypr/scripts/Brightness.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Brightness.sh --dec", - "smooth-scrolling-threshold": 1, -}, -"backlight#2": { - "device": "intel_backlight", - "format": "{icon} {percent}%", - "format-icons": ["", ""] -}, -"battery": { - //"interval": 5, - "align": 0, - "rotate": 0, - //"bat": "BAT1", - //"adapter": "ACAD", - "full-at": 100, - "design-capacity": false, - "states": { - "good": 95, - "warning": 30, - "critical": 15 - }, - "format": "{icon} {capacity}%", - "format-charging": " {capacity}%", - "format-plugged": "󱘖 {capacity}%", - "format-alt-click": "click", - "format-full": "{icon} Full", - "format-alt": "{icon} {time}", - "format-icons": [ - "󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹" - ], - "format-time": "{H}h {M}min", - "tooltip": true, - "tooltip-format": "{timeTo} {power}w", - "on-click-middle": "$HOME/.config/hypr/scripts/ChangeBlur.sh", - "on-click-right": "$HOME/.config/hypr/scripts/Wlogout.sh", -}, -"bluetooth": { - "format": "", - "format-disabled": "󰂳", - "format-connected": "󰂱 {num_connections}", - "tooltip-format": " {device_alias}", - "tooltip-format-connected": "{device_enumerate}", - "tooltip-format-enumerate-connected": " {device_alias} 󰂄{device_battery_percentage}%", - "tooltip": true, - "on-click": "blueman-manager", -}, -"clock": { - "interval": 1, - //"format": " {:%I:%M %p}", // AM PM format - "format": " {:%H:%M:%S}", // 24H - "format-alt": " {:%H:%M  %Y, %d %B, %A}", - "tooltip-format": "{calendar}", - "calendar": { - "mode": "year", - "mode-mon-col": 3, - "weeks-pos": "right", - "on-scroll": 1, - "format": { - "months": "{}", - "days": "{}", - "weeks": "W{}", - "weekdays": "{}", - "today": "{}" - } - } -}, -"actions": { - "on-click-right": "mode", - "on-click-forward": "tz_up", - "on-click-backward": "tz_down", - "on-scroll-up": "shift_up", - "on-scroll-down": "shift_down" -}, -"clock#2": { - //"format": " {:%I:%M %p}", // AM PM format - "format": " {:%H:%M}", // 24H - "format-alt": "{:%A | %H:%M | %e %B}", - "tooltip-format": "{:%Y %B}\n{calendar}" -}, -"clock#3": { - //"format": "{:%I:%M %p - %d/%b}", //for AM/PM - "format": "{:%H:%M - %d/%b}", // 24H - "tooltip": false -}, -"clock#4": { - "interval": 60, - //"format": "{:%B | %a %d, %Y | %I:%M %p}", // AM PM format - "format": "{:%B | %a %d, %Y | %H:%M}", // 24H - "format-alt": "{:%a %b %d, %G}", - "tooltip-format": "{:%B %Y}\n{calendar}", -}, -"clock#5": { - //"format": "{:%A, %I:%M %P}", // AM PM format - "format": "{:%a %d | %H:%M}", // 24H - "format-alt": "{:%A, %d %B, %Y (%R)}" -}, -"cpu": { - "format": "{usage}% 󰍛", - "interval": 1, - "min-length": 5, - "format-alt-click": "click", - "format-alt": "{icon0}{icon1}{icon2}{icon3} {usage:>2}% 󰍛", - "format-icons": [ - "▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" - ], - "on-click-right": "gnome-system-monitor", -}, -"disk": { - "interval": 30, - //"format": "󰋊", - "path": "/", - //"format-alt-click": "click", - "format": "{percentage_used}% 󰋊", - //"tooltip": true, - "tooltip-format": "{used} used out of {total} on {path} ({percentage_used}%)", -}, -"hyprland/language": { - "format": "Lang: {}", - "format-en": "US", - "format-tr": "Korea", - "keyboard-name": "at-translated-set-2-keyboard", - "on-click": "hyprctl switchxkblayout $SET_KB next" -}, -"hyprland/submap": { - "format": " {}", // Icon: expand-arrows-alt - "tooltip": false, -}, -"hyprland/window": { - "format": "{}", - "max-length": 20, - "separate-outputs": true, - "offscreen-css": true, - "offscreen-css-text": "(inactive)", - "rewrite": { - "(.*) — Mozilla Firefox": " $1", - "(.*) - fish": "> [$1]", - "(.*) - zsh": "> [$1]", - "(.*) - $term": "> [$1]", - }, -}, -"idle_inhibitor": { - "tooltip": true, - "tooltip-format-activated": "Idle_inhibitor active", - "tooltip-format-deactivated": "Idle_inhibitor not active", - "format": "{icon}", - "format-icons": { - "activated": " ", - "deactivated": " ", - } -}, -"keyboard-state": { - //"numlock": true, - "capslock": true, - "format": { - "numlock": "N {icon}", - "capslock": "󰪛 {icon}", - }, - "format-icons": { - "locked": "", - "unlocked": "" - }, -}, -"memory": { - "interval": 10, - "format": "{used:0.1f}G 󰾆", - "format-alt": "{percentage}% 󰾆", - "format-alt-click": "click", - "tooltip": true, - "tooltip-format": "{used:0.1f}GB/{total:0.1f}G", - "on-click-right": "kitty --title btop sh -c 'btop'" -}, -"mpris": { - "interval": 10, - "format": "{player_icon} ", - "format-paused": "{status_icon} {dynamic}", - "on-click-middle": "playerctl play-pause", - "on-click": "playerctl previous", - "on-click-right": "playerctl next", - "scroll-step": 5.0, - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "smooth-scrolling-threshold": 1, - "player-icons": { - "chromium": "", - "default": "", - "firefox": "", - "kdeconnect": "", - "mopidy": "", - "mpv": "󰐹", - "spotify": "", - "vlc": "󰕼", - }, - "status-icons": { - "paused": "󰐎", - "playing": "", - "stopped": "", - }, - // "ignored-players": ["firefox"] - "max-length": 30, -}, -"network": { - "format": "{ifname}", - "format-wifi": "{icon}", - "format-ethernet": "󰌘", - "format-disconnected": "󰌙", - "tooltip-format": "{ipaddr}  {bandwidthUpBits}  {bandwidthDownBits}", - "format-linked": "󰈁 {ifname} (No IP)", - "tooltip-format-wifi": "{essid} {icon} {signalStrength}%", - "tooltip-format-ethernet": "{ifname} 󰌘", - "tooltip-format-disconnected": "󰌙 Disconnected", - "max-length": 30, - "format-icons": [ - "󰤯", "󰤟", "󰤢", "󰤥", "󰤨" - ], - "on-click-right": "kitty nmtui" -}, -"network#speed": { - "interval": 1, - "format": "{ifname}", - "format-wifi": "{icon}  {bandwidthUpBytes}  {bandwidthDownBytes}", - "format-ethernet": "󰌘  {bandwidthUpBytes}  {bandwidthDownBytes}", - "format-disconnected": "󰌙", - "tooltip-format": "{ipaddr}", - "format-linked": "󰈁 {ifname} (No IP)", - "tooltip-format-wifi": "{essid} {icon} {signalStrength}%", - "tooltip-format-ethernet": "{ifname} 󰌘", - "tooltip-format-disconnected": "󰌙 Disconnected", - "min-length": 24, - "max-length": 24, - "format-icons": [ - "󰤯", "󰤟", "󰤢", "󰤥", "󰤨" - ] -}, -"power-profiles-daemon": { - "format": "{icon}", - "tooltip-format": "Power profile: {profile}\nDriver: {driver}", - "tooltip": true, - "format-icons": { - "default": "", - "performance": "", - "balanced": "", - "power-saver": "" - } -}, -"pulseaudio": { - "format": "{icon} {volume}%", - "format-bluetooth": "{icon} 󰂰 {volume}%", - "format-muted": "󰖁", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": [ - "", "", "󰕾", "" - ], - "ignored-sinks": [ - "Easy Effects Sink" - ], - }, - "scroll-step": 5.0, - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle", - "on-click-right": "pavucontrol -t 3", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "tooltip-format": "{icon} {desc} | {volume}%", - "smooth-scrolling-threshold": 1, -}, -"pulseaudio#1": { - "format": "{icon} {volume}%", - "format-bluetooth": "{icon} {volume}%", - "format-bluetooth-muted": " {icon}", - "format-muted": "󰸈", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": ["", "", ""] - }, - "on-click": "pamixer --toggle-mute", - "on-click-right": "pavucontrol -t 3", - "tooltip": true, - "tooltip-format": "{icon} {desc} | {volume}%", -}, -"pulseaudio#microphone": { - "format": "{format_source}", - "format-source": " {volume}%", - "format-source-muted": "", - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle-mic", - "on-click-right": "pavucontrol -t 4", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --mic-inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --mic-dec", - "tooltip-format": "{source_desc} | {source_volume}%", - "scroll-step": 5, -}, -"tray": { - "icon-size": 20, - "spacing": 4, -}, -"wireplumber": { - "format": "{icon} {volume} %", - "format-muted": " Mute", - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle", - "on-click-right": "pavucontrol -t 3", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "format-icons": [ - "", "", "󰕾", "" - ], -}, -"wlr/taskbar": { - "format": "{icon} {name}", - "icon-size": 16, - "all-outputs": false, - "tooltip-format": "{title}", - "on-click": "activate", - "on-click-middle": "close", - "ignore-list": [ - "wofi", - "rofi", - "kitty", - "kitty-dropterm" - ], -}, -"custom/cycle_wall": { - "format": " ", - "on-click": "$HOME/.config/hypr/UserScripts/WallpaperSelect.sh", - "on-click-right": "$HOME/.config/hypr/UserScripts/WallpaperRandom.sh", - "on-click-middle": "$HOME/.config/hypr/scripts/WaybarStyles.sh", - "tooltip": true, - "tooltip-format": "Left Click: Wallpaper Menu\nMiddle Click: Random wallpaper\nRight Click: Waybar Styles Menu", -}, -"custom/hint": { - "format": "󰺁 HINT!", - "on-click": "$HOME/.config/hypr/scripts/KeyHints.sh", - "tooltip": true, - "tooltip-format": "󱧣 Quick Tips", -}, -// Hypridle inhibitor -"custom/hypridle": { - "format": " 󱫗 ", - "return-type": "json", - "escape": true, - "exec-on-event": true, - "interval": 60, - "exec": "$HOME/.config/hypr/scripts/Hypridle.sh status", - "on-click": "$HOME/.config/hypr/scripts/Hypridle.sh toggle", - "on-click-right": "hyprlock" - }, -"custom/keyboard": { - "exec": "cat $HOME/.cache/kb_layout", - "interval": 1, - "format": " {}", - "on-click": "$HOME/.config/hypr/scripts/SwitchKeyboardLayout.sh", -}, -"custom/light_dark": { - "format": "󰔎", - "on-click": "$HOME/.config/hypr/scripts/DarkLight.sh", - "on-click-right": "$HOME/.config/hypr/scripts/WaybarStyles.sh", - "on-click-middle": "$HOME/.config/hypr/UserScripts/WallpaperSelect.sh", - "tooltip": true, - "tooltip-format": "Left Click: Switch Dark-Light Themes\nMiddle Click: Wallpaper Menu\nRight Click: Waybar Styles Menu", -}, -"custom/lock": { - "format": "󰌾", - "on-click": "$HOME/.config/hypr/scripts/LockScreen.sh", - "tooltip": true, - "tooltip-format": "󰷛 Screen Lock", - -}, -"custom/menu": { - "format": "", - "on-click": "pkill rofi || rofi -show drun -modi run,drun,filebrowser,window", - "on-click-middle": "$HOME/.config/hypr/UserScripts/WallpaperSelect.sh", - "on-click-right": "$HOME/.config/hypr/scripts/WaybarLayout.sh", - "tooltip": true, - "tooltip-format": "Left Click: Rofi Menu\nMiddle Click: Wallpaper Menu\nRight Click: Waybar Layout Menu", -}, -// This is a custom cava visualizer -"custom/cava_mviz": { - "exec": "$HOME/.config/hypr/scripts/WaybarCava.sh", - "format": "{}" -}, -"custom/playerctl": { - "format": "{}", - "return-type": "json", - "max-length": 35, - "exec": "playerctl -a metadata --format '{\"text\": \"{{artist}} $HOME {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F", - "on-click-middle": "playerctl play-pause", - "on-click": "playerctl previous", - "on-click-right": "playerctl next", - "scroll-step": 5.0, - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "smooth-scrolling-threshold": 1, -}, -"custom/power": { - "format": "⏻ ", - "on-click": "$HOME/.config/hypr/scripts/Wlogout.sh", - "on-click-right": "$HOME/.config/hypr/scripts/ChangeBlur.sh", - "tooltip": true, - "tooltip-format": "Left Click: Logout Menu\nRight Click: Change Blur", -}, -"custom/swaync": { - "tooltip": true, - "tooltip-format": "Left Click: Launch Notification Center\nRight Click: Do not Disturb", - "format": "{} {icon}", - "format-icons": { - "notification": "", - "none": "", - "dnd-notification": "", - "dnd-none": "", - "inhibited-notification": "", - "inhibited-none": "", - "dnd-inhibited-notification": "", - "dnd-inhibited-none": "" - }, - "return-type": "json", - "exec-if": "which swaync-client", - "exec": "swaync-client -swb", - "on-click": "sleep 0.1 && swaync-client -t -sw", - "on-click-right": "swaync-client -d -sw", - "escape": true, -}, -// NOTE:! This is only for Arch and Arch Based Distros depend: pacman-contrib -"custom/updater": { - "format": " {}", - "exec": "checkupdates | wc -l", - "exec-if": "[[ $(checkupdates | wc -l) ]]", - "interval": 15, - "on-click": "if command -v paru &> /dev/null; then kitty -T update paru -Syu; else kitty -T update yay -Syu; fi && notify-send 'The system has been updated'", - "tooltip": true, - "tooltip-format": "Left Click: Update System\nArch Linux Only", -}, - -// Separators -"custom/separator#dot": { - "format": "", - "interval": "once", - "tooltip": false -}, -"custom/separator#dot-line": { - "format": "", - "interval": "once", - "tooltip": false -}, -"custom/separator#line": { - "format": "|", - "interval": "once", - "tooltip": false -}, -"custom/separator#blank": { - "format": "", - "interval": "once", - "tooltip": false -}, -"custom/separator#blank_2": { - "format": " ", - "interval": "once", - "tooltip": false -}, -"custom/separator#blank_3": { - "format": " ", - "interval": "once", - "tooltip": false -}, -// Modules below are for vertical layout -"backlight#vertical": { - "interval": 2, - "align": 0.35, - "rotate": 1, - "format": "{icon}", - //"format-icons": ["󰃞", "󰃟", "󰃠"], - "format-icons": [ - "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - ], - "on-click": "", - "on-click-middle": "", - "on-click-right": "", - "on-update": "", - "on-scroll-up": "$HOME/.config/hypr/scripts/Brightness.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Brightness.sh --dec", - "smooth-scrolling-threshold": 1, - "tooltip-format": "{percent}%", -}, -"clock#vertical": { - "format": "\n{:%H\n%M\n%S\n\n \n%d\n%m\n%y}", - "interval": 1, - //"format": "\n{:%I\n%M\n%p\n\n \n%d\n%m\n%y}", - "tooltip": true, - "tooltip-format": "{calendar}", - "calendar": { - "mode": "year", - "mode-mon-col": 3, - "format": { - "today": "{}", - } - } -}, -"cpu#vertical": { - "format": "󰍛\n{usage}%", - "interval": 1, - "on-click-right": "gnome-system-monitor", -}, -"memory#vertical": { - "interval": 10, - "format": "󰾆\n{percentage}%", - "format-alt": "󰾆\n{used:0.1f}G", - "format-alt-click": "click", - "tooltip": true, - "tooltip-format": "{used:0.1f}GB/{total:0.1f}G", - "on-click-right": "kitty --title btop sh -c 'btop'", -}, -"pulseaudio#vertical": { - "format": "{icon}", - "format-bluetooth": "󰂰", - "format-muted": "󰖁", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": [ - "", "", "󰕾", "" - ], - "tooltip-format": "{icon} {desc} | {volume}%", - "ignored-sinks": [ - "Easy Effects Sink" - ], - }, - "scroll-step": 5.0, - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle", - "on-click-right": "pavucontrol -t 3", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --dec", - "tooltip-format": "{icon} {desc} | {volume}%", - "smooth-scrolling-threshold": 1, -}, -"pulseaudio#microphone_vertical": { - "format": "{format_source}", - "format-source": "󰍬", - "format-source-muted": "󰍭", - "on-click-right": "pavucontrol", - "on-click": "$HOME/.config/hypr/scripts/Volume.sh --toggle-mic", - "on-scroll-up": "$HOME/.config/hypr/scripts/Volume.sh --mic-inc", - "on-scroll-down": "$HOME/.config/hypr/scripts/Volume.sh --mic-dec", - "max-volume": 100, - "tooltip": true, - "tooltip-format": "{source_desc} | {source_volume}%", -}, -"custom/power_vertical": { - "format": "⏻", - "exec": "echo ; echo 󰟡 power // blur", - "on-click": "$HOME/.config/hypr/scripts/Wlogout.sh", - "on-click-right": "$HOME/.config/hypr/scripts/ChangeBlur.sh", - "interval": 86400, // once every day - "tooltip": true, -}, -} diff --git a/hyprland/.config/waybar/wallust/colors-waybar.css b/hyprland/.config/waybar/wallust/colors-waybar.css index 6fc876b..467de4d 100644 --- a/hyprland/.config/waybar/wallust/colors-waybar.css +++ b/hyprland/.config/waybar/wallust/colors-waybar.css @@ -1,23 +1,23 @@ /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ /* wallust template - colors-waybar */ -@define-color foreground #D3E2F1; -@define-color background rgba(31,31,34,0.25); -@define-color cursor #D3E2F1; +@define-color foreground #ECE7E2; +@define-color background rgba(0,0,4,0.25); +@define-color cursor #ECE7E2; -@define-color color0 #464549; -@define-color color1 #171623; -@define-color color2 #1B1D2A; -@define-color color3 #37455A; -@define-color color4 #40546A; -@define-color color5 #4E6781; -@define-color color6 #6082A0; -@define-color color7 #B7CDE2; -@define-color color8 #80909E; -@define-color color9 #1E1E2E; -@define-color color10 #242738; -@define-color color11 #495D77; -@define-color color12 #56708E; -@define-color color13 #6889AC; -@define-color color14 #80ADD6; -@define-color color15 #B7CDE2; +@define-color color0 #000004; +@define-color color1 #292B33; +@define-color color2 #523F41; +@define-color color3 #49596E; +@define-color color4 #825752; +@define-color color5 #905E56; +@define-color color6 #978B80; +@define-color color7 #DCD4CD; +@define-color color8 #9A948F; +@define-color color9 #373944; +@define-color color10 #6E5457; +@define-color color11 #627792; +@define-color color12 #AE746D; +@define-color color13 #C07D73; +@define-color color14 #C9B9AB; +@define-color color15 #DCD4CD; diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf index 7a1ae9f..d5b4249 100644 --- a/kitty/.config/kitty/kitty.conf +++ b/kitty/.config/kitty/kitty.conf @@ -1,172 +1,39 @@ # vim:fileencoding=utf-8:ft=conf -# Font family. You can also specify different fonts for the -# bold/italic/bold-italic variants. By default they are derived automatically, -# by the OSes font system. Setting them manually is useful for font families -# that have many weight variants like Book, Medium, Thick, etc. For example: -# font_family Operator Mono Book -# bold_font Operator Mono Thick -# bold_italic_font Operator Mono Medium -# font_family Input Mono -#font_family FiraCode Nerd Font Mono font_family MesloLGS Nerd Font Mono italic_font auto bold_font auto bold_italic_font auto # Font size (in pts) -font_size 14.0 +font_size 16.0 -# The foreground color -# foreground #c0b18b - -# The background color -# background #262626 +window_padding_width 4 +linux_display_server auto background_opacity 0.9 -# The foreground for selections -# selection_foreground #2f2f2f - -# The background for selections -# selection_background #d75f5f - -# The cursor color -# cursor #8fee96 - -# The cursor shape can be one of (block, beam, underline) cursor_shape block - -# The interval (in seconds) at which to blink the cursor. Set to zero to -# disable blinking. cursor_blink_interval 0.5 - -# Stop blinking cursor after the specified number of seconds of keyboard inactivity. Set to -# zero or a negative number to never stop blinking. cursor_stop_blinking_after 15.0 - -# Number of lines of history to keep in memory for scrolling back scrollback_lines 2000 - -# Program with which to view scrollback in a new window. The scrollback buffer is passed as -# STDIN to this program. If you change it, make sure the program you use can -# handle ANSI escape sequences for colors and text formatting. scrollback_pager less +G -R - -# Wheel scroll multiplier (modify the amount scrolled by the mouse wheel) wheel_scroll_multiplier 5.0 - -# The interval between successive clicks to detect double/triple clicks (in seconds) click_interval 0.5 - -# Characters considered part of a word when double clicking. In addition to these characters -# any character that is marked as an alpha-numeric character in the unicode -# database will be matched. select_by_word_characters :@-./_~?&=%+# - -# Hide mouse cursor after the specified number of seconds of the mouse not being used. Set to -# zero or a negative number to disable mouse cursor hiding. mouse_hide_wait 0.0 - -# The enabled window layouts. A comma separated list of layout names. The special value * means -# all layouts. The first listed layout will be used as the startup layout. -# For a list of available layouts, see the file layouts.py enabled_layouts * - -# If enabled, the window size will be remembered so that new instances of kitty will have the same -# size as the previous instance. If disabled, the window will initially have size configured -# by initial_window_width/height, in pixels. remember_window_size no initial_window_width 640 initial_window_height 400 - -# Delay (in milliseconds) between screen updates. Decreasing it, increases fps -# at the cost of more CPU usage. The default value yields ~100fps which is more -# that sufficient for most uses. -# repaint_delay 10 repaint_delay 10 - -# Delay (in milliseconds) before input from the program running in the terminal -# is processed. Note that decreasing it will increase responsiveness, but also -# increase CPU usage and might cause flicker in full screen programs that -# redraw the entire screen on each loop, because kitty is so fast that partial -# screen updates will be drawn. input_delay 3 - -# Visual bell duration. Flash the screen when a bell occurs for the specified number of -# seconds. Set to zero to disable. visual_bell_duration 0.0 - -# Enable/disable the audio bell. Useful in environments that require silence. enable_audio_bell no - -# The modifier keys to press when clicking with the mouse on URLs to open the URL open_url_modifiers ctrl+shift - -# The program with which to open URLs that are clicked on. The special value "default" means to -# use the operating system's default URL handler. open_url_with default - -# The value of the TERM environment variable to set term xterm-kitty - -# The width (in pts) of window borders. Will be rounded to the nearest number of pixels based on screen resolution. window_border_width 0 - window_margin_width 15 -# The color for the border of the active window -# active_border_color #ffffff - -# The color for the border of inactive windows -# inactive_border_color #cccccc - -# Tab-bar colors -# active_tab_foreground #000 -# active_tab_background #eee -# inactive_tab_foreground #444 -# inactive_tab_background #999 - - -# The 16 terminal colors. There are 8 basic colors, each color has a dull and -# bright version. - -# black -# color0 #2f2f2f -# color8 #656565 - -# red -# color1 #d75f5f -# color9 #d75f5f - -# green -# color2 #d4d232 -# color10 #8fee96 - -# yellow -# color3 #af865a -# color11 #cd950c - -# blue -# color4 #22c3a1 -# color12 #22c3a1 - -# magenta -# color5 #775759 -# color13 #775759 - -# cyan -# color6 #84edb9 -# color14 #84edb9 - -# white -# color7 #c0b18b -# color15 #d8d8d8 - -# Key mapping -# For a list of key names, see: http://www.glfw.org/docs/latest/group__keys.html -# For a list of modifier names, see: http://www.glfw.org/docs/latest/group__mods.html -# You can use the special action no_op to unmap a keyboard shortcut that is -# assigned in the default configuration. - # Clipboard map super+v paste_from_clipboard map ctrl+shift+s paste_from_selection @@ -218,35 +85,13 @@ map ctrl+shift+up increase_font_size map ctrl+shift+down decrease_font_size map ctrl+shift+backspace restore_font_size -# Symbol mapping (special font for specified unicode code points). Map the -# specified unicode codepoints to a particular font. Useful if you need special -# rendering for some symbols, such as for Powerline. Avoids the need for -# patched fonts. Each unicode code point is specified in the form U+. You can specify multiple code points, separated by commas -# and ranges separated by hyphens. symbol_map itself can be specified multiple times. -# Syntax is: -# -# symbol_map codepoints Font Family Name -# -# For example: -# -#symbol_map U+E0A0-U+E0A2,U+E0B0-U+E0B3 PowerlineSymbols -#hide_window_decorations yes macos_option_as_alt no remember_window_size yes confirm_os_window_close 0 - -# Change the color of the kitty window's titlebar on macOS. A value of "system" -# means to use the default system color, a value of "background" means to use -# the default background color and finally you can use an arbitrary color, such -# as #12af59 or "red". -# macos_titlebar_color background - allow_remote_control yes include ./theme.conf - # BEGIN_KITTY_THEME # Catppuccin-Mocha include current-theme.conf -# END_KITTY_THEME \ No newline at end of file +# END_KITTY_THEME