yeet xorg, I am using sway now!

This commit is contained in:
vib 2022-09-12 18:58:28 +03:00
parent 917a70e637
commit 82c5588cd2
20 changed files with 558 additions and 760 deletions

View file

@ -1,105 +0,0 @@
dwm.normbgcolor: #23232f
dwm.normbordercolor: #dedeef
dwm.normfgcolor: #bdc3c7
dwm.selfgcolor: #fff0f0
dwm.selbordercolor: #ff578b
dwm.selbgcolor: #60264A
!dwm.borderpx: 3
!dwm.font: SFMono Nerd Font Mono:size=10
*.foreground: #bdc3c7
*.background: #23232f
*.cursor: #bdc3c7
*.color0: #3f3f4f
*.color8: #474756
*.color1: #ff568e
*.color9: #ff568e
*.color2: #64de83
*.color10: #64de83
*.color3: #efff73
*.color11: #efff73
*.color4: #73a9ff
*.color12: #73a9ff
*.color5: #946ff7
*.color13: #946ff7
*.color6: #62c6da
*.color14: #62c6da
*.color7: #dedeef
*.color15: #dedeef
!!!!! Iceberg
!
! special
!*.foreground: #c6c8d1
!*.background: #161821
!*.cursorColor: #c6c8d1
! black
!*.color0: #161821
!*.color8: #6b7089
! red
!*.color1: #e27878
!*.color9: #e98989
! green
!*.color2: #b4be82
!*.color10: #c0ca8e
! yellow
!*.color3: #e2a478
!*.color11: #e9b189
! blue
!*.color4: #84a0c6
!*.color12: #91acd1
! magenta
!*.color5: #a093c7
!*.color13: #ada0d3
! cyan
!*.color6: #89b8c2
!*.color14: #95c4ce
! white
!*.color7: #c6c8d1
!*.color15: #d2d4de
!!!!!!! Ocean Dark
!! special
!*.foreground: #c0c5ce
!*.background: #2b303b
!*.cursorColor: #c0c5ce
!
!! black
!*.color0: #2b303b
!*.color8: #65737e
!
!! red
!*.color1: #bf616a
!*.color9: #bf616a
!
!! green
!*.color2: #a3be8c
!*.color10: #a3be8c
!
!! yellow
!*.color3: #ebcb8b
!*.color11: #ebcb8b
!
!! blue
!*.color4: #8fa1b3
!*.color12: #8fa1b3
!
!! magenta
!*.color5: #b48ead
!*.color13: #b48ead
!
!! cyan
!*.color6: #96b5b4
!*.color14: #96b5b4
!
!! white
!*.color7: #c0c5ce
!*.color15: #eff1f5

9
.bash_profile Normal file
View file

@ -0,0 +1,9 @@
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
[[ -f ~/.profile ]] && . ~/.profile
# If running from tty1 start sway
[ "$(tty)" = "/dev/tty1" ] && exec ~/.config/sway/start.sh

View file

@ -1,41 +0,0 @@
#export vblank_mode=0
#export WINEFSYNC=1
#export STAGING_AUDIO_PERIOD=100000
#export STAGING_AUDIO_DURATION=50000
#java stuff and android dev
export JAVA_HOME='/usr/lib/jvm/java-8-openjdk'
export PATH=$JAVA_HOME/bin:$PATH
export ANDROID_SDK_ROOT='/opt/android-sdk'
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools/
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin/
export PATH=$PATH:$ANDROID_ROOT/emulator
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/
export LUTRIS_ENABLE_PROTON=1
eval $(dbus-launch --sh-syntax --exit-with-x11)
export DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
if [ "$GDMSESSION" = "dwm" ]; then
sxhkd &
if [ -z "$(xdpyinfo | grep VNC)" ]; then
sleep 2 && corectrl &
picom --experimental-backends &
fi
nitrogen --restore &
dunst &
copyq &
slstatus &
/usr/bin/lxqt-policykit-agent &
#gentoo-pipewire-launcher &
fi
#bind Caps Lock to be Ctrl on hold and Esc on simple press
setxkbmap -option 'caps:ctrl_modifier'
xcape -e 'Caps_Lock=Escape'
export VDPAU_DRIVER= radeonsi

View file

