Compare commits
3 commits
cc39076825
...
88767dd191
Author | SHA1 | Date | |
---|---|---|---|
88767dd191 | |||
a4d7b69f76 | |||
b033291384 |
12 changed files with 106 additions and 75 deletions
|
@ -1,26 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
modes="std
|
||||
single
|
||||
single-sec
|
||||
modes="monitor-std
|
||||
monitor-single
|
||||
monitor-single-sec
|
||||
monitor-fhd
|
||||
zellij"
|
||||
|
||||
portalo_mode_std () {
|
||||
echo "Loading portalo standard screen layout"
|
||||
portalo_mode_monitor () {
|
||||
echo "Loading portalo monitor layout ${1:-std}"
|
||||
yadm config --unset-all local.class monitor-single
|
||||
yadm config --unset-all local.class monitor-single-sec
|
||||
}
|
||||
yadm config --unset-all local.class monitor-fhd
|
||||
|
||||
portalo_mode_single () {
|
||||
echo "Loading portalo single screen layout"
|
||||
yadm config --unset-all local.class monitor-single-sec
|
||||
yadm config --add local.class monitor-single
|
||||
}
|
||||
|
||||
portalo_mode_single_sec () {
|
||||
echo "Loading portalo single screen layout on secondary screen"
|
||||
yadm config --unset-all local.class monitor-single
|
||||
yadm config --add local.class monitor-single-sec
|
||||
if [ -n "$1" ]; then
|
||||
yadm config --add local.class "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
portalo_mode_zellij () {
|
||||
|
@ -39,9 +33,10 @@ else
|
|||
fi
|
||||
|
||||
case $mode in
|
||||
"std") portalo_mode_std ;;
|
||||
"single") portalo_mode_single ;;
|
||||
"single-sec") portalo_mode_single_sec ;;
|
||||
"monitor-std") portalo_mode_monitor ;;
|
||||
"monitor-single") portalo_mode_monitor "$mode" ;;
|
||||
"monitor-single-sec") portalo_mode_monitor "$mode" ;;
|
||||
"monitor-fhd") portalo_mode_monitor "$mode" ;;
|
||||
"zellij") portalo_mode_zellij ;;
|
||||
*) echo "'$mode' is not a valid mode (single, std)" ;;
|
||||
esac
|
||||
|
|
|
@ -42,8 +42,8 @@ start_audio_pipewire () {
|
|||
|
||||
sleep 1
|
||||
|
||||
pw-link 'default-sink:monitor_FL' 'alsa_output.usb-BEHRINGER_UMC202HD_192k-00.HiFi__hw_U192k__sink:playback_FL'
|
||||
pw-link 'default-sink:monitor_FR' 'alsa_output.usb-BEHRINGER_UMC202HD_192k-00.HiFi__hw_U192k__sink:playback_FR'
|
||||
pw-link 'default-sink:monitor_FL' "$AUDIO_DEVICE:playback_FL"
|
||||
pw-link 'default-sink:monitor_FR' "$AUDIO_DEVICE:playback_FR"
|
||||
|
||||
pw-link 'default-sink:monitor_FL' 'alsa_output.pci-0000_00_1f.3.analog-stereo:playback_FL'
|
||||
pw-link 'default-sink:monitor_FR' 'alsa_output.pci-0000_00_1f.3.analog-stereo:playback_FR'
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
export AUDIO_DEVICE=""
|
||||
export AUTOSTART_DISPLAY=""
|
||||
|
||||
export MONITOR_PRIMARY="primary"
|
||||
export MONITOR_SECONDARY="secondary"
|
||||
|
||||
export BROWSER_CHROMIUM="chromium"
|
||||
|
||||
export DUNST_MONITOR="0"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
export AUDIO_DEVICE="alsa_output.usb-BEHRINGER_UMC202HD_192k-00.HiFi__Line1__sink"
|
||||
export AUTOSTART_DISPLAY="Hyprland"
|
||||
|
||||
export KDE_CONNECT_DEVICE="Fairphone3"
|
||||
|
@ -7,4 +8,6 @@ export KDE_CONNECT_DEVICE="Fairphone3"
|
|||
export MONITOR_PRIMARY="DP-1"
|
||||
export MONITOR_SECONDARY="HDMI-A-1"
|
||||
|
||||
export BROWSER_CHROMIUM="brave"
|
||||
|
||||
export DUNST_MONITOR="$MONITOR_SECONDARY"
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
$mon1 = DP-1
|
||||
$mon2 = HDMI-A-1
|
||||
|
||||
monitor = $mon1,1920x1080@144,1920x0,auto
|
||||
monitor = $mon2,1920x1080@60,0x0,auto
|
||||
|
||||
source = ~/.config/hypr/lib/7_3_ws_layout.conf
|
|
@ -1,28 +1,7 @@
|
|||
$mon1 = DP-1
|
||||
$mon2 = HDMI-A-1
|
||||
|
||||
workspace=$ws01, monitor:$mon1, default:true
|
||||
workspace=$ws02, monitor:$mon1
|
||||
workspace=$ws03, monitor:$mon1
|
||||
workspace=$ws04, monitor:$mon1
|
||||
workspace=$ws05, monitor:$mon1
|
||||
workspace=$ws06, monitor:$mon1
|
||||
workspace=$ws07, monitor:$mon1
|
||||
|
||||
workspace=$ws08, monitor:$mon2
|
||||
workspace=$ws09, monitor:$mon2, default:true
|
||||
workspace=$ws10, monitor:$mon2
|
||||
|
||||
monitor = $mon1,2560x1440@144,1920x0,auto
|
||||
monitor = $mon2,1920x1080@60,0x0,auto
|
||||
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws01 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws02 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws03 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws04 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws05 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws06 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws07 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws08 $mon2
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws09 $mon2
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws10 $mon2
|
||||
source = ~/.config/hypr/lib/7_3_ws_layout.conf
|
||||
|
|
22
.config/hypr/lib/7_3_ws_layout.conf
Normal file
22
.config/hypr/lib/7_3_ws_layout.conf
Normal file
|
@ -0,0 +1,22 @@
|
|||
workspace=$ws01, monitor:$mon1, default:true
|
||||
workspace=$ws02, monitor:$mon1
|
||||
workspace=$ws03, monitor:$mon1
|
||||
workspace=$ws04, monitor:$mon1
|
||||
workspace=$ws05, monitor:$mon1
|
||||
workspace=$ws06, monitor:$mon1
|
||||
workspace=$ws07, monitor:$mon1
|
||||
|
||||
workspace=$ws08, monitor:$mon2
|
||||
workspace=$ws09, monitor:$mon2, default:true
|
||||
workspace=$ws10, monitor:$mon2
|
||||
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws01 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws02 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws03 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws04 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws05 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws06 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws07 $mon1
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws08 $mon2
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws09 $mon2
|
||||
exec = hyprctl dispatch moveworkspacetomonitor $ws10 $mon2
|
|
@ -1,6 +1,7 @@
|
|||
# Layer rules
|
||||
|
||||
layerrule = noanim, menu
|
||||
layerrule = noanim, notifications
|
||||
|
||||
|
||||
# Workspace rules
|
||||
|
@ -11,6 +12,7 @@ windowrulev2 = workspace $ws_web, class:(firefox)
|
|||
windowrulev2 = workspace $ws_focus, class:^(jetbrains-)
|
||||
|
||||
windowrulev2 = workspace $ws_media, class:([cC]hromium)
|
||||
windowrulev2 = workspace $ws_media, class:(Brave-browser)
|
||||
windowrulev2 = workspace $ws_media, class:(FreeTube)
|
||||
windowrulev2 = workspace $ws_media, class:(qutebrowser-kiosk)
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ dwindle {
|
|||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_is_master = true
|
||||
new_status = master
|
||||
mfact = 0.5
|
||||
|
||||
no_gaps_when_only = yes
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
@awesome.me:registry=https://npm.fontawesome.com/
|
||||
@fortawesome:registry=https://npm.fontawesome.com/
|
||||
@fontawesome:registry=https://git.serguzim.me/api/packages/fontawesome/npm/
|
||||
//npm.fontawesome.com/:_authToken=${FONTAWESOME_NPM_AUTH_TOKEN}
|
||||
//git.serguzim.me/api/packages/fontawesome/npm/:_authToken=${FORGEJO_TOKEN}
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
import os
|
||||
|
||||
def init(c):
|
||||
c.unbind('d') # I prefer ctrl+w to close tabs. I hit d by mistake too often.
|
||||
|
||||
c.bind(',v', 'spawn io.freetubeapp.FreeTube {url}')
|
||||
c.bind(',V', 'hint links spawn io.freetubeapp.FreeTube {hint-url}')
|
||||
|
||||
# external
|
||||
c.bind(',eb', 'spawn chromium {url}')
|
||||
c.bind(',eB', 'hint links spawn chromium {hint-url}')
|
||||
browser_chromium = os.getenv('BROWSER_CHROMIUM', 'chromium')
|
||||
c.bind(',eb', f'spawn {browser_chromium} {{url}}')
|
||||
c.bind(',eB', f'hint links spawn {browser_chromium} {{hint-url}}')
|
||||
c.bind(',ef', 'spawn firefox {url}')
|
||||
c.bind(',eF', 'hint links spawn firefox {hint-url}')
|
||||
c.bind(',es', 'spawn xdg-open steam://openurl/{url}')
|
||||
c.bind(',ep', 'spawn kdeconnect-cli -n Fairphone3 --share {url}')
|
||||
c.bind(',et', 'spawn ts-control message {url}')
|
||||
c.bind(',eT', 'hint links spawn ts-control message {hint-url}')
|
||||
|
||||
|
||||
c.bind(',g', 'open {url:scheme}://github1s.com{url:path}{url:query}')
|
||||
|
@ -16,12 +23,11 @@ def init(c):
|
|||
c.bind(',rt', 'open {url:scheme}://teddit.net{url:path}{url:query}')
|
||||
|
||||
gpg_key = '723B78C0BF8D8C721D2C4EEF41E544A54E2533B2'
|
||||
|
||||
c.bind(',p', 'spawn --userscript qutebrowser-keepassxc --key ' + gpg_key, mode='normal')
|
||||
c.bind(',Pu', 'spawn --userscript qutebrowser-keepassxc --only-username --key ' + gpg_key, mode='normal')
|
||||
c.bind(',Pi', 'spawn --userscript qutebrowser-keepassxc --only-password --key ' + gpg_key, mode='normal')
|
||||
c.bind(',Po', 'spawn --userscript qutebrowser-keepassxc --only-otp --key ' + gpg_key, mode='normal')
|
||||
c.bind(',Pp', 'spawn --userscript qutebrowser-keepassxc --autotype --key ' + gpg_key, mode='normal')
|
||||
c.bind(',p', f'spawn --userscript qutebrowser-keepassxc --key {gpg_key}', mode='normal')
|
||||
c.bind(',Pu', f'spawn --userscript qutebrowser-keepassxc --only-username --key {gpg_key}', mode='normal')
|
||||
c.bind(',Pi', f'spawn --userscript qutebrowser-keepassxc --only-password --key {gpg_key}', mode='normal')
|
||||
c.bind(',Po', f'spawn --userscript qutebrowser-keepassxc --only-otp --key {gpg_key}', mode='normal')
|
||||
c.bind(',Pp', f'spawn --userscript qutebrowser-keepassxc --autotype --key {gpg_key}', mode='normal')
|
||||
|
||||
# output
|
||||
c.bind(',oq', 'spawn --userscript qr {url}')
|
||||
|
|
|
@ -5,7 +5,7 @@ import urllib.request
|
|||
linkwarden_url = os.environ.get('LINKWARDEN_URL')
|
||||
linkwarden_token = os.environ.get('LINKWARDEN_TOKEN')
|
||||
|
||||
def get_links(cursor):
|
||||
def get_links_part(cursor):
|
||||
request = urllib.request.Request(linkwarden_url + "/api/v1/links?sort=0&cursor=" + str(cursor), headers={
|
||||
'Authorization': 'Bearer ' + linkwarden_token
|
||||
})
|
||||
|
@ -15,22 +15,20 @@ def get_links(cursor):
|
|||
data = ' '.join(data.split())
|
||||
return json.loads(data).get("response", [])
|
||||
|
||||
def init():
|
||||
if linkwarden_url is None or linkwarden_token is None:
|
||||
return
|
||||
|
||||
links = []
|
||||
def get_links():
|
||||
cursor = 0
|
||||
links = []
|
||||
|
||||
while True:
|
||||
new_links = get_links(cursor)
|
||||
new_links = get_links_part(cursor)
|
||||
links += new_links
|
||||
if len(new_links):
|
||||
cursor = new_links[-1]["id"]
|
||||
else:
|
||||
break
|
||||
return links
|
||||
|
||||
with open(os.path.expanduser("~/.config/qutebrowser/bookmarks/urls"), "w+") as f:
|
||||
def format_links(links):
|
||||
formatted_links = []
|
||||
for link in links:
|
||||
url = link.get("url")
|
||||
if not url:
|
||||
|
@ -40,8 +38,21 @@ def init():
|
|||
if not title:
|
||||
title = link.get("description")
|
||||
if not title:
|
||||
title = ""
|
||||
title = "<untitled>"
|
||||
|
||||
f.write(url + " " + title + "\n")
|
||||
collection = link.get("collection", {}).get("name")
|
||||
if not collection:
|
||||
collection = "<uncategorized>"
|
||||
|
||||
formatted_links.append(f"{url} {collection}/{title}")
|
||||
return formatted_links
|
||||
|
||||
def init():
|
||||
if linkwarden_url is None or linkwarden_token is None:
|
||||
return
|
||||
|
||||
links = format_links(get_links())
|
||||
|
||||
with open(os.path.expanduser("~/.config/qutebrowser/bookmarks/urls"), "w+") as f:
|
||||
f.write("\n".join(links))
|
||||
f.close()
|
||||
|
|
Loading…
Reference in a new issue