XFCE4 to i3wm

Here you can exchange scripts that you created or have permission to share with other users.
Post Reply
Message
Author
User avatar
nickoct
Posts: 4
Joined: Sat Feb 10, 2018 9:21 pm

XFCE4 to i3wm

#1 Post by nickoct »

Hi I am new to the MX Forum but familiar with MX Linux. Since I first tried it I was already hooked on i3-wm (or i3-Gaps), so I tried installing i3. It worked perfectly and was a good Debian base from which to create my perfect setup. I found the MX-snapshot tool invaluable for backup purposes but the trouble was each time you change version it takes time to setup exactly where you left off. I wrote this script to be run within a live environment and the script ends when the MX-installer kicks in. Once you've finished tick autologin and save live desktop changes. Once it reboots you will be logged into your i3-gaps environment. To get the script from the live environment type git clone https://gitlab.com/nickoct/mx-i3.git and cd into mx-i3 then either chmod +x the script or bash MXi3-installer.sh. I would recommend checking the script before hand and changing it to your liking. I have specific software installed like ncmpcpp mpd i3-gaps and polybar to name a few. If anyone has any advice on how to improve this script please feel free to leave a comment below, thanks.

User avatar
JayM
Qualified MX Guide
Posts: 6793
Joined: Tue Jan 08, 2019 4:47 am

Re: XFCE4 to i3wm

#2 Post by JayM »

A person could also install the i3-wm package from MX Package installer, Stable repo tab, or the i3 metapackage that includes i3-wm plus a screen locker, menu and statusbar for that window manager.

Could you share a screenshot of your system? (If it's larger than 640x620you'll need to post either a direct link to the image or a BBcoded thumbnail link from an image hosting site to stay within the forum rule on image sizes in posts, though.)
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

User avatar
nickoct
Posts: 4
Joined: Sat Feb 10, 2018 9:21 pm

Re: XFCE4 to i3wm

#3 Post by nickoct »

Here is a screenshot of my current MX i3 configuration. The reason I created it was if I need to reinstall MXi3 I want to be able to just run the script and it would do the rest. That way I have an online record of my setup exactly as I like it. I compiled i3-gaps polybar and IceSSB from Pepprmint, plus installed ncmpcpp mpd mpv ranger tmux I have an i3blocks configuration i3status configuration and a conky piped through the statusbar I am a carer I care for my wife and brother in law and two brothers that have no computer knowledge so if I write a script it is always available ready to run whenever I need it and then I can get on with more important stuff like my wifes medication hospital appointments etc. The MX-Snapshot tool works ok as a backup solution until you get a new version of MX come out. The Script helps you quickly get back to where you were before you do a Snapshot. If anyone else likes i3 your welcome to use the script.
You do not have the required permissions to view the files attached to this post.
Last edited by nickoct on Wed Jan 22, 2020 5:47 pm, edited 1 time in total.

User avatar
KoO
Posts: 491
Joined: Fri Feb 10, 2017 1:21 am

Re: XFCE4 to i3wm

#4 Post by KoO »

Nice work with your script. I will be give it ago myself but will need to edit as we use difference programs.

Just one thing you don't need install i3wm from the repo then install i3-gaps all you need is i3-gaps, it installs i3 as well. I use libreoffice for work I would not remove this myself. And I also do not use polybar, I use conkybar instead. And so on..

I'm glad to see you use mpd ncmpcpp. I have change the way I run mpd, now run it from .config and not as a server. But it is slower to load at startup.

You should try picom instead of compton but you need to removed compton first. https://github.com/yshui/picom download https://software.opensuse.org//download ... kage=picom it is also on the repo somewhere.

Have a look at this I like it myself.. https://pypi.org/project/i3-workspace-names-daemon/

Just over loaded with work at the moment contact change over chap.

Thanks Very Much I will be back..
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

User avatar
nickoct
Posts: 4
Joined: Sat Feb 10, 2018 9:21 pm

Re: XFCE4 to i3wm

#5 Post by nickoct »

