diff --git a/binds.conf b/binds.conf deleted file mode 100644 index 4199ddc..0000000 --- a/binds.conf +++ /dev/null @@ -1,13 +0,0 @@ -$MOD1=SUPER -$MOD2=ALT - -bind=$MOD1,1,exec,$THEME/scripts/workspace_switch 1 -bind=$MOD1,2,exec,$THEME/scripts/workspace_switch 2 -bind=$MOD1,3,exec,$THEME/scripts/workspace_switch 3 -bind=$MOD1,4,exec,$THEME/scripts/workspace_switch 4 -bind=$MOD1,5,exec,$THEME/scripts/workspace_switch 5 -bind=$MOD1,6,exec,$THEME/scripts/workspace_switch 6 -bind=$MOD1,7,exec,$THEME/scripts/workspace_switch 7 -bind=$MOD1,8,exec,$THEME/scripts/workspace_switch 8 -bind=$MOD1,9,exec,$THEME/scripts/workspace_switch 9 -bind=$MOD1,0,exec,$THEME/scripts/workspace_switch 10 \ No newline at end of file diff --git a/colors b/colors index a979f58..07b4615 100644 --- a/colors +++ b/colors @@ -1,19 +1,19 @@ -0: #1b3c46 -1: #9DBAD8 -2: #DABAC8 -3: #B2C2DE -4: #B4C6E3 -5: #D5C7DA -6: #E6C9D5 -7: #dedde8 -8: #9b9aa2 -9: #9DBAD8 -10: #DABAC8 -11: #B2C2DE -12: #B4C6E3 -13: #D5C7DA -14: #E6C9D5 -15: #dedde8 -background: #1b3c46 -foreground: #dedde8 -cursor: #dedde8 +0: #181716 +8: #93918b +1: #b57e72 +9: #b57e72 +2: #8cb97a +10: #8cb97a +3: #c9c384 +11: #c9c384 +4: #9c96bc +12: #9c96bc +5: #dba3c7 +13: #dba3c7 +6: #afddce +14: #afddce +7: #edeae1 +15: #edeae1 +background: #1e1d1c +foreground: #e8e5da +cursor: #e8e5da diff --git a/components/ags/config.js b/components/ags/config.js index b4d97f1..a1ab467 100644 --- a/components/ags/config.js +++ b/components/ags/config.js @@ -20,10 +20,14 @@ import { import { css, scss } from "./util.js"; import { Workspaces } from "./widgets/workspace.js"; +import { Info } from "./widgets/info.js"; -Utils.exec(`sassc ${scss} ${css}`); +const { exec, subprocess } = Utils; +const { Box, Window, Label } = Widget; -Utils.subprocess( +exec(`sassc ${scss} ${css}`); + +subprocess( [ "inotifywait", "--recursive", @@ -33,59 +37,42 @@ Utils.subprocess( App.configDir + "/style", ], () => { - Utils.exec(`sassc ${scss} ${css}`); + exec(`sassc ${scss} ${css}`); App.resetCss(); App.applyCss(css); } ); -// const Workspaces = () => -// Widget.Box({ -// className: "workspaces", - -// children: Array.from({ length: 10 }, (_, i) => i + 1).map((i) => -// Widget.EventBox({ -// className: [`${i}`], -// child: NierToggle({ -// name: `workspace-${i}`, -// className: [`${i}`], -// label: `${i}`, -// size: 80, -// }), -// onPrimaryClick: (self) => { -// Utils.execAsync(`hyprctl dispatch workspace ${i}`); -// }, -// }) -// ), -// connections: [ -// [ -// Hyprland, -// (box) => { -// //loop through children -// for (const element of box.children) { -// console.log(element.className, Hyprland.active.workspace.id); -// if (element.className.includes(`${Hyprland.active.workspace.id}`)) { -// element.child.className = ["nier-toggle-on", "workspace"]; -// } else { -// element.child.className = ["nier-toggle-off"]; -// } -// } -// }, -// ], -// ], -// }); +const top = () => + Box({ + vertical: true, + className: ["top"], + children: [ + Box({ + children: [Workspaces(), Info()], + }), + Box({ + className: ["under-workspaces"], + style: `background: url("${ + App.configDir + "/assets/nier-border.svg" + }") repeat-x;min-width: ${SCREEN_WIDTH}px;background-size: 80px 20px;min-height: 80px;`, + child: Label(""), + }), + ], + }); const Bar = ({ monitor } = {}) => { - return Widget.Window({ + return Window({ name: `bar-${monitor}`, // name has to be unique className: "bar", monitor, - margin: [50, 50], + margin: [0, 0], anchor: ["top", "left", "right"], exclusive: true, layer: "top", - child: Widget.Box({ - children: [Workspaces()], + child: Box({ + style: "margin-top: 10px;", + children: [top()], }), }); }; diff --git a/components/ags/nier/buttons.js b/components/ags/nier/buttons.js index 00ff5df..d4b915e 100644 --- a/components/ags/nier/buttons.js +++ b/components/ags/nier/buttons.js @@ -61,7 +61,7 @@ export const NierLongButton = ({ children: [ Icon({ icon: App.configDir + "/assets/nier-pointer.svg", - size: 37, + size: 35, className: [ "nier-long-button-hover-icon", "nier-long-button-hover-icon-hidden", diff --git a/components/ags/style/color.scss b/components/ags/style/color.scss index 3613143..7c64513 100644 --- a/components/ags/style/color.scss +++ b/components/ags/style/color.scss @@ -1,6 +1,4 @@ -$tan: rgba(194, 189, 166, 1); -$brown: rgba(72, 70, 61, 1); -$brown25: rgba(72, 70, 61, .25); -$brown15: rgba(72, 70, 61, .15); -$brown025: rgba(72, 70, 61, .025); -$darkBrown: rgba(69, 67, 58, 1); \ No newline at end of file +$tan: #c2bda6; +$brown: #48463d; + +$darkBrown: #45433a; diff --git a/components/ags/style/nier/longbutton.scss b/components/ags/style/nier/longbutton.scss index acb3d4b..deb992e 100644 --- a/components/ags/style/nier/longbutton.scss +++ b/components/ags/style/nier/longbutton.scss @@ -23,11 +23,7 @@ $button_spacing_horizontal: 5px; border: none; border-top: transparent $accent_border solid; border-bottom: transparent $accent_border solid; - min-width: 200px; -} - -.nier-toggle { - // border: blue 2px solid; + min-width: 150px; } .nier-toggle-on { @@ -42,11 +38,11 @@ $button_spacing_horizontal: 5px; // the actual button looking thing ( is actuaally a label :0 ) .nier-long-button label { - font-size: 2rem; + font-size: 1.5rem; background: linear-gradient( 90deg, - $brown25 0%, - $brown25 50%, + rgba($brown, 0.25) 0%, + rgba($brown, 0.25) 50%, $brown 50%, $brown 100% ); @@ -89,10 +85,10 @@ $button_spacing_horizontal: 5px; margin-top: 5px; background: linear-gradient( 90deg, - $brown25 7px, + rgba($brown, 0.25) 7px, transparent 0px, transparent 13px, - $brown25 13px, + rgba($brown, 0.25) 13px, transparent 18px ); min-width: 20px; diff --git a/components/ags/style/style.css b/components/ags/style/style.css index f5738e4..8f8b625 100644 --- a/components/ags/style/style.css +++ b/components/ags/style/style.css @@ -1,6 +1,9 @@ * { all: unset; } +label { + font-family: Arial, sans-serif; } + .nier-toggle-on { opacity: 1; transition: opacity 0.3s ease-in-out; } @@ -10,7 +13,7 @@ transition: opacity 0.3s ease-in-out; } .nier-long-button label { - font-size: 2rem; + font-size: 1.5rem; background: linear-gradient(90deg, rgba(72, 70, 61, 0.25) 0%, rgba(72, 70, 61, 0.25) 50%, #48463d 50%, #48463d 100%); background-size: 200%; color: #48463d; @@ -31,7 +34,7 @@ border: none; border-top: transparent 3px solid; border-bottom: transparent 3px solid; - min-width: 200px; + min-width: 150px; transition: border 0.3s ease-in-out; } .nier-long-button-hover { @@ -73,7 +76,7 @@ transition: opacity 0.3s ease-in-out; } .nier-long-button label { - font-size: 2rem; + font-size: 1.5rem; background: linear-gradient(90deg, rgba(72, 70, 61, 0.25) 0%, rgba(72, 70, 61, 0.25) 50%, #48463d 50%, #48463d 100%); background-size: 200%; color: #48463d; @@ -94,7 +97,7 @@ border: none; border-top: transparent 3px solid; border-bottom: transparent 3px solid; - min-width: 200px; + min-width: 150px; transition: border 0.3s ease-in-out; } .nier-long-button-hover { @@ -154,16 +157,12 @@ .active-no-hover-on-hold .nier-long-button-hover-icon { opacity: 1; } -.under-workspaces { - margin-top: -8px; - margin-right: 120px; } - .workspace-button { - margin-bottom: 20px; + margin-bottom: 10px; transition: border 0.3s cubic-bezier(0.15, 0.79, 0, 1); } .workspace-button-container .nier-long-button-hover-icon { - margin-bottom: 20px; } + margin-bottom: 10px; } .workspace-button-container .nier-long-button { transition: margin 0.1s cubic-bezier(0.15, 0.79, 0, 1); } @@ -180,11 +179,18 @@ @keyframes active { 0% { - margin-bottom: 20px; - border: transparent 0px; } + margin-bottom: 10px; + border: #48463d; } + 50% { + padding-bottom: 0px; } 100% { margin-bottom: 0px; - border: none; - border-top: transparent 3px solid; - border-bottom: transparent 3px solid; - min-width: 200px; } } + padding-bottom: 0px; + border-top: 0px; + border-bottom: 0px; } } + +.top { + margin-bottom: -60px; } + +.under-workspaces { + margin-top: -1px; } diff --git a/components/ags/style/style.scss b/components/ags/style/style.scss index e4b10df..93b5c23 100644 --- a/components/ags/style/style.scss +++ b/components/ags/style/style.scss @@ -2,6 +2,11 @@ all: unset; } +label { + font-family: Arial, sans-serif; +} + @import "nier"; @import "widgets/workspace.scss"; +@import "widgets/top.scss"; diff --git a/components/ags/style/widgets/top.scss b/components/ags/style/widgets/top.scss new file mode 100644 index 0000000..cc9bfa8 --- /dev/null +++ b/components/ags/style/widgets/top.scss @@ -0,0 +1,6 @@ +.top { + margin-bottom: -60px; +} +.under-workspaces { + margin-top: -1px; +} diff --git a/components/ags/style/widgets/workspace.scss b/components/ags/style/widgets/workspace.scss index 1563e76..b76e66e 100644 --- a/components/ags/style/widgets/workspace.scss +++ b/components/ags/style/widgets/workspace.scss @@ -4,6 +4,7 @@ .workspace-button-container.active-no-hover { .nier-long-button { @include long-button-hover; + // padding-bottom: 0px; label { transition: background 0.3s cubic-bezier(0.15, 0.79, 0, 1); animation: active-label 0.5s cubic-bezier(0.15, 0.79, 0, 1) forwards; @@ -16,6 +17,7 @@ .workspace-button-container.active { .nier-long-button { + // padding-bottom: 0px; label { transition: background 0.3s cubic-bezier(0.15, 0.79, 0, 1); animation: active-label 0.5s cubic-bezier(0.15, 0.79, 0, 1) forwards; @@ -31,19 +33,19 @@ } } -.under-workspaces { - margin-top: -8px; - margin-right: 120px; -} +// .under-workspaces { +// margin-top: -8px; +// margin-right: 120px; +// } .workspace-button { - margin-bottom: 20px; + margin-bottom: 10px; transition: border 0.3s cubic-bezier(0.15, 0.79, 0, 1); } .workspace-button-container { .nier-long-button-hover-icon { - margin-bottom: 20px; + margin-bottom: 10px; } .nier-long-button { transition: margin 0.1s cubic-bezier(0.15, 0.79, 0, 1); @@ -68,11 +70,17 @@ @keyframes active { 0% { - margin-bottom: 20px; - border: transparent 0px; + margin-bottom: 10px; + border: $brown; + // @include long-button; + } + 50% { + padding-bottom: 0px; } 100% { margin-bottom: 0px; - @include long-button; + padding-bottom: 0px; + border-top: 0px; + border-bottom: 0px; } } diff --git a/components/ags/util.js b/components/ags/util.js index d65dae1..7fad63b 100644 --- a/components/ags/util.js +++ b/components/ags/util.js @@ -44,5 +44,4 @@ export { css, SCREEN_HEIGHT, SCREEN_WIDTH, - zoom_out, }; diff --git a/components/ags/widgets/info.js b/components/ags/widgets/info.js new file mode 100644 index 0000000..9faf81f --- /dev/null +++ b/components/ags/widgets/info.js @@ -0,0 +1,30 @@ +// importing +import { + Hyprland, + Notifications, + Mpris, + Audio, + Battery, + SystemTray, + App, + Widget, + Utils, + Variable, +} from "../imports.js"; +import { + NierLongButton, + NierLongButtonGroup, + NierToggle, +} from "../nier/buttons.js"; + +import { SCREEN_HEIGHT, SCREEN_WIDTH, arradd, arrremove } from "../util.js"; + +const { Box, Label } = Widget; +const { execAsync } = Utils; + +let HOVERING = false; +let REALLY_HOVERING = false; +export const Info = () => + Box({ + child: Label("hlo"), + }); diff --git a/components/ags/widgets/workspace.js b/components/ags/widgets/workspace.js index f50d937..6d0011e 100644 --- a/components/ags/widgets/workspace.js +++ b/components/ags/widgets/workspace.js @@ -22,146 +22,147 @@ import { SCREEN_HEIGHT, SCREEN_WIDTH, arradd, arrremove } from "../util.js"; const { Box, Label } = Widget; const { execAsync } = Utils; +const int_to_string = (i) => { + switch (i) { + case 1: + return "one"; + case 2: + return "two"; + case 3: + return "three"; + case 4: + return "four"; + case 5: + return "five"; + case 6: + return "six"; + case 7: + return "seven"; + case 8: + return "eight"; + case 9: + return "nine"; + case 10: + return "ten"; + } +}; + let HOVERING = false; let REALLY_HOVERING = false; export const Workspaces = () => - Box({ - vertical: true, - children: [ - NierLongButtonGroup({ - horizontal: true, - min_scale: SCREEN_WIDTH, - className: ["workspaces"], - buttons: Array.from({ length: 10 }, (_, i) => i + 1).map((i) => { - return NierLongButton({ - className: ["workspace-button"], - containerClassName: [ - "workspace-button-container", - `workspace-button-${i}`, - ], - label: `${i}`, - onClicked: () => { - execAsync(`hyprctl dispatch workspace ${i}`); - }, - passedOnHover: async (self) => { + NierLongButtonGroup({ + horizontal: true, + min_scale: SCREEN_WIDTH, + className: ["workspaces"], + buttons: Array.from({ length: 10 }, (_, i) => i + 1).map((i) => { + return NierLongButton({ + className: ["workspace-button"], + containerClassName: [ + "workspace-button-container", + `workspace-button-${i}`, + ], + label: `${int_to_string(i).toUpperCase()}`, + onClicked: () => { + execAsync(`hyprctl dispatch workspace ${i}`); + }, + passedOnHover: async (self) => { + if ( + !( + self.parent.className.includes("active") || + self.parent.className.includes("active-no-hover") + ) + ) { + HOVERING = true; + REALLY_HOVERING = true; + } + if (HOVERING) { + for (let button of self.parent.parent.children) { if ( - !( - self.parent.className.includes("active") || - self.parent.className.includes("active-no-hover") + button.className.includes("active") || + button.className.includes("active-no-hover") + ) { + button.className = arrremove( + button.className, + "active-no-hover" + ); + button.className = arrremove(button.className, "active"); + button.className = arradd( + button.className, + "active-no-hover-on-hold" + ); + } + } + } + }, + passedOnHoverLost: async (self) => { + if (!self.className.includes("active")) { + HOVERING = false; + await new Promise((r) => setTimeout(r, 300)); + if (!HOVERING && REALLY_HOVERING) { + REALLY_HOVERING = false; + } + } + if (!HOVERING) { + for (let button of self.parent.parent.children) { + if (button.className.includes("active-on-hold")) { + button.className = arrremove( + button.className, + "active-on-hold" + ); + button.className = arradd(button.className, "active"); + } + if (button.className.includes("active-no-hover-on-hold")) { + button.className = arrremove( + button.className, + "active-no-hover-on-hold" + ); + button.className = arradd(button.className, "active-no-hover"); + } + } + } + }, + containerConnections: [ + [ + Hyprland.active.workspace, + + async (self) => { + console.log( + "workspacec changed to :: ", + Hyprland.active.workspace.id + ); + if ( + !self.className.includes( + `workspace-button-${Hyprland.active.workspace.id}` ) ) { - HOVERING = true; - REALLY_HOVERING = true; - } - if (HOVERING) { - for (let button of self.parent.parent.children) { - if ( - button.className.includes("active") || - button.className.includes("active-no-hover") - ) { - button.className = arrremove( - button.className, - "active-no-hover" - ); - button.className = arrremove(button.className, "active"); - button.className = arradd( - button.className, - "active-no-hover-on-hold" - ); - } - } - } - }, - passedOnHoverLost: async (self) => { - if (!self.className.includes("active")) { - HOVERING = false; - await new Promise((r) => setTimeout(r, 300)); - if (!HOVERING && REALLY_HOVERING) { - REALLY_HOVERING = false; - } - } - if (!HOVERING) { - for (let button of self.parent.parent.children) { - if (button.className.includes("active-on-hold")) { - button.className = arrremove( - button.className, - "active-on-hold" - ); - button.className = arradd(button.className, "active"); - } - if (button.className.includes("active-no-hover-on-hold")) { - button.className = arrremove( - button.className, - "active-no-hover-on-hold" - ); - button.className = arradd( - button.className, - "active-no-hover" - ); - } - } - } - }, - containerConnections: [ - [ - Hyprland.active.workspace, - - async (self) => { - console.log( - "workspacec changed to :: ", - Hyprland.active.workspace.id + self.className = arrremove(self.className, "active-on-hold"); + self.className = arrremove( + self.className, + "active-no-hover-on-hold" + ); + self.className = arrremove(self.className, "active"); + self.className = arrremove(self.className, "active-no-hover"); + self.children[0].icon = + App.configDir + "/assets/nier-pointer.svg"; + } else { + if ( + !self.children[1].className.includes("nier-long-button-hover") + ) { + self.className = arradd(self.className, "active-no-hover"); + } else { + self.children[1].className = arrremove( + self.children[1].className, + "nier-long-button-hover" ); - if ( - !self.className.includes( - `workspace-button-${Hyprland.active.workspace.id}` - ) - ) { - self.className = arrremove( - self.className, - "active-on-hold" - ); - self.className = arrremove( - self.className, - "active-no-hover-on-hold" - ); - self.className = arrremove(self.className, "active"); - self.className = arrremove( - self.className, - "active-no-hover" - ); - self.children[0].icon = - App.configDir + "/assets/nier-pointer.svg"; - } else { - if ( - !self.children[1].className.includes( - "nier-long-button-hover" - ) - ) { - self.className = arradd( - self.className, - "active-no-hover" - ); - } else { - self.children[1].className = arrremove( - self.children[1].className, - "nier-long-button-hover" - ); - self.className = arradd(self.className, "active"); - } - await new Promise((r) => setTimeout(r, 300)); - self.children[0].icon = - App.configDir + "/assets/nier-pointer-white.svg"; - } - }, - ], - ], - }); - }), - }), - Box({ - className: ["under-workspaces"], - style: `background: url("${App.configDir}/assets/nier-border.svg") repeat-x;`, - child: Label(""), - }), - ], + self.className = arradd(self.className, "active"); + } + await new Promise((r) => setTimeout(r, 300)); + self.children[0].icon = + App.configDir + "/assets/nier-pointer-white.svg"; + } + }, + ], + ], + }); + }), }); diff --git a/components/foot.ini b/components/foot.ini new file mode 100644 index 0000000..22fa52f --- /dev/null +++ b/components/foot.ini @@ -0,0 +1,204 @@ +# -*- conf -*- + +# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) +# term=foot (or xterm-256color if built with -Dterminfo=disabled) +# login-shell=no + +# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode +# title=foot +# locked-title=no + +font=BlexMono Nerd Font:size=16 +# font-bold= +# font-italic= +# font-bold-italic= +# font-size-adjustment=0.5 +# line-height= +# letter-spacing=0 +# horizontal-letter-offset=0 +# vertical-letter-offset=0 +# underline-offset= +# underline-thickness= +# box-drawings-uses-font-glyphs=no +# dpi-aware=no + +# initial-window-size-pixels=700x500 # Or, +# initial-window-size-chars= +# initial-window-mode=windowed +pad=7x7 # optionally append 'center' +# resize-delay-ms=100 + +# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body} + +# bold-text-in-bright=no +# word-delimiters=,│`|:"'()[]{}<> +# selection-target=primary +# workers= +# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is ‘libutempter’ (Linux) +# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ‘ulog’ (FreeBSD) + +[environment] +# name=value + +[bell] +# urgent=no +# notify=no +# command= +# command-focused=no + +[scrollback] +# lines=1000 +# multiplier=3.0 +# indicator-position=relative +# indicator-format="" + +[url] +# launch=xdg-open ${url} +# label-letters=sadfjklewcmpgh +# osc8-underline=url-mode +# protocols=http, https, ftp, ftps, file, gemini, gopher +# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] + +[cursor] +# style=block +# color= +# blink=no +# beam-thickness=1.5 +# underline-thickness= + +[mouse] +# hide-when-typing=no +# alternate-scroll-mode=yes + +[touch] +# long-press-delay=400 + +[colors] +alpha=1 +# background=242424 +# foreground=ffffff + +## Normal/regular colors (color palette 0-7) +# regular0=242424 # black +# regular1=f62b5a # red +# regular2=47b413 # green +# regular3=e3c401 # yellow +# regular4=24acd4 # blue +# regular5=f2affd # magenta +# regular6=13c299 # cyan +# regular7=e6e6e6 # white + +## Bright colors (color palette 8-15) +# bright0=616161 # bright black +# bright1=ff4d51 # bright red +# bright2=35d450 # bright green +# bright3=e9e836 # bright yellow +# bright4=5dc5f8 # bright blue +# bright5=feabf2 # bright magenta +# bright6=24dfc4 # bright cyan +# bright7=ffffff # bright white + +## dimmed colors (see foot.ini(5) man page) +# dim0= +# ... +# dim7= + +## The remaining 256-color palette +# 16 = <256-color palette #16> +# ... +# 255 = <256-color palette #255> + +## Misc colors +# selection-foreground= +# selection-background= +# jump-labels= # black-on-yellow +# scrollback-indicator= # black-on-bright-blue +# search-box-no-match= # black-on-red +# search-box-match= # black-on-yellow +# urls= + +[csd] +# preferred=server +# size=26 +# font= +# color= +# hide-when-maximized=no +# double-click-to-maximize=yes +# border-width=0 +# border-color= +# button-width=26 +# button-color= +# button-minimize-color= +# button-maximize-color= +# button-close-color= + +[key-bindings] +# scrollback-up-page=Shift+Page_Up +# scrollback-up-half-page=none +# scrollback-up-line=none +# scrollback-down-page=Shift+Page_Down +# scrollback-down-half-page=none +# scrollback-down-line=none +# clipboard-copy=Control+Shift+c XF86Copy +# clipboard-paste=Control+Shift+v XF86Paste +# primary-paste=Shift+Insert +# search-start=Control+Shift+r +# font-increase=Control+plus Control+equal Control+KP_Add +# font-decrease=Control+minus Control+KP_Subtract +# font-reset=Control+0 Control+KP_0 +# spawn-terminal=Control+Shift+n +# minimize=none +# maximize=none +# fullscreen=none +# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-selected=[xargs -r firefox] none +# show-urls-launch=Control+Shift+o +# show-urls-copy=none +# show-urls-persistent=none +# prompt-prev=Control+Shift+z +# prompt-next=Control+Shift+x +# unicode-input=Control+Shift+u +# noop=none + +[search-bindings] +# cancel=Control+g Control+c Escape +# commit=Return +# find-prev=Control+r +# find-next=Control+s +# cursor-left=Left Control+b +# cursor-left-word=Control+Left Mod1+b +# cursor-right=Right Control+f +# cursor-right-word=Control+Right Mod1+f +# cursor-home=Home Control+a +# cursor-end=End Control+e +# delete-prev=BackSpace +# delete-prev-word=Mod1+BackSpace Control+BackSpace +# delete-next=Delete +# delete-next-word=Mod1+d Control+Delete +# extend-to-word-boundary=Control+w +# extend-to-next-whitespace=Control+Shift+w +# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste +# primary-paste=Shift+Insert +# unicode-input=none + +[url-bindings] +# cancel=Control+g Control+c Control+d Escape +# toggle-url-visible=t + +[text-bindings] +# \x03=Mod4+c # Map Super+c -> Ctrl+c + +[mouse-bindings] +# selection-override-modifiers=Shift +# primary-paste=BTN_MIDDLE +# select-begin=BTN_LEFT +# select-begin-block=Control+BTN_LEFT +# select-extend=BTN_RIGHT +# select-extend-character-wise=Control+BTN_RIGHT +# select-word=BTN_LEFT-2 +# select-word-whitespace=Control+BTN_LEFT-2 +# select-row=BTN_LEFT-3 + +# vim: ft=dosini + diff --git a/scripts/apply.sh b/scripts/apply.sh index 3cb00d8..58f571c 100755 --- a/scripts/apply.sh +++ b/scripts/apply.sh @@ -1,19 +1,23 @@ #!/usr/bin/env fish +echo $argv[1] set -Ux STARSHIP_CONFIG $argv[1]/starship.toml set -Ux HYPRLAND_THEME $argv[1] set color ~/.config/hypr/scripts/color +pkill foot +foot -s -c $argv[1]/components/foot.ini & + pkill dunst & pkill -USR2 fish & swww init & +sleep 0.5 +swww clear c2bda6 & #TODO: add a check for asusctl -asusctl led-mode static -c "$($color cursor -n)" & +asusctl led-mode static -c "c2bda6" & -python $argv[1]/scripts/pywal_set.py 1 & - -ags -c ~/rice/themes/aurora/components/ags/config.js & +ags -c ~/rice/themes/nier/components/ags/config.js & diff --git a/scripts/apply_wall b/scripts/apply_wall deleted file mode 100755 index 14a00a0..0000000 --- a/scripts/apply_wall +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/env python -import subprocess -import os -import pywal -import numpy as np -import matplotlib as mpl -import time - - -def colormix(c1, c2, mix=0): - # get np arrays c1 and c2 from hex - c1 = np.array(mpl.colors.to_rgb(c1)) - c2 = np.array(mpl.colors.to_rgb(c2)) - return mpl.colors.to_hex((1 - mix) * c1 + mix * c2) - - -def alpha(c1, a): - c1 = np.array(mpl.colors.to_rgb(c1)) - return mpl.colors.to_hex(c1 + (1 - c1) * a) - - -def apply(pre=None, wallpaper=None): - if not pre: - colors = pywal.colors.get(wallpaper, backend="wal") - else: - colors = pre - print(wallpaper) - print("colors::::: ", colors) - - cmd = f"swww img '{wallpaper}' --transition-type grow --transition-step 1 --transition-duration 1 --transition-pos 0.5,1.0" - subprocess.run(cmd, shell=True) - - with open(os.path.expanduser("~/.config/hypr/themes/colors_base"), "r") as cr: - raw = cr.read() - new_colors = {} - - for line in raw.split("\n"): - if line and not line.startswith("#"): - color, value = line.split(":") - if color.isnumeric(): - new_colors[color.strip()] = colormix( - value.strip(), - colors["colors"]["color" + color.strip()], - mix=0.8, - ) - - for color, value in colors["special"].items(): - new_colors[color] = value - - with open(os.path.expanduser("~/.config/hypr/themes/colors"), "w") as f: - for color, value in new_colors.items(): - f.write(f"{color}: {value}\n") - - with open(os.path.expanduser("~/.config/hypr/themes/uicolors"), "w") as f: - for color, value in colors["colors"].items(): - f.write(f"{color[5:]}: {value}\n") - for color, value in colors["special"].items(): - f.write(f"{color}: {value}\n") - - subprocess.run("touch ~/.config/hypr/themes/uicolors", shell=True) - - # active borders - gradient = "" - for color, value in colors["colors"].items(): - gradient += f"rgba({value[1:]}ff) " - gradient += " 45deg" - cmd = f"hyprctl keyword general:col.active_border '{gradient}'" - print(cmd) - subprocess.run(cmd, shell=True) - - # inactive borders - gradient = "" - for color, value in colors["colors"].items(): - gradient += f"rgba({value[1:]}44) " - gradient += " 0deg" - cmd = f"hyprctl keyword general:col.inactive_border '{gradient}'" - print(cmd) - subprocess.run(cmd, shell=True) - - cmd = ( - f"hyprctl keyword decoration:col.shadow '0x33{colors['colors']['color5'][1:]}'" - ) - print(cmd) - subprocess.run(cmd, shell=True) - - cmd = f"hyprctl keyword decoration:col.shadow_inactive '0x22{colors['special']['background'][1:]}'" - print(cmd) - subprocess.run(cmd, shell=True) - - # keyboard - cmd = f"asusctl led-mode static -c '{colors['colors']['color0'][1:]}'" - print(cmd) - subprocess.run(cmd, shell=True) - - # cava - with open(os.path.expanduser("~/.config/cava/config"), "r") as f: - conf = f.read() - - conf = conf.split("#--- cover2bg.py ---")[0] - - conf += ( - "\n#--- cover2bg.py ---\n" - + f""" -[color] -background = '{colors["special"]["background"]}' - -gradient = 1 - -gradient_color_1 = '{colors["colors"]["color0"]}' -gradient_color_2 = '{colors["colors"]["color1"]}' -gradient_color_3 = '{colors["colors"]["color2"]}' -gradient_color_4 = '{colors["colors"]["color3"]}' -gradient_color_5 = '{colors["colors"]["color4"]}' -gradient_color_6 = '{colors["colors"]["color5"]}' -gradient_color_7 = '{colors["colors"]["color6"]}' -gradient_color_8 = '{colors["colors"]["color7"]}' -""" - ) - with open(os.path.expanduser("~/.config/cava/config"), "w") as f: - f.write(conf) - - time.sleep(0.5) - subprocess.run("pkill -USR2 cava", shell=True) - subprocess.run("pkill -USR2 fish", shell=True) - - -def main(): - apply(wallpaper="/tmp/bg.png") - - -if __name__ == "__main__": - main() diff --git a/scripts/cover2bg b/scripts/cover2bg deleted file mode 100755 index ef5bc7c..0000000 --- a/scripts/cover2bg +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash - -HQ=0 - -if [ -z "$1" ]; then - echo "Please provide an image" - exit 1 -fi -if [ ! -f "$1" ]; then - echo "Image does not exist" - exit 1 -fi -if ! file "$1" | grep -qE 'image|bitmap'; then - echo "Image is not a valid image" - exit 1 -fi - -# get json from hyprctl -json=$(hyprctl monitors -j) -json=$(echo $json | jq '.[0]') -width=$(echo $json | jq '.width') -height=$(echo $json | jq '.height') - -if [ -f /tmp/prev_bg.png ]; then - if cmp -s "$1" /tmp/prev_bg.png; then - echo "Image is the same" - exit 0 - fi -fi - -cp "$1" /tmp/prev_bg.png - -echo "Image is different" - -cp "$1" /tmp/bg.png - -magick mogrify -fuzz 4% -trim +repage -shave 7x7 -format png /tmp/bg.png - -#if HQ == 1 -if [ $HQ -eq 1 ]; then - convert /tmp/bg.png -resize $((width))x$((height))^ -gravity center -extent $((width))x$((height)) /tmp/bg.png -else - convert /tmp/bg.png -resize $((width / 2))x$((height / 2))^ -gravity center -extent $((width / 2))x$((height / 2)) /tmp/bg.png -fi - -img_width=$(identify -format "%w" /tmp/bg.png) -img_height=$(identify -format "%h" /tmp/bg.png) - -convert /tmp/bg.png -blur 0x40 /tmp/bg.png - -color=$(convert /tmp/bg.png -gravity center -crop 1x1+0+0 +repage txt:- | grep -m 1 -o '#[0-9A-F]\{6\}') -convert -size ${width}x$((height / 3)) gradient:$color-transparent /tmp/gradient.png -convert /tmp/bg.png /tmp/gradient.png -gravity north -composite /tmp/bg.png - -# if /tmp/texture.png is not a file -if [ ! -f /tmp/texture.png ]; then - echo "texture not found" - convert -size ${img_width}x${img_height} xc:gray +noise Random -channel A -threshold 90% /tmp/texture.png -fi -# convert -size ${img_width}x${img_height} xc:gray +noise Random -channel A -threshold 90% /tmp/texture.png -convert /tmp/texture.png -alpha set -channel A -evaluate set 5% /tmp/texture.png -convert /tmp/bg.png /tmp/texture.png -gravity center -compose overlay -composite /tmp/bg.png - -ags -r "dominant_color.value = '$color';" - -$HYPRLAND_THEME/scripts/apply_wall /tmp/bg.png - - diff --git a/scripts/pywal_set b/scripts/pywal_set deleted file mode 100755 index fa6f3ed..0000000 --- a/scripts/pywal_set +++ /dev/null @@ -1,171 +0,0 @@ -#!/usr/bin/env python - -import pywal -import argparse -import os -import subprocess -import numpy as np -import matplotlib as mpl -import time - -THEME_DIR = os.environ.get("HYPRLAND_THEME") -print(THEME_DIR) - - -def colormix(c1, c2, mix=0): - # get np arrays c1 and c2 from hex - c1 = np.array(mpl.colors.to_rgb(c1)) - c2 = np.array(mpl.colors.to_rgb(c2)) - return mpl.colors.to_hex((1 - mix) * c1 + mix * c2) - - -def alpha(c1, a): - c1 = np.array(mpl.colors.to_rgb(c1)) - return mpl.colors.to_hex(c1 + (1 - c1) * a) - - -def apply(pre=None, wallpaper=None): - if not pre: - colors = pywal.colors.get(wallpaper, backend="wal") - else: - colors = pre - print(wallpaper) - print("colors::::: ", colors) - - cmd = f"swww img '{wallpaper}' --transition-type outer --transition-step 1 --transition-duration 1 --transition-pos 0.5,1.0" - subprocess.run(cmd, shell=True) - - with open(os.path.expanduser("~/.config/hypr/themes/colors_base"), "r") as cr: - raw = cr.read() - new_colors = {} - - for line in raw.split("\n"): - if line and not line.startswith("#"): - color, value = line.split(":") - if color.isnumeric(): - new_colors[color.strip()] = colormix( - value.strip(), - colors["colors"]["color" + color.strip()], - mix=0.75, - ) - - for color, value in colors["special"].items(): - new_colors[color] = value - - with open(os.path.expanduser("~/.config/hypr/themes/colors"), "w") as f: - for color, value in new_colors.items(): - f.write(f"{color}: {value}\n") - - with open(os.path.expanduser("~/.config/hypr/themes/uicolors"), "w") as f: - for color, value in colors["colors"].items(): - f.write(f"{color[5:]}: {value}\n") - for color, value in colors["special"].items(): - f.write(f"{color}: {value}\n") - - subprocess.run("touch ~/.config/hypr/themes/uicolors", shell=True) - - # active borders - gradient = "" - for color, value in colors["colors"].items(): - gradient += f"rgba({value[1:]}ff) " - gradient += " 45deg" - cmd = f"hyprctl keyword general:col.active_border '{gradient}'" - print(cmd) - subprocess.run(cmd, shell=True) - - # inactive borders - gradient = "" - for color, value in colors["colors"].items(): - gradient += f"rgba({value[1:]}44) " - gradient += " 0deg" - cmd = f"hyprctl keyword general:col.inactive_border '{gradient}'" - print(cmd) - subprocess.run(cmd, shell=True) - - cmd = ( - f"hyprctl keyword decoration:col.shadow '0x33{colors['colors']['color5'][1:]}'" - ) - print(cmd) - subprocess.run(cmd, shell=True) - - cmd = f"hyprctl keyword decoration:col.shadow_inactive '0x22{colors['special']['background'][1:]}'" - print(cmd) - subprocess.run(cmd, shell=True) - - # keyboard - cmd = f"asusctl led-mode static -c '{colors['colors']['color0'][1:]}'" - print(cmd) - subprocess.run(cmd, shell=True) - - # cava - with open(os.path.expanduser("~/.config/cava/config"), "r") as f: - conf = f.read() - - conf = conf.split("#--- cover2bg.py ---")[0] - - conf += ( - "\n#--- cover2bg.py ---\n" - + f""" -[color] -background = '{colors["special"]["background"]}' - -gradient = 1 - -gradient_color_1 = '{colors["colors"]["color0"]}' -gradient_color_2 = '{colors["colors"]["color1"]}' -gradient_color_3 = '{colors["colors"]["color2"]}' -gradient_color_4 = '{colors["colors"]["color3"]}' -gradient_color_5 = '{colors["colors"]["color4"]}' -gradient_color_6 = '{colors["colors"]["color5"]}' -gradient_color_7 = '{colors["colors"]["color6"]}' -gradient_color_8 = '{colors["colors"]["color7"]}' -""" - ) - with open(os.path.expanduser("~/.config/cava/config"), "w") as f: - f.write(conf) - - time.sleep(0.5) - subprocess.run("pkill -USR2 cava", shell=True) - subprocess.run("pkill -USR2 fish", shell=True) - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument("--index", help="wallpaper index") - parser.add_argument( - "--nosave", - help="to save wallpaper to `currentwall` or not", - action="store_true", - ) - parser.add_argument( - "--reset", help="to set wallpaper in `currentwall`", action="store_true" - ) - # parser.add_argument("cycle", help="cycle wall", required=False) - args = parser.parse_args() - - if args.reset: - with open(os.path.join(THEME_DIR, "currentwall"), "r") as f: - index = f.read() - args.index = index - - if args.index and args.index.isdigit(): - index = int(args.index) - wallpaper = os.listdir(os.path.join(THEME_DIR, "wallpapers"))[index - 1] - wallpaper = os.path.join(os.path.join(THEME_DIR, "wallpapers"), wallpaper) - else: - wallpaper = os.path.expanduser(args.index) - - if not args.nosave: - with open(os.path.join(THEME_DIR, "currentwall"), "w") as f: - f.write(str(args.index)) - - try: - apply(wallpaper=wallpaper) - except Exception: - wallpaper = os.listdir(os.path.join(THEME_DIR, "wallpapers"))[0] - wallpaper = os.path.join(os.path.join(THEME_DIR, "wallpapers"), wallpaper) - apply(wallpaper=wallpaper) - - -if __name__ == "__main__": - main() diff --git a/theme.conf b/theme.conf index 8bf1980..671f59c 100644 --- a/theme.conf +++ b/theme.conf @@ -2,28 +2,25 @@ exec=cp $THEME/colors $HOME/.config/hypr/themes/colors exec=$THEME/scripts/apply.sh $THEME decoration { - drop_shadow = true - shadow_range=100 - shadow_render_power=2 - col.shadow= 0x33D5C7DA - col.shadow_inactive=0x221b3c46 - rounding=15 + rounding=0 + blur { + enabled=0 + } } general { - col.active_border=rgba(cba6f7ff) rgba(89b4faff) rgba(94e2d5ff) 10deg - col.inactive_border=0xff45475a + col.active_border=0xff48463d + col.inactive_border=0x5548463d border_size=5 } animations { enabled=1 # bezier=overshot,0.05,0.9,0.1,1.1 - bezier=overshot,0.13,0.99,0.29,1.1 - bezier = linear, 0.0, 0.0, 1.0, 1.0 - animation=windows,1,4,overshot,slide + bezier = in-out,.65,-0.01,0,.95 + bezier = woa,0,0,0,1 + animation=windows,1,2,woa,popin animation=border,1,10,default animation=fade,1,10,default - animation=workspaces,1,6,overshot,slide - animation = borderangle, 1, 100, linear, loop + animation=workspaces,1,5,in-out,slide } \ No newline at end of file diff --git a/uicolors b/uicolors new file mode 100644 index 0000000..be4daf7 --- /dev/null +++ b/uicolors @@ -0,0 +1,19 @@ +0: #1e1d1c +1: #A39D8F +2: #AFA899 +3: #BBB4A5 +4: #C3BCAB +5: #D2CCB9 +6: #DBD5C2 +7: #e8e5da +8: #a2a098 +9: #A39D8F +10: #AFA899 +11: #BBB4A5 +12: #C3BCAB +13: #D2CCB9 +14: #DBD5C2 +15: #e8e5da +background: #1e1d1c +foreground: #e8e5da +cursor: #e8e5da