Compare commits

..

32 Commits

Author SHA1 Message Date
4b12ae2c12 [Scripts] Fixes for vpn script 2025-11-24 14:25:13 +01:00
5227e5f05e [Scripts] Fix vpn script 2025-11-23 13:36:06 +01:00
b8098eac8b [Scripts] Improve VPN script 2025-11-18 09:38:24 +01:00
5b610643c7 [Install] Fix bt 2025-11-17 09:17:27 +01:00
4fce8c955c [Hyprland] Fix cursor size 2025-11-12 10:32:15 +01:00
eabb972cb8 [Binds] Fix swapescape 2025-11-11 09:58:48 +01:00
688b94c3ad [Binds] Add binds to dynamically enable and disable caps:swapescape 2025-11-11 09:50:31 +01:00
d4689d66cd [FMT] Improve latexindent config 2025-11-11 08:05:53 +01:00
e28e3e6207 [Install] Add usbutils 2025-11-06 17:47:18 +01:00
b45b3d60d1 [Scripts] Add pdf wordcount script 2025-11-04 15:51:49 +01:00
8d2e3cea85 [Hyprland] Move conflicting bind 2025-11-03 17:13:44 +01:00
8a42f9bfa2 [Install] Add timesyncd enable 2025-11-03 10:15:00 +01:00
09916ae68e [Hyprland] Add more launch commands 2025-11-02 10:49:33 +01:00
5b5fa9ad4e [Astal] Fix launch on new astal version 2025-11-01 10:37:30 +01:00
814b975533 [Linecount] Add cloc and alias for it 2025-10-30 15:31:47 +01:00
d0a450d4e8 [Setup] Make cleaner 2025-10-30 10:42:50 +01:00
786d5c5fe0 [Yazi] Fix themes 2025-10-30 10:42:42 +01:00
5ba2894101 [Hyprland] Improve windowrules 2025-10-30 10:24:08 +01:00
499bf793b2 [Hyprland] Add some nice windorules 2025-10-30 10:24:08 +01:00
f1c57b8ecc [Scripts] Add nvim update script 2025-10-29 15:19:18 +01:00
20cc042b64 [Scripts] Add batch video conversion script 2025-10-25 16:26:39 +02:00
ae9dcaa074 [Hyprland] Windowrules: Add for BeatSaber 2025-10-22 17:01:28 +02:00
21b68b1e68 [Hyprland] Fix alvr launch bind typo 2025-10-22 12:55:57 +02:00
fa4929a94b [Hyprland] Screenshot binds exit submap 2025-10-22 12:53:44 +02:00
6b4d0e22b1 [Kitty] Remove default mapping interfering with new nvim bind 2025-10-21 08:44:42 +02:00
d5615892e7 [Hyprland] Add launch command for alvr and bsm 2025-10-17 17:30:04 +02:00
81d0df6023 [Hyprland] Fix notifications submap 2025-10-17 10:58:39 +02:00
9cf14d3b55 [Astal] Format 2025-10-17 10:47:05 +02:00
06325b09b8 [Hyprland] Update readmes 2025-10-17 10:44:33 +02:00
539ec34b4c [Astal] Finish modes, move tray into quickactions menu 2025-10-17 10:44:33 +02:00
00d4f101fc [Hyprland] Remove some quick access binds (unnecessary) 2025-10-17 09:55:15 +02:00
c9a89cf545 [Setup] Fix platform wrong 2025-10-17 09:54:16 +02:00
31 changed files with 381 additions and 214 deletions

View File

