making things work decent in sway

This commit is contained in:
Chris Cochrun 2021-06-25 13:24:51 -05:00
parent 71151f755f
commit 81a8ca2b4e
11 changed files with 84 additions and 16 deletions

View file

@ -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: 0.80 background_opacity: 1
#selection: #selection:
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"

View file

@ -204,10 +204,11 @@ alias yay "paru"
alias yeet "paru -Rns" alias yeet "paru -Rns"
alias ls "exa -l" alias ls "exa -l"
alias la "exa -la" alias la "exa -la"
alias mpf "mpv --profile=fast"
### Start X at login ### Start X at login
if status is-login if status is-login
if test -z "$DISPLAY" -a "$XDG_VTNR" = 1 if test -z "$DISPLAY" -a "$XDG_VTNR" = 1
exec startx exec startx
end end
end end

View file

@ -3,7 +3,7 @@ vo=gpu
af=scaletempo2 af=scaletempo2
autofit=70% autofit=70%
geometry=50%:50% geometry=50%:50%
input-ipc-server="/tmp/mpvsocket" # input-ipc-server="/tmp/mpvsocket"
hwdec=auto hwdec=auto
rtsp-transport=udp rtsp-transport=udp

View file

@ -48,7 +48,7 @@
:background "#282a36" :background "#282a36"
:color "#e2e4e5") :color "#e2e4e5")
("#container" ("#container"
:grid-template-columns "0px 0px 1.5fr 0px 2fr 0px 1fr 0px") :grid-template-columns "0px 0px 1.5fr 2fr 0.5fr 0px 0.5fr 0px")
("#controls" ("#controls"
:background-color "#282a36" :background-color "#282a36"
:color "#f3f99d" :color "#f3f99d"

View file

@ -1,8 +1,8 @@
[FileDialog] [FileDialog]
history=file:///home/chris/Videos, file:///home/chris, file:///home/chris/Downloads, file:///home/chris/tfc, file:///home/chris/Pictures/Phone/Camera, file:///run/media/chris/LUMIX/DCIM/110_PANA history=file:///home/chris/Downloads, file:///home/chris/Pictures/Phone/Camera
lastVisited=file:///run/media/chris/LUMIX/DCIM/110_PANA lastVisited=file:///home/chris/Downloads
qtVersion=5.15.2 qtVersion=5.15.2
shortcuts=file:, file:///home/chris shortcuts=file:, file:///home/chris
sidebarWidth=116 sidebarWidth=116
treeViewHeader=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x2\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x2L\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\xff\0\0\0\x1\0\0\0\0\0\0\0X\0\0\0\x1\0\0\0\0\0\0\0X\0\0\0\x1\0\0\0\0\0\0\0\x9d\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff) treeViewHeader=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x2\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x2L\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\xff\0\0\0\x1\0\0\0\0\0\0\0X\0\0\0\x1\0\0\0\0\0\0\0X\0\0\0\x1\0\0\0\0\0\0\0\x9d\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff)
viewMode=Detail viewMode=List

View file

@ -10,6 +10,6 @@
configuration { configuration {
font: "VictorMono Nerd Font 28.0"; font: "VictorMono Nerd Font 14.0";
} }
@import "/home/chris/.dotfiles/rofi/launchers-git/blurry.rasi" @import "/home/chris/.dotfiles/rofi/launchers-git/blurry.rasi"

View file

@ -3,7 +3,7 @@
# root=/path/to/root # root=/path/to/root
if [ $(hostname) = "syl" ]; then if [ $(hostname) = "syl" ]; then
style="laptop" style="desktop"
#echo "this is hidpi" #echo "this is hidpi"
else else
style="desktop" style="desktop"

62
scripts/rofipass Executable file
View file