Thanks for your advice KoO. I use compton because its always worked for me. I'll try picom in virtualbox and see what difference I see. As for i3-wm I started the script with i3 and gradually added to it as time went by. The script started on paper and recently moved to gitlab.com. I'm from the UK and we have several main channels BBC iplayer itv hub channel 4 and channel 5. If my wife misses one of her programs on those channels I setup IceSSB from Peppermint to open firefox on a key combination to the corresponding site. If you look on my Gitlab page you'll see most of the key combinations.

User avatar
nickoct
Posts: 4
Joined: Sat Feb 10, 2018 9:21 pm

Re: XFCE4 to i3wm

#6 Post by nickoct »

I was looking at my screenshot and just realized I never mentioned I have two screens a 19 inch monitor and a 42 inch tv. So the screenshot you see is both monitors.

User avatar
KoO
Posts: 491
Joined: Fri Feb 10, 2017 1:21 am

Re: XFCE4 to i3wm

#7 Post by KoO »

@nickoct

I don't know if you use fuzzy finder as I only use bash this is must install.
https://github.com/junegunn/fzf easy install and I answer yes to all. After install make sure you refresh bash or what ever one users. source ~/.bashrc or . ~/.bashrc both work.

Code: Select all

 git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
This is my .config which I edit on a regular bases.

Code: Select all

 #  +-+-+-+ +-+-+-+-+
#  |K|o|O| |R|i|c|e|
#  +-+-+-+ +-+-+-+-+


# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#

# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!

#default mod key | Mod4 = windows | Mod1 = alt key
set $mod Mod4

# gap size for i3-gaps
gaps inner 8
gaps outer 7

# workspace border size
for_window [class="^.*"] border pixel 1
client.focused #555555 #555555 #ffffff #2e9ef4     #CC0000

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {}N block below.
font pango:NotoSans-Regular 9
# font pango: Literation mono Powerline, awesome 8.5

# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Before i3 v4.8, we used t[MaOo recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.
# Make Polkit authentication dialogs work
exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# toggle tiling / floating
focus_on_window_activation smart     # smart|urgent|focus|none
popup_during_fullscreen smart      # smart|ignore|leave_fullscreen
show_marks yes # yes|no

bindsym $mod+Shift+space floating toggle

