Skip to content

Commit

Permalink
docs: added clip showing close and restart of Obsidian in browser
Browse files Browse the repository at this point in the history
chore: format cleanup
feat: fix menu so you can reopen Obsidian
  • Loading branch information
sytone committed Mar 19, 2022
1 parent c77f984 commit f0aec53
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 39 deletions.
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
.vscode
READMETEMPLATE.md
README.md
LICENSE
LICENSE
.editorconfig
assets
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# trim_trailing_whitespace may cause unintended issues and should not be globally set true
trim_trailing_whitespace = false

[{Dockerfile*,**.yml}]
indent_style = space
indent_size = 2

[{**.sh,root/etc/cont-init.d/**,root/etc/services.d/**}]
indent_style = space
indent_size = 4
17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +25,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
- package-ecosystem: "docker" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'docker' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "daily"
interval: 'daily'
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"docker.languageserver.formatter.ignoreMultilineInstructions": true
}
6 changes: 3 additions & 3 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ the community.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.
40 changes: 20 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@ LABEL org.opencontainers.image.description="Hosted Obsidian instance allowing ac

RUN \
echo "**** install packages ****" && \
# Update and install extra packages.
apt-get update && \
apt-get install -y --no-install-recommends \
# Packages needed to download and extract obsidian.
curl \
libnss3 \
# Install Chrome dependencies.
dbus-x11 \
uuid-runtime && \
# Update and install extra packages.
apt-get update && \
apt-get install -y --no-install-recommends \
# Packages needed to download and extract obsidian.
curl \
libnss3 \
# Install Chrome dependencies.
dbus-x11 \
uuid-runtime && \
echo "**** cleanup ****" && \
apt-get autoclean && \
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*
apt-get autoclean && \
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*

# set version label
ARG OBSIDIAN_VERSION=0.13.31

RUN \
echo "**** download obsidian ****" && \
curl \
https://github.com/obsidianmd/obsidian-releases/releases/download/v$OBSIDIAN_VERSION/Obsidian-$OBSIDIAN_VERSION.AppImage \
-L \
-o obsidian.AppImage
curl \
https://github.com/obsidianmd/obsidian-releases/releases/download/v$OBSIDIAN_VERSION/Obsidian-$OBSIDIAN_VERSION.AppImage \
-L \
-o obsidian.AppImage

RUN \
echo "**** extract obsidian ****" && \
chmod +x /obsidian.AppImage && \
/obsidian.AppImage --appimage-extract
chmod +x /obsidian.AppImage && \
/obsidian.AppImage --appimage-extract

ENV \
CUSTOM_PORT="8080" \
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ docker run -d `
ghcr.io/sytone/obsidian-remote:latest
```

## Reloading Obsidan in the Browser

If you make changes to plugins or do updates that need to have obsidian restarted, instead of having to stop and start the docker container you can just close the Obsidian UI and right click to show the menus and reopen it. Here is a short clip showing how to do it.

![Reloading Obsidian in the Browser](./assets/ReloadExample.gif)

## Setting PUID and PGID

To set PUID and PGID use the follow environment variables on the command line, by default the IDs are 911/911
Expand Down
Binary file added assets/ReloadExample.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion root/defaults/autostart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/squashfs-root/obsidian --no-sandbox --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer
/squashfs-root/obsidian --no-sandbox --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer
6 changes: 3 additions & 3 deletions root/defaults/menu.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="MENU">
<item label="Calibre GUI">
<item label="Obsidian" icon="/squashfs-root/usr/share/icons/hicolor/48x48/apps/obsidian.png">
<action name="Execute">
<command>/squashfs-root/obsidian --no-sandbox </command>
<command>/squashfs-root/obsidian --no-sandbox --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer</command>
</action>
</item>
<item label="xterm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm">
Expand All @@ -15,4 +15,4 @@
<action name="Reconfigure" />
</item>
</menu>
</openbox_menu>
</openbox_menu>
2 changes: 1 addition & 1 deletion root/defaults/startwm.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
/startpulse.sh &
/usr/bin/openbox-session > /dev/null 2>&1
/usr/bin/openbox-session > /dev/null 2>&1
7 changes: 7 additions & 0 deletions root/etc/cont-init.d/56-openboxcopy
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/with-contenv bash

# default file copies first run
[[ ! -f /config/.config/openbox/menu.xml ]] && \
mkdir -p /config/.config/openbox && \
cp /defaults/menu.xml /config/.config/openbox/menu.xml && \
chown -R abc:abc /config/.config

0 comments on commit f0aec53

Please sign in to comment.