diff --git a/networkmanager-dmenu/config.ini b/networkmanager-dmenu/config.ini index be38375..6022ac0 100644 --- a/networkmanager-dmenu/config.ini +++ b/networkmanager-dmenu/config.ini @@ -19,7 +19,7 @@ list_saved = True # obscure_color = #222222 [editor] -terminal = alacritty +terminal = wezterm gui_if_available = True [nmdm] diff --git a/networkmanager-dmenu/config_wofi.ini b/networkmanager-dmenu/config_wofi.ini new file mode 100644 index 0000000..891e0f3 --- /dev/null +++ b/networkmanager-dmenu/config_wofi.ini @@ -0,0 +1,27 @@ +[dmenu] +dmenu_command = wofi --dmenu -i +# # Note that dmenu_command can contain arguments as well like: +# # `dmenu_command = rofi -dmenu -i -theme nmdm` +# # `dmenu_command = rofi -dmenu -width 30 -i` +# # `dmenu_command = dmenu -i -l 25 -b -nb #909090 -nf #303030` +rofi_highlight = True +# compact = # (Default: False). Remove extra spacing from display +# pinentry = # (Default: None) e.g. `pinentry-gtk` +# wifi_chars = +wifi_chars = ▂▄▆█ +list_saved = True + +[dmenu_passphrase] +# # Uses the -password flag for Rofi, -x for bemenu. For dmenu, sets -nb and +# # -nf to the same color or uses -P if the dmenu password patch is applied +# # https://tools.suckless.org/dmenu/patches/password/ +# obscure = True +# obscure_color = #222222 + +[editor] +terminal = wezterm +gui_if_available = True + +[nmdm] +# rescan_delay = # (seconds to wait after a wifi rescan before redisplaying the results) + diff --git a/scripts/sway_configure_display.sh b/scripts/sway_configure_display.sh new file mode 100755 index 0000000..12b04ad --- /dev/null +++ b/scripts/sway_configure_display.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +TARGET_OUTPUT=$(swaymsg -t get_outputs | jq -r '.[].name' | wofi --dmenu -p "Target display ..." -H "300") + +case $((echo 'Mode'; echo 'Power'; echo 'Cancel') | wofi --dmenu -p "Command" -H "300") in + "Mode") + echo "Currently not supported." + ;; + "Power") + case $((echo 'On'; echo 'Off') | wofi --dmenu -p "Display Power" -H "300") in + "On") + swaymsg -- output ${TARGET_OUTPUT} enable + ;; + "Off") + swaymsg -- output ${TARGET_OUTPUT} disable + ;; + *) + echo "Error: invalid command" + ;; + esac + ;; + "Cancel") + ;; + *) + echo "Error: invalid command" + ;; +esac + diff --git a/scripts/sway_move_ws.sh b/scripts/sway_move_ws.sh new file mode 100755 index 0000000..c842941 --- /dev/null +++ b/scripts/sway_move_ws.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +TARGET_OUTPUT=$(swaymsg -t get_outputs | jq -r '.[].name' | wofi --dmenu -p "Move to ..." -H "300") +swaymsg -t move workspace to ${TARGET_OUTPUT} + diff --git a/scripts/system_swayenv.sh b/scripts/system_swayenv.sh index e42deec..2fcc4a7 100755 --- a/scripts/system_swayenv.sh +++ b/scripts/system_swayenv.sh @@ -11,10 +11,11 @@ QT_SCALE_FACTOR=1 QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_QPA_PLATFORMTHEME=qt6ct QT_IM_MODULE=fcitx +GTK_IM_MODULE=fcitx #MOZ_ENABLE_WAYLAND=1 _JAVA_AWT_WM_NONREPARENTING=1 -export XDG_SESSION_TYPE XDG_CURRENT_DESKTOP XDG_CURRENT_SESSION DESKTOP_SESSION LIBSEAT_BACKEND QT_QPA_PLATFORM GDK_DPI_SCALE QT_SCALE_FACTOR QT_AUTO_SCREEN_SCALE_FACTOR QT_QPA_PLATFORMTHEME QT_IM_MODULE _JAVA_AWT_WM_NONREPARENTING; +export XDG_SESSION_TYPE XDG_CURRENT_DESKTOP XDG_CURRENT_SESSION DESKTOP_SESSION LIBSEAT_BACKEND QT_QPA_PLATFORM GDK_DPI_SCALE QT_SCALE_FACTOR QT_AUTO_SCREEN_SCALE_FACTOR QT_QPA_PLATFORMTHEME QT_IM_MODULE GTK_IM_MODULE _JAVA_AWT_WM_NONREPARENTING; systemd-cat --identifier=sway sway "$@" diff --git a/sway/keybinding.conf b/sway/keybinding.conf index 4a36f5f..6cf4aca 100644 --- a/sway/keybinding.conf +++ b/sway/keybinding.conf @@ -10,6 +10,12 @@ bindsym $mod+shift+slash exec playerctl --player playerctld position +10 # show history with clipboard manager & wofi bindsym $mod+v exec cliphist list | wofi -d -p clipboard | cliphist decode | wl-copy +# Networkmanager dmenu +bindsym $mod+n exec networkmanager_dmenu + +# Display Settings +bindsym $mod+Shift+o exec ~/.scripts/sway_configure_display.sh + ## Screenshot # [fullscreen, copy & save] bindsym $super+shift+a exec $grimshot --notify save output ~/Pictures/screenshot/$(date "+%Y%m%d-%H%M%S")'_grim_full.png' @@ -61,6 +67,12 @@ bindsym $mod+Shift+$down move down bindsym $mod+Shift+$up move up bindsym $mod+Shift+$right move right +# Move forcused workspace over display +bindsym $mod+Shift+a move workspace to left +bindsym $mod+Shift+s move workspace to down +bindsym $mod+Shift+w move workspace to up +bindsym $mod+Shift+d move workspace to right + # Switch to workspace bindsym $mod+1 workspace number 1 bindsym $mod+2 workspace number 2