From 496e0f19a0e1da3ba738740ea931ce48548687a1 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Thu, 28 Mar 2019 20:40:26 -0400 Subject: [PATCH] sway configs --- files/.config/sway/config | 35 +++++++++++++++++++++++++---------- files/.profile | 5 ++++- files/.xprofile | 1 - files/.zshrc | 15 ++++++++++++--- 4 files changed, 41 insertions(+), 15 deletions(-) diff --git a/files/.config/sway/config b/files/.config/sway/config index e838ee5..f61abb3 100644 --- a/files/.config/sway/config +++ b/files/.config/sway/config @@ -20,16 +20,19 @@ client.background $bg set $font Hack Nerd Font font pango:$font 8 -set $ws1 "1: 1 " -set $ws2 "2: 2 " -set $ws3 "3: 3 " -set $ws4 "4: 4 " -set $ws5 "5: 5 " -set $ws6 "6: 6 " -set $ws7 "7: 7 " -set $ws8 "8: 8 " -set $ws9 "9: 9 " -set $ws10 "10: 10 " +set $ws1 "1:[1]" +set $ws2 "2:[2]" +set $ws3 "3:[3]" +set $ws4 "4:[4]" +set $ws5 "5:[5]" +set $ws6 "6:[6]" +set $ws7 "7:[7]" +set $ws8 "8:[8]" +set $ws9 "9:[9]" +set $ws10 "10:[10]" + +# default workspace +workspace "2:[2]" # window title #for_window [class="^.*"] border pixel 2 title_format " %title" @@ -214,6 +217,17 @@ bindsym $mod+Pause exec lock # suspend bindsym $mod+Shift+Pause exec systemctl suspend +# function keys +bindsym XF86MonBrightnessUp exec brightness-control up +bindsym XF86MonBrightnessDown exec brightness-control down +bindsym XF86AudioMute exec volume-control mute +bindsym XF86AudioRaiseVolume exec volume-control up +bindsym XF86AudioLowerVolume exec volume-control down +bindsym Shift+Print exec sshot --pin +bindsym Control+Print exec sshot --partial +bindsym Alt+Print exec sshot --window +bindsym Print exec sshot + # resize window (you can also use the mouse for that) mode "resize" { # These bindings trigger as soon as you enter the resize mode @@ -242,6 +256,7 @@ bindsym $mod+r mode "resize" ### Startup # reach systemd target +#exec /bin/systemctl --user import-environment WAYLAND_DISPLAY exec /bin/systemctl --user import-environment exec /bin/systemctl --user start user-graphical-login.target diff --git a/files/.profile b/files/.profile index 5d77c74..66370fa 100644 --- a/files/.profile +++ b/files/.profile @@ -22,6 +22,9 @@ export QT_QPA_PLATFORMTHEME=gtk2 export QT_AUTO_SCREEN_SCALE_FACTOR=0 # java -export _JAVA_OPTIONS="-XX:MaxPermSize=128m -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dsun.java2d.opengl=true" +export _JAVA_AWT_WM_NONREPARENTING=1 +export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dsun.java2d.opengl=true" export JAVA_FONTS=/usr/share/fonts/TTF +source ~/.local/profile.d/* + diff --git a/files/.xprofile b/files/.xprofile index 7e72072..84b7b19 100644 --- a/files/.xprofile +++ b/files/.xprofile @@ -29,5 +29,4 @@ feh --bg-fill --no-fehbg /usr/share/pixmaps/wallpaper.png # set screen blanking to 30 minutes xset s 1800 1800 -source ~/.local/profile.d/* diff --git a/files/.zshrc b/files/.zshrc index d400c19..a909a08 100644 --- a/files/.zshrc +++ b/files/.zshrc @@ -1,6 +1,15 @@ -# Autostart Xorg if we are on tty1 -if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then - exec startx +# Autostart sway if we are on tty1 +if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then + export XDG_SESSION_TYPE=wayland + + # SDL + export SDL_VIDEODRIVER=wayland + + # Elementary/EFL + export ECORE_EVAS_ENGINE=wayland_egl + export ELM_ENGINE=wayland_egl + + exec sway fi