diff --git a/dot_config/rofi/executable_runrofi.sh b/dot_config/rofi/executable_runrofi.sh index 19a3dfd..d8e6673 100644 --- a/dot_config/rofi/executable_runrofi.sh +++ b/dot_config/rofi/executable_runrofi.sh @@ -1,2 +1,7 @@ -#rofi -show run -rofi -show run -modi "run,drun,ssh,window" -sidebar-mode -show-icons +#rofi -show run +#monitor="$(swaymsg -t get_outputs | jq '[.[].focused] | index(true)')" +#monitor=""$(swaymsg -t get_workspaces | jq -e "map(select(.focused == true).num)[0]-(.|length)" | tr -d "-") +# get the focused monitor - kanshi could mess up the order so we get the monitorname instead +monitor="$(swaymsg -t get_outputs | jq -c '.[] | select(.focused) | select(.id)' | jq -c '.name')" +# show rofi on the focused monitor +rofi -show run -modi "run,drun,ssh,window" -sidebar-mode -show-icons -monitor "$monitor" diff --git a/dot_config/sway/config b/dot_config/sway/config index 44c5e31..77de86e 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -17,7 +17,6 @@ default_border pixel # Font font pango:Hasklig Medium 9 - # https://github.com/Alexays/Waybar/issues/1093#issuecomment-841846291 exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK exec hash dbus-update-activation-environment 2>/dev/null && \ @@ -28,9 +27,22 @@ exec wmname LG3D # https://github.com/emersion/xdg-desktop-portal-wlr/wiki/%22It-doesn't-work%22-Troubleshooting-Checklist #XDG_CURRENT_DESKTOP=sway #MOZ_ENABLE_WAYLAND=1 -exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway -exec systemctl --user stop pipewire xdg-desktop-portal xdg-desktop-portal-wlr -exec systemctl --user start pipewire +exec_always { + dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway + systemctl --user stop pipewire xdg-desktop-portal xdg-desktop-portal-wlr + exec systemctl --user start pipewire +} + +# start kanshi for auto-output management +exec_always { + pkill kanshi + kanshi +} + +# wayland clipboard manager +exec { + wl-paste --watch cliphist store +} ### Idle configuration # @@ -113,36 +125,15 @@ assign [class="Thunderbird"] $ws2 #bindsym $mod+Pause mode $mode_system #bindsym $mod+F12 mode $mode_system -# do a nice menu for keyboard layouts -# TODO convert to wayland, using dconf-editor perhaps? -set $mode_xkbmap "Layout aus bus-intl cus-altgr dgb egb-intl fdvorak" -mode $mode_xkbmap { - bindsym a exec --no-startup-id setxkbmap us, mode "default" - bindsym b exec --no-startup-id setxkbmap us intl, mode "default" - bindsym c exec --no-startup-id setxkbmap us altgr-intl, mode "default" - bindsym d exec --no-startup-id setxkbmap gb, mode "default" - bindsym e exec --no-startup-id setxkbmap gb intl, mode "default" - bindsym f exec --no-startup-id setxkbmap dvorak, mode "default" - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+Ctrl+k mode $mode_xkbmap -# do a nice menu for custom launches -set $mode_launch " adefault start-up bnoise-fix cdual dhorizontal etearing" -mode $mode_launch { - # These are all the default programs launching at startup. - bindsym a exec thunderbird, exec signal-desktop, exec ferdi, exec obsidian mode "default", exec teams --no-sandbox, exec slack - # execute default horizontal layout of monitors - bindsym d exec autorandr horizontal, mode "default" - # this fixes tearing on nvidia - bindsym e exec nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }" - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" +# toggle keyboard layouts with scroll lock +input "type:keyboard" { + xkb_layout us,us + xkb_variant intl, + xkb_options grp:sclk_toggle } -bindsym $mod+F10 mode "$mode_launch" +$bindsym $mod+F9 mode "$mode_keyboard" + ############# # Status Bar @@ -160,7 +151,7 @@ exec --no-startup-id mako # start multi touch support exec --no-startup-id libinput-gestures-setup start # start greenclip, this somehow fails to start at launch (sometimes?) -exec --no-startup-id greenclip daemon>/dev/null +#exec --no-startup-id greenclip daemon>/dev/null # autostart background applications exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 diff --git a/dot_config/sway/keybinding.conf b/dot_config/sway/keybinding.conf index 1cfecfb..9f74a03 100644 --- a/dot_config/sway/keybinding.conf +++ b/dot_config/sway/keybinding.conf @@ -9,10 +9,14 @@ bindsym $mod+Shift+q kill # Launchers bindsym $mod+d exec ~/.config/rofi/runrofi.sh #bindsym $mod+Shift+d exec "albert show" -bindsym $mod+c exec rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}' +#this is the i3 manager +#bindsym $mod+C exec rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}' +bindsym $mod+C exec ~/.config/rofi/runcliphist.sh +# # Screenshot -bindsym --release Print exec ~/.config/i3/screenshot.sh +#bindsym --release Print exec grim -g "$(slurp)" "/home/joachim/pictures/screenshots/$(date +'%s_grim.png')" +bindsym --release Print exec ~/scripts/grim.screenshot.sh # Custom 'help' screen # bindsym $mod+F1 exec $term -e chezmoi edit ~/.dotfiles/README.md @@ -72,8 +76,8 @@ set $ws8 number 8 set $ws9 number 9 set $ws10 number 10 # Special workspaces names -set $ws11 "" -set $ws12 "" +set $ws11 number 11 +set $ws12 number 12 # Switch to workspace bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 @@ -107,8 +111,8 @@ bindsym $mod+Shift+period move container to workspace $ws12, exec $focus_ws $ws1 # 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 +bindsym $mod+m splith +bindsym $mod+n splitv # Switch the current container between different layout styles bindsym $mod+s layout stacking bindsym $mod+w layout tabbed @@ -158,9 +162,11 @@ $bindsym --locked XF86AudioLowerVolume exec $volume_down $bindsym --locked XF86AudioMute exec $volume_mute # modes -$bindsym $mod+r mode $mode_resize -$bindsym $mod+F12 mode $mode_shutdown -$bindsym $mod+F11 mode $mode_audio +bindsym $mod+r mode $mode_resize +bindsym $mod+F12 mode $mode_shutdown +bindsym $mod+F11 mode $mode_audio +bindsym $mod+Ctrl+k mode $mode_xkbmap +bindsym $mod+F10 mode $mode_launch ## Action // Scale up  ## bindsym $mod+equal exec $scale_up diff --git a/dot_config/sway/modes.conf b/dot_config/sway/modes.conf index fdb6b24..52822e5 100644 --- a/dot_config/sway/modes.conf +++ b/dot_config/sway/modes.conf @@ -70,19 +70,64 @@ mode --pango_markup $mode_shutdown { set $mode_audio "Audio    - + 0 y" mode $mode_audio { # Increase / decrease volume for the running sink only - bindsym k exec $volume_up + $bindsym k exec $volume_up # Decrease - bindsym j exec $volume_down + $bindsym j exec $volume_down # Mute sound - bindsym 0 exec $volume_mute + $bindsym 0 exec $volume_mute # Start mps-youtube - bindsym y exec --no-startup-id urxvt -e mpsyt, mode "default" + $bindsym y exec --no-startup-id urxvt -e mpsyt, mode "default" # Toggle pause/play - bindsym space exec playerctl play-pause + $bindsym space exec playerctl play-pause #bindsym XF86AudioPause exec playerctl pause #bindsym XF86AudioNext exec playerctl next #bindsym XF86AudioPrev exec playerctl previous # back to normal: Enter or Escape + $bindsym Return mode "default" + $bindsym Escape mode "default" +} + +#set $mode_keyboard "us-intl (a), us-altgr-intl (b)" +#mode $mode_keyboard { +# bindsym a exec swaymsg input type:keyboard xkb_variant intl +# bindsym b exec swaymsg input type:keyboard xkb_variant altgr-intl +# bindsym return mode "default" +# bindsym escape mode "default" +#} +# +# do a nice menu for keyboard layouts +# TODO convert to wayland, using dconf-editor perhaps? +set $mode_keys "keys" +mode $mode_keys { + bindsym Return mode "default" + bindsym Escape mode "default" +} + +# do a nice menu for keyboard layouts +# TODO convert to wayland, using dconf-editor perhaps? +set $mode_xkbmap "Layout aus bus-intl cus-altgr dgb egb-intl fdvorak" +mode $mode_xkbmap { + bindsym a exec --no-startup-id setxkbmap us, mode "default" + bindsym b exec --no-startup-id setxkbmap us intl, mode "default" + bindsym c exec --no-startup-id setxkbmap us altgr-intl, mode "default" + bindsym d exec --no-startup-id setxkbmap gb, mode "default" + bindsym e exec --no-startup-id setxkbmap gb intl, mode "default" + bindsym f exec --no-startup-id setxkbmap dvorak, mode "default" + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +# do a nice menu for custom exec launches +set $mode_launch " adefault start-up bnoise-fix cdual dhorizontal etearing" +mode $mode_launch { + # These are all the default programs launching at startup. + bindsym a exec thunderbird, exec signal-desktop, exec ferdi, exec obsidian mode "default", exec teams --no-sandbox, exec slack + # execute default horizontal layout of monitors + bindsym d exec autorandr horizontal, mode "default" + # this fixes tearing on nvidia + bindsym e exec nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }" + # back to normal: Enter or Escape bindsym Return mode "default" bindsym Escape mode "default" } diff --git a/dot_config/waybar/config b/dot_config/waybar/config index d3ca4ed..d27d462 100644 --- a/dot_config/waybar/config +++ b/dot_config/waybar/config @@ -98,8 +98,9 @@ "spacing": 10 }, "cpu": { - "format": "{usage}%  {icon}", - "format-icons": ["󱟒", "󱟓", "󱟕"], + //"format": "{usage}%  {icon}", + "format": "{usage}% {icon}", + "format-icons": ["", "", ""], "tooltip": true }, "memory": { @@ -156,15 +157,15 @@ "pulseaudio": { // "scroll-step": 1, // %, can be a float "format": "{volume}% {icon} {format_source}", - "format-bluetooth": "{volume}% {icon} {format_source}", - "format-bluetooth-muted": " {icon} {format_source}", - "format-muted": " {format_source}", + "format-bluetooth": "{volume}% {icon}  {format_source}", + "format-bluetooth-muted": "󰗿 {icon}  {format_source}", + "format-muted": " {format_source}", "format-source": "{volume}% ", "format-source-muted": "", "format-icons": { "headphone": "", - "hands-free": "", - "headset": "", + "hands-free": "󰙌", + "headset": "󰋎", "phone": "", "portable": "", "car": "",