@ -0,0 +1,62 @@
#!/usr/bin/env bash
# Very basic interface for pass using wofi
# Get all password files and create an array
root=~/.password-store
CACHE=~/.local/tmp/pass_wofi
seat=seat0
list_passwords() {
shopt -s nullglob globstar
cd "${root}" || exit
pw_list=(**/*.gpg)
printf '%s\n' "${pw_list[@]%.gpg}" | sort -n
}
prompt='search for passwords...'
SECRET=$(list_passwords | rofi -i -prompt="${prompt}" -dmenu)
# 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="...")
echo $option
case ${option} in
Password )
echo "Test"
wtype $(pass ${SECRET} | head -n 1)
;;
User )
wtype $(pass ${SECRET} | rg user: | awk '{$1 = ""; print $0}')
;;
"User and password" )
wtype $(pass ${SECRET} | rg user: | awk '{$1 = ""; print $0}')
wtype -k TAB
wtype $(pass ${SECRET} | head -n 1)
;;
"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" )
wtype $(pass otp ${SECRET})
;;
esac
# wl-copy -o -s ${seat} ${PASSWD_PASS}

View file

@ -75,7 +75,7 @@ titlebar_border_thickness 1
bindsym $mod+s exec filesearch bindsym $mod+s exec filesearch
#Pass #Pass
bindsym $mod+p exec rofi-pass bindsym $mod+p exec rofipass
# Screenshot # Screenshot
bindsym Print exec grim -g "${slurp}" - | wl-copy bindsym Print exec grim -g "${slurp}" - | wl-copy
@ -129,6 +129,9 @@ titlebar_border_thickness 1
bindsym $mod+8 workspace number 8 bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9 bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10 bindsym $mod+0 workspace number 10
# Switching around workspaces
bindsym $mod+Mod1+l workspace next
bindsym $mod+Mod1+h workspace prev
# Move focused container to workspace # Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1 bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2 bindsym $mod+Shift+2 move container to workspace number 2
@ -221,6 +224,7 @@ bindsym $mod+r mode "resize"
set $mode_launcher Launcher set $mode_launcher Launcher
bindsym $mod+o mode "$mode_launcher" bindsym $mod+o mode "$mode_launcher"
# Clear notifications
bindsym $mod+Ctrl+m exec makoctl dismiss -a bindsym $mod+Ctrl+m exec makoctl dismiss -a
mode "$mode_launcher" { mode "$mode_launcher" {
@ -249,11 +253,12 @@ for_window [app_id="pulsemixer"] floating enable
for_window [app_id="qutebrowser"] move container to workspace number 2 for_window [app_id="qutebrowser"] move container to workspace number 2
for_window [app_id="qutebrowser"] opacity 1 for_window [app_id="qutebrowser"] opacity 1
for_window [app_id="emacs"] opacity 0.95 for_window [app_id="emacs"] opacity 0.95
#for_window [app_id="__focused__"] opacity 1 for_window [app_id="__focused__"] opacity 1
exec emacs --daemon exec emacs --daemon
exec mako exec mako
exec waystart exec waystart
exec export QT_QPA_PLATFORMTHEME="qt5ct"
xwayland enable xwayland enable
include /etc/sway/config.d/* include /etc/sway/config.d/*

View file

@ -1,14 +1,14 @@
{ {
// "layer": "top", // Waybar at top layer // "layer": "top", // Waybar at top layer
"position": "bottom", // Waybar position (top|bottom|left|right) "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 20, // Waybar height (to be removed for auto height) "height": 25, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width // "width": 1280, // Waybar width
// Choose the order of the modules // Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode", "sway/window"], "modules-left": ["sway/workspaces", "sway/mode", "sway/window"],
"modules-center": ["clock"], "modules-center": ["clock"],
"modules-right": ["pulseaudio", "network", "cpu", "memory", "temperature", "battery", "battery#bat2", "tray"], "modules-right": ["pulseaudio", "network", "cpu", "memory", "battery", "battery#bat2", "tray"],
"margin-top": 5, "margin-top": 5,
"margin-bottom": 5, "margin-bottom": 10,
// Modules configuration // Modules configuration
"sway/workspaces": { "sway/workspaces": {
"disable-scroll": true, "disable-scroll": true,

View file

@ -166,7 +166,7 @@ window#waybar.solo {
padding-right: 10px; padding-right: 10px;
border-radius: 20px; border-radius: 20px;
transition: none; transition: none;
color: @base0C; color: @base0E;
background: @backtransparent; background: @backtransparent;
} }