From 38c11b2e564cc71176fdb6de64c21fe5ec5771db Mon Sep 17 00:00:00 2001 From: SDGDen Date: Sun, 17 May 2026 14:10:06 +0200 Subject: [PATCH] major update: added screenshots, first-run and a mango configurator. --- README.md | 35 ++++++++++++++++++++++++++++-- mango/autostart.conf | 6 ++++- mango/binds.conf | 14 ++++++++++-- mango/config.conf | 3 +-- mango/config.conf.backup1778959778 | 11 ---------- mango/config.conf.backup1778967304 | 12 ---------- mango/dms/colors.conf | 6 ++--- sdgos/firstrun.sh | 8 +++++++ sdgos/mango-config.sh | 15 +++++++++++++ sdgos/screenshots/fullscreen.sh | 23 ++++++++++++++++++++ sdgos/screenshots/mode-toggle.sh | 30 +++++++++++++++++++++++++ sdgos/screenshots/region.sh | 21 ++++++++++++++++++ 12 files changed, 151 insertions(+), 33 deletions(-) delete mode 100644 mango/config.conf.backup1778959778 delete mode 100644 mango/config.conf.backup1778967304 create mode 100755 sdgos/firstrun.sh create mode 100755 sdgos/mango-config.sh create mode 100755 sdgos/screenshots/fullscreen.sh create mode 100755 sdgos/screenshots/mode-toggle.sh create mode 100755 sdgos/screenshots/region.sh diff --git a/README.md b/README.md index b9cee5a..38743dd 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,17 @@ mangoWC dotfiles with DMS integration -clone the repo and place the mango folder in your .config folder: +clone the repo and place the mango and sdgos folders in your .config folder: `git clone https://git.sdgcloud.nl/SDGDen/SDG-OS.git` `cd SDG-OS` `cp -r mango ~/.config` +`cp -r sdgos ~/.config` + +then make the scripts in the sdgos folder executable: +`sudo chmod -R a+x ~/.config/sdgos` + +you can also use stow to symlink these to your .config folder instead, this allows you to store the files anywhere and also update via git pull, but means you cannot personally alter the config. you may need totweak around with some stuff to get application auto-theming to work, reference the DMS docs: @@ -17,6 +23,12 @@ as well as the mangoWM docs: https://mangowm.github.io/docs +please be sure to tweak the display config using dms or by editing monitors.conf to match your displays! + + +for keybinds, press super+k. these are automatically updated from your binds.conf file. + + # needed software: (aur)mangowm-git @@ -30,13 +42,32 @@ pipewire (aur)dsearch-bin matugen adw-gtk-theme +wl-copy +hyprshot +grim +satty +fzf +micro # installation of that software: -`sudo pacman -Syu ghostty firefox dms-shell yay git nautilus brightnessctl pipewire-pulse pipewire matugen adw-gtk-theme` +`sudo pacman -Syu ghostty firefox dms-shell yay git nautilus brightnessctl pipewire-pulse pipewire matugen adw-gtk-theme wl-copy hyprshot grim satty` `yay -S mangowm-git dsearch-bin` +# mango-config editor script + +you can open the mango config editor with super+m, this opens a terminal in which you can select a config file and see the contents of that config file. + +this script has a variable for the editor, it uses micro by default, but you can change the line "app=micro" to any editor you'd like. + + + +# Updates: + +17-05-2026 - added screenshot capability through scripts, first run modal (opens settings and keybinds popup on first boot) and added a somewhat-simple mango config editor script. + + diff --git a/mango/autostart.conf b/mango/autostart.conf index de967b2..b73b9e9 100644 --- a/mango/autostart.conf +++ b/mango/autostart.conf @@ -4,10 +4,14 @@ exec-once=tldr --update ## start dsearch file indexer exec-once=dsearch serve --workers 1 --root ~ -##start a polkit agent +## start a polkit agent exec-once=systemctl --user start hyprpolkitagent +## first-run UI +exec-once=~/.config/sdgos/firstrun.sh # UI +exec-once=ghostty + ## start DankMaterial Shell exec-once=dms run diff --git a/mango/binds.conf b/mango/binds.conf index a031918..030de55 100644 --- a/mango/binds.conf +++ b/mango/binds.conf @@ -1,6 +1,6 @@ -# Example binds,see https://wiki.hyprland.org/Configuring/Binds/ for more +# Example binds -bind=SUPER+ALT,r,reload_config # reload mango config +bind=SUPER,R,reload_config # reload mango config # Actions # window management @@ -11,6 +11,7 @@ bind=SUPER+SHIFT,Q,quit, # Exit mango bind=SUPER+SHIFT,P,toggleoverlay, # toggle overlay mode bind=SUPER,P,spawn_shell,mmsg -d toggleglobal && mmsg -d togglefloating # pin window across workspaces bind=SUPER,O,toggleoverview + # "OS" functions bind=SUPER,L,spawn_shell,dms ipc call lock lock # locks screen bind=SUPER,SPACE,spawn_shell,dms ipc call spotlight toggle # open runner menu @@ -24,6 +25,7 @@ bind=SUPER,ESCAPE,spawn_shell,dms ipc call control-center toggle # toggle contro bind=SUPER,Z,spawn_shell,dms ipc call powermenu toggle # toggle power menu bind=SUPER,S,spawn_shell,dms ipc call settings toggle # toggle settings bind=SUPER,K,spawn_shell,dms ipc call keybinds toggleWithPath mangowc ~/.config/mango/binds.conf # show binds +bind=SUPER,M,spawn_shell,ghostty -e ~/.config/sdgos/mango-config.sh # show mango config editor #program launchers bind=SUPER,RETURN,spawn_shell,ghostty @@ -31,6 +33,8 @@ bind=SUPER,TAB,spawn_shell,ghostty bind=SUPER,E,spawn,nautilus ~ bind=SUPER,B,spawn,firefox bind=SUPER,N,spawn_shell,dms ipc call notepad open # open notes +bind=SUPER+SHIFT,M,spawn,firefox --new-window https://mangowm.github.io/docs/configuration + # Audio Ctrls @@ -43,6 +47,12 @@ bind=NONE,XF86AudioMicMute,spawn_shell,dms ipc call audio micmute # mute mic bind=NONE,XF86MonBrightnessUp,spawn_shell,dms ipc call brightness increment 5 # brightness up bind=NONE,XF86MonBrightnessDown,spawn_shell,dms ipc call brightness decrement 5 # brightness down +# screenshots +bind=SUPER,PRINT,spawn_shell,~/.config/sdgos/screenshots/region.sh # screenshot region +bind=SUPER+CTRL,PRINT,spawn_shell,~/.config/sdgos/screenshots/fullscreen.sh # fullscreen screenshot +bind=NONE,PRINT,spawn_shell,~/.config/sdgos/screenshots/mode-toggle.sh # toggle screenshot save mode + + # Other bind=NONE,XF86WLAN,spawn_shell,nmcli radio wifi toggle # toggle wifi bind=NONE,XF86Refresh,spawn_shell,xdotool key F5 # refresh diff --git a/mango/config.conf b/mango/config.conf index 79ce7f3..5964495 100644 --- a/mango/config.conf +++ b/mango/config.conf @@ -10,5 +10,4 @@ source=~/.config/mango/windowrules.conf source=~/.config/mango/dms/colors.conf source=~/.config/mango/dms/layout.conf source=~/.config/mango/dms/outputs.conf - -source=./dms/cursor.conf +source=~/.config/mango/dms/cursor.conf diff --git a/mango/config.conf.backup1778959778 b/mango/config.conf.backup1778959778 deleted file mode 100644 index 566f69c..0000000 --- a/mango/config.conf.backup1778959778 +++ /dev/null @@ -1,11 +0,0 @@ -# link all config files -source=~/.config/mango/autostart.conf -source=~/.config/mango/binds.conf -source=~/.config/mango/decoration.conf -source=~/.config/mango/environment.conf -source=~/.config/mango/input.conf -source=~/.config/mango/layouts.conf -source=~/.config/mango/monitors.conf -source=~/.config/mango/windowrules.conf -source=~/.config/mango/dms/colors.conf -source=~/.config/mango/dms/layout.conf diff --git a/mango/config.conf.backup1778967304 b/mango/config.conf.backup1778967304 deleted file mode 100644 index 7b438b3..0000000 --- a/mango/config.conf.backup1778967304 +++ /dev/null @@ -1,12 +0,0 @@ -# link all config files -source=~/.config/mango/autostart.conf -source=~/.config/mango/binds.conf -source=~/.config/mango/decoration.conf -source=~/.config/mango/environment.conf -source=~/.config/mango/input.conf -source=~/.config/mango/layouts.conf -source=~/.config/mango/monitors.conf -source=~/.config/mango/windowrules.conf -source=~/.config/mango/dms/colors.conf -source=~/.config/mango/dms/layout.conf -source=~/.config/mango/dms/outputs.conf diff --git a/mango/dms/colors.conf b/mango/dms/colors.conf index e9e14b7..1cfc190 100644 --- a/mango/dms/colors.conf +++ b/mango/dms/colors.conf @@ -1,6 +1,6 @@ # ! Auto-generated file. Do not edit directly. # Remove source = ./dms/colors.conf from your config to override. -bordercolor = 0x908caaff -focuscolor = 0xc4a7e7ff -urgentcolor = 0xeb6f92ff +bordercolor = 0x958e9bff +focuscolor = 0xd6baffff +urgentcolor = 0xffb4abff diff --git a/sdgos/firstrun.sh b/sdgos/firstrun.sh new file mode 100755 index 0000000..42970aa --- /dev/null +++ b/sdgos/firstrun.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ ! -f ~/.config/firstrun.state ]; then + dms ipc call settings open + dms ipc call keybinds openWithPath mangowc ~/.config/mango/binds.conf + touch ~/.config/firstrun.state +fi +exit 0 diff --git a/sdgos/mango-config.sh b/sdgos/mango-config.sh new file mode 100755 index 0000000..d314e6a --- /dev/null +++ b/sdgos/mango-config.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +CONFDIR="/home/$(whoami)/.config/mango" +echo "confdir is $CONFDIR" + +app=micro + +selected=$(ls -1 $CONFDIR | fzf --layout=reverse --preview="bat $CONFDIR/{}") + +echo "selected is $selected" + +$app $CONFDIR/$selected + +echo "opened $CONFDIR/$selected in $app" + diff --git a/sdgos/screenshots/fullscreen.sh b/sdgos/screenshots/fullscreen.sh new file mode 100755 index 0000000..f7aeb77 --- /dev/null +++ b/sdgos/screenshots/fullscreen.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if [ -e ~/.config/screenshot-state ]; then + state=$(cat ~/.config/screenshot-state) + case $state in + file) + mkdir -p ~/Screenshots + grim $HOME/Screenshots/$(date +%Y%m%d%H%M%S).png + notify-send -t 3000 -a "Screenshots" -i $HOME/Screenshots/$(date +%Y%m%d%H%M%S).png "screenshot taken" "screenshot taken and saved to file in $HOME/screenshots" + ;; + clipboard) + f=$(mktemp -t screenshot-XXXXXX.png) && grim "$f" && wl-copy < "$f" && rm -f "$f" + notify-send -t 3000 -a "Screenshots" -i $f "screenshot taken" "screenshot taken and saved to clipboard" + ;; + editor) + f=$HOME/Screenshots/$(date +%Y%m%d%H%M%S).png && grim "$f" && satty --filename "$f" --output-filename "$f" --actions-on-enter save-to-file --early-exit & + notify-send -t 3000 -a "Screenshots" -i "$f" "screenshot taken" "screenshot taken and opened in editor" + ;; + esac +else + echo "clipboard" > ~/.config/screenshot-state + notify-send -t 3000 -a "Screenshots" "screenshot mode" 'No mode detected, set mode to "Save to Clipboard". re-run your screenshot' +fi \ No newline at end of file diff --git a/sdgos/screenshots/mode-toggle.sh b/sdgos/screenshots/mode-toggle.sh new file mode 100755 index 0000000..dbbc7e2 --- /dev/null +++ b/sdgos/screenshots/mode-toggle.sh @@ -0,0 +1,30 @@ +#!/bin/bash + + +if [ -e ~/.config/screenshot-state ]; then + state=$(cat ~/.config/screenshot-state) + case $state in + file) + echo "clipboard" > ~/.config/screenshot-state + notify-send -t 3000 -a "Screenshots" "toggled screenshot mode" "screenshot mode changed to: \nSave to Clipboard" + echo "detected file, set to clipboard" + ;; + clipboard) + echo "editor" > ~/.config/screenshot-state + notify-send -t 3000 -a "Screenshots" "toggled screenshot mode" "screenshot mode changed to: \nOpen in Editor" + echo "detected clipboard, set to editor" + ;; + editor) + echo "file" > ~/.config/screenshot-state + notify-send -t 3000 -a "Screenshots" "toggled screenshot mode" "screenshot mode changed to: \nSave to File" + echo "detected editor, set to file" + ;; + esac +else + echo "clipboard" > ~/.config/screenshot-state + notify-send -t 3000 -a "Screenshots" "toggled screenshot mode" "screenshot mode changed to: \nSave to Clipboard" + echo "detected no file ,set to clipboard" +fi + + + diff --git a/sdgos/screenshots/region.sh b/sdgos/screenshots/region.sh new file mode 100755 index 0000000..6ee7316 --- /dev/null +++ b/sdgos/screenshots/region.sh @@ -0,0 +1,21 @@ +#!/bin/bash + + +if [ -e ~/.config/screenshot-state ]; then + state=$(cat ~/.config/screenshot-state) + case $state in + file) + mkdir -p ~/Screenshots + hyprshot -m region --output-folder ~/Screenshots + ;; + clipboard) + hyprshot -m region --clipboard-only + ;; + editor) + hyprshot -m region --raw | satty --filename - + ;; + esac +else + echo "clipboard" > ~/.config/screenshot-state + notify-send -t 3000 -a "Screenshots" "screenshot mode" 'No mode detected, set mode to "Save to Clipboard". re-run your screenshot' +fi \ No newline at end of file