Compare commits
41 Commits
41f219ddee
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 273c4d090c | |||
| a88a419669 | |||
| b5471c5f25 | |||
| 422466e483 | |||
| ee49471228 | |||
| 802f0dd84e | |||
| 5570e58efc | |||
| 5d687eb837 | |||
| e46820b5f7 | |||
| ab9854d12f | |||
| 2e83db4b69 | |||
| b27f3fa744 | |||
| 1c845777e8 | |||
| e1eb5794c5 | |||
| b5f7738df3 | |||
| 6817507506 | |||
| 2a993c2ceb | |||
| e2069193fe | |||
| dc16123c82 | |||
| 641212f0e3 | |||
| 5e57111548 | |||
| 2e148cb31a | |||
| be76b81d6e | |||
| 815c1f4edb | |||
| 6fb2964443 | |||
| 506e8ef15e | |||
| f3f9e58805 | |||
| 966d31c6a8 | |||
| 9e59127cb2 | |||
| 22a684c1a6 | |||
| fd0ccc015b | |||
| fa735bac88 | |||
| 97664054b7 | |||
| b3637e4d6f | |||
| 10939f2ea3 | |||
| 2de91ed77b | |||
| 23bbbbdbe8 | |||
| 3f5b212d37 | |||
| dbeb4d02a4 | |||
| 673748402a | |||
| 605b30c730 |
110
.config/OpenTabletDriver/settings.json
Normal file
110
.config/OpenTabletDriver/settings.json
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
{
|
||||||
|
"Revision": "0.6.6.2",
|
||||||
|
"Profiles": [
|
||||||
|
{
|
||||||
|
"Tablet": "Wacom PTH-451",
|
||||||
|
"OutputMode": {
|
||||||
|
"Path": "OpenTabletDriver.Desktop.Output.LinuxArtistMode",
|
||||||
|
"Settings": [],
|
||||||
|
"Enable": true
|
||||||
|
},
|
||||||
|
"Filters": [],
|
||||||
|
"AbsoluteModeSettings": {
|
||||||
|
"Display": {
|
||||||
|
"Width": 2560.0,
|
||||||
|
"Height": 1440.0,
|
||||||
|
"X": 1280.0001,
|
||||||
|
"Y": 720.0,
|
||||||
|
"Rotation": 0.0
|
||||||
|
},
|
||||||
|
"Tablet": {
|
||||||
|
"Width": 157.48,
|
||||||
|
"Height": 88.5825,
|
||||||
|
"X": 78.74,
|
||||||
|
"Y": 49.2125,
|
||||||
|
"Rotation": 0.0
|
||||||
|
},
|
||||||
|
"EnableClipping": true,
|
||||||
|
"EnableAreaLimiting": false,
|
||||||
|
"LockAspectRatio": true
|
||||||
|
},
|
||||||
|
"RelativeModeSettings": {
|
||||||
|
"XSensitivity": 10.0,
|
||||||
|
"YSensitivity": 10.0,
|
||||||
|
"RelativeRotation": 0.0,
|
||||||
|
"RelativeResetDelay": "00:00:00.1000000"
|
||||||
|
},
|
||||||
|
"Bindings": {
|
||||||
|
"TipActivationThreshold": 1.0,
|
||||||
|
"TipButton": {
|
||||||
|
"Path": "OpenTabletDriver.Desktop.Binding.AdaptiveBinding",
|
||||||
|
"Settings": [
|
||||||
|
{
|
||||||
|
"Property": "Binding",
|
||||||
|
"Value": "Tip"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Enable": true
|
||||||
|
},
|
||||||
|
"EraserActivationThreshold": 1.0,
|
||||||
|
"EraserButton": {
|
||||||
|
"Path": "OpenTabletDriver.Desktop.Binding.AdaptiveBinding",
|
||||||
|
"Settings": [
|
||||||
|
{
|
||||||
|
"Property": "Binding",
|
||||||
|
"Value": "Eraser"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Enable": true
|
||||||
|
},
|
||||||
|
"PenButtons": [
|
||||||
|
{
|
||||||
|
"Path": "OpenTabletDriver.Desktop.Binding.AdaptiveBinding",
|
||||||
|
"Settings": [
|
||||||
|
{
|
||||||
|
"Property": "Binding",
|
||||||
|
"Value": "Button 1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Enable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "OpenTabletDriver.Desktop.Binding.AdaptiveBinding",
|
||||||
|
"Settings": [
|
||||||
|
{
|
||||||
|
"Property": "Binding",
|
||||||
|
"Value": "Button 2"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Enable": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"AuxButtons": [
|
||||||
|
{
|
||||||
|
"Path": "OpenTabletDriver.Desktop.Binding.MultiKeyBinding",
|
||||||
|
"Settings": [
|
||||||
|
{
|
||||||
|
"Property": "Keys",
|
||||||
|
"Value": "Control+Z"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Enable": true
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
],
|
||||||
|
"MouseButtons": [],
|
||||||
|
"MouseScrollUp": null,
|
||||||
|
"MouseScrollDown": null,
|
||||||
|
"DisablePressure": false,
|
||||||
|
"DisableTilt": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"LockUsableAreaDisplay": true,
|
||||||
|
"LockUsableAreaTablet": true,
|
||||||
|
"Tools": []
|
||||||
|
}
|
||||||
6
.config/direnv/direnvrc
Normal file
6
.config/direnv/direnvrc
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Better support for Nix flakes
|
||||||
|
use_flake() {
|
||||||
|
watch_file flake.nix
|
||||||
|
watch_file flake.lock
|
||||||
|
eval "$(nix print-dev-env)"
|
||||||
|
}
|
||||||
@@ -102,11 +102,17 @@ windowrule = tag -default-opacity, match:class com.libretro.RetroArch
|
|||||||
windowrule = opacity 1 1, match:class com.libretro.RetroArch
|
windowrule = opacity 1 1, match:class com.libretro.RetroArch
|
||||||
windowrule = idle_inhibit fullscreen, match:class com.libretro.RetroArch
|
windowrule = idle_inhibit fullscreen, match:class com.libretro.RetroArch
|
||||||
|
|
||||||
|
# Scratchpad apps
|
||||||
|
windowrule = workspace special:scratchpad, match:class Spotify
|
||||||
|
windowrule = workspace special:scratchpad, match:class signal
|
||||||
|
windowrule = workspace special:scratchpad, match:class ^(chrome-discord.com__channels_@me-Default)$
|
||||||
|
windowrule = workspace special:scratchpad, match:class ^(chrome-web.whatsapp.com__-Default)$
|
||||||
|
|
||||||
# Float Nextcloud
|
# Float Nextcloud
|
||||||
windowrule = float on, match:class com.nextcloud.desktopclient.nextcloud
|
windowrule = float on, match:class com.nextcloud.desktopclient.nextcloud
|
||||||
|
|
||||||
# Position drawing
|
# Position drawing
|
||||||
windowrule = workspace 4, match:class (krita)
|
windowrule = workspace 5, match:class (krita)
|
||||||
windowrule = tag -default-opacity, match:class (krita)
|
windowrule = tag -default-opacity, match:class (krita)
|
||||||
windowrule = opacity 1 1, match:class (krita)
|
windowrule = opacity 1 1, match:class (krita)
|
||||||
|
|
||||||
@@ -116,7 +122,7 @@ windowrule = workspace 7, match:class ^(chrome-netflix.com__-Default)$
|
|||||||
|
|
||||||
# Float Steam
|
# Float Steam
|
||||||
windowrule = float on, match:class steam
|
windowrule = float on, match:class steam
|
||||||
windowrule = workspace 5, match:class steam
|
windowrule = workspace 7, match:class steam
|
||||||
windowrule = center on, match:class steam, match:title Steam
|
windowrule = center on, match:class steam, match:title Steam
|
||||||
windowrule = tag -default-opacity, match:class steam.*
|
windowrule = tag -default-opacity, match:class steam.*
|
||||||
windowrule = opacity 1 1, match:class steam.*
|
windowrule = opacity 1 1, match:class steam.*
|
||||||
@@ -126,7 +132,7 @@ windowrule = idle_inhibit fullscreen, match:class steam
|
|||||||
|
|
||||||
# Float Lunar Client
|
# Float Lunar Client
|
||||||
windowrule = float on, match:class lunarclient
|
windowrule = float on, match:class lunarclient
|
||||||
windowrule = workspace 5, match:class lunarclient
|
windowrule = workspace 7, match:class lunarclient
|
||||||
windowrule = center on, match:class lunarclient
|
windowrule = center on, match:class lunarclient
|
||||||
windowrule = tag -default-opacity, match:class lunarclient
|
windowrule = tag -default-opacity, match:class lunarclient
|
||||||
windowrule = opacity 1 1, match:class lunarclient
|
windowrule = opacity 1 1, match:class lunarclient
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
exec-once = uwsm-app -- hypridle
|
exec-once = uwsm-app -- hypridle
|
||||||
exec-once = uwsm-app -- mako
|
exec-once = uwsm-app -- mako
|
||||||
exec-once = uwsm-app -- waybar
|
# exec-once = Enpass
|
||||||
|
# exec-once = uwsm-app -- waybar
|
||||||
exec-once = uwsm-app -- fcitx5 --disable notificationitem
|
exec-once = uwsm-app -- fcitx5 --disable notificationitem
|
||||||
exec-once = uwsm-app -- swaybg -i ~/.config/station/current/background -m fill
|
exec-once = station-bg-random
|
||||||
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||||
|
|
||||||
# Slow app launch fix -- set systemd vars
|
# Slow app launch fix -- set systemd vars
|
||||||
|
|||||||
@@ -60,68 +60,15 @@ bindd = SUPER, L, Move window focus right, movefocus, r
|
|||||||
bindd = SUPER, K, Move window focus up, movefocus, u
|
bindd = SUPER, K, Move window focus up, movefocus, u
|
||||||
bindd = SUPER, J, Move window focus down, movefocus, d
|
bindd = SUPER, J, Move window focus down, movefocus, d
|
||||||
|
|
||||||
# Switch workspaces with SUPER + [1-9; 0]
|
|
||||||
bindd = SUPER, code:10, Switch to workspace 1, workspace, 1
|
|
||||||
bindd = SUPER, code:11, Switch to workspace 2, workspace, 2
|
|
||||||
bindd = SUPER, code:12, Switch to workspace 3, workspace, 3
|
|
||||||
bindd = SUPER, code:13, Switch to workspace 4, workspace, 4
|
|
||||||
bindd = SUPER, code:14, Switch to workspace 5, workspace, 5
|
|
||||||
bindd = SUPER, code:15, Switch to workspace 6, workspace, 6
|
|
||||||
bindd = SUPER, code:16, Switch to workspace 7, workspace, 7
|
|
||||||
bindd = SUPER, code:17, Switch to workspace 8, workspace, 8
|
|
||||||
bindd = SUPER, code:18, Switch to workspace 9, workspace, 9
|
|
||||||
bindd = SUPER, code:19, Switch to workspace 10, workspace, 10
|
|
||||||
|
|
||||||
# Move active window to a workspace with SUPER + SHIFT + [1-9; 0]
|
|
||||||
bindd = SUPER SHIFT, code:10, Move window to workspace 1, movetoworkspace, 1
|
|
||||||
bindd = SUPER SHIFT, code:11, Move window to workspace 2, movetoworkspace, 2
|
|
||||||
bindd = SUPER SHIFT, code:12, Move window to workspace 3, movetoworkspace, 3
|
|
||||||
bindd = SUPER SHIFT, code:13, Move window to workspace 4, movetoworkspace, 4
|
|
||||||
bindd = SUPER SHIFT, code:14, Move window to workspace 5, movetoworkspace, 5
|
|
||||||
bindd = SUPER SHIFT, code:15, Move window to workspace 6, movetoworkspace, 6
|
|
||||||
bindd = SUPER SHIFT, code:16, Move window to workspace 7, movetoworkspace, 7
|
|
||||||
bindd = SUPER SHIFT, code:17, Move window to workspace 8, movetoworkspace, 8
|
|
||||||
bindd = SUPER SHIFT, code:18, Move window to workspace 9, movetoworkspace, 9
|
|
||||||
bindd = SUPER SHIFT, code:19, Move window to workspace 10, movetoworkspace, 10
|
|
||||||
|
|
||||||
# Move active window silently to a workspace with SUPER + SHIFT + ALT + [1-9; 0]
|
|
||||||
bindd = SUPER SHIFT ALT, code:10, Move window silently to workspace 1, movetoworkspacesilent, 1
|
|
||||||
bindd = SUPER SHIFT ALT, code:11, Move window silently to workspace 2, movetoworkspacesilent, 2
|
|
||||||
bindd = SUPER SHIFT ALT, code:12, Move window silently to workspace 3, movetoworkspacesilent, 3
|
|
||||||
bindd = SUPER SHIFT ALT, code:13, Move window silently to workspace 4, movetoworkspacesilent, 4
|
|
||||||
bindd = SUPER SHIFT ALT, code:14, Move window silently to workspace 5, movetoworkspacesilent, 5
|
|
||||||
bindd = SUPER SHIFT ALT, code:15, Move window silently to workspace 6, movetoworkspacesilent, 6
|
|
||||||
bindd = SUPER SHIFT ALT, code:16, Move window silently to workspace 7, movetoworkspacesilent, 7
|
|
||||||
bindd = SUPER SHIFT ALT, code:17, Move window silently to workspace 8, movetoworkspacesilent, 8
|
|
||||||
bindd = SUPER SHIFT ALT, code:18, Move window silently to workspace 9, movetoworkspacesilent, 9
|
|
||||||
bindd = SUPER SHIFT ALT, code:19, Move window silently to workspace 10, movetoworkspacesilent, 10
|
|
||||||
|
|
||||||
# Control scratchpad
|
# Control scratchpad
|
||||||
bindd = SUPER, S, Toggle scratchpad, togglespecialworkspace, scratchpad
|
bindd = SUPER, S, Toggle scratchpad, togglespecialworkspace, scratchpad
|
||||||
bindd = SUPER ALT, S, Move window to scratchpad, movetoworkspacesilent, special:scratchpad
|
bindd = SUPER ALT, S, Move window to scratchpad, movetoworkspacesilent, special:scratchpad
|
||||||
|
|
||||||
# TAB between workspaces
|
|
||||||
bindd = SUPER, TAB, Next workspace, workspace, e+1
|
|
||||||
bindd = SUPER SHIFT, TAB, Previous workspace, workspace, e-1
|
|
||||||
bindd = SUPER CTRL, TAB, Former workspace, workspace, previous
|
|
||||||
|
|
||||||
# Move workspaces to other monitors
|
|
||||||
bindd = SUPER SHIFT ALT, LEFT, Move workspace to left monitor, movecurrentworkspacetomonitor, l
|
|
||||||
bindd = SUPER SHIFT ALT, RIGHT, Move workspace to right monitor, movecurrentworkspacetomonitor, r
|
|
||||||
bindd = SUPER SHIFT ALT, UP, Move workspace to up monitor, movecurrentworkspacetomonitor, u
|
|
||||||
bindd = SUPER SHIFT ALT, DOWN, Move workspace to down monitor, movecurrentworkspacetomonitor, d
|
|
||||||
|
|
||||||
# Swap active window with the one next to it with SUPER + SHIFT + arrow keys
|
|
||||||
bindd = SUPER SHIFT, LEFT, Swap window to the left, swapwindow, l
|
|
||||||
bindd = SUPER SHIFT, RIGHT, Swap window to the right, swapwindow, r
|
|
||||||
bindd = SUPER SHIFT, UP, Swap window up, swapwindow, u
|
|
||||||
bindd = SUPER SHIFT, DOWN, Swap window down, swapwindow, d
|
|
||||||
|
|
||||||
# Cycle through applications on active workspace
|
# Cycle through applications on active workspace
|
||||||
bindd = ALT, TAB, Cycle to next window, cyclenext
|
bindd = SUPER, TAB, Cycle to next window, cyclenext, visible
|
||||||
bindd = ALT SHIFT, TAB, Cycle to prev window, cyclenext, prev
|
bindd = SUPER SHIFT, TAB, Cycle to prev window, cyclenext, visible prev
|
||||||
bindd = ALT, TAB, Reveal active window on top, bringactivetotop
|
bindd = SUPER, TAB, Reveal active window on top, bringactivetotop
|
||||||
bindd = ALT SHIFT, TAB, Reveal active window on top, bringactivetotop
|
bindd = SUPER SHIFT, TAB, Reveal active window on top, bringactivetotop
|
||||||
|
|
||||||
# Resize active window
|
# Resize active window
|
||||||
bindd = SUPER, code:20, Expand window left, resizeactive, -100 0 # - key
|
bindd = SUPER, code:20, Expand window left, resizeactive, -100 0 # - key
|
||||||
@@ -233,7 +180,7 @@ bindd = SUPER CTRL, L, Lock system, exec, station-lock-screen
|
|||||||
# ==========================
|
# ==========================
|
||||||
# Applications
|
# Applications
|
||||||
# ==========================
|
# ==========================
|
||||||
bindd = SUPER, RETURN, Terminal, exec, uwsm-app -- xdg-terminal-exec --dir="$(station-cmd-terminal-cwd)"
|
bindd = SUPER, RETURN, Terminal, exec, uwsm-app -- xdg-terminal-exec
|
||||||
bindd = SUPER ALT, RETURN, Tmux, exec, uwsm-app -- xdg-terminal-exec --dir="$(station-cmd-terminal-cwd)" tmux new
|
bindd = SUPER ALT, RETURN, Tmux, exec, uwsm-app -- xdg-terminal-exec --dir="$(station-cmd-terminal-cwd)" tmux new
|
||||||
bindd = SUPER SHIFT, F, File manager, exec, uwsm-app -- nautilus --new-window
|
bindd = SUPER SHIFT, F, File manager, exec, uwsm-app -- nautilus --new-window
|
||||||
bindd = SUPER ALT SHIFT, F, File manager (cwd), exec, uwsm-app -- nautilus --new-window "$(station-cmd-terminal-cwd)"
|
bindd = SUPER ALT SHIFT, F, File manager (cwd), exec, uwsm-app -- nautilus --new-window "$(station-cmd-terminal-cwd)"
|
||||||
@@ -245,7 +192,7 @@ bindd = SUPER SHIFT, N, Editor, exec, station-launch-editor
|
|||||||
bindd = SUPER SHIFT, G, Signal, exec, station-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"
|
bindd = SUPER SHIFT, G, Signal, exec, station-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"
|
||||||
bindd = SUPER SHIFT, O, Obsidian, exec, station-launch-or-focus ^obsidian$ "uwsm-app -- obsidian -disable-gpu --enable-wayland-ime"
|
bindd = SUPER SHIFT, O, Obsidian, exec, station-launch-or-focus ^obsidian$ "uwsm-app -- obsidian -disable-gpu --enable-wayland-ime"
|
||||||
# bindd = SUPER SHIFT, W, Typora, exec, uwsm-app -- typora --enable-wayland-ime
|
# bindd = SUPER SHIFT, W, Typora, exec, uwsm-app -- typora --enable-wayland-ime
|
||||||
bindd = SUPER SHIFT, SLASH, Passwords, exec, uwsm-app -- Enpass
|
bindd = SUPER SHIFT, SLASH, Passwords, exec, Enpass showassistant
|
||||||
bindd = SUPER SHIFT, E, Email, exec, station-launch-or-focus mailspring
|
bindd = SUPER SHIFT, E, Email, exec, station-launch-or-focus mailspring
|
||||||
|
|
||||||
# If your web app url contains #, type it as ## to prevent hyprland treating it as a comment
|
# If your web app url contains #, type it as ## to prevent hyprland treating it as a comment
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ general {
|
|||||||
}
|
}
|
||||||
|
|
||||||
listener {
|
listener {
|
||||||
timeout = 150 # 2.5min
|
timeout = 300 # 5min
|
||||||
on-timeout = pidof hyprlock || station-launch-screensaver # start screensaver (if we haven't locked already)
|
on-timeout = pidof hyprlock || station-launch-screensaver # start screensaver (if we haven't locked already)
|
||||||
}
|
}
|
||||||
|
|
||||||
listener {
|
listener {
|
||||||
timeout = 151 # 5min
|
timeout = 301 # 5min
|
||||||
on-timeout = loginctl lock-session # lock screen when timeout has passed
|
on-timeout = loginctl lock-session # lock screen when timeout has passed
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,6 +23,6 @@ listener {
|
|||||||
|
|
||||||
listener {
|
listener {
|
||||||
timeout = 330 # 5.5min
|
timeout = 330 # 5.5min
|
||||||
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
|
on-timeout = station-system-suspend # suspend when timeout has passed
|
||||||
on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected
|
on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ source = ~/.config/hypr/windows.conf
|
|||||||
source = ~/.config/hypr/monitors.conf
|
source = ~/.config/hypr/monitors.conf
|
||||||
source = ~/.config/hypr/looknfeel.conf
|
source = ~/.config/hypr/looknfeel.conf
|
||||||
source = ~/.config/hypr/autostart.conf
|
source = ~/.config/hypr/autostart.conf
|
||||||
# source = ~/.config/hypr/theme.conf
|
source = ~/.config/hypr/workspaces.conf
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ misc {
|
|||||||
focus_on_activate = true
|
focus_on_activate = true
|
||||||
anr_missed_pings = 3
|
anr_missed_pings = 3
|
||||||
on_focus_under_fullscreen = 1
|
on_focus_under_fullscreen = 1
|
||||||
|
disable_watchdog_warning = true
|
||||||
}
|
}
|
||||||
|
|
||||||
# https://wiki.hypr.land/Configuring/Variables/#cursor
|
# https://wiki.hypr.land/Configuring/Variables/#cursor
|
||||||
|
|||||||
@@ -3,11 +3,9 @@
|
|||||||
# Format: monitor = [port], resolution, position, scale
|
# Format: monitor = [port], resolution, position, scale
|
||||||
|
|
||||||
# Optimized for retina-class 2x displays, like 13" 2.8K, 27" 5K, 32" 6K.
|
# Optimized for retina-class 2x displays, like 13" 2.8K, 27" 5K, 32" 6K.
|
||||||
# env = GDK_SCALE,2
|
# monitor=eDP-1,3840x2160,0x0,2
|
||||||
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
|
monitor=desc:Samsung Electric Company LU28R55 HNMN500475,3840x2160,auto-left,1.5
|
||||||
env = QT_ENABLE_HIGHDPI_SCALING,1
|
monitor=desc:Samsung Electric Company LU28R55 HNMN500462,3840x2160,auto-right,1.5
|
||||||
# env = QT_SCREEN_SCALE_FACTORS,2
|
|
||||||
monitor=eDP-1,3840x2160,0x0,2
|
|
||||||
# monitor=HDMI-A-1,preferred,auto,auto
|
# monitor=HDMI-A-1,preferred,auto,auto
|
||||||
|
|
||||||
# Good compromise for 27" or 32" 4K monitors (but fractional!)
|
# Good compromise for 27" or 32" 4K monitors (but fractional!)
|
||||||
|
|||||||
33
.config/hypr/workspaces.conf
Normal file
33
.config/hypr/workspaces.conf
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
workspace = 1, monitor:DP-1
|
||||||
|
workspace = 2, monitor:DP-2
|
||||||
|
workspace = 3, monitor:DP-1
|
||||||
|
workspace = 4, monitor:DP-2
|
||||||
|
workspace = 5, monitor:DP-1
|
||||||
|
workspace = 6, monitor:DP-2
|
||||||
|
workspace = 7, monitor:DP-1
|
||||||
|
workspace = 8, monitor:DP-2
|
||||||
|
workspace = 9, monitor:DP-1
|
||||||
|
workspace = 10, monitor:DP-2
|
||||||
|
|
||||||
|
bindd = SUPER, code:10, Switch to Home, workspace, 2
|
||||||
|
bindd = SUPER, code:10, Switch to Home, workspace, 1
|
||||||
|
bindd = SUPER, code:11, Switch to Dev, workspace, 4
|
||||||
|
bindd = SUPER, code:11, Switch to Dev, workspace, 3
|
||||||
|
bindd = SUPER, code:12, Switch to Art, workspace, 6
|
||||||
|
bindd = SUPER, code:12, Switch to Art, workspace, 5
|
||||||
|
bindd = SUPER, code:13, Switch to Gaming, workspace, 8
|
||||||
|
bindd = SUPER, code:13, Switch to Gaming, workspace, 7
|
||||||
|
bindd = SUPER, code:14, Switch to Writing, workspace, 10
|
||||||
|
bindd = SUPER, code:14, Switch to Writing, workspace, 9
|
||||||
|
|
||||||
|
# Move active window to a workspace with SUPER + SHIFT + [1-9; 0]
|
||||||
|
bindd = SUPER SHIFT, code:10, Move window to workspace 1, exec, station-move-to-workspace 1
|
||||||
|
bindd = SUPER SHIFT, code:11, Move window to workspace 1, exec, station-move-to-workspace 2
|
||||||
|
bindd = SUPER SHIFT, code:12, Move window to workspace 1, exec, station-move-to-workspace 3
|
||||||
|
bindd = SUPER SHIFT, code:13, Move window to workspace 1, exec, station-move-to-workspace 4
|
||||||
|
bindd = SUPER SHIFT, code:14, Move window to workspace 1, exec, station-move-to-workspace 5
|
||||||
|
|
||||||
|
bindd = SUPER SHIFT, L, Move window to right monitor, movewindow, r
|
||||||
|
bindd = SUPER SHIFT, H, Move window to left monitor, movewindow, l
|
||||||
|
bindd = SUPER SHIFT, J, Move window to right monitor, movewindow, d
|
||||||
|
bindd = SUPER SHIFT, K, Move window to left monitor, movewindow, u
|
||||||
1
.config/nix/nix.conf
Normal file
1
.config/nix/nix.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
extra-experimental-features = flakes nix-command
|
||||||
Submodule .config/nvim updated: 8d1278b84a...bd2349c1ba
@@ -1,35 +0,0 @@
|
|||||||
OPENROUTER_API_KEY=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
|
|
||||||
OPENROUTER_API_BASE=https://openrouter.ai/api
|
|
||||||
|
|
||||||
AIHUBMIX_API_KEY=sk-0ArIwI5NaUF1U1Z6F9D9CeF8C155436bA7E8A8107cFf7f7b
|
|
||||||
AIHUBMIX_API_BASE=https://aihubmix.com/api
|
|
||||||
|
|
||||||
#COPILOT_API_KEY=ghu_XOB0IcwvOBthQxxZea0EBhZHjn0aBW17UHml
|
|
||||||
#COPILOT_API_BASE=https://api.githubcopilot.com
|
|
||||||
COPILOT_API_KEY=
|
|
||||||
COPILOT_API_BASE=
|
|
||||||
|
|
||||||
DEFAULT_OPENAI_API_KEY=${OPENROUTER_API_KEY}
|
|
||||||
DEFAULT_OPENAI_API_BASE=${OPENROUTER_API_BASE}
|
|
||||||
# DEFAULT_AI_MODEL=openai/gpt-5.2-codex
|
|
||||||
DEFAULT_AI_MODEL=auto
|
|
||||||
|
|
||||||
REASONING_OPENAI_API_KEY=${OPENROUTER_API_KEY}
|
|
||||||
REASONING_OPENAI_API_BASE=${OPENROUTER_API_BASE}
|
|
||||||
#REASONING_MODEL=openai/gpt-5.1-codex
|
|
||||||
# REASONING_MODEL=moonshotai/kimi-k2-thinking
|
|
||||||
REASONING_MODEL=anthropic/claude-opus-4.6
|
|
||||||
|
|
||||||
FAST_OPENAI_API_KEY=${OPENROUTER_API_KEY}
|
|
||||||
FAST_OPENAI_API_BASE=${OPENROUTER_API_BASE}
|
|
||||||
FAST_MODEL=qwen/qwen3-max
|
|
||||||
|
|
||||||
COMPLETION_OPENAI_API_KEY=${OPENROUTER_API_KEY}
|
|
||||||
COMPLETION_OPENAI_API_BASE=${OPENROUTER_API_BASE}
|
|
||||||
COMPLETION_MODEL=google/gemini-3-flash-preview
|
|
||||||
# COMPLETION_MODEL=anthropic/claude-3-haiku
|
|
||||||
|
|
||||||
OPENAI_API_KEY=${DEFAULT_OPENAI_API_KEY}
|
|
||||||
OPENAI_API_BASE=${DEFAULT_OPENAI_API_BASE}
|
|
||||||
AIDER_OPENAI_API_KEY=${DEFAULT_OPENAI_API_KEY}
|
|
||||||
AIDER_OPENAI_API_BASE=${DEFAULT_OPENAI_API_BASE}
|
|
||||||
@@ -36,7 +36,7 @@ alias eff='$EDITOR "$(ff)"'
|
|||||||
|
|
||||||
if command -v eza &> /dev/null; then
|
if command -v eza &> /dev/null; then
|
||||||
alias ls='eza -lh --group-directories-first --icons=auto'
|
alias ls='eza -lh --group-directories-first --icons=auto'
|
||||||
alias lsa='ls -a'
|
alias la='ls -al'
|
||||||
alias lt='eza --tree --level=2 --long --icons --git'
|
alias lt='eza --tree --level=2 --long --icons --git'
|
||||||
alias lta='lt -a'
|
alias lta='lt -a'
|
||||||
fi
|
fi
|
||||||
@@ -89,10 +89,6 @@ alias \
|
|||||||
notes="cd ~/Tower/Notes && nvim ." \
|
notes="cd ~/Tower/Notes && nvim ." \
|
||||||
aid="aider"
|
aid="aider"
|
||||||
|
|
||||||
# Projects
|
|
||||||
alias \
|
|
||||||
src="tmuxinator start runcats"
|
|
||||||
|
|
||||||
# Dev
|
# Dev
|
||||||
alias \
|
alias \
|
||||||
sail='[ -f sail ] && sh sail || sh vendor/bin/sail' \
|
sail='[ -f sail ] && sh sail || sh vendor/bin/sail' \
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ img2png() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Create a new worktree and branch from within current git directory.
|
# Create a new worktree and branch from within current git directory.
|
||||||
ga() {
|
gwa() {
|
||||||
if [[ -z "$1" ]]; then
|
if [[ -z "$1" ]]; then
|
||||||
echo "Usage: ga [branch name]"
|
echo "Usage: ga [branch name]"
|
||||||
return 1
|
return 1
|
||||||
@@ -244,7 +244,7 @@ ga() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Remove worktree and branch from within active worktree directory.
|
# Remove worktree and branch from within active worktree directory.
|
||||||
gd() {
|
gwd() {
|
||||||
if gum confirm "Remove worktree and branch?"; then
|
if gum confirm "Remove worktree and branch?"; then
|
||||||
local cwd base branch root
|
local cwd base branch root
|
||||||
|
|
||||||
@@ -263,3 +263,43 @@ gd() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
linkenv() {
|
||||||
|
local env="${1:-dev}"
|
||||||
|
local env_files_directory="$HOME/Tower/.backups/Development/Environments"
|
||||||
|
|
||||||
|
# Fetch the closest git parent or current directory if not
|
||||||
|
local root_dir=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
||||||
|
local project_name=$(basename "$root_dir")
|
||||||
|
|
||||||
|
local source_file="$env_files_directory/${project_name}-${env}-env"
|
||||||
|
local target_file="$root_dir/.env"
|
||||||
|
|
||||||
|
if [[ -f "$target_file" ]]; then
|
||||||
|
if gum confirm "Overwrite existing .env file?"; then
|
||||||
|
if [[ -L "$target_file" ]]; then
|
||||||
|
rm "$target_file"
|
||||||
|
else
|
||||||
|
mv "$target_file" "${target_file}.bak"
|
||||||
|
echo "Existing .env backed up to .env.bak"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -f "$source_file" ]]; then
|
||||||
|
ln -sf "$source_file" "$target_file"
|
||||||
|
echo "Linked $source_file -> $target_file"
|
||||||
|
else
|
||||||
|
echo "No environment file found for $project_name at $source_file copying example, copying example if exists"
|
||||||
|
|
||||||
|
if [[ -f "$root_dir/.env.example" ]]; then
|
||||||
|
cp "$root_dir/.env.example" "$source_file"
|
||||||
|
ln -sf "$source_file" "$target_file"
|
||||||
|
echo "Copied .env.example to $source_file and linked"
|
||||||
|
else
|
||||||
|
echo "No .env.example found."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ export ANDROID_AVD_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/android/avd"
|
|||||||
export ANDROID_USER_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/android"
|
export ANDROID_USER_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/android"
|
||||||
export CODEX_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/codex"
|
export CODEX_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/codex"
|
||||||
export XCOMPOSEFILE="${XDG_CONFIG_HOME:-$HOME/.config}/xcompose"
|
export XCOMPOSEFILE="${XDG_CONFIG_HOME:-$HOME/.config}/xcompose"
|
||||||
|
export GEMINI_CLI_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
|
|
||||||
# Export OPENAI_API_KEY from GitHub Copilot config
|
# Export OPENAI_API_KEY from GitHub Copilot config
|
||||||
# if [ -f "$HOME/.config/github-copilot/apps.json" ]; then
|
# if [ -f "$HOME/.config/github-copilot/apps.json" ]; then
|
||||||
@@ -76,8 +77,9 @@ export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
|
|||||||
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
|
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
|
||||||
|
|
||||||
# Development variables
|
# Development variables
|
||||||
export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
|
export ANDROID_SDK_ROOT="$HOME/.local/share/android/Sdk"
|
||||||
export ANDROID_HOME="$ANDROID_SDK_ROOT"
|
export ANDROID_HOME="$ANDROID_SDK_ROOT"
|
||||||
|
export GRADLE_USER_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/gradle"
|
||||||
|
|
||||||
export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME:$ANDROID_HOME/emulator:$XDG_DATA_HOME/cargo/bin"
|
export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME:$ANDROID_HOME/emulator:$XDG_DATA_HOME/cargo/bin"
|
||||||
export PATH="$HOME/development/flutter/bin:$PATH"
|
export PATH="$HOME/development/flutter/bin:$PATH"
|
||||||
@@ -176,8 +178,6 @@ export NVM_DIR="$HOME/.config/nvm"
|
|||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
|
|
||||||
source "$HOME/.local/share/../bin/env"
|
|
||||||
|
|
||||||
env_file="$HOME/.config/shell/.env"
|
env_file="$HOME/.config/shell/.env"
|
||||||
if [ -f "$env_file" ]; then
|
if [ -f "$env_file" ]; then
|
||||||
set -a
|
set -a
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ bind-key -n User0 send-keys C-S-o
|
|||||||
bind-key -n User0 send-keys C-S-y
|
bind-key -n User0 send-keys C-S-y
|
||||||
bind-key -n User0 send-keys C-S-a
|
bind-key -n User0 send-keys C-S-a
|
||||||
|
|
||||||
|
|
||||||
# Prefix
|
# Prefix
|
||||||
set -g prefix C-Space
|
set -g prefix C-Space
|
||||||
set -g prefix2 C-b
|
set -g prefix2 C-b
|
||||||
@@ -106,7 +105,6 @@ bind -n C-M-S-Right resize-pane -R 5
|
|||||||
# Window navigation
|
# Window navigation
|
||||||
bind r command-prompt -I "#W" "rename-window -- '%%'"
|
bind r command-prompt -I "#W" "rename-window -- '%%'"
|
||||||
bind c new-window -c "#{pane_current_path}"
|
bind c new-window -c "#{pane_current_path}"
|
||||||
bind k kill-window
|
|
||||||
|
|
||||||
bind -n M-1 select-window -t 1
|
bind -n M-1 select-window -t 1
|
||||||
bind -n M-2 select-window -t 2
|
bind -n M-2 select-window -t 2
|
||||||
@@ -126,7 +124,7 @@ bind -n M-S-Right swap-window -t +1 \; select-window -t +1
|
|||||||
# Session controls
|
# Session controls
|
||||||
bind R command-prompt -I "#S" "rename-session -- '%%'"
|
bind R command-prompt -I "#S" "rename-session -- '%%'"
|
||||||
bind C new-session -c "#{pane_current_path}"
|
bind C new-session -c "#{pane_current_path}"
|
||||||
bind K kill-session
|
bind X kill-session
|
||||||
bind P switch-client -p
|
bind P switch-client -p
|
||||||
bind N switch-client -n
|
bind N switch-client -n
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,11 @@
|
|||||||
export STATION_PATH=$HOME/.local/share/station
|
export STATION_PATH=$HOME/.local/share/station
|
||||||
export PATH=$STATION_PATH/bin:$PATH
|
export PATH=$STATION_PATH/bin:$PATH
|
||||||
|
|
||||||
|
export GDK_SCALE=2
|
||||||
|
# export QT_AUTO_SCALE_FACTOR=1
|
||||||
|
# export QT_ENABLE_HIGHDPI_SCALING=1
|
||||||
|
export QT_SCALE_FACTOR=1.5
|
||||||
|
|
||||||
# Set default terminal and editor
|
# Set default terminal and editor
|
||||||
source ~/.config/uwsm/default
|
source ~/.config/uwsm/default
|
||||||
|
|
||||||
|
|||||||
@@ -20,24 +20,19 @@
|
|||||||
"format-icons": {
|
"format-icons": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"1": "",
|
"1": "",
|
||||||
"2": "",
|
"2": "",
|
||||||
"3": "",
|
"3": "",
|
||||||
"4": "",
|
"4": "",
|
||||||
"5": "",
|
"5": "",
|
||||||
"6": "",
|
"6": "",
|
||||||
"7": "",
|
"7": "",
|
||||||
"8": "8",
|
"8": "",
|
||||||
"9": "9",
|
"9": "",
|
||||||
"10": "0",
|
"10": "",
|
||||||
},
|
},
|
||||||
"persistent-workspaces": {
|
"persistent-workspaces": {
|
||||||
"1": [],
|
"DP-1": [1, 3, 5, 7, 9],
|
||||||
"2": [],
|
"DP-2": [2, 4, 6, 8, 10]
|
||||||
"3": [],
|
|
||||||
"4": [],
|
|
||||||
"5": [],
|
|
||||||
"6": [],
|
|
||||||
"7": []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"custom/station": {
|
"custom/station": {
|
||||||
|
|||||||
@@ -187,6 +187,8 @@ eval "$(zoxide init --cmd cd zsh)"
|
|||||||
|
|
||||||
eval "$(try init ~/src/tries)"
|
eval "$(try init ~/src/tries)"
|
||||||
|
|
||||||
|
eval "$(direnv hook zsh)"
|
||||||
|
|
||||||
[ -f ~/.cache/wal/sequences ] && \cat ~/.cache/wal/sequences
|
[ -f ~/.cache/wal/sequences ] && \cat ~/.cache/wal/sequences
|
||||||
|
|
||||||
[ -f ~/.cache/wal/colors-tty.sh ] && source ~/.cache/wal/colors-tty.sh
|
[ -f ~/.cache/wal/colors-tty.sh ] && source ~/.cache/wal/colors-tty.sh
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
input_dir="$1" # Replace with your input directory path
|
|
||||||
output_dir="$2" # Replace with your output directory path
|
|
||||||
|
|
||||||
# Ensure the output directory exists or create it
|
|
||||||
mkdir -p "$output_dir"
|
|
||||||
|
|
||||||
# Loop through all JPEG files in the input directory
|
|
||||||
for file in "$input_dir"/*.jpg; do
|
|
||||||
if [ -e "$file" ]; then
|
|
||||||
filename=$(basename "$file")
|
|
||||||
filename_without_extension="${filename%.*}"
|
|
||||||
output_file1="$output_dir/${filename_without_extension}_left.jpg"
|
|
||||||
output_file2="$output_dir/${filename_without_extension}_right.jpg"
|
|
||||||
|
|
||||||
# Get the width of the image
|
|
||||||
width=$(identify -format "%w" "$file")
|
|
||||||
|
|
||||||
# Use ImageMagick to split the image in half
|
|
||||||
convert "$file" -crop "50%x100%+0+0" "$output_file1"
|
|
||||||
convert "$file" -crop "50%x100%+$((width / 2))+0" "$output_file2"
|
|
||||||
|
|
||||||
echo "Split $filename into $output_file1 and $output_file2"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Splitting completed."
|
|
||||||
|
|
||||||
@@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
# Picks and sets a random background
|
# Picks and sets a random background
|
||||||
|
|
||||||
BACKGROUNDS_PATH="$HOME/Tower/Library/Pictures/Wallpapers/3840x2160/"
|
width=$(hyprctl monitors -j | jq 'map(.width) | add')
|
||||||
CURRENT_BACKGROUND_LINK="$HOME/.local/state/station/background"
|
height=$(hyprctl monitors -j | jq '.[0].height')
|
||||||
|
BACKGROUNDS_PATH="$HOME/Tower/Library/Pictures/Wallpapers/${width}x${height}/"
|
||||||
|
|
||||||
mapfile -d '' -t BACKGROUNDS < <(find -L "$BACKGROUNDS_PATH" -maxdepth 1 -type f -print0 2>/dev/null | sort -z)
|
mapfile -d '' -t BACKGROUNDS < <(find -L "$BACKGROUNDS_PATH" -maxdepth 1 -type f -print0 2>/dev/null | sort -z)
|
||||||
TOTAL=${#BACKGROUNDS[@]}
|
TOTAL=${#BACKGROUNDS[@]}
|
||||||
|
|||||||
@@ -17,4 +17,13 @@ wal -i "$CURRENT_BACKGROUND_LINK"
|
|||||||
|
|
||||||
# Kill existing swaybg and start new one
|
# Kill existing swaybg and start new one
|
||||||
pkill -x swaybg
|
pkill -x swaybg
|
||||||
|
|
||||||
|
if [[ $(hyprctl monitors -j | jq 'length') -eq 2 ]]; then
|
||||||
|
station-bg-split "$CURRENT_BACKGROUND_LINK" "/tmp/bg"
|
||||||
|
first_mon=$(hyprctl monitors -j | jq -r '.[0].name')
|
||||||
|
second_mon=$(hyprctl monitors -j | jq -r '.[1].name')
|
||||||
|
setsid uwsm-app -- swaybg -o "$first_mon" -i /tmp/bg/background_left -m fill >/dev/null 2>&1 &
|
||||||
|
setsid uwsm-app -- swaybg -o "$second_mon" -i /tmp/bg/background_right -m fill >/dev/null 2>&1 &
|
||||||
|
else
|
||||||
setsid uwsm-app -- swaybg -i "$CURRENT_BACKGROUND_LINK" -m fill >/dev/null 2>&1 &
|
setsid uwsm-app -- swaybg -i "$CURRENT_BACKGROUND_LINK" -m fill >/dev/null 2>&1 &
|
||||||
|
fi
|
||||||
|
|||||||
40
.local/bin/station-bg-split
Executable file
40
.local/bin/station-bg-split
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
input="$1" # Replace with your input directory path
|
||||||
|
output_dir="$2" # Replace with your output directory path
|
||||||
|
|
||||||
|
# Ensure the output directory exists or create it
|
||||||
|
mkdir -p "$output_dir"
|
||||||
|
|
||||||
|
split_img() {
|
||||||
|
file=$1
|
||||||
|
filename=$(basename "$file")
|
||||||
|
filename_without_extension="${filename%.*}"
|
||||||
|
extension="${filename##$filename_without_extension}"
|
||||||
|
output_file1="$output_dir/${filename_without_extension}_left${extension}"
|
||||||
|
output_file2="$output_dir/${filename_without_extension}_right${extension}"
|
||||||
|
|
||||||
|
# Get the width of the image
|
||||||
|
width=$(identify -format "%w" "$file")
|
||||||
|
|
||||||
|
# Use ImageMagick to split the image in half
|
||||||
|
magick "$file" -crop "50%x100%+0+0" "$output_file1"
|
||||||
|
magick "$file" -crop "50%x100%+$((width / 2))+0" "$output_file2"
|
||||||
|
|
||||||
|
echo "Split $filename into $output_file1 and $output_file2"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Loop through all JPEG files in the input directory
|
||||||
|
if [[ -d $input ]]; then
|
||||||
|
echo "Processing images in directory: $input"
|
||||||
|
for file in "$input/*.(jpg|jpeg|png)"; do
|
||||||
|
if [ -e "$file" ]; then
|
||||||
|
split_img "$file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
split_img $input
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Splitting completed."
|
||||||
|
|
||||||
5
.local/bin/station-confirm-or-close
Executable file
5
.local/bin/station-confirm-or-close
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#! /bin/zsh
|
||||||
|
|
||||||
|
zenity --title="$1" --info --text="$2" \
|
||||||
|
|| gum confirm "You closed the dialog, do you want to continue?" \
|
||||||
|
|| break
|
||||||
28
.local/bin/station-get-username-password
Executable file
28
.local/bin/station-get-username-password
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#! /bin/zsh
|
||||||
|
|
||||||
|
local label="$1"
|
||||||
|
|
||||||
|
if [[ -z "$MASTERPW" ]]; then
|
||||||
|
export MASTERPW=$(gum input --password --placeholder "Enter Enpass Master Password")
|
||||||
|
fi
|
||||||
|
local entry=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -json -sort show "$label" | sed 's/\\/\\\\/g') # Escaping backslashes for jq
|
||||||
|
|
||||||
|
len=$(echo "$entry" | jq '. | length')
|
||||||
|
if [[ $len -eq 0 ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ $len -gt 1 ]];then
|
||||||
|
logins=$(echo "$entry" | jq -r '.[].login')
|
||||||
|
|
||||||
|
login=$(echo "$logins" | gum choose --header "Select which account to use" --selected="stofflees@gmail.com" --height=$(echo "$logins" | wc -l) --ordered)
|
||||||
|
|
||||||
|
entry=$(echo "$entry" | jq -c --arg login "$login" '.[] | select(.login == $login) | [.]')
|
||||||
|
fi
|
||||||
|
username=$(echo "$entry" | jq -r '.[].login')
|
||||||
|
password=$(echo "$entry" | jq -r '.[].password')
|
||||||
|
|
||||||
|
if [[ -z "$username" || -z "$password" ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$username $password"
|
||||||
65
.local/bin/station-initial-setup
Executable file
65
.local/bin/station-initial-setup
Executable file
@@ -0,0 +1,65 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
echo "Let's get set up"
|
||||||
|
echo """
|
||||||
|
|
||||||
|
░▒█▀▀▀█░▀▀█▀▀░█▀▀▄░▀▀█▀▀░▀█▀░▒█▀▀▀█░▒█▄░▒█░░░▒█▀▀▀█░▒█▀▀▀░▀▀█▀▀░▒█░▒█░▒█▀▀█
|
||||||
|
░░▀▀▀▄▄░░▒█░░▒█▄▄█░░▒█░░░▒█░░▒█░░▒█░▒█▒█▒█░░░░▀▀▀▄▄░▒█▀▀▀░░▒█░░░▒█░▒█░▒█▄▄█
|
||||||
|
░▒█▄▄▄█░░▒█░░▒█░▒█░░▒█░░░▄█▄░▒█▄▄▄█░▒█░░▀█░░░▒█▄▄▄█░▒█▄▄▄░░▒█░░░░▀▄▄▀░▒█░░░
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
export MASTERPW=$(gum input --header="Enpass Master password" --password)
|
||||||
|
|
||||||
|
station-setup-password
|
||||||
|
station-setup-password-manager
|
||||||
|
|
||||||
|
CHECKPW=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -sort list 2>&1)
|
||||||
|
|
||||||
|
while [[ "$CHECKPW" == *level=error* ]]; do
|
||||||
|
export MASTERPW=$(gum input --header="Enpass Master password (incorrect, try again)" --password)
|
||||||
|
CHECKPW=$(enpass-cli -vault="$VAULT_DIR" -sort list)
|
||||||
|
done
|
||||||
|
|
||||||
|
["Firefox"]="https://accounts.firefox.com/signin?action=email&service=sync,false"
|
||||||
|
["Google"]="https://accounts.google.com,true"
|
||||||
|
["Discord"]="https://discord.com/channels/@me,true"
|
||||||
|
["Netflix"]="https://netflix.com/gb/login,true"
|
||||||
|
["GitHub"]="https://github.com/login,true,GitHub (1)"
|
||||||
|
["Zoom"]="https://apps.zoom.us/wc/home,true"
|
||||||
|
["Scarif: Tower"]="https://tower.scarif.space,true"
|
||||||
|
["Scarif: Labs"]="https://labs.scarif.space/user/login,true"
|
||||||
|
["Scarif: Droid"]="https://droid.scarif.space,true"
|
||||||
|
|
||||||
|
STEPS=(
|
||||||
|
["SSH"]="station-setup-ssh"
|
||||||
|
["Server"]="station-setup-server"
|
||||||
|
["Firefox"]="station-setup-website \"Firefox\" https://accounts.firefox.com/signin?action=email&service=sync"
|
||||||
|
["Nextcloud"]="station-setup-nextcloud"
|
||||||
|
["Google"]="station-setup-website \"Google\" https://accounts.google.com"
|
||||||
|
["Discord"]="station-setup-website \"Discord\" https://discord.com/channels/@me"
|
||||||
|
["Netflix"]="station-setup-website \"Netflix\" https://netflix.com/gb/login"
|
||||||
|
["GitHub"]="station-setup-website \"GitHub\" https://github.com/login true \"GitHub (1)\""
|
||||||
|
["Zoom"]="station-setup-website \"Zoom\" https://apps.zoom.us/wc/home"
|
||||||
|
["Tower"]="station-setup-website \"Scarif: Tower\" https://tower.scarif.space"
|
||||||
|
["Labs"]="station-setup-website \"Scarif: Labs\" https://labs.scarif.space/user/login"
|
||||||
|
["Droid"]="station-setup-website \"Scarif: Droid\" https://droid.scarif.space"
|
||||||
|
["ExpressVPN"]="station-setup-vpn"
|
||||||
|
["Spotify"]="station-setup-spotify"
|
||||||
|
["Antigravity"]="station-setup-antigravity"
|
||||||
|
["Minecraft"]="station-setup-minecraft"
|
||||||
|
["Mail"]="station-setup-mail"
|
||||||
|
["Steam"]="station-setup-steam"
|
||||||
|
["Super Productivity"]="station-setup-super-productivity"
|
||||||
|
)
|
||||||
|
|
||||||
|
CHOICE=$(print -l ${(k)STEPS} | gum choose --header "Select accounts to setup (ctrl + a to toggle all)" --no-limit --selected="*" --height="${#STEPS[@]}" --ordered)
|
||||||
|
|
||||||
|
if [[ -z "$CHOICE" ]]; then
|
||||||
|
echo "No choice made, skipping."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
for key in ${(@f)CHOICE}; do
|
||||||
|
eval "${ACCOUNTS[$key]}"
|
||||||
|
done
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#! /bin/zsh
|
|
||||||
|
|
||||||
enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -sort copy "Firefox"
|
|
||||||
|
|
||||||
firefox "https://accounts.firefox.com/signin?action=email&service=sync" &
|
|
||||||
|
|
||||||
read -s -k $'?Press enter when you have synced Firefox...\n'
|
|
||||||
|
|
||||||
echo "" | wl-copy
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
"$HOME/.local/bin/install/password.sh"
|
|
||||||
"$HOME/.local/bin/install/ssh.sh"
|
|
||||||
"$HOME/.local/bin/install/dev.sh"
|
|
||||||
"$HOME/.local/bin/install/firefox.sh"
|
|
||||||
"$HOME/.local/bin/install/nextcloud.sh"
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#! /bin/zsh
|
|
||||||
|
|
||||||
mkdir -p "$HOME/Tower"
|
|
||||||
|
|
||||||
nextcloud &
|
|
||||||
|
|
||||||
enpasscli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -sort copy "Scarif: Tower"
|
|
||||||
|
|
||||||
read -s -k $'?Press enter when you have synced Nextcloud... \n'
|
|
||||||
|
|
||||||
wl-copy --clear
|
|
||||||
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
export MASTERPW=$(gum input --header="Master password" --password)
|
|
||||||
|
|
||||||
Enpass &
|
|
||||||
|
|
||||||
echo "$MASTERPW" | wl-copy
|
|
||||||
|
|
||||||
read -n 1 -r -s -p $'Press enter when you have synced enpass...\n'
|
|
||||||
|
|
||||||
wl-copy --clear
|
|
||||||
|
|
||||||
CHECKPW=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -sort list 2>&1)
|
|
||||||
|
|
||||||
while [[ "$CHECKPW" == *level=fatal* ]]; do
|
|
||||||
export MASTERPW=$(zenity --password)
|
|
||||||
CHECKPW=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -sort list)
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Password set successfuly"
|
|
||||||
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
sudo systemctl enable --now expressvpn.service
|
|
||||||
|
|
||||||
VPN=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "ExpressVPN Activation Code" 2>&1)
|
|
||||||
VPNPW=$(echo "$LABS" | grep -Po "(?<=pass : ).+(?=\")")
|
|
||||||
|
|
||||||
echo "$VPNPW" | xclip -selection clipboard -i
|
|
||||||
|
|
||||||
expressvpn activate
|
|
||||||
|
|
||||||
expressvpn autoconnect true
|
|
||||||
|
|
||||||
expressvpn connect smart
|
|
||||||
|
|
||||||
echo "" | xclip -selection clipboard -i
|
|
||||||
|
|
||||||
7
.local/bin/station-launch-password-manager
Executable file
7
.local/bin/station-launch-password-manager
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Launch the default password manager
|
||||||
|
default_password_manager="enpass.desktop"
|
||||||
|
password_manager_exec=$(sed -n 's/^Exec=\(.\+\?\)\( %U\)/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$default_password_manager 2>/dev/null | head -1)
|
||||||
|
|
||||||
|
$password_manager_exec "$@" >/dev/null 2>&1 &
|
||||||
@@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
# Ensure elephant is running before launching walker
|
# Ensure elephant is running before launching walker
|
||||||
if ! pgrep -x elephant > /dev/null; then
|
if ! pgrep -x elephant > /dev/null; then
|
||||||
setsid uwsm-app -- elephant &
|
setsid uwsm-app -- elephant > /dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ensure walker service is running
|
# Ensure walker service is running
|
||||||
if ! pgrep -f "walker --gapplication-service" > /dev/null; then
|
if ! pgrep -f "walker --gapplication-service" > /dev/null; then
|
||||||
setsid uwsm-app -- walker --gapplication-service &
|
setsid uwsm-app -- walker --gapplication-service > /dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec walker --width 644 --maxheight 300 --minheight 300 "$@"
|
exec walker --width 644 --maxheight 300 --minheight 300 "$@"
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ show_system_menu() {
|
|||||||
local options=" Screensaver\n Lock\n Suspend"
|
local options=" Screensaver\n Lock\n Suspend"
|
||||||
station-hibernation-available && options="$options\n Hibernate"
|
station-hibernation-available && options="$options\n Hibernate"
|
||||||
options="$options\n Logout\n Restart\n Shutdown"
|
options="$options\n Logout\n Restart\n Shutdown"
|
||||||
|
echo $options
|
||||||
|
|
||||||
case $(menu "System" "$options") in
|
case $(menu "System" "$options") in
|
||||||
*Screensaver*) station-launch-screensaver force ;;
|
*Screensaver*) station-launch-screensaver force ;;
|
||||||
@@ -257,6 +258,7 @@ go_to_menu() {
|
|||||||
case "${1,,}" in
|
case "${1,,}" in
|
||||||
*apps*) walker -p "Launch…" ;;
|
*apps*) walker -p "Launch…" ;;
|
||||||
*trigger*) show_trigger_menu ;;
|
*trigger*) show_trigger_menu ;;
|
||||||
|
*share*) show_share_menu ;;
|
||||||
*background*) show_background_menu ;;
|
*background*) show_background_menu ;;
|
||||||
*setup*) show_setup_menu ;;
|
*setup*) show_setup_menu ;;
|
||||||
*update*) show_update_menu ;;
|
*update*) show_update_menu ;;
|
||||||
|
|||||||
12
.local/bin/station-move-to-workspace
Executable file
12
.local/bin/station-move-to-workspace
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Moves the active window to the relevant workspace
|
||||||
|
|
||||||
|
workspace=$1
|
||||||
|
|
||||||
|
active_window=$(hyprctl activewindow -j | jq -r ".address")
|
||||||
|
active_workspace=$(hyprctl activeworkspace -j | jq -r ".id")
|
||||||
|
|
||||||
|
new_workspace=$((($workspace*2)-($active_workspace%2)))
|
||||||
|
|
||||||
|
hyprctl dispatch movetoworkspacesilent "$new_workspace,address:$active_window"
|
||||||
13
.local/bin/station-setup-antigravity
Executable file
13
.local/bin/station-setup-antigravity
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#! /bin/zsh
|
||||||
|
|
||||||
|
echo "Signing into Antigravity..."
|
||||||
|
|
||||||
|
antigravity &
|
||||||
|
|
||||||
|
station-confirm-or-close "Spotify Setup" "Click OK when you have finished logging in to move on."
|
||||||
|
|
||||||
|
wl-copy --clear
|
||||||
|
|
||||||
|
hyprctl dispatch closewindow class:Antigravity
|
||||||
|
|
||||||
|
echo "Finished setting up Antigravity"
|
||||||
5
.local/bin/station-setup-mail
Executable file
5
.local/bin/station-setup-mail
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#! /bin/zsh
|
||||||
|
|
||||||
|
echo "Signing into Mail..."
|
||||||
|
|
||||||
|
## Todo
|
||||||
21
.local/bin/station-setup-minecraft
Executable file
21
.local/bin/station-setup-minecraft
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#! /bin/zsh
|
||||||
|
|
||||||
|
echo "Signing into Minecraft..."
|
||||||
|
|
||||||
|
read -r username password <<< "$(station-get-username-password "Minecraft")"
|
||||||
|
|
||||||
|
echo -n "$username" | wl-copy
|
||||||
|
|
||||||
|
lunarclient &
|
||||||
|
|
||||||
|
station-confirm-or-close "Minecraft Setup" "Username copied.\nPress OK for password"
|
||||||
|
|
||||||
|
echo -n "$password" | wl-copy
|
||||||
|
|
||||||
|
station-confirm-or-close "Minecraft Setup" "Click OK when you have finished logging in to move on."
|
||||||
|
|
||||||
|
wl-copy --clear
|
||||||
|
|
||||||
|
hyprctl dispatch closewindow class:lunarclient
|
||||||
|
|
||||||
|
echo "Finished setting up Minecraft"
|
||||||
10
.local/bin/station-setup-nextcloud
Executable file
10
.local/bin/station-setup-nextcloud
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#! /bin/zsh
|
||||||
|
|
||||||
|
echo -n "https://tower.scarif.space" | wl-copy
|
||||||
|
|
||||||
|
nextcloud &
|
||||||
|
|
||||||
|
station-confirm-or-close "Nextcloud Setup" "Click OK to finish setup"
|
||||||
|
|
||||||
|
wl-copy --clear
|
||||||
|
|
||||||
27
.local/bin/station-setup-password
Executable file
27
.local/bin/station-setup-password
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
echo "-------------------------------------"
|
||||||
|
echo "Password Setup Script"
|
||||||
|
echo "-------------------------------------"
|
||||||
|
|
||||||
|
if gum confirm "Do you need to change your password?"; then
|
||||||
|
new_password=$(gum input --password --placeholder "Enter new password")
|
||||||
|
confirm_password=$(gum input --password --placeholder "Confirm new password")
|
||||||
|
|
||||||
|
if [ "$new_password" != "$confirm_password" ]; then
|
||||||
|
echo "Passwords do not match."
|
||||||
|
exit 1
|
||||||
|
elif [[ $new_password == "" ]]; then
|
||||||
|
echo "Password cannot be empty."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ ! -d /persist/passwords ]]; then
|
||||||
|
sudo mkdir -p /persist/passwords
|
||||||
|
fi
|
||||||
|
sudo sh -c "mkpasswd -m sha-512 \"$new_password\" > /persist/passwords/$USER"
|
||||||
|
echo
|
||||||
|
echo "New password written to /persist/passwords/$USER"
|
||||||
|
echo "Password will become active next time you run:"
|
||||||
|
echo "sudo nixos-rebuild switch"
|
||||||
|
echo "Password change skipped."
|
||||||
|
fi
|
||||||
42
.local/bin/station-setup-password-manager
Executable file
42
.local/bin/station-setup-password-manager
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
echo "-------------------------------------"
|
||||||
|
echo "Enpass Setup Script"
|
||||||
|
echo "-------------------------------------"
|
||||||
|
|
||||||
|
if [[ -z $MASTERPW ]]; then
|
||||||
|
export MASTERPW=$(gum input --header="Enpass Master password" --password)
|
||||||
|
fi
|
||||||
|
|
||||||
|
VAULT_DIR="$HOME/.local/share/Enpass/Enpass/Vaults/primary"
|
||||||
|
|
||||||
|
if [ -f "$VAULT_DIR/vault.enpassdb" ]; then
|
||||||
|
echo "Vault already exists, skipping Enpass setup."
|
||||||
|
else
|
||||||
|
echo -n "stofflees@gmail.com" | wl-copy
|
||||||
|
|
||||||
|
station-launch-password-manager
|
||||||
|
|
||||||
|
zenity --title="Enpass Setup" \
|
||||||
|
--info \
|
||||||
|
--text="Email copied.\nPress OK when it asks for webdav URL" \
|
||||||
|
|| gum confirm "You closed the dialog, do you want to continue?" \
|
||||||
|
|| exit 1
|
||||||
|
|
||||||
|
echo -n "https://tower.scarif.space" | wl-copy
|
||||||
|
|
||||||
|
zenity --title="Enpass Setup" \
|
||||||
|
--info \
|
||||||
|
--text="Tower URL copied.\nPress OK when it asks for master password" \
|
||||||
|
|| gum confirm "You closed the dialog, do you want to continue?" \
|
||||||
|
|| exit 1
|
||||||
|
|
||||||
|
echo -n "$MASTERPW" | wl-copy
|
||||||
|
|
||||||
|
read -n 1 -r -s -p $'Press enter when you have synced enpass...\n'
|
||||||
|
|
||||||
|
wl-copy --clear
|
||||||
|
|
||||||
|
echo "Enpass setup complete."
|
||||||
|
fi
|
||||||
|
|
||||||
40
.local/bin/station-setup-server
Executable file
40
.local/bin/station-setup-server
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
echo "-------------------------------------"
|
||||||
|
echo "Server Setup Script"
|
||||||
|
echo "-------------------------------------"
|
||||||
|
|
||||||
|
echo "Extracting login details from enpass"
|
||||||
|
SERVER=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -json -sort show "Scarif space" | jq '.[] | select(.label=="New new admin password")')
|
||||||
|
SERVERUN=$(echo "$SERVER" | jq -r '.login')
|
||||||
|
SERVERPW=$(echo "$SERVER" | jq -r '.password')
|
||||||
|
|
||||||
|
SSHPATH="$HOME/.ssh/id_ed25519" # The path to the SSH key file
|
||||||
|
SERVERIP="scarif.space"
|
||||||
|
SERVERPORT=629
|
||||||
|
|
||||||
|
echo "~~~~~~~~"
|
||||||
|
echo "Generating the SSH key if it does not exist"
|
||||||
|
[ ! -f $SSHPATH ] && ssh-keygen -t ed25519 -f "$SSHPATH" -N "" -q
|
||||||
|
|
||||||
|
KEY=$(cat "$SSHPATH.pub")
|
||||||
|
|
||||||
|
echo "~~~~~~~~"
|
||||||
|
echo "Copying SSH key to server known hosts"
|
||||||
|
ssh-keygen -F $SERVERIP >/dev/null || ssh-keyscan -p $SERVERPORT $SERVERIP >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
echo "~~~~~~~~"
|
||||||
|
echo "Checking if key exists on the server"
|
||||||
|
if sshpass -p "$SERVERPW" ssh -o PasswordAuthentication=yes -p $SERVERPORT "$SERVERUN@$SERVERIP" "grep -q \"$KEY\" ~/.ssh/authorized_keys 2>/dev/null"; then
|
||||||
|
echo "Key already exists on the server. Skipping upload."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "~~~~~~~~"
|
||||||
|
echo "Uploading the SSH key to the server"
|
||||||
|
sshpass -p "$SERVERPW" ssh -p $SERVERPORT "$SERVERUN@$SERVERIP" "mkdir -p ~/.ssh && echo '$KEY' >> ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys"
|
||||||
|
|
||||||
|
echo "~~~~~~~~"
|
||||||
|
echo "Testing SSH connection"
|
||||||
|
ssh -i "$SSHPATH" -p $SERVERPORT "$SERVERUN@$SERVERIP" "echo 'Successfully connected to $SERVERIP'"
|
||||||
|
|
||||||
21
.local/bin/station-setup-spotify
Executable file
21
.local/bin/station-setup-spotify
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#! /bin/zsh
|
||||||
|
|
||||||
|
echo "Signing into Spotify..."
|
||||||
|
|
||||||
|
read -r username password <<< "$(station-get-username-password "Spotify")"
|
||||||
|
|
||||||
|
echo -n "$username" | wl-copy
|
||||||
|
|
||||||
|
spotify &
|
||||||
|
|
||||||
|
station-confirm-or-close "Spotify Setup" "Username copied.\nPress OK for password"
|
||||||
|
|
||||||
|
echo -n "$password" | wl-copy
|
||||||
|
|
||||||
|
station-confirm-or-close "Spotify Setup" "Click OK when you have finished logging in to move on."
|
||||||
|
|
||||||
|
wl-copy --clear
|
||||||
|
|
||||||
|
hyprctl dispatch closewindow class:Spotify
|
||||||
|
|
||||||
|
echo "Finished setting up Spotify"
|
||||||
@@ -1,16 +1,19 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
echo "Setting up SSH"
|
echo "-------------------------------------"
|
||||||
|
echo "SSH Setup Script"
|
||||||
|
echo "-------------------------------------"
|
||||||
|
|
||||||
# Extract the login details from enpass
|
echo "Extracting login details from enpass"
|
||||||
LABS=$(enpass-cli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "Scarif: Labs" 2>&1)
|
LABS=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -json -sort show "Scarif: Labs")
|
||||||
LABSUN=$(echo "$LABS" | grep -Po "(?<=login: )\w+")
|
LABSUN=$(echo "$LABS" | jq -r '.[].login')
|
||||||
LABSPW=$(enpass-cli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort pass "Scarif: Labs")
|
LABSPW=$(echo "$LABS" | jq -r '.[].password')
|
||||||
|
|
||||||
SSHPATH="$HOME/.ssh/id_ed25519" # The path to the SSH key file
|
SSHPATH="$HOME/.ssh/id_ed25519" # The path to the SSH key file
|
||||||
TITLE="$USER@$(cat /etc/hostname)" # The title for the SSH key
|
TITLE="$USER@$(cat /etc/hostname)" # The title for the SSH key
|
||||||
|
|
||||||
echo "Generate the SSH key if it does not exist"
|
echo "~~~~~~~~"
|
||||||
|
echo "Generating the SSH key if it does not exist"
|
||||||
[ ! -f $SSHPATH ] && ssh-keygen -t ed25519 -f "$SSHPATH" -N "" -q
|
[ ! -f $SSHPATH ] && ssh-keygen -t ed25519 -f "$SSHPATH" -N "" -q
|
||||||
|
|
||||||
KEY=$(cat "$SSHPATH.pub")
|
KEY=$(cat "$SSHPATH.pub")
|
||||||
@@ -34,25 +37,32 @@ KEYS=$(curl -X GET -s -S --url "$KEYS_URL")
|
|||||||
|
|
||||||
KEY_EXISTS=$(echo $KEYS | jq --arg TITLE "$TITLE" 'map(.title|ascii_downcase)|contains([$TITLE|ascii_downcase])')
|
KEY_EXISTS=$(echo $KEYS | jq --arg TITLE "$TITLE" 'map(.title|ascii_downcase)|contains([$TITLE|ascii_downcase])')
|
||||||
|
|
||||||
|
echo "~~~~~~~~"
|
||||||
|
echo "Checking if the key exists on the server"
|
||||||
if [[ $KEY_EXISTS == true ]]; then
|
if [[ $KEY_EXISTS == true ]]; then
|
||||||
echo "Found keys with the same title as this machine."
|
echo "Found keys with the same title as this machine."
|
||||||
# Extract the ids of the keys with the same title as this machine
|
# Extract the ids of the keys with the same title as this machine
|
||||||
IDS=$(echo "$KEYS" | jq --arg TITLE "$TITLE" 'map(select(.title|ascii_downcase == ($TITLE|ascii_downcase)))[].id')
|
MATCH=$(echo "$KEYS" | jq --arg TITLE "$TITLE" 'map(select(.title|ascii_downcase == ($TITLE|ascii_downcase)))[]')
|
||||||
|
|
||||||
# Loop through the keys and remove them from gitea to be replaced by the new one
|
if [[ -n "$MATCH" ]]; then
|
||||||
echo "Removing found keys to replace with this machine"
|
ID=$(echo "$MATCH" | jq -r '.id')
|
||||||
if [ ! -z "$IDS" ]; then
|
EXISTING_KEY=$(echo "$MATCH" | jq -r '.key')
|
||||||
for ID in $IDS; do
|
|
||||||
echo "Deleting key with ID $ID"
|
if [[ "$KEY" == "$EXISTING_KEY" ]]; then
|
||||||
|
echo "Key already exists and is correct. Nothing to do."
|
||||||
|
exit 0;
|
||||||
|
else
|
||||||
|
echo "Key exists but differs. Deleting existing key ID $ID"
|
||||||
curl -X DELETE \
|
curl -X DELETE \
|
||||||
-s -S \
|
-s -S \
|
||||||
-H "Accept: application/json" \
|
-H "Accept: application/json" \
|
||||||
-H "Content-Type:application/json" \
|
-H "Content-Type:application/json" \
|
||||||
--url "$KEYS_URL/$ID"
|
--url "$KEYS_URL/$ID"
|
||||||
done
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "~~~~~~~~"
|
||||||
echo "Saving the new key"
|
echo "Saving the new key"
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
-s -S \
|
-s -S \
|
||||||
@@ -72,7 +82,9 @@ for dir in "$HOME/.local/nixos"; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "~~~~~~~~"
|
||||||
echo "Replacing remote URL to use SSH key"
|
echo "Replacing remote URL to use SSH key"
|
||||||
DOTFILES_SSH_URL=$(git --git-dir "$HOME/.config/dotfiles/.git" --work-tree="$HOME" remote get-url origin | sed "$HTTP_REPLACE")
|
DOTFILES_SSH_URL=$(git --git-dir "$HOME/.config/dotfiles/.git" --work-tree="$HOME" remote get-url origin | sed "$HTTP_REPLACE")
|
||||||
git --git-dir "$HOME/.config/dotfiles/.git" --work-tree="$HOME" remote set-url origin "$DOTFILES_SSH_URL"
|
git --git-dir "$HOME/.config/dotfiles/.git" --work-tree="$HOME" remote set-url origin "$DOTFILES_SSH_URL"
|
||||||
|
|
||||||
|
|
||||||
21
.local/bin/station-setup-steam
Executable file
21
.local/bin/station-setup-steam
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#! /bin/zsh
|
||||||
|
|
||||||
|
echo "Signing into Steam..."
|
||||||
|
|
||||||
|
read -r username password <<< "$(station-get-username-password "Steam")"
|
||||||
|
|
||||||
|
steam &
|
||||||
|
|
||||||
|
echo -n "$username" | wl-copy
|
||||||
|
|
||||||
|
station-confirm-or-close "Steam Setup" "Username copied.\nPress OK for password"
|
||||||
|
|
||||||
|
echo -n "$password" | wl-copy
|
||||||
|
|
||||||
|
station-confirm-or-close "Steam Setup" "Password copied.\nPress OK to finish setup"
|
||||||
|
|
||||||
|
hyprctl dispatch closewindow class:steam
|
||||||
|
|
||||||
|
echo "Finished setting up Steam"
|
||||||
|
|
||||||
|
|
||||||
37
.local/bin/station-setup-super-productivity
Executable file
37
.local/bin/station-setup-super-productivity
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
#! /bin/zsh
|
||||||
|
|
||||||
|
echo "Signing into Super Productivity..."
|
||||||
|
|
||||||
|
read -r username password <<< "$(station-get-username-password "Scarif: Tower")"
|
||||||
|
|
||||||
|
echo -n "https://tower.scarif.space/remote.php/dav/files/chris/" | wl-copy
|
||||||
|
|
||||||
|
super-productivity &
|
||||||
|
|
||||||
|
station-confirm-or-close "Super Productivity Setup" "URL copied.\nPress OK for username"
|
||||||
|
|
||||||
|
echo -n "$username" | wl-copy
|
||||||
|
|
||||||
|
station-confirm-or-close "Super Productivity Setup" "Username copied.\nPress OK for password"
|
||||||
|
|
||||||
|
echo -n "$password" | wl-copy
|
||||||
|
|
||||||
|
station-confirm-or-close "Super Productivity Setup" "Password copied.\nPress OK for sync folder"
|
||||||
|
|
||||||
|
echo -n ".backups/super-productivity" | wl-copy
|
||||||
|
|
||||||
|
station-confirm-or-close "Super Productivity Setup" "Sync folder path copied\n\nClick OK when you have finished logging in to move on."
|
||||||
|
|
||||||
|
wl-copy --clear
|
||||||
|
|
||||||
|
echo "Downloading latest autoplan plugin..."
|
||||||
|
|
||||||
|
wget "https://codeberg.org/00sapo/sp-autoplan/releases/download/latest/sp-autoplan-plugin.zip" -O "$HOME/Downloads/autoplan.zip"
|
||||||
|
|
||||||
|
station-confirm-or-close "Super Productivity Setup" "Autoplan plugin downloaded. Please enable it in settings."
|
||||||
|
|
||||||
|
hyprctl dispatch closewindow class:superProductivity
|
||||||
|
|
||||||
|
echo "Finished setting up Super Productivity"
|
||||||
|
|
||||||
|
|
||||||
22
.local/bin/station-setup-vpn
Executable file
22
.local/bin/station-setup-vpn
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
echo "Signing into ExpressVPN..."
|
||||||
|
|
||||||
|
read -r username password <<< "$(station-get-username-password "ExpressVPN")"
|
||||||
|
|
||||||
|
station-launch-browser "https://www.expressvpn.com/sign-in"
|
||||||
|
|
||||||
|
echo -n "$username" | wl-copy
|
||||||
|
|
||||||
|
station-confirm-or-close "ExpressVPN Setup" "Email copied.\nPress OK for password" || exit
|
||||||
|
|
||||||
|
echo -n "$password" | wl-copy
|
||||||
|
|
||||||
|
expressvpn activate
|
||||||
|
|
||||||
|
expressvpn autoconnect true
|
||||||
|
|
||||||
|
expressvpn connect smart
|
||||||
|
|
||||||
|
wl-copy --clear
|
||||||
|
|
||||||
28
.local/bin/station-setup-website
Executable file
28
.local/bin/station-setup-website
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#! /bin/zsh
|
||||||
|
|
||||||
|
key="$1"
|
||||||
|
url="$2"
|
||||||
|
also_webapp="$3:-true"
|
||||||
|
label="$4:-$key"
|
||||||
|
|
||||||
|
echo "Signing into $key..."
|
||||||
|
|
||||||
|
read -r username password <<< "$(station-get-username-password "$label")"
|
||||||
|
|
||||||
|
echo -n "$username" | wl-copy
|
||||||
|
|
||||||
|
station-launch-browser "$url"
|
||||||
|
|
||||||
|
if [[ "$also_webapp" == "true" ]]; then
|
||||||
|
exec setsid uwsm-app -- chromium "$url" 2>/dev/null &
|
||||||
|
fi
|
||||||
|
|
||||||
|
station-confirm-or-close "$key Setup" "Email copied.\nPress OK for password"
|
||||||
|
|
||||||
|
echo -n "$password" | wl-copy
|
||||||
|
|
||||||
|
station-confirm-or-close "$key Setup" "Click OK when you have finished logging in to move on."
|
||||||
|
|
||||||
|
echo -n "" | wl-copy
|
||||||
|
|
||||||
|
echo "Finished setting up $key."
|
||||||
Reference in New Issue
Block a user