@ -1,35 +1,31 @@
# My dotfiles~
### My dotfiles are a hot mess right now (but more and more manageable with every commit)
I made this repo mostly to keep my dotfiles in sync across computers, so yeah...
You can try to grab and use them in their entirety but some things are particular to my computers (display configurations) so it won't work for you.
## I have a repository of these pretty much to share the config among my computers, but why not have it public too
What I use right now (stuff I have to install on a fresh linux install):
------------------------------------------------------------------------
* dwm -- my build is [right here](https://github.com/vibikim/dwm)
* slstatus
* sxhkd
* dunst
* st -- my build is [right here](https://github.com/vibikim/st)
* pcmanfmqt and ranger
* rofi, sometimes dmenu
* neovim
* DOOM emacs
* xreader
* viewnior
* copyq
* flameshot
* nitrogen
* picom
* xfce4-power-manager (if using a laptop)
* nm-applet (again, if using a laptop with wifi)
* **Compositor**: sway (and swaybg, swayidle, swaylock)
* **Bar info**: i3status-rust
* **terminal**: foot
* **Notifications**: dunst
* **File manager**: pcmanfm-qt and ranger
* **Application launcher**: wofi
* **text editor**: neovim
* **"IDE"**: Doom Emacs
* **Clipboard manager**: copyq
* **Web browsers**: Librewolf and ungoogled-chromium
* **Email client and organizer**: Thunderbird
* **Document viewer**: zathura
* **Image viewer**: imv
* **Video player**: MPV
* **Image editing**: Krita
* **Sound management**: pavucontrol-qt
* **Music playing**: MPD and ncmpcpp
* **System monitor**: btop
* **Fonts**: terminus and SFMono
* lxqt-policykit
* pavucontrol
* Librewolf and ungoogled-chromium
* MPD and ncmpcpp (includes `mpd-mpris` and `mpdscribble`)
* lxapperance
* Hack and SFMono fonts, maybe some others idk, I have to sort this out lmao
* **DASH set as /bin/sh** (Arch Linux) (! Some scripts won't run corectly if they are run by bash)
### Some screenshots, yoo
![screenshot1](https://git.vibb.ro/dotfiles/plain/screenshot1.png)
![screenshot2](https://git.vibb.ro/dotfiles/plain/screenshot2.png)

View file

@ -1,99 +0,0 @@
#!/bin/bash
XRANDR=$(which xrandr)
MONITORS=( $( ${XRANDR} | awk '( $2 == "connected" ){ print $1 }' ) )
NUM_MONITORS=${#MONITORS[@]}
TITLES=()
COMMANDS=()
function gen_xrandr_only()
{
selected=$1
cmd="xrandr --output ${MONITORS[$selected]} --auto "
for entry in $(seq 0 $((${NUM_MONITORS}-1)))
do
if [ $selected != $entry ]
then
cmd="$cmd --output ${MONITORS[$entry]} --off"
fi
done
echo $cmd
}
declare -i index=0
TILES[$index]="Cancel"
COMMANDS[$index]="true"
index+=1
for entry in $(seq 0 $((${NUM_MONITORS}-1)))
do
TILES[$index]="Only ${MONITORS[$entry]}"
COMMANDS[$index]=$(gen_xrandr_only $entry)
index+=1
done
##
# Dual screen options
##
for entry_a in $(seq 0 $((${NUM_MONITORS}-1)))
do
for entry_b in $(seq 0 $((${NUM_MONITORS}-1)))
do
if [ $entry_a != $entry_b ]
then
TILES[$index]="Dual Screen ${MONITORS[$entry_a]} -> ${MONITORS[$entry_b]}"
COMMANDS[$index]="xrandr --output ${MONITORS[$entry_a]} --auto \
--output ${MONITORS[$entry_b]} --auto --left-of ${MONITORS[$entry_a]}"
index+=1
fi
done
done
##
# Clone monitors
##
for entry_a in $(seq 0 $((${NUM_MONITORS}-1)))
do
for entry_b in $(seq 0 $((${NUM_MONITORS}-1)))
do
if [ $entry_a != $entry_b ]
then
TILES[$index]="Clone Screen ${MONITORS[$entry_a]} -> ${MONITORS[$entry_b]}"
COMMANDS[$index]="xrandr --output ${MONITORS[$entry_a]} --auto \
--output ${MONITORS[$entry_b]} --auto --same-as ${MONITORS[$entry_a]}"
index+=1
fi
done
done
##
# Generate entries, where first is key.
##
function gen_entries()
{
for a in $(seq 0 $(( ${#TILES[@]} -1 )))
do
echo $a ${TILES[a]}
done
}
# Call menu
SEL=$( gen_entries | rofi -dmenu -p "Monitor Setup:" -a 0 -no-custom | awk '{print $1}' )
# Call xrandr
$( ${COMMANDS[$SEL]} )

View file

@ -1,4 +0,0 @@
#!/bin/sh
pactl list sinks | grep '^[[:space:]]Volume:' | \
head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'

195
foot/foot.ini Normal file
View file

@ -0,0 +1,195 @@
# -*- conf -*-
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
# login-shell=no
# app-id=foot
# title=foot
# locked-title=no
font=terminus:size=10
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
# line-height=<font metrics>
# letter-spacing=0
# horizontal-letter-offset=0
# vertical-letter-offset=0
# underline-offset=<font metrics>
# box-drawings-uses-font-glyphs=no
# dpi-aware=auto
# initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed
# pad=2x2 # optionally append 'center'
# resize-delay-ms=100
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
# bold-text-in-bright=no
# word-delimiters=,│`|:"'()[]{}<>
# selection-target=primary
# workers=<number of logical CPUs>
[environment]
# name=value
[bell]
# urgent=no
# notify=no
# command=
# command-focused=no
[scrollback]
# lines=1000
# multiplier=3.0
# indicator-position=relative
# indicator-format=
[url]
# launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
# protocols=http, https, ftp, ftps, file, gemini, gopher
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
[cursor]
# style=block
# color=<inverse foreground/background>
# blink=no
# beam-thickness=1.5
# underline-thickness=<font underline thickness>
[mouse]
# hide-when-typing=no
# alternate-scroll-mode=yes
[colors]
alpha=0.97
foreground=bdc3c7
background=23232f
# Normal/regular colors (color palette 0-7)
regular0=3f3f4f # black
regular1=ff568e # red
regular2=64de83 # green
regular3=efff73 # yellow
regular4=73a9ff # blue
regular5=946ff7 # magenta
regular6=62c6da # cyan
regular7=dedeef # white
# Bright colors (color palette 8-15)
bright0=474756 # bright black
bright1=ff568e # bright red
bright2=64de83 # bright green
bright3=efff73 # bright yellow
bright4=73a9ff # bright blue
bright5=946ff7 # bright magenta
bright6=62c6da # bright cyan
bright7=dedeef # bright white
## dimmed colors (see foot.ini(5) man page)
# dim0=<not set>
# ...
# dim7=<not-set>
## The remaining 256-color palette
# 16 = <256-color palette #16>
# ...
# 255 = <256-color palette #255>
## Misc colors
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# jump-labels=<regular0> <regular3> # black-on-yellow
# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue
# search-box-no-match=<regular0> <regular1> # black-on-red
# search-box-match=<regular0> <regular3> # black-on-yellow
# urls=<regular3>
[csd]
# preferred=server
# size=26
# font=<primary font>
# color=<foreground color>
# hide-when-typing=no
# border-width=0
# border-color=<csd.color>
# button-width=26
# button-color=<background color>
# button-minimize-color=<regular4>
# button-maximize-color=<regular2>
# button-close-color=<regular1>
[key-bindings]
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# clipboard-copy=Control+Shift+c XF86Copy
# clipboard-paste=Control+Shift+v XF86Paste
# primary-paste=Shift+Insert
# search-start=Control+Shift+r
# font-increase=Control+plus Control+equal Control+KP_Add
# font-decrease=Control+minus Control+KP_Subtract
# font-reset=Control+0 Control+KP_0
# spawn-terminal=Control+Shift+n
# minimize=none
# maximize=none
# fullscreen=none
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-selected=[xargs -r firefox] none
# show-urls-launch=Control+Shift+u
# show-urls-copy=none
# show-urls-persistent=none
# prompt-prev=Control+Shift+z
# prompt-next=Control+Shift+x
# unicode-input=none
# noop=none
[search-bindings]
# cancel=Control+g Control+c Escape
# commit=Return
# find-prev=Control+r
# find-next=Control+s
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
# delete-prev-word=Mod1+BackSpace Control+BackSpace
# delete-next=Delete
# delete-next-word=Mod1+d Control+Delete
# extend-to-word-boundary=Control+w
# extend-to-next-whitespace=Control+Shift+w
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
# primary-paste=Shift+Insert
# unicode-input=none
[url-bindings]
# cancel=Control+g Control+c Control+d Escape
# toggle-url-visible=t
[text-bindings]
# \x03=Mod4+c # Map Super+c -> Ctrl+c
[mouse-bindings]
# selection-override-modifiers=Shift
# primary-paste=BTN_MIDDLE
# select-begin=BTN_LEFT
# select-begin-block=Control+BTN_LEFT
# select-extend=BTN_RIGHT
# select-extend-character-wise=Control+BTN_RIGHT
# select-word=BTN_LEFT-2
# select-word-whitespace=Control+BTN_LEFT-2
# select-row=BTN_LEFT-3
# vim: ft=dosini

28
i3status-rust/config.toml Normal file
View file

@ -0,0 +1,28 @@
theme = "semi-native"
icons = "awesome"
[[block]]
block = "focused_window"
max_width = 50
show_marks = "visible"
[[block]]
block = "cpu"
interval = 1
[[block]]
block = "memory"
format_mem = "{mem_used_percents}({mem_used})"
display_type = "memory"
[[block]]
block = "sound"
on_click="pavucontrol-qt"
[[block]]
block = "time"
interval = 5
format = "%a %d/%m %R"
[block.icons_overrides]
time = ""

View file

@ -23,21 +23,18 @@ read choice
if [ "$choice" = "y" ]
then
gohome .bashrc
gohome .bash_profile
gohome .profile
gohome .xprofile
gohome .Xresources
gohome .doom.d
goconfig dunst
goconfig rofi
goconfig sxhkd
goconfig picom.conf
goconfig foot
goconfig sway
goconfig i3status-rust
goconfig nvim
goconfig ncmpcpp
goconfig lf
gobin bin/dmenukaomoji
gobin bin/toggle
gobin bin/monitor_layout.sh
gobin bin/volcontrol
fi

View file

@ -1,106 +0,0 @@
# ██
# █████ ██████ ██████████ ██████ ██████ ██████ ███████
# ██░░░██ ██░░░░██░░██░░██░░██░██░░░██░░░██░ ██░░░░██░░██░░░██
#░██ ░░ ░██ ░██ ░██ ░██ ░██░██ ░██ ░██ ░██ ░██ ░██ ░██
#░██ ██░██ ░██ ░██ ░██ ░██░██████ ░██ ░██ ░██ ░██ ░██
#░░█████ ░░██████ ███ ░██ ░██░██░░░ ░░██ ░░██████ ███ ░██
# ░░░░░ ░░░░░░ ░░░ ░░ ░░ ░██ ░░ ░░░░░░ ░░░ ░░
# ░░
# ▓▓▓▓▓▓▓▓▓▓
# ░▓ author ▓ xero <x@xero.nu>
# ░▓ code ▓ http://code.xero.nu/dotfiles
# ░▓ mirror ▓ http://git.io/.files
# ░▓▓▓▓▓▓▓▓▓▓
# ░░░░░░░░░░
#█▓▒░ animations
# requires https://github.com/jonaburg/picom
# (These are also the default values)
# transition-length = 150
# transition-pow-x = 0.2
# transition-pow-y = 0.2
# transition-pow-w = 0.2
# transition-pow-h = 0.2
# size-transition = false
#█▓▒░ shadows
wintypes: {
shadow = true;
dnd = { shadow = false; }
dock = { shadow = false; }
popup-menu = { opacity = 1; }
dropdown_menu = { opacity = 1; }
}
shadow = true;
shadow-radius = 20;
shadow-offset-x = -15;
shadow-offset-y = -15;
shadow-opacity = 0.60;
shadow-red = 0.0;
shadow-green = 0.0;
shadow-blue = 0.0;
shadow-exclude = [ "n:e:xfce4-notifyd" ];
shadow-ignore-shaped = true;
#█▓▒░ opacity
opacity-rule = [
"50:class_g = 'PabloDraw'",
"99:class_g = 'viewnoir'"
];
#inactive-opacity = 0.95;
active-opacity = 1;
frame-opacity = 0.95;
inactive-opacity-override = false;
#alpha-step = 0.06;
#█▓▒░ fading
fading = true;
fade-delta = 3;
fade-in-step = 0.03;
fade-out-step = 0.03;
no-fading-openclose = false;
#█▓▒░ blur
blur-background = false;
blur: {
method = "dual_kawase";
#method = "kernel";
strength = 7;
# deviation = 1.0;
# kernel = "11x11gaussian";
background = false;
background-frame = false;
background-fixed = false;
kern = "3x3box";
}
# Exclude conditions for background blur.
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"class_g = 'URxvt'",
"class_g = 'brave' && argb",
#
# prevents picom from blurring the background
# when taking selection screenshot with `main`
# https://github.com/naelstrof/maim/issues/130
"class_g = 'slop'",
"_GTK_FRAME_EXTENTS@:c"
];
#█▓▒░ other
mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
backend = "glx";
# experimental-backends = true;
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
vsync = true;
xrender-sync-fence = true;
unredir-if-possible = true;
dbe = false;
#paint-on-overlay = true;
sw-opti = false;

View file

@ -1,6 +0,0 @@
/** Basic config file **/
configuration {
show-icons: true;
icon-theme: "Papirus";
}

View file

@ -1,246 +0,0 @@
#!/usr/bin/env bash
# This script defines just a mode for rofi instead of being a self-contained
# executable that launches rofi by itself. This makes it more flexible than
# running rofi inside this script as now the user can call rofi as one pleases.
# For instance:
#
# rofi -show powermenu -modi powermenu:./rofi-power-menu
#
# See README.md for more information.
set -e
set -u
# All supported choices
all=(shutdown reboot suspend hibernate logout lockscreen)
# By default, show all (i.e., just copy the array)
show=("${all[@]}")
declare -A texts
texts[lockscreen]="lock screen"
texts[switchuser]="switch user"
texts[logout]="log out"
texts[suspend]="suspend"
texts[hibernate]="hibernate"
texts[reboot]="reboot"
texts[shutdown]="shut down"
declare -A icons
icons[lockscreen]="\uf023"
icons[switchuser]="\uf518"
icons[logout]="\uf842"
icons[suspend]="\uf9b1"
icons[hibernate]="\uf7c9"
icons[reboot]="\ufc07"
icons[shutdown]="\uf011"
icons[cancel]="\u00d7"
declare -A actions
actions[lockscreen]="systemctl lock-session ${XDG_SESSION_ID-}"
#actions[switchuser]="???"
actions[logout]="systemctl terminate-session ${XDG_SESSION_ID-}"
actions[suspend]="systemctl suspend"
actions[hibernate]="systemctl hibernate"
actions[reboot]="systemctl reboot"
actions[shutdown]="systemctl poweroff"
# By default, ask for confirmation for actions that are irreversible
confirmations=(reboot shutdown logout)
# By default, no dry run
dryrun=false
showsymbols=true
function check_valid {
option="$1"
shift 1
for entry in "${@}"
do
if [ -z "${actions[$entry]+x}" ]
then
echo "Invalid choice in $1: $entry" >&2
exit 1
fi
done
}
# Parse command-line options
parsed=$(getopt --options=h --longoptions=help,dry-run,confirm:,choices:,choose:,symbols,no-symbols --name "$0" -- "$@")
if [ $? -ne 0 ]; then
echo 'Terminating...' >&2
exit 1
fi
eval set -- "$parsed"
unset parsed
while true; do
case "$1" in
"-h"|"--help")
echo "rofi-power-menu - a power menu mode for Rofi"
echo
echo "Usage: rofi-power-menu [--choices CHOICES] [--confirm CHOICES]"
echo " [--choose CHOICE] [--dry-run] [--symbols|--no-symbols]"
echo
echo "Use with Rofi in script mode. For instance, to ask for shutdown or reboot:"
echo
echo " rofi -show menu -modi \"menu:rofi-power-menu --choices=shutdown/reboot\""
echo
echo "Available options:"
echo " --dry-run Don't perform the selected action but print it to stderr."
echo " --choices CHOICES Show only the selected choices in the given order. Use / "
echo " as the separator. Available choices are lockscreen, logout,"
echo " suspend, hibernate, reboot and shutdown. By default, all"
echo " available choices are shown."
echo " --confirm CHOICES Require confirmation for the gives choices only. Use / as"
echo " the separator. Available choices are lockscreen, logout,"
echo " suspend, hibernate, reboot and shutdown. By default, only"
echo " irreversible actions logout, reboot and shutdown require"
echo " confirmation."
echo " --choose CHOICE Preselect the given choice and only ask for a confirmation"
echo " (if confirmation is set to be requested). It is strongly"
echo " recommended to combine this option with --confirm=CHOICE"
echo " if the choice wouldn't require confirmation by default."
echo " Available choices are lockscreen, logout, suspend,"
echo " hibernate, reboot and shutdown."
echo " --[no-]symbols Show Unicode symbols or not. Requires a font with support"
echo " for the symbols. Use, for instance, fonts from the"
echo " Nerdfonts collection. By default, they are shown"
echo " -h,--help Show this help text."
exit 0
;;
"--dry-run")
dryrun=true
shift 1
;;
"--confirm")
IFS='/' read -ra confirmations <<< "$2"
check_valid "$1" "${confirmations[@]}"
shift 2
;;
"--choices")
IFS='/' read -ra show <<< "$2"
check_valid "$1" "${show[@]}"
shift 2
;;
"--choose")
# Check that the choice is valid
check_valid "$1" "$2"
selectionID="$2"
shift 2
;;
"--symbols")
showsymbols=true
shift 1
;;
"--no-symbols")
showsymbols=false
shift 1
;;
"--")
shift
break
;;
*)
echo "Internal error" >&2
exit 1
;;
esac
done
# Define the messages after parsing the CLI options so that it is possible to
# configure them in the future.
function write_message {
icon="<span font_size=\"medium\">$1</span>"
text="<span font_size=\"medium\">$2</span>"
if [ "$showsymbols" = "true" ]
then
echo -n "\u200e$icon \u2068$text\u2069"
else
echo -n "$text"
fi
}
function print_selection {
echo -e "$1" | $(read -r -d '' entry; echo "echo $entry")
}
declare -A messages
declare -A confirmationMessages
for entry in "${all[@]}"
do
messages[$entry]=$(write_message "${icons[$entry]}" "${texts[$entry]^}")
done
for entry in "${all[@]}"
do
confirmationMessages[$entry]=$(write_message "${icons[$entry]}" "Yes, ${texts[$entry]}")
done
confirmationMessages[cancel]=$(write_message "${icons[cancel]}" "No, cancel")
if [ $# -gt 0 ]
then
# If arguments given, use those as the selection
selection="${@}"
else
# Otherwise, use the CLI passed choice if given
if [ -n "${selectionID+x}" ]
then
selection="${messages[$selectionID]}"
fi
fi
# Don't allow custom entries
echo -e "\0no-custom\x1ftrue"
# Use markup
echo -e "\0markup-rows\x1ftrue"
if [ -z "${selection+x}" ]
then
echo -e "\0prompt\x1fPower menu"
for entry in "${show[@]}"
do
echo -e "${messages[$entry]}\0icon\x1f${icons[$entry]}"
done
else
for entry in "${show[@]}"
do
if [ "$selection" = "$(print_selection "${messages[$entry]}")" ]
then
# Check if the selected entry is listed in confirmation requirements
for confirmation in "${confirmations[@]}"
do
if [ "$entry" = "$confirmation" ]
then
# Ask for confirmation
echo -e "\0prompt\x1fAre you sure"
echo -e "${confirmationMessages[$entry]}\0icon\x1f${icons[$entry]}"
echo -e "${confirmationMessages[cancel]}\0icon\x1f${icons[cancel]}"
exit 0
fi
done
# If not, then no confirmation is required, so mark confirmed
selection=$(print_selection "${confirmationMessages[$entry]}")
fi
if [ "$selection" = "$(print_selection "${confirmationMessages[$entry]}")" ]
then
if [ $dryrun = true ]
then
# Tell what would have been done
echo "Selected: $entry" >&2
else
# Perform the action
${actions[$entry]}
fi
exit 0
fi
if [ "$selection" = "$(print_selection "${confirmationMessages[cancel]}")" ]
then
# Do nothing
exit 0
fi
done
# The selection didn't match anything, so raise an error
echo "Invalid selection: $selection" >&2
exit 1
fi

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

After

Width:  |  Height:  |  Size: 152 KiB

70
sway/config Normal file
View file

@ -0,0 +1,70 @@
### Variables
#
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term foot
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
set $menu wofi -S run | xargs swaymsg exec --
set $launcher wofi -S drun -I | xargs swaymsg exec --
exec --no-startup-id systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec --no-startup-id dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg ~/Pictures/wallpapers/purple-girl-goo.png fill
output HDMI-A-2 bg ~/Pictures/wallpapers/1659127462058350.jpg fill
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Idle configuration
exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000'
font terminus 8
smart_borders no_gaps
client.focused #F76577 #F76577 #ffffff
client.focused_inactive #707B84 #707B84 #bdc3c7
client.unfocused #454C51 #454C51 #707B84
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position bottom
font terminus, FontAwesome 12
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
#status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
status_command i3status-rs
colors {
statusline #bdc3c7
background #23232ff7
focused_workspace #F8758B #FF5975 #ffffff
inactive_workspace #23232f #23232f #bdc3c7
urgent_workspace #707B84 #707B84 #ffffff
}
}
for_window [shell="xwayland"] title_format "%title [XWayland]"
for_window [app_id="flameshot"] floating enable, fullscreen disable, move absolute position 0 0, border pixel 0
for_window [app_id="copyq"] floating enable, move position pointer
for_window [app_id="pavucontrol"] floating enable
for_window [app_id="galculator"] floating enable
include /etc/sway/config.d/*
include ~/.config/sway/config.d/*

View file

@ -0,0 +1,3 @@
exec corectrl &
exec copyq &
exec /usr/bin/lxqt-policykit-agent &

View file

@ -0,0 +1,17 @@
### Input configuration
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
input type:pointer {
accel_profile flat
pointer_accel -0.15
}

196
sway/config.d/keybinds.conf Normal file
View file

@ -0,0 +1,196 @@
# Relevant variables from main config:
# $mod - Super ; $left - h ; $down - j ; $up - k ; $right - l
# $term foot ; $menu - bemenu command
### Key bindings
#
# Basics:
#
# launch programs
bindsym $mod+Return exec $term
bindsym $mod+Shift+Return exec $term ranger
bindsym $mod+Shift+w exec "$BROWSER"
bindsym $mod+Ctrl+Shift+w exec "$BROWSER2"
bindsym $mod+shift+e exec emacs
bindsym $mod+Shift+v exec pavucontrol-qt
bindsym $mod+Shift+f exec "$FILEMANAGER"
bindsym $mod+Shift+n exec thunderbird
bindsym $mod+Shift+c exec dino
bindsym $mod+Shift+g exec galculator
# Toggle stuff
bindsym $mod+Ctrl+Alt+m exec toggle mpd #(!)The toggle script has custom behaviour for mpd so it also starts `mpd-rpc` and `mpd-mpris`
bindsym $mod+Ctrl+Alt+v exec toggle -s vncserver@:1
bindsym $mod+Ctrl+t exec toggle -su opentabletdriver
bindsym $mod+Ctrl+Alt+b exec toggle -s bluetooth
# Toggle second monitor
bindsym $mod+Ctrl+Alt+p output HDMI-A-2 toggle
# Kill focused window
bindsym $mod+c kill
# Start exec menu
bindsym $mod+Ctrl+d exec $menu
# Start application launcher
bindsym $mod+d exec $launcher
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Alt+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Alt+q exec swaynag -t warning -m 'Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
# Power menu
bindsym $mod+Escape exec swaynag -m "Power" -B 'Shutdown' 'systemctl poweroff' -B 'Reboot' 'systemctl reboot' -Z 'Sleep' 'systemctl suspend'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
# Copy screenshot to clipboard
bindsym Print exec grim - | wl-copy && notify-send "Screenshot taken"
# Select area then screenshot
bindsym Shift+Print exec grim -g "$(slurp)" - | wl-copy
# Take screenshot and open swappy (small screenshot editor and exporter)
bindsym Ctrl+Print exec grim -g "$(slurp)" - | swappy -f -
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 30px
bindsym $down resize grow height 30px
bindsym $up resize shrink height 30px
bindsym $right resize grow width 30px
# Ditto, with arrow keys
bindsym Left resize shrink width 30px
bindsym Down resize grow height 30px
bindsym Up resize shrink height 30px
bindsym Right resize grow width 30px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Turn off all displays (useful on laptops)
bindsym $mod+Alt+c exec killall -SIGUSR1 swayidle
# Volume control
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -2%
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +2%
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
# Media keys
bindsym --locked XF86AudioPlay exec playerctl play-pause
bindsym --locked XF86AudioNext exec playerctl next
bindsym --locked XF86AudioPrev exec playerctl previous
bindsym --locked XF86AudioStop exec playerctl stop
# Brightness control
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
# Dunst
bindsym $mod+Ctrl+Grave exec dunstctl history-pop
bindsym $mod+Ctrl+Space exec dunstctl close-all
bindsym $mod+Ctrl+slash exec dunstctl context

15
sway/start.sh Executable file
View file

@ -0,0 +1,15 @@
#export QT_QPA_PLATFORM="wayland;xcb"
#export GDK_BACKEND="wayland,x11"
export QT_QPA_PLATFORMTHEME=qt5ct
export CLUTTER_BACKEND=wayland
export SDL_VIDEODRIVER=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
export MOZ_ENABLE_WAYLAND=1
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_DESKTOP=sway
export VDPAU_DRIVER= radeonsi
exec dbus-run-session sway

View file

@ -1,121 +0,0 @@
#restart sxhkd
super + alt + x
killall -q sxhkd && sleep 1 && notify-send "sxhkd restarted" && sxhkd &
###
# LAUNCH APPS
###
super + Return
$TERMINAL
super + shift + w
$BROWSER
super + shift + ctrl + w
$BROWSER2
super + shift + m
$TERMINAL -e ncmpcpp
super + shift + v
pavucontrol
super + shift + f
$FILEMANAGER
super + shift + n
thunderbird
super + shift + Return
$TERMINAL -e ranger
super + shift + d
lightcord
super + shift + v
pavucontrol
super + shift + g
galculator
super + shift + o
$TERMINAL -e btop
super + shift + Escape
xfce4-taskmanager
super + shift + e
emacs
super + shift + c
dino
super + shift + x
virt-manager
# Toggle stuff
super + ctrl + alt + s
toggle redshift -l 44:26
super + ctrl + alt + p
toggle picom --experimental-backends
super + ctrl + alt + m
toggle mpd #(!)The toggle script has custom behaviour for mpd so it also starts `mpd-rpc` and `mpd-mpris`
super + ctrl + alt + v
toggle -s vncserver@:1
super + ctrl + alt + t
toggle -su opentabletdriver
super + ctrl + alt + b
toggle -s bluetooth
###
# MISC
###
# ROFI run menu
super + d
rofi -show drun
#dmenu_run
# kaomoji picker lol
ctrl + alt + k
dmenukaomoji
# Turn off all diplays
super + alt + c
sleep 1; xset dpms force off
# dmenu display selector
super + p
monitor_layout.sh
#dmenu wacom area set
#super + w
#~/.config/bspwm/wacom.sh
#Take a screenshot
Print
flameshot gui
shift + Print
sleep 2 && flameshot gui
#Brightness control
XF86MonBrightnessDown
xbacklight -dec 5
XF86MonBrightnessUp
xbacklight -inc 5
#Volume control
XF86Audio{Lower,Raise}Volume
pactl set-sink-volume @DEFAULT_SINK@ {-,+}2%
XF86AudioMute
pactl set-sink-mute @DEFAULT_SINK@ toggle
XF86AudioMicMute
pactl set-source-mute @DEFAULT_SOURCE@ toggle
#Media keys
XF86AudioPlay
playerctl play-pause
XF86Audio{Next,Prev}
playerctl {next,previous}
XF86AudioStop
playerctl stop
# Power options script
super + Escape
rofi -show powermenu -modi powermenu:~/.config/rofi/rofi-power-menu
# Dunst
super + ctrl + grave
dunstctl history-pop
super + ctrl + space
dunstctl close
super + shift + space
dunstctl close-all
super + ctrl + /
dunstclt context