From 37c88e94e17e69dfc03f215a317856c67be205e1 Mon Sep 17 00:00:00 2001 From: Tobias Maier Date: Sun, 16 Oct 2022 00:21:48 +0200 Subject: [PATCH] Added zsh install script --- awesome/rc.lua | 22 +++++++++++++++++++--- install_dotfiles.sh | 0 install_zsh.sh | 3 +++ 3 files changed, 22 insertions(+), 3 deletions(-) mode change 100644 => 100755 install_dotfiles.sh create mode 100644 install_zsh.sh diff --git a/awesome/rc.lua b/awesome/rc.lua index cac8e83..3ee533e 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -19,10 +19,22 @@ local hotkeys_popup = require("awful.hotkeys_popup") -- when client with a matching name is opened: require("awful.hotkeys_popup.keys") +-- Autostart from xdg/autostart dir +local xresources_name = "awesome.started" +local xresources = awful.util.pread("xrdb -query") +if not xresources:match(xresources_name) then + awful.util.spawn_with_shell("xrdb -merge <<< " .. "'" .. xresources_name .. ":true'") + -- Execute once for X server + os.execute("dex --environment Awesome --autostart --search-paths /etc/xdg/autostart") +end + + + + awful.util.spawn("picom --daemon") -awful.util.spawn("xrandr --output DP-2 --output HDMI-0 --left-of DP-2") -awful.util.spawn("xinput --set-prop 14 'libinput Accel Speed' -0.2") -awful.util.spawn("xinput --set-prop 14 'libinput Accel Profile Enabled' 0, 1") +awful.util.spawn("xrandr --output DP-4 --output HDMI-0 --left-of DP-4") +awful.util.spawn("xinput --set-prop 18 'libinput Accel Speed' -0.2") +awful.util.spawn("xinput --set-prop 18 'libinput Accel Profile Enabled' 0, 1") -- {{{ Error handling -- Check if awesome encountered an error during startup and fell back to -- another config (This code will only ever execute for the fallback config) @@ -235,6 +247,10 @@ root.buttons(gears.table.join( -- {{{ Key bindings globalkeys = gears.table.join( + + awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%") end), + awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%") end), + awful.key({ }, "XF86AudioMute", function () awful.util.spawn("pactl set-sink-volume @DEFAULT_SINK@ -10%") end), awful.key({ modkey, }, "s", hotkeys_popup.show_help, {description="show help", group="awesome"}), awful.key({ modkey, }, "Left", awful.tag.viewprev, diff --git a/install_dotfiles.sh b/install_dotfiles.sh old mode 100644 new mode 100755 diff --git a/install_zsh.sh b/install_zsh.sh new file mode 100644 index 0000000..a2753be --- /dev/null +++ b/install_zsh.sh @@ -0,0 +1,3 @@ +git clone https://github.com/romkatv/powerlevel10k.git /home/tobi/.config/zsh_addons/powerlevel10k +git clone https://github.com/zsh-users/zsh-autosuggestions.git /home/tobi/.config/zsh_addons/zsh-autosuggestions +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git /home/tobi/.config/zsh_addons/zsh-syntax-highlighting