From a066c28b67c7bc3d7fccef5c3c3f2ac880bbaa64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Wed, 3 Aug 2022 12:51:26 +0200 Subject: [PATCH] Remove master +- in awesome --- .Xmodmap | 3 ++ awesome/keys.lua | 72 ++++------------------------------------- rofi/show-calculator.sh | 3 +- 3 files changed, 11 insertions(+), 67 deletions(-) diff --git a/.Xmodmap b/.Xmodmap index fe1a846..d99b18e 100644 --- a/.Xmodmap +++ b/.Xmodmap @@ -1 +1,4 @@ +keycode 94 = grave asciitilde dead_grave dead_tilde grave asciitilde +keycode 49 = less greater less greater bar brokenbar bar brokenbar +keycode 49 = Shift_L keycode 108 = Multi_key diff --git a/awesome/keys.lua b/awesome/keys.lua index c68d89c..4cb3f30 100644 --- a/awesome/keys.lua +++ b/awesome/keys.lua @@ -20,7 +20,6 @@ local dpi = beautiful.xresources.apply_dpi local modkey = "Mod4" -local altkey = "Shift" -- define module table local keys = {} @@ -281,6 +280,13 @@ keys.globalkeys = gears.table.join( {description = "toggle exit screen", group = "hotkeys"} ), + awful.key({}, "XF86Calculator", + function() + awful.util.spawn("rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | xsel -i\"") + end, + {description = "Launch the calculator", group = "hotkeys"} + ), + -- ========================================= -- CLIENT FOCUSING -- ========================================= @@ -415,62 +421,6 @@ keys.globalkeys = gears.table.join( end ), - -- ========================================= - -- NUMBER OF MASTER / COLUMN CLIENTS - -- ========================================= - - -- Number of master clients - awful.key({modkey, altkey}, "h", - function() - awful.tag.incnmaster( 1, nil, true) - end, - {description = "increase the number of master clients", group = "layout"} - ), - awful.key({ modkey, altkey }, "l", - function() - awful.tag.incnmaster(-1, nil, true) - end, - {description = "decrease the number of master clients", group = "layout"} - ), - awful.key({ modkey, altkey }, "Left", - function() - awful.tag.incnmaster( 1, nil, true) - end, - {description = "increase the number of master clients", group = "layout"} - ), - awful.key({ modkey, altkey }, "Right", - function() - awful.tag.incnmaster(-1, nil, true) - end, - {description = "decrease the number of master clients", group = "layout"} - ), - - -- Number of columns - awful.key({modkey, altkey}, "k", - function() - awful.tag.incncol(1, nil, true) - end, - {description = "increase the number of columns", group = "layout"} - ), - awful.key({modkey, altkey}, "j", - function() - awful.tag.incncol(-1, nil, true) - end, - {description = "decrease the number of columns", group = "layout"} - ), - awful.key({modkey, altkey}, "Up", - function() - awful.tag.incncol(1, nil, true) - end, - {description = "increase the number of columns", group = "layout"} - ), - awful.key({modkey, altkey}, "Down", - function() - awful.tag.incncol(-1, nil, true) - end, - {description = "decrease the number of columns", group = "layout"} - ), - -- ========================================= -- GAP CONTROL -- ========================================= @@ -575,14 +525,6 @@ keys.clientkeys = gears.table.join( end ), - -- toggle fullscreen - -- awful.key({modkey}, "f", - -- function(c) - -- c.fullscreen = not c.fullscreen - -- end, - -- {description = "toggle fullscreen", group = "client"} - -- ), - -- close client awful.key({modkey}, "q", function(c) diff --git a/rofi/show-calculator.sh b/rofi/show-calculator.sh index 7c74891..3704cbb 100755 --- a/rofi/show-calculator.sh +++ b/rofi/show-calculator.sh @@ -6,6 +6,5 @@ if [[ -z "$1" ]]; then else killall rofi # so rofi doesn't complain "can't launch rofi inside rofi" - # rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | xclip -selection clipboard" - rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | xclip -selection clipboard" + rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | xsel -i" fi