diff --git a/README.md b/README.md index 5cf58fb..31e3fb2 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,10 @@ -Sway desktop configuration +Sway sesktop configuration -------------------------- -This repository contain all configurations for my desktop : [sway][l_sway] (and -swaylock, swayidle), [mako][l_mako] and [waybar][l_waybar]. Execute +This repository contain all configuration for my desktop : [sway][l_sway] (and +swaylock, swayidle), [mako][l_mako] and [waybar][l_waybar]. Execute `install.sh` install it properly. -## Launcher - -I use a custom launcher based on fzf with a script taken from -[FlyingWombat][l_won] with some light modifications. - [l_sway]:https://swayvm.org [l_mako]:https://wayland.emersion.fr/mako/ [l_waybar]:https://github.com/Alexays/Waybar -[l_fzf]: https://gitlab.com/FlyingWombat/my-scripts/blob/master/sway-launcher -[l_won]: https://gitlab.com/FlyingWombat/my-scripts/blob/master/sway-launcher diff --git a/bin/launcher.sh b/bin/launcher.sh deleted file mode 100755 index 21ca1cd..0000000 --- a/bin/launcher.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -# terminal application launcher for sway, using fzf -# original command: -# Based on: https://github.com/swaywm/sway/issues/1367 -# bindsym $altkey+space exec termite --name=launcher -e \ -# "bash -c 'compgen -c | sort -u | fzf --no-extended --print-query | \ -# tail -n1 | xargs -r swaymsg -t command exec'" - -HIST_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/sway-launcher-history.txt" -FZF_OPTIONS="--layout=reverse --no-extended --print-query --no-sort" - -# Get shell command list -# This may include the occasional non-executable file -# command_list=$({ IFS=:; ls -H $PATH; } | grep -v '/.*' | sort -u) -command_list=$(find $(echo $PATH | tr ':' ' ') -type f -executable -printf "\n%f") -# read existing command history -if [ -f "$HIST_FILE" ]; then - command_history=$(cat "$HIST_FILE") -else - command_history="" -fi - -# search command list -command_str=$(printf "%s\n" "${command_history}" "${command_list}" | \ - sed -E 's/^[0-9]+ (.+)$/\1/' | \ - fzf $FZF_OPTIONS | \ - tail -n1) || exit 1 - -if [ "$command_str" = "" ]; then - exit 1 -fi -# echo "Command: $command_str" - -# using \E flag from perl regex -test "${command_str#*\\E}" != "$command_str" && echo "command can't contain '\E'" -test "${command_str#*\\E}" != "$command_str" && exit 1 - -# get full line from history (with count number) -hist_line=$(echo "$command_history" | grep -Pe "^[0-9]+ \Q$command_str\E$") -# echo "Hist Line: $hist_line" - -if [ "$hist_line" = "" ]; then - hist_count=1 -else - # Increment usage count - hist_count=$(echo "$hist_line" | sed -E 's/^([0-9]+) .+$/\1/') - hist_count=$((hist_count + 1)) - # delete line, to add updated later - # echo "Hist Before: $command_history" - command_history=$(echo "$command_history" | \ - grep --invert-match -Pe "^[0-9]+ \Q$command_str\E$") - # echo "Hist After: $command_history" -fi - -# update history -update_line="${hist_count} ${command_str}" -printf "%s\n" "${update_line}" "${command_history}" | \ - sort --numeric-sort --reverse > "$HIST_FILE" -# echo "$update_line" - -# execute command -echo "$command_str" -swaymsg -t command exec "$command_str" - diff --git a/conf/gtk-2.0/gtkfilechooser.ini b/conf/gtk-2.0/gtkfilechooser.ini index c522196..b4e0459 100644 --- a/conf/gtk-2.0/gtkfilechooser.ini +++ b/conf/gtk-2.0/gtkfilechooser.ini @@ -2,10 +2,10 @@ LocationMode=filename-entry ShowHidden=false ShowSizeColumn=true -GeometryX=282 -GeometryY=194 -GeometryWidth=876 -GeometryHeight=538 +GeometryX=0 +GeometryY=0 +GeometryWidth=640 +GeometryHeight=516 SortColumn=name SortOrder=descending StartupMode=recent diff --git a/conf/sway/conf.d/morty.config b/conf/sway/conf.d/morty.config index 29675b7..bd5229d 100644 --- a/conf/sway/conf.d/morty.config +++ b/conf/sway/conf.d/morty.config @@ -1,4 +1,3 @@ set $term termite -set $menu exec $term --name=launcher -e launcher.sh - output * bg ~/Documents/ressources/wallpapers/building_cyberpunk.jpg fill + diff --git a/conf/sway/config b/conf/sway/config index 3b29722..f5fd9c3 100644 --- a/conf/sway/config +++ b/conf/sway/config @@ -3,7 +3,7 @@ set $left h set $down j set $up k set $right l - +set $menu rofi -location 0 -show combi ~/.config/i3/rofi.config gaps inner 5 @@ -60,8 +60,6 @@ assign [app_id="^firefox$"] $ws3 assign [class="keepassxc"] $ws3 assign [app_id="org.remmina.*"] $ws5 -for_window [app_id="^launcher$"] floating enable, border none - # switch to workspace bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 diff --git a/conf/sway/i3status.config b/conf/sway/i3status.config new file mode 100644 index 0000000..a37cd44 --- /dev/null +++ b/conf/sway/i3status.config @@ -0,0 +1,76 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# ß +# If the above line is not correctly displayed, fix your editor first! + +general { + output_format = "i3bar" + colors = true + interval = 3 + + color_bad = "#cf6a4c" + color_degraded = "#f9ee98" + color_good = "#8f9d6a" +} + +#order += "disk /" +order += "cpu_usage" +#order += "cpu_temperature 0" +order += "wireless _first_" +order += "battery 0" +order += "volume master" +order += "tztime local" + +wireless _first_ { + format_up = " %essid:%quality" + format_down = " ---" +} + +ethernet _first_ { + # if you use %speed, i3status requires root privileges + format_up = " %ip" + format_down = " ---" +} + +battery 0 { + hide_seconds = true + integer_battery_capacity = true + low_threshold = 15 + threshold_type = "percentage" + format = "%status %percentage %remaining" + status_chr = "" + status_bat = "" + status_full = "" +} + +tztime local { + format = " %a %d %b  %I:%M %p" +} + +disk "/" { + format = "%used/%total" + threshold_type = "percentage" + low_threshold = 10 +} + +cpu_usage { + format = " %usage" +} + +volume master { + format = " %volume" + format_muted = " (%volume)" + device = "default" + mixer = "Master" + mixer_idx = 0 +} + +cpu_temperature 0 { + format = "%degrees°C" + max_threshold = 65 +} + + diff --git a/conf/sway/lock.sh b/conf/sway/lock.sh new file mode 100755 index 0000000..4a63e3b --- /dev/null +++ b/conf/sway/lock.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +swaylock -i ~/Documents/ressources/wallpapers/morty.jpg diff --git a/install.sh b/install.sh index 90c6b9b..ea1c98a 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -required="sway swayidle swaylock waybar fzf" +required="sway swayidle swaylock waybar" BIN_FOLDER="$HOME/.local/bin" printf "Checking required programs :\n"