Compare commits
7 commits
31ea9ec987
...
ed53cd1afa
Author | SHA1 | Date | |
---|---|---|---|
ed53cd1afa | |||
516191efba | |||
3489655cf4 | |||
dc01774ad2 | |||
160ee8dfff | |||
bbe85477dd | |||
4e2fb32d74 |
9 changed files with 184 additions and 30 deletions
|
@ -223,12 +223,12 @@ in {
|
|||
(key "A" "Ctrl+Alt" "exec" "${waydroid} session stop")
|
||||
(key "A" "Super" "togglespecialworkspace" "android")
|
||||
(key "A" "Super+Shift" "movetoworkspacesilent" "special:android")
|
||||
(key "B" "Super" "exec" "[group new; tile] ${firefox-esr}")
|
||||
(key "B" "Super" "exec" firefox-esr)
|
||||
(key "C" "Super" "exec" codium)
|
||||
(key "E" "Super" "exec" gnome-text-editor)
|
||||
(key "F" "Super" "exec" "${nautilus} --new-window")
|
||||
(key "G" "Super" "workspace" "name:game")
|
||||
(key "G" "Super+Alt" "workspace" "name:gamescope")
|
||||
(key "G" "Super+Alt" "togglespecialworkspace" "gamescope")
|
||||
(key "G" "Super+Ctrl+Alt" "exec" "${pkill} gamescope")
|
||||
(key "G" "Super+Shift" "movetoworkspacesilent" "name:game")
|
||||
(key "K" "Super" "exec" obsidian)
|
||||
|
|
|
@ -29,6 +29,7 @@ in {
|
|||
"plugin:hyprbars:nobar, class:^discord$, title:^Discord Updater$"
|
||||
"plugin:hyprbars:nobar, class:^dropdown$"
|
||||
"plugin:hyprbars:nobar, class:^org\\.gnome\\.Nautilus$, title:^New Folder$"
|
||||
"plugin:hyprbars:nobar, class:^org\\.gnome\\.NautilusPreviewer$"
|
||||
"plugin:hyprbars:nobar, class:^steam$"
|
||||
"plugin:hyprbars:nobar, class:^steam_app_.+$"
|
||||
"plugin:hyprbars:nobar, class:^[Ww]aydroid.*$"
|
||||
|
|
|
@ -29,15 +29,14 @@ in {
|
|||
# https://wiki.hyprland.org/Configuring/Workspace-Rules
|
||||
#?? workspace = WORKSPACE, RULES
|
||||
workspace = [
|
||||
"name:gamescope, on-created-empty:MANGOHUD=0 ${gamescope} --fullscreen --steam ${steam}"
|
||||
|
||||
"special:android, on-created-empty:${launch} --empty --workspace special:android ${waydroid} app launch com.YoStarEN.Arknights"
|
||||
"special:android, on-created-empty:${waydroid} app launch com.YoStarEN.Arknights"
|
||||
"special:gamescope, on-created-empty:MANGOHUD=0 ${gamescope} --fullscreen --steam ${steam}"
|
||||
"special:music, on-created-empty:${youtube-music}"
|
||||
"special:office, on-created-empty:[tile] ${onlyoffice} --xdg-desktop-portal"
|
||||
"special:password, on-created-empty:${launch} --empty --tile --workspace special:password ${_1password}"
|
||||
#// "special:office, on-created-empty:[tile] ${onlyoffice} --xdg-desktop-portal"
|
||||
"special:password, on-created-empty:${_1password}"
|
||||
"special:steam, on-created-empty:${steam}"
|
||||
"special:terminal, on-created-empty:${kitty}"
|
||||
"special:vm, on-created-empty:${pgrep} -x vm || ${virt-manager}"
|
||||
#// "special:vm, on-created-empty:${pgrep} -x vm || ${virt-manager}"
|
||||
"special:wallpaper, on-created-empty:[tile] ${loupe} /tmp/wallpaper.png"
|
||||
];
|
||||
|
||||
|
@ -178,6 +177,18 @@ in {
|
|||
android = rules: [
|
||||
(class "[Ww]aydroid.*" rules)
|
||||
];
|
||||
browser = rules: [
|
||||
(fields {
|
||||
class = "^chromium-browser$";
|
||||
title = "^(?!Picture.in.[Pp]icture).*$";
|
||||
}
|
||||
rules)
|
||||
(fields {
|
||||
class = "^firefox$";
|
||||
title = "^(?!Picture.in.[Pp]icture).*$";
|
||||
}
|
||||
rules)
|
||||
];
|
||||
clipboard = rules: [
|
||||
(class "clipboard" rules)
|
||||
];
|
||||
|
@ -206,13 +217,17 @@ in {
|
|||
(title "Spotify Premium" rules)
|
||||
];
|
||||
office = rules: [
|
||||
(class "draw\\.io" (rules ++ ["tile"]))
|
||||
(class "draw\\.io" (rules ++ ["group override set" "tile"]))
|
||||
(class "libreoffice.+" rules)
|
||||
(class "ONLYOFFICE Desktop Editors" rules)
|
||||
];
|
||||
password = rules: [
|
||||
(class "1Password" rules)
|
||||
(class "Bitwarden" rules)
|
||||
(fields {
|
||||
class = "^1Password$";
|
||||
title = "^.+1Password$"; # Main window
|
||||
}
|
||||
rules)
|
||||
];
|
||||
pip = rules: [
|
||||
(title "Picture.in.[Pp]icture" rules)
|
||||
|
@ -249,16 +264,17 @@ in {
|
|||
(fullscreen true ["idleinhibit focus"])
|
||||
(pinned true ["bordercolor rgb(073642) rgb(073642)"])
|
||||
|
||||
(tag.android ["idleinhibit always" "move ${android.x} ${android.y}" "size ${android.w} ${android.h}" "workspace special:android"])
|
||||
(tag.android ["idleinhibit always" "move ${android.x} ${android.y}" "size ${android.w} ${android.h}"])
|
||||
(tag.browser ["group override set" "tile" "workspace 1"])
|
||||
(tag.clipboard ["move ${clipboard.x} ${clipboard.y}" "pin" "size ${clipboard.w} ${clipboard.h}" "stayfocused"])
|
||||
(tag.dropdown ["move ${dropdown.x} ${dropdown.y}" "pin" "size ${dropdown.w} ${dropdown.h}"])
|
||||
(tag.editor ["group override set" "tile"])
|
||||
(tag.files ["center" "size 1000 625"])
|
||||
(tag.game ["fullscreen" "idleinhibit always" "noborder" "noshadow" "renderunfocused" "workspace name:game"])
|
||||
(tag.media ["center" "keepaspectratio"])
|
||||
(tag.media ["center" "keepaspectratio" "size <90% <90%"])
|
||||
(tag.music ["tile" "workspace special:music"])
|
||||
(tag.office ["group override set" "workspace special:office"])
|
||||
(tag.password ["center" "workspace special:password"])
|
||||
(tag.office ["workspace special:office"])
|
||||
(tag.password ["center" "tile" "workspace special:password"])
|
||||
(tag.pip ["keepaspectratio" "move ${pip.x} ${pip.y}" "noinitialfocus" "pin" "size ${pip.w} ${pip.h}"])
|
||||
(tag.social ["group override set" "tile"])
|
||||
(tag.steam ["suppressevent activate activatefocus" "workspace special:steam"])
|
||||
|
@ -267,6 +283,7 @@ in {
|
|||
(tag.wine ["noborder" "noshadow"])
|
||||
|
||||
### Overrides
|
||||
(class "org\\.gnome\\.NautilusPreviewer" ["stayfocused"]) # Sushi
|
||||
(class "signal" ["group override new" "tile"]) # Initial window in social group
|
||||
(class "steam_app_1473350" ["workspace 0"]) # (the) Gnorp Apologue
|
||||
(class "Tap Wizard 2\\.x86_64" ["workspace 0"])
|
||||
|
@ -285,10 +302,6 @@ in {
|
|||
class = "^lutris$";
|
||||
title = "^Lutris$"; # Main window
|
||||
} ["center" "size 1000 500"])
|
||||
(fields {
|
||||
class = "^org\\.gnome\\.Nautilus$";
|
||||
title = "^New Folder$";
|
||||
} ["center" "stayfocused"])
|
||||
(fields {
|
||||
class = "^org\\.remmina\\.Remmina$";
|
||||
title = "^Remmina Remote Desktop Client$"; # Main window
|
||||
|
|
|
@ -10,6 +10,7 @@ with lib; let
|
|||
clipse = "${pkgs.clipse}/bin/clipse";
|
||||
firefox-esr = "${config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage}/bin/firefox-esr";
|
||||
left = config.home-manager.users.${config.custom.username}.home.file.".local/bin/left".source;
|
||||
loupe = "${pkgs.loupe}/bin/loupe";
|
||||
nautilus = "${pkgs.nautilus}/bin/nautilus";
|
||||
pkill = "${pkgs.procps}/bin/pkill";
|
||||
rm = "${pkgs.coreutils}/bin/rm";
|
||||
|
@ -74,8 +75,9 @@ in {
|
|||
"${_1password} --silent" # Launch password manager in background
|
||||
#// "[group new; tile] ${firefox-esr}"
|
||||
|
||||
# HACK: Launch hidden nautilus window in lieu of background service
|
||||
"[workspace special:files silent] ${nautilus}"
|
||||
# HACK: Launch hidden GTK windows to reduce startup time
|
||||
"[workspace special:hidden silent] ${loupe}"
|
||||
"[workspace special:hidden silent] ${nautilus}"
|
||||
];
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#xwayland
|
||||
|
@ -112,6 +114,7 @@ in {
|
|||
gaps_out = config.custom.gap;
|
||||
layout = "master";
|
||||
#// no_border_on_floating = true;
|
||||
resize_corner = 3; # Bottom-right
|
||||
resize_on_border = true;
|
||||
snap.enabled = true;
|
||||
};
|
||||
|
|
|
@ -60,6 +60,7 @@ with lib; {
|
|||
#// nheko.enable = true;
|
||||
nix-ld.enable = true;
|
||||
obs-studio.enable = true;
|
||||
onlyoffice.enable = true;
|
||||
#// onedrive.enable = true;
|
||||
path-of-building.enable = true;
|
||||
rbw.enable = true;
|
||||
|
|
52
options/custom/programs/onlyoffice.nix
Normal file
52
options/custom/programs/onlyoffice.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
||||
onlyoffice-desktopeditors = "${pkgs.onlyoffice-bin}/bin/onlyoffice-desktopeditors";
|
||||
|
||||
cfg = config.custom.programs.onlyoffice;
|
||||
in {
|
||||
options.custom.programs.onlyoffice.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [onlyoffice-bin];
|
||||
|
||||
home-manager.users.${config.custom.username} = {
|
||||
home.file.".local/share/applications/onlyoffice-desktopeditors.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=ONLYOFFICE Desktop Editors
|
||||
GenericName=Document Editor
|
||||
Comment=Edit office documents
|
||||
Type=Application
|
||||
Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} %U"
|
||||
Terminal=false
|
||||
Icon=onlyoffice-desktopeditors
|
||||
Keywords=Text;Document;OpenDocument Text;Microsoft Word;Microsoft Works;odt;doc;docx;rtf;
|
||||
Categories=Office;WordProcessor;Spreadsheet;Presentation;
|
||||
MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;text/spreadsheet;application/csv;application/excel;application/x-excel;application/x-msexcel;application/x-ms-excel;text/comma-separated-values;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.slide;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;x-scheme-handler/oo-office;text/docxf;text/oform;
|
||||
Actions=NewDocument;NewSpreadsheet;NewPresentation;NewForm;
|
||||
|
||||
[Desktop Action NewDocument]
|
||||
Name=New document
|
||||
Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} --new:word"
|
||||
|
||||
[Desktop Action NewSpreadsheet]
|
||||
Name=New spreadsheet
|
||||
Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} --new:cell"
|
||||
|
||||
[Desktop Action NewPresentation]
|
||||
Name=New presentation
|
||||
Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} --new:slide"
|
||||
|
||||
[Desktop Action NewForm]
|
||||
Name=New PDF form
|
||||
Exec=${hyprctl} dispatch exec "[group override set; tile] ${onlyoffice-desktopeditors} --new:form"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -180,8 +180,8 @@ in {
|
|||
format-icons = {
|
||||
android = "";
|
||||
dropdown = "";
|
||||
files = "";
|
||||
game = "";
|
||||
hidden = "";
|
||||
music = "";
|
||||
office = "";
|
||||
password = "";
|
||||
|
|
|
@ -66,6 +66,7 @@ in {
|
|||
blackbox-terminal # Terminal
|
||||
cartridges # Game library
|
||||
cinny-desktop # Matrix client
|
||||
clapper # Video player
|
||||
d-spy # D-Bus introspection
|
||||
dconf-editor # GSettings editor
|
||||
decibels # Audio player
|
||||
|
@ -74,6 +75,7 @@ in {
|
|||
drawio # Diagram maker
|
||||
easyeffects # Audio filters
|
||||
element-desktop # Matrix client
|
||||
file-roller # Archive utility
|
||||
flare-signal # Signal client
|
||||
fluffychat # Matrix client
|
||||
footage # Video editor
|
||||
|
@ -113,7 +115,6 @@ in {
|
|||
newsflash # RSS feed
|
||||
nheko # Matrix client
|
||||
obsidian # Knowledge base
|
||||
onlyoffice-bin # Document editor
|
||||
papers # Document viewer
|
||||
path-of-building # Path of Exile planner
|
||||
pika-backup # Borg backup manager
|
||||
|
|
|
@ -4,12 +4,17 @@
|
|||
...
|
||||
}:
|
||||
with lib; let
|
||||
evince = "org.gnome.Evince.desktop";
|
||||
firefox-esr =
|
||||
config.home-manager.users.${config.custom.username}.programs.firefox.package.desktopItem.name;
|
||||
apostrophe = "org.gnome.gitlab.somas.Apostrophe.desktop";
|
||||
clapper = "com.github.rafostar.Clapper.desktop";
|
||||
decibels = "org.gnome.Decibels.desktop";
|
||||
file-roller = "org.gnome.File Roller.desktop";
|
||||
firefox-esr = "firefox-esr.desktop";
|
||||
font-viewer = "org.gnome.font-viewer.desktop";
|
||||
gnome-text-editor = "org.gnome.TextEditor.desktop";
|
||||
loupe = "org.gnome.Loupe.desktop";
|
||||
nautilus = "org.gnome.Nautilus.desktop";
|
||||
onlyoffice = "onlyoffice-desktopeditors.desktop";
|
||||
papers = "org.gnome.Papers.desktop";
|
||||
|
||||
cfg = config.custom.settings.xdg;
|
||||
in {
|
||||
|
@ -34,16 +39,96 @@ in {
|
|||
# https://www.iana.org/assignments/media-types/media-types.xhtml
|
||||
#?? xdg-mime query <default|filetype>
|
||||
defaultApplications = {
|
||||
"application/epub+zip" = papers;
|
||||
"application/gzip" = file-roller;
|
||||
"application/java-archive" = gnome-text-editor;
|
||||
"application/json" = gnome-text-editor;
|
||||
"application/pdf" = evince;
|
||||
"application/xhtml+xml" = gnome-text-editor;
|
||||
"application/octet-stream" = "";
|
||||
"application/pdf" = papers;
|
||||
"application/rtf" = onlyoffice;
|
||||
"application/schema+json" = gnome-text-editor;
|
||||
"application/sql" = gnome-text-editor;
|
||||
"application/toml" = gnome-text-editor;
|
||||
"application/vnd.adobe.flash.movie" = clapper;
|
||||
"application/vnd.ms-excel.sheet.macroEnabled.12" = onlyoffice;
|
||||
"application/vnd.ms-excel" = onlyoffice;
|
||||
"application/vnd.ms-powerpoint" = onlyoffice;
|
||||
"application/vnd.ms-visio.drawing.main+xml" = gnome-text-editor;
|
||||
"application/vnd.oasis.opendocument.formula-template" = onlyoffice;
|
||||
"application/vnd.oasis.opendocument.graphics" = onlyoffice;
|
||||
"application/vnd.oasis.opendocument.spreadsheet" = onlyoffice;
|
||||
"application/vnd.oasis.opendocument.text" = onlyoffice;
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation" = onlyoffice;
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" = onlyoffice;
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = onlyoffice;
|
||||
"application/vnd.sqlite3" = gnome-text-editor;
|
||||
"application/vnd.visio" = gnome-text-editor;
|
||||
"application/x-asar" = gnome-text-editor;
|
||||
"application/x-bat" = gnome-text-editor;
|
||||
"application/x-compressed-tar" = file-roller;
|
||||
"application/x-designer" = gnome-text-editor;
|
||||
"application/x-desktop" = gnome-text-editor;
|
||||
"application/x-etherpeek" = gnome-text-editor;
|
||||
"application/x-font-bdf" = font-viewer;
|
||||
"application/x-font-pcf" = font-viewer;
|
||||
"application/x-gz-font-linux-psf" = font-viewer;
|
||||
"application/x-mobipocket-ebook" = papers;
|
||||
"application/x-mozilla-bookmarks" = gnome-text-editor;
|
||||
"application/x-php" = gnome-text-editor;
|
||||
"application/x-powershell" = gnome-text-editor;
|
||||
"application/x-shellscript" = gnome-text-editor;
|
||||
"application/x-trash" = gnome-text-editor;
|
||||
"application/x-xpinstall" = gnome-text-editor;
|
||||
"application/xhtml_xml" = gnome-text-editor;
|
||||
"application/xhtml+xml" = gnome-text-editor;
|
||||
"application/xml" = gnome-text-editor;
|
||||
"application/yaml" = gnome-text-editor;
|
||||
"application/zip" = file-roller;
|
||||
"audio/midi" = decibels;
|
||||
"audio/mpeg" = decibels;
|
||||
"audio/vnd.wave" = decibels;
|
||||
"audio/x-mod" = gnome-text-editor;
|
||||
"font/ttf" = font-viewer;
|
||||
"font/woff2" = font-viewer;
|
||||
"image/bmp" = loupe;
|
||||
"image/gif" = loupe;
|
||||
"image/heif" = loupe;
|
||||
"image/jpeg" = loupe;
|
||||
"image/png" = loupe;
|
||||
"image/svg+xml" = loupe;
|
||||
"image/tiff" = loupe;
|
||||
"image/vnd.microsoft.icon" = loupe;
|
||||
"image/vnd.zbrush.pcx" = loupe;
|
||||
"image/webp" = loupe;
|
||||
"image/x-tga" = loupe;
|
||||
"image/x-xcf" = loupe;
|
||||
"inode/directory" = nautilus;
|
||||
"text/css" = gnome-text-editor;
|
||||
"text/csv" = gnome-text-editor;
|
||||
"text/html" = gnome-text-editor;
|
||||
"text/javascript" = gnome-text-editor;
|
||||
"text/markdown" = apostrophe;
|
||||
"text/plain" = gnome-text-editor;
|
||||
"text/tab-separated-values" = gnome-text-editor;
|
||||
"text/vnd.trolltech.linguist" = gnome-text-editor;
|
||||
"text/x-changelog" = gnome-text-editor;
|
||||
"text/x-common-lisp" = gnome-text-editor;
|
||||
"text/x-copying" = gnome-text-editor;
|
||||
"text/x-csrc" = gnome-text-editor;
|
||||
"text/x-dbus-service" = gnome-text-editor;
|
||||
"text/x-gettext-translation" = gnome-text-editor;
|
||||
"text/x-go" = gnome-text-editor;
|
||||
"text/x-gradle" = gnome-text-editor;
|
||||
"text/x-java" = gnome-text-editor;
|
||||
"text/x-log" = gnome-text-editor;
|
||||
"text/x-makefile" = gnome-text-editor;
|
||||
"text/x-meson" = gnome-text-editor;
|
||||
"text/x-python" = gnome-text-editor;
|
||||
"text/x-readme" = gnome-text-editor;
|
||||
"text/x-rst" = gnome-text-editor;
|
||||
"text/x-scss" = gnome-text-editor;
|
||||
"video/mp4" = clapper;
|
||||
"video/x-matroska" = clapper;
|
||||
"x-scheme-handler/http" = firefox-esr;
|
||||
"x-scheme-handler/https" = firefox-esr;
|
||||
};
|
||||
|
@ -56,9 +141,7 @@ in {
|
|||
templates = "/home/${config.custom.username}/SYNC/linux/config/templates";
|
||||
|
||||
extraConfig = {
|
||||
XDG_SCREENSHOTS_DIR = "${
|
||||
config.home-manager.users.${config.custom.username}.xdg.userDirs.pictures
|
||||
}/Screenshots";
|
||||
XDG_SCREENSHOTS_DIR = "${config.home-manager.users.${config.custom.username}.xdg.userDirs.pictures}/Screenshots";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue