diff --git a/config/general/Thunar/accels.scm b/config/Thunar/accels.scm similarity index 100% rename from config/general/Thunar/accels.scm rename to config/Thunar/accels.scm diff --git a/config/general/Thunar/uca.xml b/config/Thunar/uca.xml similarity index 100% rename from config/general/Thunar/uca.xml rename to config/Thunar/uca.xml diff --git a/config/general/fish/config.fish b/config/fish/config.fish similarity index 98% rename from config/general/fish/config.fish rename to config/fish/config.fish index 2b0ff86..84ee695 100755 --- a/config/general/fish/config.fish +++ b/config/fish/config.fish @@ -21,7 +21,7 @@ alias open-webui='sudo systemctl start docker && sudo docker start -i open-webui alias ai='ollama serve' # Add scripts in ~/projects/active/dotfiles/general/scripts/ to path -fish_add_path -P ~/projects/active/dotfiles/general/scripts/ +fish_add_path -P ~/projects/active/dotfiles/scripts/ function y set tmp (mktemp -t "yazi-cwd.XXXXXX") diff --git a/config/general/fish/fish_variables b/config/fish/fish_variables similarity index 100% rename from config/general/fish/fish_variables rename to config/fish/fish_variables diff --git a/config/general/ags/bar/.gitignore b/config/general/ags/bar/.gitignore deleted file mode 100644 index 298eb4d..0000000 --- a/config/general/ags/bar/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -@girs/ diff --git a/config/general/ags/bar/app.ts b/config/general/ags/bar/app.ts deleted file mode 100644 index 83217ef..0000000 --- a/config/general/ags/bar/app.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { App } from "astal/gtk3" -import style from "./style.scss" -import Bar from "./widget/Bar" - -App.start({ - css: style, - main() { - App.get_monitors().map(Bar) - }, -}) diff --git a/config/general/ags/bar/env.d.ts b/config/general/ags/bar/env.d.ts deleted file mode 100644 index 467c0a4..0000000 --- a/config/general/ags/bar/env.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -declare const SRC: string - -declare module "inline:*" { - const content: string - export default content -} - -declare module "*.scss" { - const content: string - export default content -} - -declare module "*.blp" { - const content: string - export default content -} - -declare module "*.css" { - const content: string - export default content -} diff --git a/config/general/ags/bar/package.json b/config/general/ags/bar/package.json deleted file mode 100644 index 44226f2..0000000 --- a/config/general/ags/bar/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "astal-shell", - "dependencies": { - "astal": "/usr/share/astal/gjs" - } -} diff --git a/config/general/ags/bar/style.scss b/config/general/ags/bar/style.scss deleted file mode 100644 index 1d0d3a9..0000000 --- a/config/general/ags/bar/style.scss +++ /dev/null @@ -1,20 +0,0 @@ -// https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss -$fg-color: #{"@theme_fg_color"}; -$bg-color: #{"@theme_bg_color"}; - -window.Bar { - background: transparent; - color: $fg-color; - font-weight: bold; - - >centerbox { - background: $bg-color; - border-radius: 10px; - margin: 8px; - } - - button { - border-radius: 8px; - margin: 2px; - } -} diff --git a/config/general/ags/bar/tsconfig.json b/config/general/ags/bar/tsconfig.json deleted file mode 100644 index 9471e35..0000000 --- a/config/general/ags/bar/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "compilerOptions": { - "experimentalDecorators": true, - "strict": true, - "target": "ES2022", - "module": "ES2022", - "moduleResolution": "Bundler", - // "checkJs": true, - // "allowJs": true, - "jsx": "react-jsx", - "jsxImportSource": "astal/gtk3", - } -} diff --git a/config/general/ags/bar/widget/Bar.tsx b/config/general/ags/bar/widget/Bar.tsx deleted file mode 100644 index 0384535..0000000 --- a/config/general/ags/bar/widget/Bar.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { App, Astal, Gtk, Gdk } from "astal/gtk3" -import { Variable } from "astal" - -const time = Variable("").poll(1000, "date") - -export default function Bar(gdkmonitor: Gdk.Monitor) { - const { TOP, LEFT, RIGHT } = Astal.WindowAnchor - - return - - - - - - -} diff --git a/config/general/ags/launcher/.gitignore b/config/general/ags/launcher/.gitignore deleted file mode 100644 index 298eb4d..0000000 --- a/config/general/ags/launcher/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -@girs/ diff --git a/config/general/ags/launcher/app.ts b/config/general/ags/launcher/app.ts deleted file mode 100644 index 83217ef..0000000 --- a/config/general/ags/launcher/app.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { App } from "astal/gtk3" -import style from "./style.scss" -import Bar from "./widget/Bar" - -App.start({ - css: style, - main() { - App.get_monitors().map(Bar) - }, -}) diff --git a/config/general/ags/launcher/env.d.ts b/config/general/ags/launcher/env.d.ts deleted file mode 100644 index 467c0a4..0000000 --- a/config/general/ags/launcher/env.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -declare const SRC: string - -declare module "inline:*" { - const content: string - export default content -} - -declare module "*.scss" { - const content: string - export default content -} - -declare module "*.blp" { - const content: string - export default content -} - -declare module "*.css" { - const content: string - export default content -} diff --git a/config/general/ags/launcher/package.json b/config/general/ags/launcher/package.json deleted file mode 100644 index 44226f2..0000000 --- a/config/general/ags/launcher/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "astal-shell", - "dependencies": { - "astal": "/usr/share/astal/gjs" - } -} diff --git a/config/general/ags/launcher/style.scss b/config/general/ags/launcher/style.scss deleted file mode 100644 index 1d0d3a9..0000000 --- a/config/general/ags/launcher/style.scss +++ /dev/null @@ -1,20 +0,0 @@ -// https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss -$fg-color: #{"@theme_fg_color"}; -$bg-color: #{"@theme_bg_color"}; - -window.Bar { - background: transparent; - color: $fg-color; - font-weight: bold; - - >centerbox { - background: $bg-color; - border-radius: 10px; - margin: 8px; - } - - button { - border-radius: 8px; - margin: 2px; - } -} diff --git a/config/general/ags/launcher/tsconfig.json b/config/general/ags/launcher/tsconfig.json deleted file mode 100644 index 9471e35..0000000 --- a/config/general/ags/launcher/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "compilerOptions": { - "experimentalDecorators": true, - "strict": true, - "target": "ES2022", - "module": "ES2022", - "moduleResolution": "Bundler", - // "checkJs": true, - // "allowJs": true, - "jsx": "react-jsx", - "jsxImportSource": "astal/gtk3", - } -} diff --git a/config/general/ags/launcher/widget/Bar.tsx b/config/general/ags/launcher/widget/Bar.tsx deleted file mode 100644 index 0384535..0000000 --- a/config/general/ags/launcher/widget/Bar.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { App, Astal, Gtk, Gdk } from "astal/gtk3" -import { Variable } from "astal" - -const time = Variable("").poll(1000, "date") - -export default function Bar(gdkmonitor: Gdk.Monitor) { - const { TOP, LEFT, RIGHT } = Astal.WindowAnchor - - return - - - - - - -} diff --git a/config/general/ags/notifications/.gitignore b/config/general/ags/notifications/.gitignore deleted file mode 100644 index 298eb4d..0000000 --- a/config/general/ags/notifications/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -@girs/ diff --git a/config/general/ags/notifications/app.ts b/config/general/ags/notifications/app.ts deleted file mode 100644 index 548b260..0000000 --- a/config/general/ags/notifications/app.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { App } from "astal/gtk3" -import style from "./style.scss" - -import not from "./handler" - -App.start({ - instanceName: "notifier", - css: style, - main() { - not.startNotificationHandler( 0, App.get_monitors()[0] ) - }, - requestHandler(request, res) { - if ( request == 'show' ) { - not.openNotificationMenu( 0 ); - res( 'Showing all open notifications' ); - } else if ( request == 'hide' ) { - not.closeNotificationMenu( 0 ); - res( 'Hid all notifications' ); - } else if ( request == 'clear' ) { - not.clearAllNotifications( 0 ); - res( 'Cleared all notifications' ); - } else if ( request == 'clear-newest' ) { - not.clearNewestNotifications( 0 ); - res( 'Cleared newest notification' ); - } else { - res( 'Unknown command!' ); - } - }, -}) diff --git a/config/general/ags/notifications/env.d.ts b/config/general/ags/notifications/env.d.ts deleted file mode 100644 index 467c0a4..0000000 --- a/config/general/ags/notifications/env.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -declare const SRC: string - -declare module "inline:*" { - const content: string - export default content -} - -declare module "*.scss" { - const content: string - export default content -} - -declare module "*.blp" { - const content: string - export default content -} - -declare module "*.css" { - const content: string - export default content -} diff --git a/config/general/ags/notifications/handler.tsx b/config/general/ags/notifications/handler.tsx deleted file mode 100644 index ee2ad42..0000000 --- a/config/general/ags/notifications/handler.tsx +++ /dev/null @@ -1,184 +0,0 @@ -/* -* dotfiles - handler.ts -* -* Created by Janis Hutz 03/21/2025, Licensed under the GPL V3 License -* https://janishutz.com, development@janishutz.com -* -* -*/ - -import { Astal, Gtk, Gdk } from "astal/gtk3" -import Notifd from "gi://AstalNotifd"; -import Notification from "./notifications/notifications"; -import { type Subscribable } from "astal/binding"; -import { Variable, bind, timeout } from "astal" - -// Config -const TIMEOUT_DELAY = 5000; - -class Notifier implements Subscribable { - private display: Map = new Map(); - private notifications: Map = new Map(); - - private notifd: Notifd.Notifd; - private subscriberData: Variable = Variable( [] ); - private instanceID: number; - private menuOpen: boolean; - - /** - * Sets up the notifier - */ - constructor( id: number ) { - this.instanceID = id; - this.menuOpen = false; - this.notifd = Notifd.get_default(); - this.notifd.ignoreTimeout = true; - - this.notifd.connect( 'notified', ( _, id ) => { - this.add( id ); - } ); - - this.notifd.connect( 'resolved', ( _, id ) => { - this.hide( id ); - } ); - } - - private notify () { - this.subscriberData.set( [ ...this.display.values() ].reverse() ); - } - - private add ( id: number ) { - this.notifications.set( id, this.notifd.get_notification( id )! ); - this.show( id ); - } - - /** - * Show an element on screen - * @param id - The id of the element to be shown - */ - private show ( id: number ) { - this.set( id, Notification( { - notification: this.notifications.get( id )!, - onHoverLost: () => this.hide( id ), - setup: () => timeout( TIMEOUT_DELAY, () => { - if ( !this.menuOpen ) { - this.hide( id ); - } - } ), - id: id, - delete: deleteHelper, - instanceID: this.instanceID - } ) ) - } - - /** - * Set a selected widget to be shown - * @param id - The id of the element to be referenced for later - * @param widget - A GTK widget instance - */ - private set ( id: number, widget: Gtk.Widget ) { - this.display.get( id )?.destroy(); - this.display.set( id, widget ); - this.notify(); - } - - /** - * Hide, not delete notification (= send to notification centre) - * @param id - The id of the notification to hide - */ - private hide ( id: number ) { - this.display.get( id )?.destroy(); - this.display.delete( id ); - this.notify(); - } - - /** - * Delete a notification (from notification centre too) - * @param id - The id of the notification to hide - */ - delete ( id: number ) { - this.hide( id ); - this.notifications.get( id )?.dismiss(); - this.notifications.delete( id ); - } - - openNotificationMenu () { - // Show all notifications that have not been cleared - this.menuOpen = true; - this.notifications.forEach( ( _, id ) => { - this.show( id ); - } ) - } - - hideNotifications () { - this.menuOpen = false; - this.notifications.forEach( ( _, id ) => { - this.hide( id ); - } ) - } - - clearAllNotifications () { - this.menuOpen = false; - this.notifications.forEach( ( _, id ) => { - this.delete( id ); - } ) - } - - clearNewestNotification () { - this.delete( [ ...this.notifications.keys() ][0] ); - } - - subscribe(callback: (value: unknown) => void): () => void { - return this.subscriberData.subscribe( callback ); - } - - get() { - return this.subscriberData.get(); - } -} - -const notifiers: Map = new Map(); -const deleteHelper = ( id: number, instanceID: number ) => { - notifiers.get( instanceID )?.delete( id ); -} - -const openNotificationMenu = ( id: number ) => { - notifiers.get( id )?.openNotificationMenu(); -} - -const closeNotificationMenu = ( id: number ) => { - notifiers.get( id )?.hideNotifications(); -} - -const clearAllNotifications = ( id: number ) => { - notifiers.get( id )?.clearAllNotifications(); -} - -const clearNewestNotifications = ( id: number ) => { - notifiers.get( id )?.clearNewestNotification(); -} - -const startNotificationHandler = (id: number, gdkmonitor: Gdk.Monitor) => { - const { TOP, RIGHT } = Astal.WindowAnchor - const notifier: Notifier = new Notifier( id ); - notifiers.set( id, notifier ); - - return - - {bind(notifier)} - - -} - - -export default { - startNotificationHandler, - openNotificationMenu, - closeNotificationMenu, - clearAllNotifications, - clearNewestNotifications -} diff --git a/config/general/ags/notifications/notifications/notifications.scss b/config/general/ags/notifications/notifications/notifications.scss deleted file mode 100644 index a32f08b..0000000 --- a/config/general/ags/notifications/notifications/notifications.scss +++ /dev/null @@ -1,125 +0,0 @@ -@use "sass:string"; - -@function gtkalpha($c, $a) { - @return string.unquote("alpha(#{$c},#{$a})"); -} - -// https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss -$fg-color: #{"@theme_fg_color"}; -$bg-color: #{"@theme_bg_color"}; -$error: red; - -window.NotificationPopups { - all: unset; -} - -eventbox.Notification { - - &:first-child>box { - margin-top: 1rem; - } - - &:last-child>box { - margin-bottom: 1rem; - } - - // eventboxes can not take margins so we style its inner box instead - >box { - min-width: 400px; - border-radius: 13px; - background-color: $bg-color; - margin: .5rem 1rem .5rem 1rem; - box-shadow: 2px 3px 8px 0 gtkalpha(black, .4); - border: 1pt solid gtkalpha($fg-color, .03); - } - - &.critical>box { - border: 1pt solid gtkalpha($error, .4); - - .header { - - .app-name { - color: gtkalpha($error, .8); - - } - - .app-icon { - color: gtkalpha($error, .6); - } - } - } - - .header { - padding: .5rem; - color: gtkalpha($fg-color, 0.5); - - .app-icon { - margin: 0 .4rem; - } - - .app-name { - margin-right: .3rem; - font-weight: bold; - - &:first-child { - margin-left: .4rem; - } - } - - .time { - margin: 0 .4rem; - } - - button { - padding: .2rem; - min-width: 0; - min-height: 0; - } - } - - separator { - margin: 0 .4rem; - background-color: gtkalpha($fg-color, .1); - } - - .content { - margin: 1rem; - margin-top: .5rem; - - .summary { - font-size: 1.2em; - color: $fg-color; - } - - .body { - color: gtkalpha($fg-color, 0.8); - } - - .image { - border: 1px solid gtkalpha($fg-color, .02); - margin-right: .5rem; - border-radius: 9px; - min-width: 100px; - min-height: 100px; - background-size: cover; - background-position: center; - } - } - - .actions { - margin: 1rem; - margin-top: 0; - - button { - margin: 0 .3rem; - - &:first-child { - margin-left: 0; - } - - &:last-child { - margin-right: 0; - } - } - } -} diff --git a/config/general/ags/notifications/notifications/notifications.tsx b/config/general/ags/notifications/notifications/notifications.tsx deleted file mode 100644 index de4e7b2..0000000 --- a/config/general/ags/notifications/notifications/notifications.tsx +++ /dev/null @@ -1,112 +0,0 @@ -// From astal examples - -import { GLib } from "astal" -import { Gtk, Astal } from "astal/gtk3" -import { type EventBox } from "astal/gtk3/widget" -import Notifd from "gi://AstalNotifd" - -const isIcon = (icon: string) => - !!Astal.Icon.lookup_icon(icon) - -const fileExists = (path: string) => - GLib.file_test(path, GLib.FileTest.EXISTS) - -const time = (time: number, format = "%H:%M") => GLib.DateTime - .new_from_unix_local(time) - .format(format)! - -const urgency = (n: Notifd.Notification) => { - const { LOW, NORMAL, CRITICAL } = Notifd.Urgency - // match operator when? - switch (n.urgency) { - case LOW: return "low" - case CRITICAL: return "critical" - case NORMAL: - default: return "normal" - } -} - -type Props = { - delete( id: number, instanceID: number ): void - setup(self: EventBox): void - onHoverLost(self: EventBox): void - notification: Notifd.Notification - id: number - instanceID: number -} - -export default function Notification(props: Props) { - const { notification: n, onHoverLost, setup, id: id, delete: del, instanceID: instance } = props - const { START, CENTER, END } = Gtk.Align - - return - - - {(n.appIcon || n.desktopEntry) && } - - - - {n.image && fileExists(n.image) && } - {n.image && isIcon(n.image) && - - } - - - - {n.get_actions().length > 0 && - {n.get_actions().map(({ label, id }) => ( - - ))} - } - - -} diff --git a/config/general/ags/notifications/package.json b/config/general/ags/notifications/package.json deleted file mode 100644 index 44226f2..0000000 --- a/config/general/ags/notifications/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "astal-shell", - "dependencies": { - "astal": "/usr/share/astal/gjs" - } -} diff --git a/config/general/ags/notifications/style.scss b/config/general/ags/notifications/style.scss deleted file mode 100644 index a1c9bb7..0000000 --- a/config/general/ags/notifications/style.scss +++ /dev/null @@ -1,2 +0,0 @@ -// Import notification box style -@use "./notifications/notifications.scss" diff --git a/config/general/ags/notifications/tsconfig.json b/config/general/ags/notifications/tsconfig.json deleted file mode 100644 index 9471e35..0000000 --- a/config/general/ags/notifications/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "compilerOptions": { - "experimentalDecorators": true, - "strict": true, - "target": "ES2022", - "module": "ES2022", - "moduleResolution": "Bundler", - // "checkJs": true, - // "allowJs": true, - "jsx": "react-jsx", - "jsxImportSource": "astal/gtk3", - } -} diff --git a/config/general/ags/quickactions/.gitignore b/config/general/ags/quickactions/.gitignore deleted file mode 100644 index 298eb4d..0000000 --- a/config/general/ags/quickactions/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -@girs/ diff --git a/config/general/ags/quickactions/app.ts b/config/general/ags/quickactions/app.ts deleted file mode 100644 index 83217ef..0000000 --- a/config/general/ags/quickactions/app.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { App } from "astal/gtk3" -import style from "./style.scss" -import Bar from "./widget/Bar" - -App.start({ - css: style, - main() { - App.get_monitors().map(Bar) - }, -}) diff --git a/config/general/ags/quickactions/env.d.ts b/config/general/ags/quickactions/env.d.ts deleted file mode 100644 index 467c0a4..0000000 --- a/config/general/ags/quickactions/env.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -declare const SRC: string - -declare module "inline:*" { - const content: string - export default content -} - -declare module "*.scss" { - const content: string - export default content -} - -declare module "*.blp" { - const content: string - export default content -} - -declare module "*.css" { - const content: string - export default content -} diff --git a/config/general/ags/quickactions/package.json b/config/general/ags/quickactions/package.json deleted file mode 100644 index 44226f2..0000000 --- a/config/general/ags/quickactions/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "astal-shell", - "dependencies": { - "astal": "/usr/share/astal/gjs" - } -} diff --git a/config/general/ags/quickactions/style.scss b/config/general/ags/quickactions/style.scss deleted file mode 100644 index 1d0d3a9..0000000 --- a/config/general/ags/quickactions/style.scss +++ /dev/null @@ -1,20 +0,0 @@ -// https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss -$fg-color: #{"@theme_fg_color"}; -$bg-color: #{"@theme_bg_color"}; - -window.Bar { - background: transparent; - color: $fg-color; - font-weight: bold; - - >centerbox { - background: $bg-color; - border-radius: 10px; - margin: 8px; - } - - button { - border-radius: 8px; - margin: 2px; - } -} diff --git a/config/general/ags/quickactions/tsconfig.json b/config/general/ags/quickactions/tsconfig.json deleted file mode 100644 index 9471e35..0000000 --- a/config/general/ags/quickactions/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "compilerOptions": { - "experimentalDecorators": true, - "strict": true, - "target": "ES2022", - "module": "ES2022", - "moduleResolution": "Bundler", - // "checkJs": true, - // "allowJs": true, - "jsx": "react-jsx", - "jsxImportSource": "astal/gtk3", - } -} diff --git a/config/general/ags/quickactions/widget/Bar.tsx b/config/general/ags/quickactions/widget/Bar.tsx deleted file mode 100644 index 0384535..0000000 --- a/config/general/ags/quickactions/widget/Bar.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { App, Astal, Gtk, Gdk } from "astal/gtk3" -import { Variable } from "astal" - -const time = Variable("").poll(1000, "date") - -export default function Bar(gdkmonitor: Gdk.Monitor) { - const { TOP, LEFT, RIGHT } = Astal.WindowAnchor - - return - - - - - - -} diff --git a/config/general/hypr/hypridle.conf b/config/hypr/hypridle.conf similarity index 100% rename from config/general/hypr/hypridle.conf rename to config/hypr/hypridle.conf diff --git a/config/general/hypr/hyprland.conf b/config/hypr/hyprland.conf similarity index 100% rename from config/general/hypr/hyprland.conf rename to config/hypr/hyprland.conf diff --git a/config/general/hypr/hyprland/binds.conf b/config/hypr/hyprland/binds.conf similarity index 100% rename from config/general/hypr/hyprland/binds.conf rename to config/hypr/hyprland/binds.conf diff --git a/config/general/hypr/hyprland/colors.conf b/config/hypr/hyprland/colors.conf similarity index 100% rename from config/general/hypr/hyprland/colors.conf rename to config/hypr/hyprland/colors.conf diff --git a/config/general/hypr/hyprland/general.conf b/config/hypr/hyprland/general.conf similarity index 100% rename from config/general/hypr/hyprland/general.conf rename to config/hypr/hyprland/general.conf diff --git a/config/general/hypr/hyprland/windowrules.conf b/config/hypr/hyprland/windowrules.conf similarity index 100% rename from config/general/hypr/hyprland/windowrules.conf rename to config/hypr/hyprland/windowrules.conf diff --git a/config/general/hypr/hyprlock.conf b/config/hypr/hyprlock.conf similarity index 100% rename from config/general/hypr/hyprlock.conf rename to config/hypr/hyprlock.conf diff --git a/config/general/hypr/xdg-portal-hyprland b/config/hypr/xdg-portal-hyprland similarity index 100% rename from config/general/hypr/xdg-portal-hyprland rename to config/hypr/xdg-portal-hyprland diff --git a/config/general/kitty/current-theme.conf b/config/kitty/current-theme.conf similarity index 100% rename from config/general/kitty/current-theme.conf rename to config/kitty/current-theme.conf diff --git a/config/general/kitty/kitty.conf b/config/kitty/kitty.conf similarity index 100% rename from config/general/kitty/kitty.conf rename to config/kitty/kitty.conf diff --git a/config/general/kitty/kitty.conf.bak b/config/kitty/kitty.conf.bak similarity index 100% rename from config/general/kitty/kitty.conf.bak rename to config/kitty/kitty.conf.bak diff --git a/config/general/lazygit/config.yml b/config/lazygit/config.yml similarity index 100% rename from config/general/lazygit/config.yml rename to config/lazygit/config.yml diff --git a/config/general/mpv/fonts/Material-Design-Iconic-Font.ttf b/config/mpv/fonts/Material-Design-Iconic-Font.ttf similarity index 100% rename from config/general/mpv/fonts/Material-Design-Iconic-Font.ttf rename to config/mpv/fonts/Material-Design-Iconic-Font.ttf diff --git a/config/general/mpv/scripts/modernx.lua b/config/mpv/scripts/modernx.lua similarity index 100% rename from config/general/mpv/scripts/modernx.lua rename to config/mpv/scripts/modernx.lua diff --git a/config/general/yazi/flavors/tokyo-night.yazi/LICENSE b/config/yazi/flavors/tokyo-night.yazi/LICENSE similarity index 100% rename from config/general/yazi/flavors/tokyo-night.yazi/LICENSE rename to config/yazi/flavors/tokyo-night.yazi/LICENSE diff --git a/config/general/yazi/flavors/tokyo-night.yazi/LICENSE-tmtheme b/config/yazi/flavors/tokyo-night.yazi/LICENSE-tmtheme similarity index 100% rename from config/general/yazi/flavors/tokyo-night.yazi/LICENSE-tmtheme rename to config/yazi/flavors/tokyo-night.yazi/LICENSE-tmtheme diff --git a/config/general/yazi/flavors/tokyo-night.yazi/README.md b/config/yazi/flavors/tokyo-night.yazi/README.md similarity index 100% rename from config/general/yazi/flavors/tokyo-night.yazi/README.md rename to config/yazi/flavors/tokyo-night.yazi/README.md diff --git a/config/general/yazi/flavors/tokyo-night.yazi/flavor.toml b/config/yazi/flavors/tokyo-night.yazi/flavor.toml similarity index 100% rename from config/general/yazi/flavors/tokyo-night.yazi/flavor.toml rename to config/yazi/flavors/tokyo-night.yazi/flavor.toml diff --git a/config/general/yazi/flavors/tokyo-night.yazi/preview.png b/config/yazi/flavors/tokyo-night.yazi/preview.png similarity index 100% rename from config/general/yazi/flavors/tokyo-night.yazi/preview.png rename to config/yazi/flavors/tokyo-night.yazi/preview.png diff --git a/config/general/yazi/flavors/tokyo-night.yazi/tmtheme.xml b/config/yazi/flavors/tokyo-night.yazi/tmtheme.xml similarity index 100% rename from config/general/yazi/flavors/tokyo-night.yazi/tmtheme.xml rename to config/yazi/flavors/tokyo-night.yazi/tmtheme.xml diff --git a/config/general/yazi/keymap.toml b/config/yazi/keymap.toml similarity index 100% rename from config/general/yazi/keymap.toml rename to config/yazi/keymap.toml diff --git a/config/general/yazi/theme.toml b/config/yazi/theme.toml similarity index 100% rename from config/general/yazi/theme.toml rename to config/yazi/theme.toml diff --git a/scripts/ethz-vpn b/scripts/ethz-vpn new file mode 100755 index 0000000..7343ede --- /dev/null +++ b/scripts/ethz-vpn @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +connect() { + read -sp $'Please type in your Encryption Password:\n' encpass + TOKEN=$(cat ~/.local/share/ethz-vpn-connect/ethzvpntoken.secret | openssl enc -aes-256-cbc -pbkdf2 -d -a -k $encpass) + PASSWORD=$(cat ~/.local/share/ethz-vpn-connect/ethzvpnpass.secret | openssl enc -aes-256-cbc -pbkdf2 -d -a -k $encpass) + USERNAME=$(cat ~/.local/share/ethz-vpn-connect/ethzvpnusername.txt) + echo $PASSWORD | sudo openconnect -b -u $USERNAME@student-net.ethz.ch -g student-net --useragent=AnyConnect --passwd-on-stdin --token-mode=totp --token-secret=sha1:base32:$TOKEN sslvpn.ethz.ch + encpass="" + PASSWORD="" + TOKEN="" +} + +disconnect() { + sudo killall -v -SIGINT openconnect #add -i option to ask for confirmation, usefull if running multible openconnect. +} + +setup() { + echo 'You are about to overwrite your secrets. Press ctrl + C to cancel.' + read -p $'Please type in your Username: ' USERNAME + echo 'Ok!' + read -sp $'Please type in your Encryption Password: ' encpass + echo 'Ok!' + read -sp $'Please type in your ETHZ WLAN Password: ' PASSWORD + echo 'Ok!' + read -sp $'Please type in your ETHZ OTP Secret: ' TOKEN + mkdir ~/.local/share/ethz-vpn-connect + echo $PASSWORD | openssl enc -aes-256-cbc -pbkdf2 -a -k $encpass >~/.local/share/ethz-vpn-connect/ethzvpnpass.secret + echo $TOKEN | openssl enc -aes-256-cbc -pbkdf2 -a -k $encpass >~/.local/share/ethz-vpn-connect/ethzvpntoken.secret + echo $USERNAME >~/.local/share/ethz-vpn-connect/ethzvpnusername.txt + encpass="" + PASSWORD="" + TOKEN="" + echo $'Secrets set\n' +} + +case "$1" in +'connect') + connect + ;; +c) + connect + ;; +'disconnect') + disconnect + ;; +d) + disconnect + ;; +dc) + disconnect + ;; +setup) + setup + ;; +*) + echo -e 'Usage: ethz-vpn [Option] \n [Option]: \n connect, c: Connect VPN \n disconnect, d, dc: Disconnect VPN \n setup: set secrets and eth-Kürzel.\n' + ;; +esac