for_window [window_role="pop-up"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable

for_window [window_type="dialog"] floating enable
for_window [window_type="menu"] floating enable


for_window [instance="st"] floating enable 
for_window [instance="yad"] floating enable
for_window [title="galculator"] floating enable
for_window [title="MX Tools"] floating enable

#for_window [instance="desktop-session-exit"] floating enable  #  Only for antiX
#for_window [title="antiX Wallpaper"] floating enable # Ditto
#for_window [title="antiX Control Centre"] floating enable # Ditto

# My AutoStarts

exec --no-startup-id dunst &
exec --no-startup-id bash ~/.scripts/mpd-notify.sh
exec --no-startup-id mpd 
exec --no-startup-id nitrogen --restore
exec --no-startup-id picom --config ~/.config/picom/picom.conf 
exec_always --no-startup-id exec i3-workspace-names-daemon

# My Binds
bindsym $mod+Return exec --no-startup-id rxvt
bindsym $mod+Shift+Return exec --no-startup-id st   # I use st instead of a scratchpad.
bindsym $mod+c exec --no-startup-id rxvt -e calcurse
bindsym $mod+r exec --no-startup-id rxvt -e ranger
bindsym $mod+n exec --no-startup-id rxvt -e ncmpcpp
bindsym $mod+z exec --no-startup-id ~/.scripts/i3lock-fancy
bindsym $mod+t exec --no-startup-id thunar 
bindsym $mod+g exec --no-startup-id geany
bindsym $mod+i exec --no-startup-id ~/waterfox-classic/waterfox
bindsym $mod+p exec --no-startup-id ~/.cheeet/./cheatsheet.sh sgl
bindsym $mod+shift+t exec --no-startup-id  tixati
bindsym $mod+q exec --no-startup-id qutebrowser
bindsym $mod+x exec --no-startup-id mx-tools
bindsym $mod+v exec --no-startup-id rxvt -e vim
bindsym $mod+Shift+i exec --no-startup-id ~/.scripts/.i3-get-window-criteria

#bindsym $mod+b exec --no-startup-id  ~/.scripts/dunstesting


# Assign Workspaces:
assign [class="Waterfox"] workspace number $ws1 
assign [title="ncmpcpp"] workspace number $ws2 
assign [instance="geany"] workspace number $ws3
assign [instance="thunar"] workspace number $ws3
assign [instance="vlc"] workspace number $ws8
assign [title="mpsyt"] workspace number $ws8
assign [class="qutebrowser"] workspace number $ws9 
assign [instance="tixati"] workspace number $ws10
 
# kill focused window
bindsym $mod+Shift+c kill

# start rofi & dmenu (program launcher)
bindsym $mod+d exec --no-startup-id rofi window -show combi
## bindsym $mod+d exec --no-startup-id dmenu_run 


# Resizing by 10 My Bind >>>>
bindsym $mod+Ctrl+Right resize shrink width 5 px or 5 ppt
bindsym $mod+Ctrl+Up resize grow height 5 px or 5 ppt
bindsym $mod+Ctrl+Down resize shrink height 5 px or 5 ppt
bindsym $mod+Ctrl+Left resize grow width 5 px or 5 ppt


# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+semicolon focus right

# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window ( I DONT USE prefer arrows keys ) 
#bindsym $mod+Shift+h move left
#bindsym $mod+Shift+j move down
#bindsym $mod+Shift+k move up
#bindsym $mod+Shift+l move right

# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# split in horizontal orientation
bindsym $mod+Shift+h split h exec --no-startup-id notify-send 'tile horizontally'

# split in vertical orientation
bindsym $mod+Shift+v split v exec --no-startup-id notify-send 'tile vertically'

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split) ( I DONT USE only like spilt mode ) 
#bindsym $mod+s layout stacking
#bindsym $mod+w layout tabbed
#bindsym $mod+e layout toggle split



# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

# focus the parent container
bindsym $mod+a focus parent

# focus the child container
#bindsym $mod+d focus child



# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 " 1 "
set $ws2 " 2 "
set $ws3 " 3 "
set $ws4 " 4 "
set $ws5 " 5 "
set $ws6 " 6 "
set $ws7 " 7 "
set $ws8 " 8 "
set $ws9 " 9 "
set $ws10 " 10 "

# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10


# reload the configuration file
bindsym $mod+Shift+p reload

# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart

# logout i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"   # This is for logout

# desktop session exit menu 
bindsym $mod+shift+x exec --no-startup-id ~/.scripts/logout.sh  # Use this for shutdown or reboot

# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym j resize shrink width 10 px or 10 ppt
        bindsym k resize grow height 10 px or 10 ppt
        bindsym l resize shrink height 10 px or 10 ppt
        bindsym semicolon resize grow width 10 px or 10 ppt

        # same bindings, but for the arrow keys
        bindsym Left resize shrink width 10 px or 10 ppt
        bindsym Down resize grow height 10 px or 10 ppt
        bindsym Up resize shrink height 10 px or 10 ppt
        bindsym Right resize grow width 10 px or 10 ppt

        # back to normal: Enter or Escape or $mod+r
        bindsym Return mode "default"
        bindsym Escape mode "default"
        bindsym $mod+r mode "default"
}

# Conkybar
bar {
     status_command ~/.config/i3/conkybar.sh
     i3bar_command i3bar  --transparency
     height 30
     workspace_buttons yes
     font pango:Noto Sans 10
     position top
     tray_output none
     strip_workspace_numbers no
     binding_mode_indicator yes

colors {
    statusline    #FF0000
    background    #00000000
    separator     #FF0000
#                                  BORDER        B/G           TEXT
    focused_workspace   #000000     #000000     #80FF00
    inactive_workspace  #000000     #000000     #00FFFF
    active_workspace    #000000     #000000    #FFFF00
    urgent_workspace   #b71c1c     #b71c1c    #000000
    binding_mode         #b71c1c     #b71c1c    #000000
  }
} 
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

Post Reply

Return to “Scripts”