update from local
This commit is contained in:
parent
db6e9e17f6
commit
c364ffe701
|
@ -1,11 +1,12 @@
|
|||
font_family Comic Code NerdFont
|
||||
font_size 18
|
||||
font_size 20
|
||||
|
||||
shell_integration no-cursor
|
||||
|
||||
cursor_shape underline
|
||||
cursor_underline_thickness 7
|
||||
cursor_underline_thickness 5
|
||||
|
||||
window_padding_width 10
|
||||
text_composition_strategy legacy
|
||||
enable_audio_bell false
|
||||
confirm_os_window_close 0
|
||||
|
@ -23,45 +24,30 @@ map alt+7 goto_tab 7
|
|||
map alt+8 goto_tab 8
|
||||
map alt+9 goto_tab 9
|
||||
|
||||
background #0d0e1c
|
||||
foreground #ffffff
|
||||
selection_background #7030af
|
||||
selection_foreground #ffffff
|
||||
url_color #c6daff
|
||||
cursor #ffffff
|
||||
cursor_text_color #0d0e1c
|
||||
background #121212
|
||||
foreground #f5f5f5
|
||||
cursor #b4b4b4
|
||||
selection_background #b4b4b4
|
||||
selection_foreground #f5f5f5
|
||||
|
||||
# Tabs
|
||||
active_tab_background #0d0e1c
|
||||
active_tab_foreground #c6daff
|
||||
inactive_tab_background #4a4f6a
|
||||
inactive_tab_foreground #ffffff
|
||||
#tab_bar_background #2c3045
|
||||
color0 #121212
|
||||
color1 #B14242
|
||||
color2 #D87C4A
|
||||
color3 #E49A44
|
||||
color4 #4A8B8B
|
||||
color5 #a7a7a7
|
||||
color6 #b4b4b4
|
||||
color7 #d5d5d5
|
||||
color8 #949494
|
||||
color9 #B14242
|
||||
color10 #D87C4A
|
||||
color11 #E49A44
|
||||
color12 #4A8B8B
|
||||
color13 #a7a7a7
|
||||
color14 #b4b4b4
|
||||
color15 #d5d5d5
|
||||
|
||||
# Windows
|
||||
active_border_color #79a8ff
|
||||
inactive_border_color #61647a
|
||||
active_border_color #B14242
|
||||
inactive_border_color #949494
|
||||
bell_border_color #D87C4A
|
||||
|
||||
# normal
|
||||
color0 #0d0e1c
|
||||
color1 #ff5f59
|
||||
color2 #44bc44
|
||||
color3 #d0bc00
|
||||
color4 #2fafff
|
||||
color5 #feacd0
|
||||
color6 #00d3d0
|
||||
color7 #ffffff
|
||||
|
||||
# bright
|
||||
color8 #1d2235
|
||||
color9 #ff5f5f
|
||||
color10 #44df44
|
||||
color11 #efef00
|
||||
color12 #338fff
|
||||
color13 #ff66ff
|
||||
color14 #00eff0
|
||||
color15 #989898
|
||||
|
||||
# extended colors
|
||||
color16 #fec43f
|
||||
color17 #ff9f80
|
||||
|
|
|
@ -7,4 +7,4 @@ hostname=$(hostname)
|
|||
volume=$(pamixer --get-volume)
|
||||
|
||||
# => Friday, Mar 05 | 03:47 PM
|
||||
echo "$user@$hostname | $volume% | | $date | $time"
|
||||
echo "$user@$hostname | $volume% | $date | $time"
|
||||
|
|
|
@ -17,9 +17,33 @@ exec dunst
|
|||
default_border pixel 5
|
||||
gaps inner 5
|
||||
|
||||
client.focused #0d0e1c #0d0e1c #ffffff #0d0e1c
|
||||
client.focused_inactive #2b3045 #2b3045 #ffffff #2b3045
|
||||
client.unfocused #2b3045 #2b3045 #ffffff #2b3045
|
||||
set $bg #121212
|
||||
set $fg #f5f5f5
|
||||
|
||||
set $c0 #121212
|
||||
set $c1 #B14242
|
||||
set $c2 #D87C4A
|
||||
set $c3 #E49A44
|
||||
set $c4 #4A8B8B
|
||||
set $c5 #a7a7a7
|
||||
set $c6 #b4b4b4
|
||||
set $c7 #d5d5d5
|
||||
set $c8 #949494
|
||||
set $c9 #B14242
|
||||
set $c10 #D87C4A
|
||||
set $c11 #E49A44
|
||||
set $c12 #4A8B8B
|
||||
set $c13 #a7a7a7
|
||||
set $c14 #b4b4b4
|
||||
set $c15 #d5d5d5
|
||||
|
||||
client.focused $c9 $c9 $fg $c9 $c9
|
||||
client.focused_inactive $bg $bg $bg $bg $bg
|
||||
client.unfocused $bg $bg $bg $bg $bg
|
||||
client.placeholder $c9 $c9 $fg $c9 $c9
|
||||
client.background $c9
|
||||
client.urgent $c11 $c11 $fg $c11 $c11
|
||||
|
||||
|
||||
# Wallpaper & Display/DPI
|
||||
output * bg /home/hunterstasonis/.config/sway/bg1.jpg fill
|
||||
|
@ -131,11 +155,11 @@ bar {
|
|||
font JetBrains Mono 12
|
||||
|
||||
colors {
|
||||
background #0d0e1c
|
||||
statusline #ffffff
|
||||
background $bg
|
||||
statusline $fg
|
||||
|
||||
focused_workspace #4a4f69 #4a4f69 #f4f4f4
|
||||
inactive_workspace #2b3045 #2b3045 #bfc0c4
|
||||
inactive_workspace $bg $bg $fg
|
||||
focused_workspace $c1 $c1 $fg
|
||||
}
|
||||
|
||||
status_command while ~/.config/sway/bar.sh; do sleep 1; done
|
||||
|
|
163
scripts/sway-screenshot
Executable file
163
scripts/sway-screenshot
Executable file
|
@ -0,0 +1,163 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
AVAILABLE_MODES=(output window region)
|
||||
|
||||
function Help() {
|
||||
cat <<EOF
|
||||
Usage: sway-screenshot [options ..] -m [mode] -- [command]
|
||||
|
||||
sway-screenshot is an utility to easily take screenshot in swaywm using your mouse.
|
||||
|
||||
It allows taking screenshots of windows, regions and monitors which are saved to a folder of your choosing and copied to your clipboard.
|
||||
|
||||
Options:
|
||||
-h, --help show help message
|
||||
-m, --mode one of: output, window, region
|
||||
-o, --output-folder directory in which to save screenshot
|
||||
-f, --filename the file name of the resulting screenshot
|
||||
-d, --debug print debug information
|
||||
-s, --silent don't send notification when screenshot is saved
|
||||
--clipboard-only copy screenshot to clipboard and don't save image in disk
|
||||
-- [command] open screenshot with a command of your choosing. e.g. sway-screenshot -m window -- mirage
|
||||
|
||||
Modes:
|
||||
output take screenshot of an entire monitor
|
||||
window take screenshot of an open window
|
||||
region take screenshot of selected region
|
||||
EOF
|
||||
}
|
||||
|
||||
function Print() {
|
||||
if [ $DEBUG -eq 0 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
1>&2 printf "$@"
|
||||
}
|
||||
|
||||
function send_notification() {
|
||||
if [ $SILENT -eq 1 ]; then
|
||||
return 0
|
||||
fi
|
||||
notify-send "Screenshot saved" \
|
||||
"Image saved in <i>${1}</i> and copied to the clipboard." \
|
||||
-i "${1}"
|
||||
}
|
||||
|
||||
function save_geometry() {
|
||||
Print "Geometry: %s\n" "${1}"
|
||||
|
||||
if [ $CLIPBOARD -eq 0 ]; then
|
||||
mkdir -p "$SAVEDIR"
|
||||
grim -g "${1}" "$SAVE_FULLPATH"
|
||||
local output="$SAVE_FULLPATH"
|
||||
# Trim transparent pixels, in case the window was floating and partially
|
||||
# outside the monitor
|
||||
convert $output -trim +repage $output
|
||||
wl-copy < "$output"
|
||||
send_notification $output
|
||||
[ -z "$COMMAND" ] || {
|
||||
"$COMMAND" "$output"
|
||||
}
|
||||
else
|
||||
wl-copy < <(grim -g "${1}" - | convert - -trim +repage -)
|
||||
fi
|
||||
}
|
||||
|
||||
function begin_grab() {
|
||||
local option=$1
|
||||
case $option in
|
||||
output)
|
||||
local geometry=`grab_output`
|
||||
;;
|
||||
region)
|
||||
local geometry=`grab_region`
|
||||
;;
|
||||
window)
|
||||
local geometry=`grab_window`
|
||||
;;
|
||||
esac
|
||||
save_geometry "${geometry}"
|
||||
}
|
||||
|
||||
function grab_output() {
|
||||
slurp -or
|
||||
}
|
||||
|
||||
function grab_region() {
|
||||
slurp -d
|
||||
}
|
||||
|
||||
function grab_window() {
|
||||
local clients=`swaymsg -t get_tree | jq -r '[.. | ((.nodes? // empty) + (.floating_nodes? // empty))[] | select(.visible and .pid)]'`
|
||||
Print "Clients: %s\n" "$clients"
|
||||
# Generate boxes for each visible window and send that to slurp
|
||||
# through stdin
|
||||
local boxes="$(echo $clients | jq -r '.[] | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height) \(.name)"')"
|
||||
Print "Boxes:\n%s\n" "$boxes"
|
||||
slurp -r <<< "$boxes"
|
||||
}
|
||||
|
||||
function args() {
|
||||
local options=$(getopt -o hf:o:m:ds --long help,filename:,output-folder:,mode:,clipboard-only,debug,silent -- "$@")
|
||||
eval set -- "$options"
|
||||
|
||||
while true; do
|
||||
case "$1" in
|
||||
-h | --help)
|
||||
Help
|
||||
exit
|
||||
;;
|
||||
-o | --output-folder)
|
||||
shift;
|
||||
SAVEDIR=$1
|
||||
;;
|
||||
-f | --filename)
|
||||
shift;
|
||||
FILENAME=$1
|
||||
;;
|
||||
-m | --mode)
|
||||
shift;
|
||||
echo "${AVAILABLE_MODES[@]}" | grep -wq $1
|
||||
OPTION=$1;;
|
||||
--clipboard-only)
|
||||
CLIPBOARD=1
|
||||
;;
|
||||
-d | --debug)
|
||||
DEBUG=1
|
||||
;;
|
||||
-s | --silent)
|
||||
SILENT=1
|
||||
;;
|
||||
--)
|
||||
shift # Skip -- argument
|
||||
COMMAND=${@:2}
|
||||
break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -z $OPTION ]; then
|
||||
Print "A mode is required\n\nAvailable modes are:\n\toutput\n\tregion\n\twindow\n"
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -z $1 ]; then
|
||||
Help
|
||||
exit
|
||||
fi
|
||||
|
||||
CLIPBOARD=0
|
||||
DEBUG=0
|
||||
SILENT=0
|
||||
FILENAME="$(date +'%Y-%m-%d-%H%M%S_sway-screenshot.png')"
|
||||
[ -z "$SWAY_SCREENSHOT_DIR" ] && SAVEDIR=${XDG_PICTURES_DIR:=~} || SAVEDIR=${SWAY_SCREENSHOT_DIR}
|
||||
|
||||
args $0 "$@"
|
||||
|
||||
SAVE_FULLPATH="$SAVEDIR/$FILENAME"
|
||||
[ $CLIPBOARD -eq 0 ] && Print "Saving in: %s\n" "$SAVE_FULLPATH"
|
||||
begin_grab $OPTION
|
Loading…
Reference in a new issue