make nyxt sleeker
This commit is contained in:
parent
72b6c49e94
commit
c5d884ccb5
|
@ -318,7 +318,7 @@ colors:
|
||||||
#
|
#
|
||||||
# Window opacity as a floating point number from `0.0` to `1.0`.
|
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||||
# The value `0.0` is completely transparent and `1.0` is opaque.
|
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||||
background_opacity: 1.0
|
background_opacity: 0.75
|
||||||
|
|
||||||
#selection:
|
#selection:
|
||||||
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
||||||
|
|
17
fish/functions/sway-getwindowinfo.fish
Normal file
17
fish/functions/sway-getwindowinfo.fish
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
function sway-getwindowinfo
|
||||||
|
slurp -p -f "%x %y" | read x_sel y_sel
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
# TODO: this returns everything when there is only one container open in the workspace
|
||||||
|
# need to fix the logic
|
||||||
|
for rect in (swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x) \(.width) \(.y) \(.height)"')
|
||||||
|
echo $rect | read x1 w y1 h
|
||||||
|
set x2 (math $x1 + $w)
|
||||||
|
set y2 (math $y1 + $h)
|
||||||
|
if test \( $x_sel -ge $x1 \) -a \( $x_sel -le $x2 \)
|
||||||
|
and test \( $y_sel -ge $y1 \) -a \( $y_sel -le $y2 \)
|
||||||
|
#swaymsg --type get_tree | jq ".. | objects | select(.rect.x == $x1 and .rect.y == $y1 and .rect.width == $w and .rect.height == $h) | .id, .name, .pid, .title, .app_id, .marks, .type"
|
||||||
|
swaymsg --type get_tree | jq ".. | objects | select(.rect.x == $x1 and .rect.y == $y1 and .rect.width == $w and .rect.height == $h)"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,3 +10,5 @@
|
||||||
((VISIBLE-IN-STATUS-P NIL)))
|
((VISIBLE-IN-STATUS-P NIL)))
|
||||||
(DEFINE-CONFIGURATION NYXT/WEB-MODE:WEB-MODE
|
(DEFINE-CONFIGURATION NYXT/WEB-MODE:WEB-MODE
|
||||||
((VISIBLE-IN-STATUS-P NIL)))
|
((VISIBLE-IN-STATUS-P NIL)))
|
||||||
|
(DEFINE-CONFIGURATION NYXT/VI-MODE:USER-VI-NORMAL-MODE
|
||||||
|
((VISIBLE-IN-STATUS-P NIL)))
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
"J" 'switch-buffer-previous
|
"J" 'switch-buffer-previous
|
||||||
"b" 'switch-buffer
|
"b" 'switch-buffer
|
||||||
"v" 'hint-mpv
|
"v" 'hint-mpv
|
||||||
"C-v v" 'hint-ytdl
|
"V" 'hint-ytdl
|
||||||
"d" 'delete-current-buffer
|
"d" 'delete-current-buffer
|
||||||
"D" 'delete-buffer
|
"D" 'delete-buffer
|
||||||
"r" 'reload-current-buffer
|
"r" 'reload-current-buffer
|
||||||
|
@ -99,6 +99,12 @@
|
||||||
:search-url "https://search.tfcconnection.org/?q=~a"
|
:search-url "https://search.tfcconnection.org/?q=~a"
|
||||||
:fallback-url "https://search.tfcconnection.org")))))
|
:fallback-url "https://search.tfcconnection.org")))))
|
||||||
|
|
||||||
|
(define-configuration nyxt/vi-mode:vi-normal-mode
|
||||||
|
((visible-in-status-p nil)))
|
||||||
|
|
||||||
|
(define-configuration nyxt/vi-mode:vi-insert-mode
|
||||||
|
((visible-in-status-p nil)))
|
||||||
|
|
||||||
(define-configuration status-buffer
|
(define-configuration status-buffer
|
||||||
((style
|
((style
|
||||||
(str:concat
|
(str:concat
|
||||||
|
@ -176,7 +182,7 @@
|
||||||
'((body
|
'((body
|
||||||
:background-color "#282a36"
|
:background-color "#282a36"
|
||||||
:color "#e2e4e5")
|
:color "#e2e4e5")
|
||||||
("#prompt-area"
|
("#prompt-area-vi"
|
||||||
:background-color "#282a36"
|
:background-color "#282a36"
|
||||||
:color "#57c7ff")
|
:color "#57c7ff")
|
||||||
("#prompt"
|
("#prompt"
|
||||||
|
@ -188,6 +194,10 @@
|
||||||
("#suggestions"
|
("#suggestions"
|
||||||
:background-color "#282a36"
|
:background-color "#282a36"
|
||||||
:color "#e2e4e5")
|
:color "#e2e4e5")
|
||||||
|
(.vi-insert-mode
|
||||||
|
:background-color "#282a36")
|
||||||
|
(.vi-normal-mode
|
||||||
|
:background-color "#282a36")
|
||||||
(.source
|
(.source
|
||||||
:margin-left "5px")
|
:margin-left "5px")
|
||||||
(.source-name
|
(.source-name
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
|
|
||||||
configuration {
|
configuration {
|
||||||
font: "VictorMono Nerd Font 22.0";
|
font: "VictorMono Nerd Font 12.0";
|
||||||
show-icons: false;
|
show-icons: false;
|
||||||
}
|
}
|
||||||
@import "/home/chris/.config/rofi/config.rasi"
|
@import "/home/chris/.config/rofi/config.rasi"
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
# Check to see if nyxt is running
|
# Check to see if nyxt is running
|
||||||
if [ -n $(pgrep -c nyxt) ]; then
|
if pgrep -x nyxt > /dev/null; then
|
||||||
echo running
|
echo running
|
||||||
|
|
||||||
if [ $XDG_SESSION_TYPE = "x11" ]; then
|
if [ $XDG_SESSION_TYPE = "x11" ]; then
|
||||||
|
|
71
scripts/plasma-rofi-rbw.sh
Executable file
71
scripts/plasma-rofi-rbw.sh
Executable file
|
@ -0,0 +1,71 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Very basic interface for rbw using rofi
|
||||||
|
|
||||||
|
if [ $(hostname) = "syl" ]; then
|
||||||
|
style="laptop-rbw"
|
||||||
|
#echo "this is hidpi"
|
||||||
|
else
|
||||||
|
style="desktop-rbw"
|
||||||
|
#echo "this is not hidpi"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get all password files and create an array
|
||||||
|
root=~/.password-store
|
||||||
|
CACHE=~/.local/tmp/pass_rofi
|
||||||
|
seat=seat0
|
||||||
|
|
||||||
|
rbw sync
|
||||||
|
rbw list
|
||||||
|
|
||||||
|
list_passwords() {
|
||||||
|
rbw list
|
||||||
|
}
|
||||||
|
|
||||||
|
passwords=$(rbw list)
|
||||||
|
|
||||||
|
prompt='search for passwords...'
|
||||||
|
SECRET=$(list_passwords | rofi -i -p="${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi)
|
||||||
|
|
||||||
|
# Ask whether pass, user or both are required
|
||||||
|
|
||||||
|
options=("Password" \
|
||||||
|
"User" \
|
||||||
|
"User and password" \
|
||||||
|
"QR-Code" \
|
||||||
|
"OTP")
|
||||||
|
|
||||||
|
option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -width 400 -lines 4 -prompt="..." -theme ~/.config/rofi/launchers-git/$style.rasi)
|
||||||
|
|
||||||
|
echo $option
|
||||||
|
|
||||||
|
case ${option} in
|
||||||
|
Password )
|
||||||
|
echo "${SECRET}"
|
||||||
|
ydotool type $(rbw get "${SECRET}")
|
||||||
|
;;
|
||||||
|
User )
|
||||||
|
ydotool type $(rbw get --full "${SECRET}" | rg Username: | awk '{$1 = ""; print $0}')
|
||||||
|
;;
|
||||||
|
"User and password" )
|
||||||
|
ydotool type $(rbw get --full "${SECRET}" | rg Username: | awk '{$1 = ""; print $0}')
|
||||||
|
ydotool key Tab
|
||||||
|
ydotool type $(rbw get "${SECRET}")
|
||||||
|
;;
|
||||||
|
"QR-Code" )
|
||||||
|
if [[ $SECRET =~ wifi$ ]]; then
|
||||||
|
# Produce a valid wifi QR-code
|
||||||
|
WIFISSID=$(pass get_user ${SECRET})
|
||||||
|
WIFIPASS=$(pass get_pass ${SECRET})
|
||||||
|
WIFIQR="WIFI:T:WPA;S:${WIFISSID};P:${WIFIPASS};;"
|
||||||
|
qrencode -s 8 -o - $WIFIQR | feh --title "pass: QR-WIFI" -
|
||||||
|
else
|
||||||
|
# Only password
|
||||||
|
pass show -q1 ${SECRET}
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"OTP" )
|
||||||
|
ydotool type $(rbw code ${SECRET})
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# wl-copy -o -s ${seat} ${PASSWD_PASS}
|
32
scripts/swayprop
Executable file
32
scripts/swayprop
Executable file
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ALL_NODES='recurse(.nodes[]?, .floating_nodes[]?) | select(.pid and .visible)'
|
||||||
|
WINDOW_NAME='(.app_id // .window_properties.class)'
|
||||||
|
ID_PREFIX='"\(.id):"'
|
||||||
|
WINDOW_PROTOCOL='(if .shell == "xwayland" then "X11" else "wayland" end)'
|
||||||
|
WINDOW_GEOMETRY='(.rect | "\(.x),\(.y) \(.width)x\(.height) ")'
|
||||||
|
WINDOW_PID='(.pid | tostring)'
|
||||||
|
|
||||||
|
# Output format, e.g. "1234 - 12:firefox (wayland)" or "5678 - 17:discord (X11)"
|
||||||
|
FORMAT="$WINDOW_PID + \" - \" + $ID_PREFIX + $WINDOW_NAME + \" (\" + $WINDOW_PROTOCOL + \")\""
|
||||||
|
FILT="$ALL_NODES | $WINDOW_GEOMETRY + $FORMAT"
|
||||||
|
|
||||||
|
function getprop() {
|
||||||
|
typeset -A views
|
||||||
|
local selected
|
||||||
|
|
||||||
|
while read POS GEOM INFO; do
|
||||||
|
views["$POS $GEOM"]="$INFO"
|
||||||
|
done
|
||||||
|
|
||||||
|
selected="$(printf "%s\n" "${!views[@]}" | slurp)"
|
||||||
|
if [[ -n "$selected" ]]; then
|
||||||
|
printf '%s\n' "${views[${selected}]}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ "$1" == "wait" ]]; then
|
||||||
|
swaymsg -t subscribe '["workspace"]' | jq -r ".current | $FILT" | getprop
|
||||||
|
else
|
||||||
|
swaymsg -t get_tree | jq -r "$FILT" | getprop
|
||||||
|
fi
|
16
sway/config
16
sway/config
|
@ -54,10 +54,10 @@ gaps inner 10
|
||||||
|
|
||||||
default_border none
|
default_border none
|
||||||
|
|
||||||
# border_images.focused /home/chris/.config/sway/rounded_and_shadows_custom.png
|
border_images.focused /home/chris/.config/sway/rounded_and_shadows_custom.png
|
||||||
# border_images.focused_inactive /home/chris/.config/sway/rounded_and_shadows_custom.png
|
border_images.focused_inactive /home/chris/.config/sway/rounded_and_shadows_custom.png
|
||||||
# border_images.unfocused /home/chris/.config/sway/rounded_and_shadows_custom.png
|
border_images.unfocused /home/chris/.config/sway/rounded_and_shadows_custom.png
|
||||||
# border_images.urgent /home/chris/.config/sway/rounded_and_shadows_custom.png
|
border_images.urgent /home/chris/.config/sway/rounded_and_shadows_custom.png
|
||||||
|
|
||||||
font pango: VictorMono Nerd Font 10
|
font pango: VictorMono Nerd Font 10
|
||||||
show_marks yes
|
show_marks yes
|
||||||
|
@ -253,6 +253,8 @@ bar {
|
||||||
workspace_buttons yes
|
workspace_buttons yes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
workspace 9 output DP-4
|
||||||
|
workspace 3 output eDP-1
|
||||||
|
|
||||||
for_window [title="org-agenda"] floating enable, move scratchpad
|
for_window [title="org-agenda"] floating enable, move scratchpad
|
||||||
for_window [app_id="mpv"] floating enable
|
for_window [app_id="mpv"] floating enable
|
||||||
|
@ -262,9 +264,13 @@ for_window [app_id="pulsemixer"] floating enable
|
||||||
for_window [app_id="__focused__"] opacity set 1
|
for_window [app_id="__focused__"] opacity set 1
|
||||||
for_window [app_id="qutebrowser"] move container to workspace number 2, opacity set 1
|
for_window [app_id="qutebrowser"] move container to workspace number 2, opacity set 1
|
||||||
for_window [app_id="nyxt"] move container to workspace number 2, opacity set 1
|
for_window [app_id="nyxt"] move container to workspace number 2, opacity set 1
|
||||||
for_window [title="Display Window"] move container to workspace number 9, fullscreen enable, move workspace to output right
|
for_window [title="Display Window"] move window to workspace number 9, fullscreen enable
|
||||||
|
for_window [title="OpenLP"] move window to workspace number 9, floating enable
|
||||||
|
for_window [title="VLC media player"] move window to workspace number 9, fullscreen enable
|
||||||
# for_window [app_id="emacs"] opacity set 0.90
|
# for_window [app_id="emacs"] opacity set 0.90
|
||||||
|
|
||||||
|
focus_follows_mouse no
|
||||||
|
|
||||||
### Locking screen
|
### Locking screen
|
||||||
bindsym $mod+Ctrl+l exec swaylock-blur --blur-sigma 80
|
bindsym $mod+Ctrl+l exec swaylock-blur --blur-sigma 80
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"height": 30, // Waybar height (to be removed for auto height)
|
"height": 30, // Waybar height (to be removed for auto height)
|
||||||
// "width": 1280, // Waybar width
|
// "width": 1280, // Waybar width
|
||||||
// Choose the order of the modules "custom/wintitle",
|
// Choose the order of the modules "custom/wintitle",
|
||||||
"modules-left": ["sway/workspaces", "river/tags", "custom/wintitle", "sway/mode", "sway/window"],
|
"modules-left": ["sway/workspaces", "river/tags", "sway/mode", "sway/window"],
|
||||||
"modules-center": ["clock"],
|
"modules-center": ["clock"],
|
||||||
"modules-right": ["pulseaudio", "network", "memory", "cpu", "battery", "battery#bat2", "tray"],
|
"modules-right": ["pulseaudio", "network", "memory", "cpu", "battery", "battery#bat2", "tray"],
|
||||||
"margin-top": 0,
|
"margin-top": 0,
|
||||||
|
|
Loading…
Reference in a new issue