@@ -9,10 +9,10 @@ For my neovim config, see [here](https://git.janishutz.com/janishutz/nvim)
![screenshot of desktop with 2 screens](./assets/screenshot.png)
I am currently working on redoing my keybinds for Hyprland, in what I call `hyprmode`:
I am currently working on redoing my keybinds for Hyprland, in what I call `hyprvim`:
They are going to use submaps and will be significantly different, yet still familiar.
This will enable me to have many more keybinds with reasonable starter bindings.
I will also update Astal to have a mode indicator if `hyprmode` is enabled.
I will also update Astal to have a mode indicator if `hyprvim` is enabled.
## Features
- Astal4 based Status Bar and Quick Actions menu

View File

@@ -1,26 +1,31 @@
import { App } from "astal/gtk4"
import style from "./style.scss"
import Bar from "./components/bar/Bar";
import AstalHyprland from "gi://AstalHyprland?version=0.1";
import { hyprToGdk } from "./util/hyprland";
import Brightness from "./util/brightness";
import {
App
} from 'astal/gtk4';
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
import Bar from './components/bar/Bar';
import Brightness from './util/brightness';
import {
hyprToGdk
} from './util/hyprland';
import style from './style.scss';
App.start({
instanceName: "runner",
css: style,
main() {
App.start( {
'instanceName': 'runner',
'css': style,
main () {
const hypr = AstalHyprland.get_default();
const bars = new Map<number, string>();
const barCreator = ( monitor: AstalHyprland.Monitor ) => {
const gdkMonitor = hyprToGdk( monitor );
if ( gdkMonitor ) {
print( 'Bar added for screen ' + monitor.get_id() );
bars.set( monitor.get_id(), Bar.BarLauncher( gdkMonitor ) );
}
}
};
for (const monitor of hypr.monitors) {
for ( const monitor of hypr.monitors ) {
barCreator( monitor );
}
@@ -30,14 +35,17 @@ App.start({
hypr.connect( 'monitor-removed', ( _, monitor ) => {
const windowName = bars.get( monitor );
if ( windowName ) {
const win = App.get_window( windowName );
if ( win ) {
App.toggle_window( windowName );
win.set_child( null );
App.remove_window( win );
print( 'Bar removed for screen', monitor );
}
bars.delete( monitor );
}
} );
@@ -49,7 +57,7 @@ App.start({
// }
// Launcher();
},
requestHandler(request, res) {
requestHandler ( request, res ) {
const args = request.trimStart().split( ' ' );
if ( args[ 0 ] === 'notifier' ) {
@@ -60,6 +68,7 @@ App.start({
} else if ( args[ 0 ] === 'brightness' ) {
try {
const brightness = Brightness.get_default();
if ( brightness.screenAvailable ) {
if ( args[ 1 ] === 'increase' ) {
brightness.screen += args.length > 1 ? parseInt( args[ 2 ] ) / 100 : 1;
@@ -70,12 +79,15 @@ App.start({
brightness.screen = parseInt( args[ 2 ] ) / 100;
} else {
res( 'Argument <brightness> unspecified' );
return;
}
} else {
res( 'Unknown command ' + args[ 1 ] );
return;
}
res( 'Ok' );
} else {
res( 'No controllable screen available' );
@@ -99,5 +111,4 @@ App.start({
// }
// }
},
})
} );

View File

@@ -1,44 +1,58 @@
import { Gtk } from "astal/gtk4";
import Power from "./modules/Power";
import Audio from "./modules/Audio/Audio";
import Bluetooth from "./modules/Bluetooth/Bluetooth";
import Brightness from "./modules/Brightness/Brightness";
import Player from "./modules/Player/Player";
import { BatteryBox } from "./modules/Battery";
import { exec } from "astal";
import Network from "./modules/Networking/Network";
import Audio from './modules/Audio/Audio';
import {
BatteryBox
} from './modules/Battery';
import Bluetooth from './modules/Bluetooth/Bluetooth';
import Brightness from './modules/Brightness/Brightness';
import {
Gtk
} from 'astal/gtk4';
import Network from './modules/Networking/Network';
import Player from './modules/Player/Player';
import Power from './modules/Power';
import SysTray from './modules/SysTray';
import {
exec
} from 'astal';
const QuickActions = () => {
const popover = new Gtk.Popover({ cssClasses: ["quick-actions-wrapper"] });
popover.set_child(renderQuickActions());
const popover = new Gtk.Popover( {
'cssClasses': [ 'quick-actions-wrapper' ]
} );
popover.set_child( renderQuickActions() );
return popover;
};
const renderQuickActions = () => {
const user = exec("/bin/sh -c whoami");
const profile = exec("/bin/fish -c get-profile-picture");
const cwd = exec("pwd");
const user = exec( '/bin/sh -c whoami' );
const profile = exec( '/bin/fish -c get-profile-picture' );
const cwd = exec( 'pwd' );
const um = Power.UserMenu();
return (
<box visible cssClasses={["quick-actions", "popover-box"]} vertical>
<box visible cssClasses={[
'quick-actions',
'popover-box'
]} vertical>
<centerbox
startWidget={
<button
onClicked={() => um.popup()}
cssClasses={["stealthy-button"]}
cssClasses={[ 'stealthy-button' ]}
child={
<box>
{um}
<Gtk.Frame
cssClasses={["avatar-icon"]}
cssClasses={[ 'avatar-icon' ]}
child={
<image
file={
profile !== ""
profile !== ''
? profile
: cwd +
"/no-avatar-icon.jpg"
: cwd
+ '/no-avatar-icon.jpg'
}
></image>
}
@@ -53,6 +67,7 @@ const renderQuickActions = () => {
hexpand={false}
>
<BatteryBox></BatteryBox>
<SysTray.SystemTray></SysTray.SystemTray>
<Power.Power></Power.Power>
</box>
}

View File

@@ -7,6 +7,7 @@ const BrightnessModule = () => {
const setBrightness = (value: number) => {
brightness.screen = value;
}
return (
<box visible={bind(brightness, 'screenAvailable')}>
<image iconName={"brightness-high-symbolic"}></image>

View File

@@ -1,48 +1,56 @@
import { exec } from "astal";
import { Gtk } from "astal/gtk4";
import {
exec
} from 'astal';
import {
Gtk
} from 'astal/gtk4';
const PowerMenu = (): Gtk.Popover => {
const popover = new Gtk.Popover({ cssClasses: ["PowerMenu"] });
const popover = new Gtk.Popover( {
'cssClasses': [ 'PowerMenu' ]
} );
const powerMenuBox = () => {
return (
<box>
<button
cssClasses={["power-button"]}
cssClasses={[ 'power-button' ]}
child={
<image iconName={"system-shutdown-symbolic"}></image>
<image iconName={'system-shutdown-symbolic'}></image>
}
onClicked={() => exec("/bin/sh -c 'shutdown now'")}
onClicked={() => exec( '/bin/sh -c \'shutdown now\'' )}
></button>
<button
cssClasses={["power-button"]}
child={<image iconName={"system-reboot-symbolic"}></image>}
onClicked={() => exec("/bin/sh -c 'reboot'")}
cssClasses={[ 'power-button' ]}
child={<image iconName={'system-reboot-symbolic'}></image>}
onClicked={() => exec( '/bin/sh -c \'reboot\'' )}
></button>
<button
cssClasses={["power-button"]}
child={<image iconName={"system-suspend-symbolic"}></image>}
onClicked={() => exec("/bin/sh -c 'systemctl suspend'")}
cssClasses={[ 'power-button' ]}
child={<image iconName={'system-suspend-symbolic'}></image>}
onClicked={() => exec( '/bin/sh -c \'systemctl suspend\'' )}
></button>
</box>
);
};
popover.set_child(powerMenuBox());
popover.set_child( powerMenuBox() );
return popover;
};
const Power = () => {
const pm = PowerMenu();
return (
<button
widthRequest={0}
hexpand={false}
vexpand={false}
cssClasses={["power-menu-button"]}
cssClasses={[ 'power-menu-button' ]}
child={
<box>
<image iconName={"system-shutdown-symbolic"}></image>
<image iconName={'system-shutdown-symbolic'}></image>
{pm}
</box>
}
@@ -58,24 +66,24 @@ const UserMenu = (): Gtk.Popover => {
return (
<box>
<button
cssClasses={["power-button"]}
cssClasses={[ 'power-button' ]}
child={
<image iconName={"system-lock-screen-symbolic"}></image>
<image iconName={'system-lock-screen-symbolic'}></image>
}
onClicked={() => exec("/bin/sh -c 'hyprlock'")}
onClicked={() => exec( '/bin/sh -c \'hyprlock\'' )}
></button>
<button
cssClasses={["power-button"]}
child={<image iconName={"system-log-out-symbolic"}></image>}
onClicked={() =>
exec("/bin/sh -c 'hyprctl dispatch exit 0'")
cssClasses={[ 'power-button' ]}
child={<image iconName={'system-log-out-symbolic'}></image>}
onClicked={() => exec( '/bin/sh -c \'hyprctl dispatch exit 0\'' )
}
></button>
</box>
);
};
popover.set_child(powerMenuBox());
popover.set_child( powerMenuBox() );
return popover;
};

View File

@@ -0,0 +1,88 @@
import AstalTray from 'gi://AstalTray';
import {
GObject
} from 'astal';
import {
Gtk
} from 'astal/gtk4';
const SYNC = GObject.BindingFlags.SYNC_CREATE;
const SysTray = () => {
const trayBox = new Gtk.Box( {
'cssClasses': [ '' ]
} );
const tray = AstalTray.get_default();
const trayItems = new Map<string, Gtk.MenuButton>();
const trayAddedHandler = tray.connect( 'item-added', ( _, id ) => {
const item = tray.get_item( id );
const popover = Gtk.PopoverMenu.new_from_model( item.menu_model );
const icon = new Gtk.Image();
const button = new Gtk.MenuButton( {
popover,
'child': icon,
'cssClasses': [ 'tray-item' ],
} );
item.bind_property(
'gicon', icon, 'gicon', SYNC
);
popover.insert_action_group( 'dbusmenu', item.action_group );
item.connect( 'notify::action-group', () => {
popover.insert_action_group( 'dbusmenu', item.action_group );
} );
trayItems.set( id, button );
trayBox.append( button );
} );
const trayRemovedHandler = tray.connect( 'item-removed', ( _, id ) => {
const button = trayItems.get( id );
if ( button ) {
trayBox.remove( button );
button.run_dispose();
trayItems.delete( id );
}
} );
trayBox.connect( 'destroy', () => {
tray.disconnect( trayAddedHandler );
tray.disconnect( trayRemovedHandler );
} );
return trayBox;
};
const TrayPopover = () => {
const popover = new Gtk.Popover( {
'cssClasses': [ 'TrayPopover' ]
} );
popover.set_child( SysTray() );
return popover;
};
const SystemTray = () => {
const systray = TrayPopover();
return (
<button
widthRequest={0}
hexpand={false}
vexpand={false}
cssClasses={[ 'power-menu-button' ]}
child={
<box>
<image iconName={'systemtray'}></image>
{systray}
</box>
}
onClicked={() => systray.popup()}
/>
);
};
export default {
SystemTray
};

View File

@@ -39,7 +39,6 @@ const Bar = ( {
>
<Hyprland.ModeStatus />
<Calendar.Time />
<SystemInfo.SystemInfo />
<Hyprland.Workspace />
</box>
}
@@ -50,7 +49,7 @@ const Bar = ( {
halign={Gtk.Align.END}
cssClasses={[ 'BarRight' ]}
>
<Hyprland.SysTray />
<SystemInfo.SystemInfo />
<QuickView.QuickView />
</box>
}

View File

@@ -20,6 +20,11 @@ window.Bar {
border-radius: 20px;
font-family: $monospace-font;
&.command-mode {
background-color: darkslategray;
color: white;
}
&.windowing-mode {
background-color: darkslategray;
color: white;

View File

@@ -1,62 +1,15 @@
import {
GObject, bind,
bind,
exec,
readFile
} from 'astal';
import AstalHyprland from 'gi://AstalHyprland';
import AstalTray from 'gi://AstalTray';
import {
Gtk
} from 'astal/gtk4';
import Pango from 'gi://Pango?version=1.0';
const hypr = AstalHyprland.get_default();
const SYNC = GObject.BindingFlags.SYNC_CREATE;
const SysTray = () => {
const trayBox = new Gtk.Box( {
'cssClasses': [ 'bar-button' ]
} );
const tray = AstalTray.get_default();
const trayItems = new Map<string, Gtk.MenuButton>();
const trayAddedHandler = tray.connect( 'item-added', ( _, id ) => {
const item = tray.get_item( id );
const popover = Gtk.PopoverMenu.new_from_model( item.menu_model );
const icon = new Gtk.Image();
const button = new Gtk.MenuButton( {
popover,
'child': icon,
'cssClasses': [ 'tray-item' ],
} );
item.bind_property(
'gicon', icon, 'gicon', SYNC
);
popover.insert_action_group( 'dbusmenu', item.action_group );
item.connect( 'notify::action-group', () => {
popover.insert_action_group( 'dbusmenu', item.action_group );
} );
trayItems.set( id, button );
trayBox.append( button );
} );
const trayRemovedHandler = tray.connect( 'item-removed', ( _, id ) => {
const button = trayItems.get( id );
if ( button ) {
trayBox.remove( button );
button.run_dispose();
trayItems.delete( id );
}
} );
trayBox.connect( 'destroy', () => {
tray.disconnect( trayAddedHandler );
tray.disconnect( trayRemovedHandler );
} );
return trayBox;
};
const Workspace = () => {
return (
@@ -123,33 +76,33 @@ const ActiveWindow = () => {
type submaps = 'device' | 'launch' | 'workspace' | 'windowing' | 'screenshotting' | 'notifications' | '';
const ModeStatus = () => {
let isUsingHyprmode = false;
let isUsingHyprvim = false;
try {
const path = exec( 'bash -c "cd ~ && pwd"' ) + '/.config/hyprmode';
const path = exec( 'bash -c "cd ~ && pwd"' ) + '/.config/hyprvim';
isUsingHyprmode = readFile( path ).trim() === 'y';
isUsingHyprvim = readFile( path ).trim() === 'y';
} catch ( e ) {
printerr( 'Failed to read hyprmode config', e );
printerr( 'Failed to read hyprvim config', e );
}
const label = new Gtk.Label();
if ( !isUsingHyprmode ) return label;
if ( !isUsingHyprvim ) return label;
print( '==> Using hyprmode config' );
print( '==> Using hyprvim config' );
const map = {
'device': 'D',
'launch': 'L',
'workspace': 'W',
'windowing': 'M',
'screenshotting': 'S',
'notifications': 'N',
'': 'N'
'device': 'DEV',
'launch': 'LNC',
'workspace': 'WSP',
'windowing': 'WIN',
'screenshotting': 'SCS',
'notifications': 'NOT',
'': 'NRM'
};
label.label = 'N';
label.label = map[''];
label.cssClasses = [ 'mode-status' ];
// TODO: Possibly add popover to it that lists binds
@@ -189,6 +142,5 @@ const WindowPopoverBox = () => {
export default {
Workspace,
ActiveWindow,
SysTray,
ModeStatus
};

View File

@@ -26,6 +26,7 @@ alias ff='fastfetch'
alias p='nvimpager -p'
alias latexdocs='zathura ~/projects/latex/docs/docs.pdf &>> /dev/null & disown'
alias gccerr='gcc -Wall -Wextra -Wpedantic -Werror -Wmissing-prototypes -std=c99'
alias linecount='cloc --vcs git .'
# Add scripts in ~/projects/dotfiles/scripts/ to path
fish_add_path -P ~/projects/dotfiles/scripts/

View File

@@ -9,21 +9,18 @@ exec-once = ~/.config/hypr/xdg-portal-hyprland
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XAUTHORITY DISPLAY
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# exec-once = waybar
exec-once = hypridle
exec-once = nm-applet
exec-once = nextcloud --background
exec-once = sleep 2 && bash -c "ags run -d ~/projects/dotfiles/config/astal/ --gtk4 >> /tmp/runner-log 2>&1"
# exec-once = sleep 2 && bash -c "ags run -d ~/projects/active/dotfiles/config/astal/ --gtk4"
exec-once = bash -c "ags run -d ~/projects/dotfiles/config/ags/notifications/ >> /tmp/notifier-log 2>&1"
# exec-once = bash -c "ags run -d ~/projects/active/dotfiles/config/ags/notifications/"
exec-once = sleep 2 && bash -c "ags run -d ~/projects/dotfiles/config/astal/ --gtk 4 >> /tmp/runner-log 2>&1"
exec-once = bash -c "ags run -d ~/projects/dotfiles/config/ags/notifications/ --gtk 3 >> /tmp/notifier-log 2>&1"
# ── wlhist ──────────────────────────────────────────────────────────
exec-once = wl-paste --type text --watch cliphist store # Stores only text data
exec-once = wl-paste --type image --watch cliphist store # Stores only image data
exec = hyprctl setcursor oreo_spark_blue_cursors 24
env = QT_QPA_PLATFORM,wayland
env = QT_QPA_PLATFORM_THEME,qt6ct
env = OLLAMA_HOST,0.0.0.0

View File

@@ -1,4 +1,4 @@
# Hyprmode
# hyprvim
Using Vim Motions and in general vim-style commands is really neat - so why not apply to the Window Manager as well?
## Mapping

View File

@@ -19,6 +19,11 @@ bind = $mainMod, D, submap, device
submap = device
# ── Swapescape ──────────────────────────────────────────────────────
bind = , S, exec, fish -c "toggle-swapescape"
bind = , S, submap, reset
# ── FPV goggles binds ───────────────────────────────────────────────
bind = CTRL, D, exec, hyprctl keyword monitor HDMI-A-1, 1280x720@60, 1920x0, 1, mirror, DP-1 && notify-send 'Set FPV goggles to mirror main screen' --app-name="Hyprctl"
bind = CTRL, E, exec, hyprctl keyword monitor HDMI-A-1, 1280x720@60, 3840x0, 1 && notify-send 'Set to expand FPV goggles' --app-name="Hyprctl"

View File

@@ -2,9 +2,6 @@
# ╭────────────────────────────────────────────────╮
# │ App launching │
# ╰────────────────────────────────────────────────╯
bind = $mainMod SHIFT, L, exec, librewolf
bind = $mainMod SHIFT, D, exec, vesktop
bind = $mainMod SHIFT, Z, exec, zathura
bind = $mainMod, Return, exec, kitty
@@ -43,6 +40,12 @@ bind = , E, submap, reset
bind = , D, exec, vesktop
bind = , D, submap, reset
bind = SHIFT, B, exec, brave
bind = SHIFT, B, submap, reset
bind = , F, exec, filezilla
bind = , F, submap, reset
bind = , V, exec, vscodium
bind = , V, submap, reset
@@ -55,6 +58,12 @@ bind = , H, submap, reset
bind = , Z, exec, zathura
bind = , Z, submap, reset
bind = , B, exec, /opt/bs-manager/bs-manager
bind = , B, submap, reset
bind = , P, exec, alvr_dashboard
bind = , P, submap, reset
bind = , A, exec, notify-send 'AirPlay server starting...' --app-name="AirPlay Audio" && terminator -T "hidden-terminator" -e "systemctl start avahi-daemon && shairport-sync -a LinuxPlay"
bind = , A, submap, reset

View File

@@ -9,10 +9,19 @@ submap = notifications
bind = , T, exec, astal -i notifier toggle
bind = , T, submap, reset
bind = , D, exec, astal -i notifier clear-newest
bind = , D, submap, reset
bind = , C, exec, astal -i notifier clear
bind = , C, submap, reset
bind = , S, exec, astal -i notifier show
bind = , S, submap, reset
bind = , H, exec, astal -i notifier hide
bind = , H, submap, reset
# ── Exit submap ─────────────────────────────────────────────────────

View File

@@ -6,11 +6,17 @@ bind = $mainMod, S, submap, screenshotting
submap = screenshotting
bind = , Y, exec, grimblast --notify copy area
bind = , Y, submap, reset
bind = , C, exec, grimblast --notify copysave area
bind = , C, submap, reset
bind = , S, exec, grimblast --notify save area
bind = , S, submap, reset
bind = SHIFT, Y, exec, grimblast --notify copy screen
bind = SHIFT, Y, submap, reset
bind = SHIFT, C, exec, grimblast --notify copysave screen
bind = SHIFT, C, submap, reset
bind = SHIFT, S, exec, grimblast --notify save screen
bind = SHIFT, S, submap, reset
# ── Exit submap ─────────────────────────────────────────────────────

View File

@@ -1,17 +1,3 @@
# ────────────────────────────────────────────────────────────────────
# ╭────────────────────────────────────────────────╮
# │ WORKSPACE RULES │
# ╰────────────────────────────────────────────────╯
# ────────────────────────────────────────────────────────────────────
# Display full sized (without gaps), if only window on screen
# workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0
# windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
# windowrule = rounding 0, floating:0, onworkspace:w[tv1]
# windowrule = bordersize 0, floating:0, onworkspace:f[1]
# windowrule = rounding 0, floating:0, onworkspace:f[1]
$mainMod = SUPER
# ────────────────────────────────────────────────────────────────────
@@ -19,16 +5,20 @@ $mainMod = SUPER
# │ WINDOW RULES │
# ╰────────────────────────────────────────────────╯
# ────────────────────────────────────────────────────────────────────
windowrule = move 1450 50, title:^(.*)(Power menu)$
windowrule = move 1450 50, title:(.*)Power menu$
windowrule = workspace 2, class:evince
windowrule = workspace 2, title:.*(Okular).*
windowrule = workspace 2, title:.*Okular.*
windowrule = workspace 2, class:org.pwmt.zathura
windowrule = fullscreen, title:wlogout
windowrule = workspace 2, class:librewolf
windowrule = workspace 2, title:LibreWolf
windowrule = workspace 2, title:(.*)(Discord)(.*)
windowrule = workspace 2, title:BSManager
windowrule = workspace 1, title:ALVR(.*)
windowrule = workspace 2, title:(.*)Beat Saber(.*)
windowrule = fullscreen, title:(.*)Beat Saber(.*)
windowrule = workspace 2, title:(.*)Discord(.*)
windowrule = workspace 3, title:^(Steam)(.*)$
windowrule = workspace 1, title:^(.*)(VSCodium)$
windowrule = workspace 1, title:(.*)(VSCodium)$
windowrule = center, title:^(.*)(VSCodium)$
windowrule = workspace 3, class:minecraft-launcher
windowrule = tile, class:minecraft-launcher
@@ -46,6 +36,7 @@ windowrule = float, title:^(.*)hidden-terminator*(.*)$
windowrule = float, title:^(.*)termfilechooser*(.*)$
windowrule = size 1400 800, title:^(.*)termfilechooser*(.*)$
windowrule = center, title:^(.*)termfilechooser*(.*)$
windowrule = dimaround, title:^(.*)termfilechooser*(.*)$
# ┌ ┐
# │ Set floating windows & position them centered │
@@ -107,6 +98,7 @@ windowrule = center, class:pavucontrol
windowrule = float, class:file-roller
windowrule = center, class:file-roller
# idleinhibit
windowrule = idleinhibit focus, title:^(Rocket League)(.*)$
windowrule = fullscreen, title:^(Steam Big Picture)$
windowrule = idleinhibit always, class:steam
@@ -116,6 +108,12 @@ windowrule = idleinhibit focus, class:supertuxkart
windowrule = idleinhibit fullscreen, title:^(.*)(Discord)(.*)$
windowrule = idleinhibit fullscreen, title:^(.*)(~)(.*)$
# Do not screenshare bitwarden windows
windowrule = noscreenshare, title:(.*)(Bitwarden)(.*)
windowrule = noscreenshare, class:nm-connection-editor
windowrule = noscreenshare, title:(.*)(secret)(.*)
windowrule = noscreenshare, class:(.*)[aA]uthentication(.*)
# ┌ ┐
# │ Layer rules │

View File

@@ -20,6 +20,7 @@
monitor=DP-1, 1920x1080@144, 0x0, 1, vrr, 2
monitor=DP-2, 1920x1080@75, 1920x0, 1
exec = hyprctl setcursor oreo_spark_blue_cursors 24
source=./hyprland/binds.conf
source=./hyprland/general.conf

View File

@@ -32,7 +32,7 @@ source=./hyprland/windowrules.conf
exec = hyprctl setcursor oreo_spark_blue_cursors 36
env = HYPRCURSOR_THEME, Oreo_spark_blue_cursor
env = X_CURSOR_THEME, Oreo_spark_blue_cursor
env = XCURSOR_SIZE, 24
env = XCURSOR_SIZE, 36
env = ELECTRON_ENABLE_HIGHDPI_SUPPORT, 1
env = XDG_SESSION_TYPE, wayland
env = QT_QPA_PLATFORM, wayland

View File

@@ -29,3 +29,8 @@ url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto ne
detect_urls yes
show_hyperlink_targets yes
include current-theme.conf
# ┌ ┐
# │ Mappings │
# └ ┘
map kitty_mod+e

View File

@@ -4,6 +4,12 @@ defaultIndent: " "
# Limit Number of backups
maxNumberOfBackups: 3
verbatimEnvironments:
verbatim: 1
lstlisting: 1
minted: 1
code: 1
indentRules:
recall: " "
remarks: " "

View File

@@ -1,2 +1,3 @@
[flavor]
use = "tokyo-night"
dark = "tokyo-night"
light = "tokyo-night"

View File

@@ -84,7 +84,7 @@ echo "
==> Installing other utilities...
"
sleep 2
yay -S --noconfirm --noremovemake okular vlc nextcloud-client p7zip zip unzip noto-fonts pavucontrol light fastfetch bashtop hugo uxplay upower gdu dig nwg-look serpl fcitx5 qalculate-gtk openconnect light blueman xdg-desktop-portal-termfilechooser-hunkyburrito-git lazygit tldr
yay -S --noconfirm --noremovemake okular vlc nextcloud-client p7zip zip unzip noto-fonts pavucontrol light fastfetch bashtop hugo uxplay upower gdu dig nwg-look serpl fcitx5 qalculate-gtk openconnect light blueman xdg-desktop-portal-termfilechooser-hunkyburrito-git lazygit tldr cloc usbutils bluez-utils bluez
# LaTeX
echo "
@@ -128,6 +128,7 @@ cd nvim
xdg-settings set default-web-browser librewolf.desktop
xdg-mime default org.pwmt.zathura.desktop application/pdf
sudo systemctl disable rustdesk
sudo systemctl enable --now systemd-timesyncd
hyprpm update
git-credential-manager configure

View File

@@ -1,2 +1,3 @@
[flavor]
use = "{{ yazi-theme }}"
dark = "{{ yazi-theme }}"
light = "{{ yazi-theme }}"

14
scripts/convert-to-mp4 Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
extension="out"
read -p "Pick extension to convert from: " extension
outfolder="out"
outext="mp4"
read -p "Output folder: " outfolder
read -p "Output extension: " outext
mkdir $outfolder
for file in *.$extension; do
ffmpeg -i "$file" "$outfolder/${file%.$extension}.$outext"
echo "\n\n==> Conversion complete\n\n"
done

View File

@@ -1,58 +1,75 @@
#!/usr/bin/env bash
connect() {
read -sp $'Please enter your Encryption Password: ' encpass
echo " ==> Connecting"
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=""
read -sp $'Please enter your Encryption Password: ' encpass
echo "
==> Connecting"
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 --no-external-auth --passwd-on-stdin --token-mode=totp --token-secret=sha1:base32:$TOKEN sslvpn.ethz.ch
if [ $? -ne 0 ]; then
echo ' ==> Failed to connect <=='
else
echo ' ==> Connected <==
'
fi
encpass=""
PASSWORD=""
TOKEN=""
}
disconnect() {
sudo killall -v -SIGINT openconnect
echo " ==> Disconnected"
sudo killall -v -SIGINT openconnect
echo " ==> Disconnected"
}
setup() {
echo 'You are about to overwrite your secrets. Press ctrl + C to cancel.'
read -p $'Please enter your ETHZ-Username: ' USERNAME
read -sp $'Please choose and enter your Encryption Password (will be required when launching): ' encpass
read -sp $'Please enter your ETHZ WLAN (= Radius) Password: ' PASSWORD
read -sp $'Please enter 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'
echo 'You are about to overwrite your secrets. Press ctrl + C to cancel.'
read -p 'Please enter your ETHZ-Username: ' USERNAME
read -sp 'Please choose and enter your Encryption Password (will be required when launching): ' encpass
echo ""
read -sp 'Please enter your ETHZ WLAN (= Radius) Password: ' PASSWORD
echo ""
read -sp 'Please enter your ETHZ OTP Secret: ' TOKEN
echo ""
if [[ -d ~/.local/share/ethz-vpn-connect ]]; then
rm -rf ~/.local/share/ethz-vpn-connect
fi
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=""
if [ $? -ne 0 ]; then
echo ' ==> Failed to set secrets <=='
else
echo ' ==> Secrets set <==\n'
fi
}
case "$1" in
'connect')
connect
;;
connect
;;
c)
connect
;;
connect
;;
'disconnect')
disconnect
;;
disconnect
;;
d)
disconnect
;;
disconnect
;;
dc)
disconnect
;;
disconnect
;;
setup)
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-Username.\n'
;;
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-Username.\n'
;;
esac

3
scripts/pdf-wordcount Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
echo "Word count is $(pdftotext $1 - | tr -d '.' | wc -w)"

View File

@@ -8,6 +8,6 @@ echo "
killall gjs
killall ags
sleep 4
ags run -d ~/projects/dotfiles/config/astal --gtk4 & disown
ags run -d ~/projects/dotfiles/config/astal --gtk 4 & disown
sleep 2
ags run -d ~/projects/dotfiles/config/ags/notifications & disown
ags run -d ~/projects/dotfiles/config/ags/notifications --gtk 3 & disown

10
scripts/toggle-swapescape Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
enabled=$(hyprctl getoption input:kb_options | grep "caps:swapescape")
if [[ $enabled == "" ]]; then
hyprctl keyword input:kb_options "caps:swapescape"
notify-send "Swapescape enabled"
else
hyprctl keyword input:kb_options ""
notify-send "Swapescape disabled"
fi

5
scripts/update-nvim Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
cd ~/projects/nvim/
git pull
./nvim-install.sh

33
setup
View File

@@ -28,7 +28,6 @@ trap 'echo -e "\nCaught Ctrl+C, exiting..."; exit 130' SIGINT
# Read platform to install on (only if no platform file present in ~/.config/)
platform=""
if [[ -f ~/.config/platform ]]; then
echo "Config type already selected, skipping"
platform=$(cat ~/.config/platform)
else
read -p "Choose the configs to install, Laptop or Desktop (l/D): " platform
@@ -55,19 +54,18 @@ else
fi
# ────────────────────────────────────────────────────────────────────
# Hyprmode config
hyprmode=""
if [[ -f ~/.config/hyprmode ]]; then
echo "Hyprmode config already specified, skipping"
platform=$(cat ~/.config/hyprmode)
# hyprvim config
hyprvim=""
if [[ -f ~/.config/hyprvim ]]; then
hyprvim=$(cat ~/.config/hyprvim)
else
read -p "Would you like to use Hyprmode? (Y/n) " hyprmode
read -p "Would you like to use hyprvim? (Y/n) " hyprvim
fi
hyprmode=$(echo "$hyprmode" | tr '[:upper:]' '[:lower:]')
if [[ "$hyprmode" == "" ]]; then
hyprmode="y"
hyprvim=$(echo "$hyprvim" | tr '[:upper:]' '[:lower:]')
if [[ "$hyprvim" == "" ]]; then
hyprvim="y"
fi
echo "$hyprmode" >~/.config/hyprmode
echo "$hyprvim" >~/.config/hyprvim
# ────────────────────────────────────────────────────────────────────
echo "=> Moving configs to correct destinations"
@@ -81,19 +79,19 @@ cp -r ./config/xdg-desktop-portal/ ~/.config/
# Depending on platform, remove one or the other config and rename remaining one
if [[ "$platform" == "d" ]]; then
echo "Running on desktop"
echo "==> Running on desktop"
cp -f ~/.config/hypr/hyprland_desktop.conf ~/.config/hypr/hyprland.conf
else
echo "Running on laptop"
echo "==> Running on laptop"
cp -f ~/.config/hypr/hyprland_laptop.conf ~/.config/hypr/hyprland.conf
fi
# Enable or disable "Hyprmode" (using hyprland with vim-inspired modes)
if [[ "$hyprmode" == "y" ]]; then
echo "Enabling hyprmode"
# Enable or disable "hyprvim" (using hyprland with vim-inspired modes)
if [[ "$hyprvim" == "y" ]]; then
echo "==> Enabling hyprvim"
mv -f ~/.config/hypr/hyprland/mode-binds.conf ~/.config/hypr/hyprland/binds.conf
else
echo "Disabling hyprmode"
echo "==> Disabling hyprvim"
rm -rf ~/.config/hypr/hyprland/modal-binds
rm ~/.config/hypr/hyprland/mode-binds.conf
fi
@@ -114,6 +112,7 @@ cp ./config/lint/indentconfig.yaml ~/.indentconfig.yaml
echo "
=> Installing yazi plugins
"
rm -rf ~/.config/yazi/plugins/*
ya pkg upgrade
if [[ "$restart" == "y" ]]; then