update startpage

This commit is contained in:
speedie 2023-06-20 15:47:21 +02:00
parent 37911be490
commit 52872fc0b1
6 changed files with 85 additions and 52 deletions

View file

@ -1,39 +1,54 @@
![image](startpage.png?raw=true "image")
# startpage
JS and PHP free minimal startpage with pywal and dynamic wallpaper support.
![image](startpage.png?raw=true "image")
This startpage is meant to be used locally, not hosted on a server, because
that way it's hackable and scriptable, and you are meant to edit the HTML
yourself and modify it to fit your needs.
## Usage with qutebrowser
Clone the repository into ~/.config/qutebrowser and add these two lines to config.py.
config.set('url.start_pages','~/.config/qutebrowser/startpage/index.html')
config.set('url.default_page','~/.config/qutebrowser/startpage/index.html')
```
config.set('url.start_pages','~/.config/qutebrowser/startpage/index.html')
config.set('url.default_page','~/.config/qutebrowser/startpage/index.html')
```
You don't need to edit script-qutebrowser.sh if you're using speedwm as it is default.
You don't need to edit script-qutebrowser.sh if you're using wallpaper-spmenu
as it is set by default.
## Usage with Chromium based browsers
Clone the repository into ~/.config and set the start page (I'll assume you know how to do this on Chromium) and then see 'To copy in the wallpaper'
Clone the repository into ~/.config and set the start page (I'll assume you
know how to do this on Chromium) and then see 'To copy in the wallpaper'
For pywal support in the browser (as a theme), clone https://github.com/metafates/ChromiumPywal into ~/.config/startpage/. See that repo for more information on how to use it.
For pywal support in the browser (as a theme), clone
[ChromiumPywal](https://github.com/metafates/ChromiumPywal) into
~/.config/startpage/. See that repo for more information on how to use it.
## Usage with Firefox based browsers
Clone the repository into ~/.config and set the start page. Again I'm going to assume you know how to do this for Firefox. Now see 'To copy in the wallpaper'
Clone the repository into ~/.config and set the start page. Again I'm going to
assume you know how to do this for Firefox. Now see 'To copy in the wallpaper'
For pywal support in the browser, install https://github.com/frewacom/pywalfox!
For pywal support in the browser, install [pywalfox](https://github.com/frewacom/pywalfox).
## Usage with suckless surf
Clone the repository into ~/.config and make sure surf has the [homepage](https://surf.suckless.org/patches/homepage) patch applied.
Clone the repository into ~/.config and make sure surf has the
[homepage](https://surf.suckless.org/patches/homepage) patch applied.
Change the value of HOMEPAGE in config.h to ~/.config/startpage/index.html. Now see 'To copy in the wallpaper'.
Change the value of HOMEPAGE in config.h to ~/.config/startpage/index.html. Now
see 'To copy in the wallpaper'.
## Usage for other browsers
Clone the repository and edit script-generic.sh and change PREFIX if you aren't using speedwm.
Check the wiki on how to set a start page for your specific browser.
Clone the repository and edit script-generic.sh and change PREFIX if you aren't
using speedwm. Check the wiki on how to set a start page for your specific
browser.
## To copy in the wallpaper
@ -42,13 +57,14 @@ Otherwise find some other method to copy the current wallpaper.
## Pywal
If you're using Pywal, this script also allows you to override font colors with pywal colors.
Simply run the script and make sure Pywal works.
If you're using Pywal, this script also allows you to override font colors with
pywal colors. Simply run the script and make sure Pywal works.
## License
License for the shell script is GNU GPLv3.
License for the HTML and this README is Creative Commons Attribution-ShareAlike 4.0 International.
License for the HTML and this README is Creative Commons Attribution-ShareAlike
4.0 International.
## Credit

3
colors
View file

@ -1,3 +1,6 @@
# Colors used in the HTML page
# Can be edited manually if Pywal isn't used.
LINKCOLOR="#e0ffff"
HEADCOLOR="#ffffff"
PARACOLOR="#bbbbbb"

View file

@ -1,9 +1,18 @@
<!DOCTYPE html>
<!-- startpage - Minimal JS/PHP free startpage with Pywal and wallpaper integration
https://git.speedie.site/speedie/startpage
See README.md for more information.
Licensed under CC-BY-SA.
Code is licensed under GNU GPLv3
!-->
<html>
<head>
<title>home://</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body, html {
height: 100%;
margin: 0;
@ -36,14 +45,14 @@ p {
.image {
/* the image used. this file should be created by speedwm-swal or similar. */
background-image: url("img/wallpaper");
/* blur the page */
filter: blur(8px);
-webkit-filter: blur(8px);
/* height = full image */
height: 100%;
height: 100%;
/* center the image */
background-position: center;
background-repeat: no-repeat;
@ -120,39 +129,42 @@ input[type=search] {
<div class="header">
<h1 style="font-size:50px">home://</h1>
<!-- You can have as many paragraphs in the stack as you want.
To add more stacks, copy paste one of these along with the css and change the class.
Left stack
--!>
<div class="leftstack">
<p>web://</p>
<p><a href="https://searx.org">searx</a></p>
<p><a href="https://piped.kavin.rocks">piped</a></p>
<p><a href="https://discord.com/channels/@me">discord</a></p>
<p><a href="https://gmail.com">gmail</a></p>
<p><a href="https://knaben.eu">knaben</a></p>
<p><a href="https://lulz.com">lulz</a></p>
<p><a href="https://4chan.org/g/">/g/</a></p>
</div>
<div class="midstack">
<p>code://</p>
<p><a href="https://codeberg.org">codeberg</a></p>
<p><a href="https://github.com">github</a></p>
<p><a href="https://codeberg.org/speedie/speedwm">speedwm</a></p>
<p><a href="https://codeberg.org/speedie/iron">iron</a></p>
<p><a href="https://codeberg.org/speedie/fontctrl">fontctrl</a></p>
<p><a href="https://codeberg.org/speedie/dotfiles">dotfiles</a></p>
<p><a href="https://codeberg.org/speedie/scripts">scripts</a></p>
</div>
<div class="rightstack">
<p>wiki://</p>
<p><a href="https://gentoo.org">gentoo home</a></p>
<p><a href="https://packages.gentoo.org">gentoo pkgs</a></p>
<p><a href="https://wiki.gentoo.org">gentoo wiki</a></p>
<p><a href="https://archlinux.org">arch home</a></p>
<p><a href="https://wiki.archlinux.org">arch wiki</a></p>
<p><a href="https://wiki.voidlinux.org/voidlinux_en_all_2021-04/A/Main_Page">void wiki</a></p>
<p><a href="https://voidlinux.org/packages/">void pkgs</a></p>
<p><a href="https://speedie.site">Link 1</a></p>
<p><a href="https://speedie.site">Link 2</a></p>
<p><a href="https://speedie.site">Link 3</a></p>
</div>
<!-- Middle stack --!>
<div class="midstack">
<p>code://</p>
<p><a href="https://speedie.site">Link 4</a></p>
<p><a href="https://speedie.site">Link 5</a></p>
<p><a href="https://speedie.site">Link 6</a></p>
</div>
<!-- Right stack --!>
<div class="rightstack">
<p>wiki://</p>
<p><a href="https://speedie.site">Link 7</a></p>
<p><a href="https://speedie.site">Link 8</a></p>
<p><a href="https://speedie.site">Link 9</a></p>
</div>
<!-- Search - To change the search engine, set action in the <form> !-->
<div class="search">
<form method="POST" action="https://searx.donut.gq/search">
<form method="POST" action="http://localhost:8888/search">
<input type="search" autofocus="" name="q" placeholder="search with searx..." aria-label="" autocomplete="off" value="" accesskey="s">
</form>
</div>

View file

@ -25,7 +25,8 @@ if [ -e "$HOME/.cache/wal/colors" ]; then
BGSXCOLOR="$(sed -n 13,13p $HOME/.cache/wal/colors)"
fi
printf "a {\n color: ${LINKCOLOR};\n}\n" > "$PREFIX/startpage/fontcol.css"
printf "# Not to be edited manually. The scripts will overwrite this file with colors.\n\n" > "$PREFIX/startpage/fontcol.css"
printf "a {\n color: ${LINKCOLOR};\n}\n" >> "$PREFIX/startpage/fontcol.css"
printf "h1 {\n color: ${HEADCOLOR};\n}\n" >> "$PREFIX/startpage/fontcol.css"
printf "p {\n color: ${PARACOLOR};\n}\n" >> "$PREFIX/startpage/fontcol.css"
printf "input[type=search] {\n -webkit-box-shadow: 0 0 0px 1000px ${BGSXCOLOR} inset;\n -webkit-text-fill-color: ${TXSXCOLOR} !important;\n}\n" >> $PREFIX/startpage/fontcol.css

View file

@ -25,7 +25,8 @@ if [ -e "$HOME/.cache/wal/colors" ]; then
BGSXCOLOR="$(sed -n 13,13p $HOME/.cache/wal/colors)"
fi
printf "a {\n color: ${LINKCOLOR};\n}\n" > "$PREFIX/startpage/fontcol.css"
printf "# Not to be edited manually. The scripts will overwrite this file with colors.\n\n" > "$PREFIX/startpage/fontcol.css"
printf "a {\n color: ${LINKCOLOR};\n}\n" >> "$PREFIX/startpage/fontcol.css"
printf "h1 {\n color: ${HEADCOLOR};\n}\n" >> "$PREFIX/startpage/fontcol.css"
printf "p {\n color: ${PARACOLOR};\n}\n" >> "$PREFIX/startpage/fontcol.css"
printf "input[type=search] {\n -webkit-box-shadow: 0 0 0px 1000px ${BGSXCOLOR} inset;\n -webkit-text-fill-color: ${TXSXCOLOR} !important;\n}\n" >> $PREFIX/startpage/fontcol.css

View file

@ -6,8 +6,7 @@ PREFIX="$HOME/.config/qutebrowser" # Prefix
CWAL="$HOME/.config/wallpaper-spmenu/currentwallpaper" # Symlink to the current wallpaper
# Real path for current wallpaper
command -v speedwm-swal > /dev/null && \
IPATH="$(readlink "$CWAL")"
IPATH="$(readlink "$CWAL")"
# Copy current wallpaper to img/wallpaper
if [ -e "$IPATH" ]; then
@ -28,7 +27,8 @@ if [ -e "$HOME/.cache/wal/colors" ]; then
BGSXCOLOR="$(sed -n 13,13p $HOME/.cache/wal/colors)"
fi
printf "a {\n color: ${LINKCOLOR};\n}\n" > "$PREFIX/startpage/fontcol.css"
printf "# Not to be edited manually. The scripts will overwrite this file with colors.\n\n" > "$PREFIX/startpage/fontcol.css"
printf "a {\n color: ${LINKCOLOR};\n}\n" >> "$PREFIX/startpage/fontcol.css"
printf "h1 {\n color: ${HEADCOLOR};\n}\n" >> "$PREFIX/startpage/fontcol.css"
printf "p {\n color: ${PARACOLOR};\n}\n" >> "$PREFIX/startpage/fontcol.css"
printf "input[type=search] {\n -webkit-box-shadow: 0 0 0px 1000px ${BGSXCOLOR} inset;\n -webkit-text-fill-color: ${TXSXCOLOR} !important;\n}\n" >> $PREFIX/startpage/fontcol.css