Compare commits
3 commits
6da8d4336b
...
0b69eff54b
Author | SHA1 | Date | |
---|---|---|---|
0b69eff54b | |||
06f35a4eb9 | |||
876f11177d |
12 changed files with 60 additions and 31 deletions
1
.bin/.e
1
.bin/.e
|
@ -51,6 +51,7 @@ declare -A directory=(
|
||||||
)
|
)
|
||||||
|
|
||||||
declare -A hooks=(
|
declare -A hooks=(
|
||||||
|
["autostart.toml"]="autostart-manage sync"
|
||||||
["qutebrowser"]="qutebrowser :config-source"
|
["qutebrowser"]="qutebrowser :config-source"
|
||||||
["qutebrowser-kiosk"]="qutebrowser-kiosk :config-source" # broken due to qutebrowser-kiosk being an alias
|
["qutebrowser-kiosk"]="qutebrowser-kiosk :config-source" # broken due to qutebrowser-kiosk being an alias
|
||||||
["sway"]="sway reload"
|
["sway"]="sway reload"
|
||||||
|
|
39
.bin/host-mode##hostname.portalo
Executable file
39
.bin/host-mode##hostname.portalo
Executable file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
modes="monitor-std
|
||||||
|
monitor-single
|
||||||
|
monitor-single-sec
|
||||||
|
zellij"
|
||||||
|
|
||||||
|
portalo_mode_monitor () {
|
||||||
|
echo "Loading portalo monitor layout ${1:-std}"
|
||||||
|
yadm config --unset-all local.class monitor-*
|
||||||
|
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
yadm config --add local.class "$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
swaymsg reload
|
||||||
|
}
|
||||||
|
|
||||||
|
portalo_mode_zellij () {
|
||||||
|
layout_dir="$HOME/.config/zellij/layouts"
|
||||||
|
layouts=$(\ls -1 "$layout_dir")
|
||||||
|
layout=$(echo "$layouts" | $DMENU -p "layout")
|
||||||
|
if [ -n "$layout" ]; then
|
||||||
|
$TERMINAL -e zellij --layout="$layout_dir/$layout"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
mode=$(echo "$modes" | $DMENU -p "mode")
|
||||||
|
else
|
||||||
|
mode=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $mode in
|
||||||
|
"monitor-std") portalo_mode_monitor ;;
|
||||||
|
"monitor-"*) portalo_mode_monitor "$mode" ;;
|
||||||
|
"zellij") portalo_mode_zellij ;;
|
||||||
|
*) echo "'$mode' is not a valid mode (single, std)" ;;
|
||||||
|
esac
|
|
@ -1,4 +1,10 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
if [ -x "$(command -v rg)" ]
|
||||||
|
then
|
||||||
|
$EDITOR $(rg -l "$@")
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
$EDITOR $(grep "$@")
|
$EDITOR $(grep "$@")
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
[general]
|
||||||
import = ["~/.config/alacritty/dracula.toml"]
|
import = ["~/.config/alacritty/dracula.toml"]
|
||||||
|
|
||||||
[colors]
|
[colors]
|
||||||
|
|
|
@ -28,7 +28,7 @@ if [ "$hostname" = "portalo" ]; then
|
||||||
xrandr --output "$secondary" --off
|
xrandr --output "$secondary" --off
|
||||||
bspc monitor "$primary" -d web terminal 3 4 5 6 focus side-view voip messenger
|
bspc monitor "$primary" -d web terminal 3 4 5 6 focus side-view voip messenger
|
||||||
else
|
else
|
||||||
xrandr --output "$primary" --mode 2560x1440 --refresh 144
|
xrandr --output "$primary" --mode 1920x1080 --refresh 60
|
||||||
xrandr --output "$secondary" --auto --left-of "$primary"
|
xrandr --output "$secondary" --auto --left-of "$primary"
|
||||||
|
|
||||||
bspc monitor "$primary" -d web terminal 3 4 5 6 focus
|
bspc monitor "$primary" -d web terminal 3 4 5 6 focus
|
||||||
|
@ -108,4 +108,4 @@ bspc rule -a 'Thunderbird:Mail' desktop='messenger' locked='true'
|
||||||
bspc rule -a 'thunderbird-default:Mail' desktop='messenger' locked='true'
|
bspc rule -a 'thunderbird-default:Mail' desktop='messenger' locked='true'
|
||||||
bspc rule -a 'thunderbird' desktop='messenger' locked='true'
|
bspc rule -a 'thunderbird' desktop='messenger' locked='true'
|
||||||
|
|
||||||
autostart-manage run-xorg
|
autostart-manage run-xorg &
|
||||||
|
|
|
@ -5,6 +5,10 @@ export AUTOSTART_DISPLAY="Hyprland"
|
||||||
|
|
||||||
export KDE_CONNECT_DEVICE="Fairphone3"
|
export KDE_CONNECT_DEVICE="Fairphone3"
|
||||||
|
|
||||||
|
# X11
|
||||||
|
#export MONITOR_PRIMARY="DisplayPort-0"
|
||||||
|
#export MONITOR_SECONDARY="HDMI-A-0"
|
||||||
|
# Wayland
|
||||||
export MONITOR_PRIMARY="DP-1"
|
export MONITOR_PRIMARY="DP-1"
|
||||||
export MONITOR_SECONDARY="HDMI-A-1"
|
export MONITOR_SECONDARY="HDMI-A-1"
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
./graphical.nix
|
./graphical.nix
|
||||||
./nvim.nix
|
./nvim.nix
|
||||||
./wayland.nix
|
./wayland.nix
|
||||||
|
./x11.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
[bar/portalo-base]
|
[bar/portalo-base]
|
||||||
inherit = bar/base
|
inherit = bar/base
|
||||||
|
|
||||||
modules-left = bspwm title
|
modules-left = bspwm
|
||||||
modules-right = openweather memory cpu temperature eth check-arch-updates date
|
modules-right = openweather memory cpu temperature eth check-arch-updates date
|
||||||
|
|
||||||
eth-interface = enp0s31f6
|
eth-interface = enp0s31f6
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
[bar/portalo-primary]
|
[bar/portalo-primary]
|
||||||
inherit = bar/portalo-base
|
inherit = bar/portalo-base
|
||||||
|
|
||||||
modules-left = bspwm bsp-layout-primary title
|
modules-left = bspwm bsp-layout-primary
|
||||||
modules-center = player-mpris-simple
|
modules-center = player-mpris-simple
|
||||||
|
|
||||||
monitor = ${env:MONITOR_PRIMARY}
|
monitor = ${env:MONITOR_PRIMARY}
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
[bar/portalo-secondary]
|
[bar/portalo-secondary]
|
||||||
inherit = bar/portalo-base
|
inherit = bar/portalo-base
|
||||||
|
|
||||||
modules-left = bspwm bsp-layout-secondary title
|
modules-left = bspwm bsp-layout-secondary
|
||||||
|
|
||||||
monitor = ${env:MONITOR_SECONDARY}
|
monitor = ${env:MONITOR_SECONDARY}
|
||||||
tray-position = none
|
tray-position = none
|
||||||
|
|
|
@ -29,8 +29,9 @@ def init(c):
|
||||||
'DEFAULT': 'https://duckduckgo.com/?q={}',
|
'DEFAULT': 'https://duckduckgo.com/?q={}',
|
||||||
'ddg': 'https://duckduckgo.com/?q={}',
|
'ddg': 'https://duckduckgo.com/?q={}',
|
||||||
'kagi': 'https://kagi.com/search?q={}',
|
'kagi': 'https://kagi.com/search?q={}',
|
||||||
'lh': 'http://localhost:{}/',
|
'!lh': 'http://localhost:{}/',
|
||||||
'12ft': 'http://12ft.io/proxy?q={}/',
|
'!12ft': 'http://12ft.io/proxy?q={}/',
|
||||||
|
'!osm': 'https://www.openstreetmap.org/search?query={}',
|
||||||
}
|
}
|
||||||
c.url.start_pages = [
|
c.url.start_pages = [
|
||||||
'https://rss.serguzim.me/',
|
'https://rss.serguzim.me/',
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
"cpu",
|
"cpu",
|
||||||
"memory",
|
"memory",
|
||||||
"custom/pacman",
|
"custom/pacman",
|
||||||
"custom/status",
|
|
||||||
"custom/weather",
|
|
||||||
"clock",
|
"clock",
|
||||||
"tray"
|
"tray"
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
result=$(curl https://status.serguzim.net/api/status-page/heartbeat/serguzim-net \
|
|
||||||
| jq '.heartbeatList | to_entries | map(.value | last .status)
|
|
||||||
| [group_by(.)[] | {value: .[0], count: length}] | map({(.value|tostring): .count}) | add')
|
|
||||||
|
|
||||||
up_count=$(echo "$result" | jq '."1" // 0')
|
|
||||||
down_count=$(echo "$result" | jq '."0" // 0')
|
|
||||||
count=$((up_count + down_count))
|
|
||||||
percent=$((up_count * 100 / count))
|
|
||||||
|
|
||||||
tooltip="status.serguzim.net\nUp: $up_count\nDown: $down_count\nTotal: $count\nPercent: $percent%"
|
|
||||||
|
|
||||||
echo "{\"text\": \"$percent%\", \"tooltip\": \"$tooltip\"}"
|
|
|
@ -73,13 +73,5 @@
|
||||||
"format": "{}",
|
"format": "{}",
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
"interval": 1200
|
"interval": 1200
|
||||||
},
|
|
||||||
"custom/status": {
|
|
||||||
"format": " {}",
|
|
||||||
"exec": "~/.config/waybar/custom/status-serguzim-net",
|
|
||||||
"on-click": "xdg-open 'https://status.serguzim.me'",
|
|
||||||
"return-type": "json",
|
|
||||||
"tooltip": true,
|
|
||||||
"interval": 500
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue