sway and waybar configs for fedora 29

This commit is contained in:
2019-03-18 03:31:32 -03:00
parent 47c7939e51
commit 7c07a971b3
4 changed files with 147 additions and 12 deletions

View File

@@ -23,6 +23,7 @@ alert = #bd2c40
locale = pt_BR.UTF-8 locale = pt_BR.UTF-8
[bar/default] [bar/default]
enable-ipc = true
inherit = bar/general inherit = bar/general
;monitor = ${env:MONITOR:HDMI-1} ;monitor = ${env:MONITOR:HDMI-1}
width = 100% width = 100%
@@ -76,7 +77,7 @@ tray-background = ${colors.background}
;wm-restack = bspwm ;wm-restack = bspwm
wm-restack = i3 wm-restack = i3
;override-redirect = true override-redirect = true
;scroll-up = bspwm-desknext ;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev ;scroll-down = bspwm-deskprev

View File

@@ -19,7 +19,8 @@ set $Right ccedilla
# Your preferred terminal emulator # Your preferred terminal emulator
#set $term urxvt256c-ml #set $term urxvt256c-ml
set $term konsole set $term gnome-terminal
#set $term konsole
# Your preferred application launcher # Your preferred application launcher
set $menu-alt dmenu_run set $menu-alt dmenu_run
@@ -37,9 +38,14 @@ set $menu i3-dmenu-desktop
# This font is widely installed, provides lots of unicode glyphs, right-to-left # This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango). # text rendering and scalability on retina/hidpi displays (thanks to pango).
font pango:DejaVu Sans Mono 10 font pango:DejaVu Sans Mono 9
gaps 20 ### GAPS AND STATUS BAR
#gaps 20
#gaps bottom 40
#exec $HOME/.config/polybar/launch.sh
#for_window [class="Polybar"] sticky enable, floating enable, border none
### SWAY SETUP ### ### SWAY SETUP ###
@@ -60,7 +66,9 @@ output "*" bg ~/src/wallpapers/default.jpg fill
### Input configuration ### Input configuration
# #
input "2:7:SynPS\/2_Synaptics_TouchPad" { #input "2:7:SynPS\/2_Synaptics_TouchPad" {
#input "*" {
input "2:7:SynPS/2_Synaptics_TouchPad" {
dwt enabled dwt enabled
tap enabled tap enabled
scroll_method two_finger scroll_method two_finger
@@ -72,7 +80,12 @@ input "2:7:SynPS\/2_Synaptics_TouchPad" {
# `swaymsg -t get_inputs` # `swaymsg -t get_inputs`
# Read `man 5 sway-input` for more information about this section. # Read `man 5 sway-input` for more information about this section.
#input "*" {
input "1:1:AT_Translated_Set_2_keyboard" {
xkb_layout br,us
xkb_variant abnt2,altgr-intl
xkb_options grp:alt_caps_toggle,compose:menu,eurosign:e,nbsp:level2,nbsp:zwnj3nb4,terminate:ctrl_alt_bksp
}
@@ -120,7 +133,8 @@ bindsym $mod+h split h
bindsym $mod+v split v bindsym $mod+v split v
# enter fullscreen mode for the focused container # enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle #bindsym $mod+f fullscreen toggle
bindsym $mod+f exec /home/renato/.config/sway/fullscreen.sh
# change container layout (stacked, tabbed, toggle split) # change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking bindsym $mod+s layout stacking
@@ -179,7 +193,7 @@ bindsym $mod+Shift+0 move container to workspace $ws10
# reload the configuration file # reload the configuration file
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
#bindsym $mod+Shift+r restart #bindsym $mod+Shift+rmestart
# exit i3 (logs you out of your X session) # exit i3 (logs you out of your X session)
@@ -232,9 +246,9 @@ bindsym $mod+r mode "resize"
# Polybar # Polybar
#status_command $HOME/.config/polybar/launch.sh #status_command $HOME/.config/polybar/launch.sh
#status_command i3status #status_command i3status
status_command waybar
} }
for_window [class="Polybar"] sticky enable, floating enable, border none
include /etc/sway/config.d/* include /etc/sway/config.d/*
@@ -255,12 +269,17 @@ bindsym $mod+z exec $lock
bindsym $mod+Shift+z mode "$mode_exit" bindsym $mod+Shift+z mode "$mode_exit"
# Exit # Exit
# exit i3 (logs you out of your X session)
set $exit "swaynag -t warning -m 'Do you really want to exit your current session? All unsaved work will be lost!' -s 'No! Cancel!' -b 'Yes, exit!' 'swaymsg exit'"
#bindsym $mod+Shift+e mode "$mode_exit" #bindsym $mod+Shift+e mode "$mode_exit"
# exit sway (logs you out of your wayland session) # exit sway (logs you out of your wayland session)
bindsym $mod+Shift+e exit bindsym $mod+Shift+e exec $exit
bindsym $mod+Shift+Escape exit bindsym $mod+Shift+Escape exit
# dmenu # dmenu
bindsym $mod+d exec --no-startup-id $menu bindsym $mod+d exec --no-startup-id $menu
# Move: `Mod+\` Show: `Mod+|` # Move: `Mod+\` Show: `Mod+|`
@@ -291,8 +310,6 @@ mode "$mode_exit" {
bindsym Escape mode "default" bindsym Escape mode "default"
} }
# exit i3 (logs you out of your X session)
#bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# XKBOPTIONS compose key # XKBOPTIONS compose key
exec_always --no-startup-id setxkbmap -option "compose:menu" exec_always --no-startup-id setxkbmap -option "compose:menu"

14
sway/fullscreen.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
flag=$XDG_RUNTIME_DIR/.sway_fullscreen_flag-$XDG_SEAT
# fullscreen -> normal
if [ -f $flag ]; then
polybar-msg cmd show
rm $flag
# normal -> fullscreen
else
polybar-msg cmd hide
touch $flag
fi
swaymsg fullscreen

103
waybar/config.fc29 Normal file
View File

@@ -0,0 +1,103 @@
{
"layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar at the bottom of your screen
// "height": 30, // Waybar height
// "width": 1280, // Waybar width
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode", "custom/spotify"],
"modules-center": ["sway/window"],
"modules-right": ["idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "clock", "tray"],
// Modules configuration
// "sway/workspaces": {
// "disable-scroll": true,
// "all-outputs": true,
// "format": "{name}: {icon}",
// "format-icons": {
// "1": "",
// "2": "",
// "3": "",
// "4": "",
// "5": "",
// "urgent": "",
// "focused": "",
// "default": ""
// }
// },
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
"tooltip-format": "{:%Y-%m-%d | %H:%M}",
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": "{usage}% "
},
"memory": {
"format": "{}% "
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C ",
"format": "{temperatureC}°C "
},
"backlight": {
// "device": "acpi_video1",
"format": "{percent}% {icon}",
"format-icons": ["", ""]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
// "interface": "wlp2s0", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
"format-disconnected": "Disconnected ⚠"
},
"pulseaudio": {
//"scroll-step": 1,
"format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon}",
"format-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
},
"on-click": "pavucontrol"
},
"custom/spotify": {
"format": " {}",
"max-length": 40,
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
}
}