forked from pub-solar/os
Merge branch 'main' into feat/hibernate-always
This commit is contained in:
commit
963212893e
|
@ -3,4 +3,4 @@ authors = ["Timothy DeHerrera"]
|
||||||
language = "en"
|
language = "en"
|
||||||
multilingual = false
|
multilingual = false
|
||||||
src = "."
|
src = "."
|
||||||
title = "devos docs"
|
title = "PubSolarOS documentation"
|
||||||
|
|
|
@ -34,20 +34,26 @@ in
|
||||||
|
|
||||||
# These entries get added to /etc/hosts
|
# These entries get added to /etc/hosts
|
||||||
networking.hosts = {
|
networking.hosts = {
|
||||||
"127.0.0.1" = [ "cups.local" ];
|
"127.0.0.1" = [ "cups.local" "help.local" "caddy.local" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Caddy reverse proxy for local services like cups
|
# Caddy reverse proxy for local services like cups
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
globalConfig = ''
|
globalConfig = ''
|
||||||
|
default_bind 127.0.0.1
|
||||||
auto_https off
|
auto_https off
|
||||||
'';
|
'';
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
cups.local:80
|
cups.local:80 {
|
||||||
bind 127.0.0.1
|
request_header Host localhost:631
|
||||||
request_header Host localhost:631
|
reverse_proxy unix//run/cups/cups.sock
|
||||||
reverse_proxy unix//run/cups/cups.sock
|
}
|
||||||
|
|
||||||
|
help.local:80 {
|
||||||
|
root * ${pkgs.psos-docs}/lib/html
|
||||||
|
file_server
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,8 +14,9 @@ assign [app_id="telegramdesktop"] $ws4
|
||||||
# Launcher
|
# Launcher
|
||||||
for_window [app_id="launcher" title="Alacritty"] floating enable, border pixel 10, sticky enable
|
for_window [app_id="launcher" title="Alacritty"] floating enable, border pixel 10, sticky enable
|
||||||
|
|
||||||
|
for_window [app_id="pavucontrol"] floating enable, border pixel 10, sticky enable
|
||||||
|
|
||||||
# Floating menus
|
# Floating menus
|
||||||
for_window [app_id="pavucontrol"] floating enable
|
|
||||||
for_window [app_id="blueman-manager"] floating enable
|
for_window [app_id="blueman-manager"] floating enable
|
||||||
|
|
||||||
# Open specific applications in floating mode
|
# Open specific applications in floating mode
|
||||||
|
@ -60,10 +61,14 @@ for_window [window_type="dialog"] floating enable
|
||||||
for_window [window_type="menu"] floating enable
|
for_window [window_type="menu"] floating enable
|
||||||
for_window [title="About Mozilla Firefox"] floating enable
|
for_window [title="About Mozilla Firefox"] floating enable
|
||||||
for_window [title="Password Required - Mozilla Firefox"] floating enable
|
for_window [title="Password Required - Mozilla Firefox"] floating enable
|
||||||
for_window [title="Firefox — Sharing Indicator"] move to workspace $ws7, floating enable
|
|
||||||
no_focus [title="Firefox — Sharing Indicator"]
|
|
||||||
for_window [title="Extension: (Open in Browser)*"] floating enable
|
for_window [title="Extension: (Open in Browser)*"] floating enable
|
||||||
|
|
||||||
|
# Technical media stuff happens on ws7
|
||||||
|
for_window [app_id="screen-recorder" title="Alacritty"] move to workspace $ws7, floating disable
|
||||||
|
no_focus [app_id="screen-recorder"]
|
||||||
|
for_window [title="Firefox — Sharing Indicator"] move to workspace $ws7, floating disable
|
||||||
|
no_focus [title="Firefox — Sharing Indicator"]
|
||||||
|
|
||||||
# qMasterPassword floating menu
|
# qMasterPassword floating menu
|
||||||
for_window [title="qMasterPassword"] focus
|
for_window [title="qMasterPassword"] focus
|
||||||
for_window [title="qMasterPassword"] floating enable
|
for_window [title="qMasterPassword"] floating enable
|
||||||
|
|
|
@ -13,21 +13,26 @@ bindsym $mod+Ctrl+m exec pavucontrol
|
||||||
################################################################################################
|
################################################################################################
|
||||||
|
|
||||||
# Quickstart application shortcuts
|
# Quickstart application shortcuts
|
||||||
bindsym $mod+F1 exec qMasterPassword
|
bindsym $mod+F1 exec psos help
|
||||||
|
bindsym $mod+Shift+h exec psos help
|
||||||
|
|
||||||
bindsym $mod+F2 exec firefox
|
bindsym $mod+F2 exec firefox
|
||||||
|
|
||||||
bindsym $mod+F3 exec $term -e vifm
|
bindsym $mod+F3 exec $term -e vifm
|
||||||
bindsym $mod+Shift+F3 exec gksu $term -e vifm
|
bindsym $mod+Shift+F3 exec gksu $term -e vifm
|
||||||
|
|
||||||
bindsym $mod+F4 exec nautilus -w
|
bindsym $mod+F4 exec nautilus -w
|
||||||
bindsym $mod+Shift+F4 exec signal-desktop --use-tray-icon
|
bindsym $mod+Shift+F4 exec signal-desktop --use-tray-icon
|
||||||
bindsym $mod+F5 exec $term -e 'mocp -C $XDG_CONFIG_DIR/mocp/config'
|
|
||||||
bindsym $mod+Shift+m exec mu
|
|
||||||
bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf
|
|
||||||
|
|
||||||
# Screenshots
|
bindsym $mod+Shift+m exec qMasterPassword
|
||||||
|
|
||||||
|
# Screenshots and screen recordings
|
||||||
bindsym $mod+Ctrl+p exec grim -g "$(slurp -d -b \#ffffff11)" ~/Pictures/Screenshots/$(date +%Y%m%d_%Hh%Mm%Ss)_grim.png
|
bindsym $mod+Ctrl+p exec grim -g "$(slurp -d -b \#ffffff11)" ~/Pictures/Screenshots/$(date +%Y%m%d_%Hh%Mm%Ss)_grim.png
|
||||||
bindsym $mod+Shift+p exec grim ~/Pictures/Screenshots/$(date +%Y%m%d_%Hh%Mm%Ss)_grim.png
|
bindsym $mod+Shift+p exec grim ~/Pictures/Screenshots/$(date +%Y%m%d_%Hh%Mm%Ss)_grim.png
|
||||||
bindsym $mod+Ctrl+f exec "( pkill flameshot || true && flameshot & ) && ( sleep 0.5s && flameshot gui )"
|
bindsym $mod+Ctrl+f exec "( pkill flameshot || true && flameshot & ) && ( sleep 0.5s && flameshot gui )"
|
||||||
|
|
||||||
|
bindsym $mod+Ctrl+r exec record-screen
|
||||||
|
|
||||||
# Launcher
|
# Launcher
|
||||||
set $menu exec alacritty --class launcher -e env TERMINAL_COMMAND="alacritty -e" sway-launcher
|
set $menu exec alacritty --class launcher -e env TERMINAL_COMMAND="alacritty -e" sway-launcher
|
||||||
bindsym $mod+Space exec $menu
|
bindsym $mod+Space exec $menu
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
floating_modifier $mod normal
|
floating_modifier $mod normal
|
||||||
|
|
||||||
# Reload the configuration file
|
# Reload the configuration file
|
||||||
bindsym $mod+Ctrl+r reload
|
bindsym $mod+F5 reload
|
||||||
|
|
||||||
#
|
#
|
||||||
# Moving around:
|
# Moving around:
|
||||||
|
|
|
@ -77,6 +77,7 @@ in
|
||||||
ydotool
|
ydotool
|
||||||
|
|
||||||
sway-launcher
|
sway-launcher
|
||||||
|
record-screen
|
||||||
import-gtk-settings
|
import-gtk-settings
|
||||||
s
|
s
|
||||||
wcwd
|
wcwd
|
||||||
|
|
|
@ -9,6 +9,7 @@ with final; {
|
||||||
mopidy-jellyfin = import ./mopidy-jellyfin.nix final;
|
mopidy-jellyfin = import ./mopidy-jellyfin.nix final;
|
||||||
mu = writeShellScriptBin "mu" (import ./mu.nix final);
|
mu = writeShellScriptBin "mu" (import ./mu.nix final);
|
||||||
psos = writeShellScriptBin "psos" (import ./psos.nix final);
|
psos = writeShellScriptBin "psos" (import ./psos.nix final);
|
||||||
|
psos-docs = import ./psos-docs.nix final;
|
||||||
s = writeShellScriptBin "s" (import ./s.nix final);
|
s = writeShellScriptBin "s" (import ./s.nix final);
|
||||||
sway-launcher = writeScriptBin "sway-launcher" (import ./sway-launcher.nix final);
|
sway-launcher = writeScriptBin "sway-launcher" (import ./sway-launcher.nix final);
|
||||||
sway-service = writeShellScriptBin "sway-service" (import ./sway-service.nix final);
|
sway-service = writeShellScriptBin "sway-service" (import ./sway-service.nix final);
|
||||||
|
@ -17,6 +18,7 @@ with final; {
|
||||||
uhk-agent = import ./uhk-agent.nix final;
|
uhk-agent = import ./uhk-agent.nix final;
|
||||||
wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final);
|
wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final);
|
||||||
drone-docker-runner = writeShellScriptBin "drone-docker-runner" (import ./drone-docker-runner.nix final);
|
drone-docker-runner = writeShellScriptBin "drone-docker-runner" (import ./drone-docker-runner.nix final);
|
||||||
|
record-screen = writeShellScriptBin "record-screen" (import ./record-screen.nix final);
|
||||||
|
|
||||||
# ps-fixes
|
# ps-fixes
|
||||||
}
|
}
|
||||||
|
|
26
pkgs/psos-docs.nix
Normal file
26
pkgs/psos-docs.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
self: with self;
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "psos-docs";
|
||||||
|
version = "0.0.1";
|
||||||
|
buildInputs = [
|
||||||
|
mdbook
|
||||||
|
mdbook-pdf
|
||||||
|
];
|
||||||
|
|
||||||
|
src = ../docs/..; # wut
|
||||||
|
|
||||||
|
phases = [ "buildPhase" "installPhase" ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
cp -r $src/doc ./doc
|
||||||
|
cp $src/README.md ./README.md
|
||||||
|
chmod ug+w -R .
|
||||||
|
ls -la .
|
||||||
|
mdbook build doc
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/lib/
|
||||||
|
cp -r doc/book $out/lib/html
|
||||||
|
'';
|
||||||
|
}
|
|
@ -14,6 +14,10 @@ self: with self; ''
|
||||||
shift;
|
shift;
|
||||||
exec nixos-option -I nixpkgs=/etc/nixos/lib/compat $@
|
exec nixos-option -I nixpkgs=/etc/nixos/lib/compat $@
|
||||||
;;
|
;;
|
||||||
|
help)
|
||||||
|
shift;
|
||||||
|
exec xdg-open http://help.local/
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
if [[ "$@" != "" ]]; then
|
if [[ "$@" != "" ]]; then
|
||||||
echo "Unknown command: psos $@"
|
echo "Unknown command: psos $@"
|
||||||
|
|
10
pkgs/record-screen.nix
Normal file
10
pkgs/record-screen.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
self: with self; ''
|
||||||
|
mkdir -p "$HOME/Videos/Screenrecordings"
|
||||||
|
GEOMETRY="$(slurp -d -b \#ffffff11)"
|
||||||
|
RESOLUTION="$(echo $GEOMETRY | awk '{print $2}')"
|
||||||
|
FILE_LOCATION="$HOME/Videos/Screenrecordings/$(${coreutils}/bin/date +%Y%m%d_%Hh%Mm%Ss)_$RESOLUTION.mp4"
|
||||||
|
echo "Recording $GEOMETRY into $FILE_LOCATION"
|
||||||
|
${alacritty}/bin/alacritty \
|
||||||
|
--class screen-recorder \
|
||||||
|
-e ${wf-recorder}/bin/wf-recorder -g "$GEOMETRY" -f "$FILE_LOCATION"
|
||||||
|
''
|
Loading…
Reference in a new issue